]> code.citadel.org Git - citadel.git/blobdiff - citadel/commands.c
centralized filename calculation
[citadel.git] / citadel / commands.c
index 4fd1d39508b53282f272cfbf766a9c008e4e1cc0..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,18 +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, 
-#ifndef HAVE_ETC_DIR
-                                CTDLDIR
-#else
-                                ETC_DIR
-#endif
-                                "/citadel.rc");
-               ccfile = fopen(buf, "r");
+               ccfile = fopen(file_citadel_rc, "r");
        }
        if (ccfile == NULL) {
                ccfile = fopen("/etc/citadel.rc", "r");
@@ -905,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]);