]> code.citadel.org Git - citadel.git/blobdiff - citadel/commands.c
centralized filename calculation
[citadel.git] / citadel / commands.c
index 892258f62eeca28233fed73c07de4f318e95a189..d81f41ca7039a98a8610643c4085f25f6b619d5e 100644 (file)
@@ -53,6 +53,7 @@
 #include "tools.h"
 #include "rooms.h"
 #include "client_chat.h"
+#include "citadel_dirs.c"
 #ifndef HAVE_SNPRINTF
 #include "snprintf.h"
 #endif
@@ -749,7 +750,6 @@ 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
@@ -764,12 +764,10 @@ void load_command_set(void)
 
        ccfile = NULL;
        if (getenv("HOME") != NULL) {
-               snprintf(buf, sizeof buf, "%s/.citadelrc", getenv("HOME"));
-               ccfile = fopen(buf, "r");
+               ccfile = fopen(file_citadel_rc, "r");
        }
        if (ccfile == NULL) {
-               snprintf(buf, sizeof buf, "%s/citadel.rc", BBSDIR);
-               ccfile = fopen(buf, "r");
+               ccfile = fopen(file_citadel_rc, "r");
        }
        if (ccfile == NULL) {
                ccfile = fopen("/etc/citadel.rc", "r");
@@ -899,14 +897,7 @@ 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]);
 
@@ -1215,13 +1206,13 @@ int getcmd(CtdlIPC *ipc, char *argbuf)
 /*
  * set tty modes.  commands are:
  * 
- * 01- set to bbs mode
+ * 01- set to Citadel mode
  * 2 - save current settings for later restoral
  * 3 - restore saved settings
  */
 #ifdef HAVE_TERMIOS_H
-void sttybbs(int cmd)
-{                              /* SysV version of sttybbs() */
+void stty_ctdl(int cmd)
+{                              /* SysV version of stty_ctdl() */
        struct termios live;
        static struct termios saved_settings;
        static int last_cmd = 0;
@@ -1264,8 +1255,8 @@ void sttybbs(int cmd)
 
 }
 #else
-void sttybbs(int cmd)
-{                              /* BSD version of sttybbs() */
+void stty_ctdl(int cmd)
+{                              /* BSD version of stty_ctdl() */
        struct sgttyb live;
        static struct sgttyb saved_settings;
        static int last_cmd = 0;