* Replaced the DEFAULT_ENTRY definition in sysconfig.h with a new option
authorArt Cancro <ajc@citadel.org>
Fri, 17 Oct 2003 02:18:40 +0000 (02:18 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 17 Oct 2003 02:18:40 +0000 (02:18 +0000)
  "reply_with_external_editor" in citadel.rc.

citadel/ChangeLog
citadel/citadel.rc
citadel/citadel_decls.h
citadel/commands.c
citadel/messages.c
citadel/sysconfig.h

index a946acb7c03342260e23d760c9f8e8ca6272ca60..d2a08b44cdb28ee8378cc4caee0046bb9b9017c2 100644 (file)
@@ -1,4 +1,8 @@
  $Log$
+ Revision 610.22  2003/10/17 02:18:40  ajc
+ * Replaced the DEFAULT_ENTRY definition in sysconfig.h with a new option
+   "reply_with_external_editor" in citadel.rc.
+
  Revision 610.21  2003/10/14 03:09:47  ajc
  * routines2.c: fixed an off-by-one error in filename sanitization for
    client file uploads
@@ -5048,4 +5052,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 510c97fe3edddc2878aa4f667ea3316444b9a47f..f768b2970112704023e9533c2e109503031f6839 100644 (file)
@@ -162,6 +162,13 @@ remember_passwords=0
 alternate_semantics=no
 
 
+# When the user hits the <R>eply key after reading a message, reply_with_editor
+# selects whether it uses the built-in editor (select 'no') or an external
+# editor (select 'yes').
+#
+reply_with_external_editor=no
+
+
 # COMMAND SET CONFIGURATION
 #
 # All lines starting with "cmd=" are considered to be commands.  This allows
index 4c56ba65c3593a38e6c4189d747767287b717c77..ee3a658cd758c78da77f058611ded0df8bfbf245 100644 (file)
@@ -23,6 +23,7 @@ extern char rc_screen;
 extern char arg_screen;
 #endif
 extern char rc_alt_semantics;
+extern char rc_reply_extedit;
 extern char express_msgs;
 void logoff(CtdlIPC *ipc, int code);
 void formout(CtdlIPC *ipc, char *name);
index 55ac0045469a3656dfdc00534c92eee12eb11ef3..a057577f782b251341704d71a7284f8ef22dfe83 100644 (file)
@@ -747,6 +747,7 @@ void load_command_set(void)
        rc_force_mail_prompts = 0;
        rc_ansi_color = 0;
        rc_color_use_bg = 0;
+       rc_reply_extedit = 0;
        strcpy(rc_url_cmd, "");
        strcpy(rc_gotmail_cmd, "");
 #ifdef HAVE_OPENSSL
@@ -893,6 +894,14 @@ void load_command_set(void)
                                rc_alt_semantics = 0;
                        }
                }
+               if (!strncasecmp(buf, "reply_with_external_editor=", 27)) {
+                       if (!strncasecmp(&buf[27], "yes", 3)) {
+                               rc_reply_extedit = 1;
+                       }
+                       else {
+                               rc_reply_extedit = 0;
+                       }
+               }
                if (!strncasecmp(buf, "cmd=", 4)) {
                        strcpy(buf, &buf[4]);
 
index 50ca0ccb5c2bd0244d74d9cde21656fb54ff56ed..24b051464c9802cee62ff94a425544d4840d7df8 100644 (file)
@@ -65,6 +65,7 @@ unsigned long *msg_arr = NULL;
 int msg_arr_size = 0;
 int num_msgs;
 char rc_alt_semantics;
+char rc_reply_extedit;
 extern char room_name[];
 extern unsigned room_flags;
 extern long highest_msg_read;
@@ -1619,7 +1620,7 @@ RMSGREAD: scr_flush();
                        goto RMSGREAD;
                case 'r':
                        savedpos = num_msgs;
-                       entmsg(ipc, 1, (DEFAULT_ENTRY == 46 ? 2 : 0));
+                       entmsg(ipc, 1, (rc_reply_extedit ? 2 : 0));
                        num_msgs = savedpos;
                        goto RMSGREAD;
                case 'u':
index 9f683c68b8007229c44758694b23aae47d201274..39ea373fe5d76880a13e5662c80678c86949e0a9 100644 (file)
  */
 #define S_KEEPALIVE    30
 
-/*
- * This is the command that gets executed when a user hits <E>nter message:
- * presses the <E>nter message key.  The possible values are:
- *   4  - .<E>nter <M>essage
- *   46 - .<E>nter message with <E>ditor
- *   36 - .<E>nter message with <A>scii
- * Normally, this value will be set to 4, to cause the <E>nter message
- * command to run Citadel's built-in editor.  However, if you have an external
- * editor installed, and you want to make it the default, set this to 46
- * to make it use your editor by default.
- */
-#define DEFAULT_ENTRY          4
-
-
 /*
  * Logging level to use if none is specified on the command line.
  */