]> code.citadel.org Git - citadel.git/blobdiff - citadel/commands.c
* Threw in a few more #ifdef's so the client build doesn't barf on
[citadel.git] / citadel / commands.c
index 2f39edde726fe2568b91488d9fd4ea8ebfd95cb5..4ea818cead701ce3766f91c439ea93266086e5d6 100644 (file)
@@ -75,6 +75,7 @@ int rc_force_mail_prompts;
 int rc_remember_passwords;
 int rc_ansi_color;
 int num_urls = 0;
+int rc_prompt_control = 0;
 char urls[MAXURLS][SIZ];
 char rc_url_cmd[SIZ];
 
@@ -688,7 +689,9 @@ void load_command_set(void)
        rc_ansi_color = 0;
        strcpy(rc_url_cmd, "");
        rc_encrypt = RC_DEFAULT;
+#ifdef HAVE_CURSES_H
        rc_screen = RC_DEFAULT;
+#endif
        rc_alt_semantics = 0;
 
        /* now try to open the citadel.rc file */
@@ -698,13 +701,13 @@ void load_command_set(void)
                snprintf(buf, sizeof buf, "%s/.citadelrc", getenv("HOME"));
                ccfile = fopen(buf, "r");
        }
-       if (ccfile == NULL) {
-               ccfile = fopen("/usr/local/lib/citadel.rc", "r");
-       }
        if (ccfile == NULL) {
                snprintf(buf, sizeof buf, "%s/citadel.rc", BBSDIR);
                ccfile = fopen(buf, "r");
        }
+       if (ccfile == NULL) {
+               ccfile = fopen("/etc/citadel.rc", "r");
+       }
        if (ccfile == NULL) {
                ccfile = fopen("./citadel.rc", "r");
        }
@@ -725,12 +728,14 @@ void load_command_set(void)
                                rc_encrypt = RC_DEFAULT;
                }
 
+#ifdef HAVE_CURSES_H
                if (!strncasecmp(buf, "fullscreen=", 11)) {
                        if (!strcasecmp(&buf[11], "yes"))
                                rc_screen = RC_YES;
                        else if (!strcasecmp(&buf[11], "no"))
                                rc_screen = RC_NO;
                }
+#endif
 
                if (!strncasecmp(buf, "editor=", 7))
                        strcpy(editor_path, &buf[7]);
@@ -775,6 +780,12 @@ void load_command_set(void)
                        if (!strncasecmp(&buf[11], "user", 4))
                                rc_ansi_color = 3;      /* user config */
                }
+               if (!strncasecmp(buf, "prompt_control=", 15)) {
+                       if (!strncasecmp(&buf[15], "on", 2))
+                               rc_prompt_control = 1;
+                       if (!strncasecmp(&buf[15], "user", 4))
+                               rc_prompt_control = 3;  /* user config */
+               }
                if (!strncasecmp(buf, "username=", 9))
                        strcpy(rc_username, &buf[9]);