$Log$
+ Revision 590.109 2002/02/12 20:15:25 ajc
+ * Threw in a few more #ifdef's so the client build doesn't barf on
+ non-curses systems
+ * Added rc_prompt_control (<N>ext/<S>top active at paginator: on/off/user)
+
Revision 590.108 2002/02/11 15:52:10 ajc
* Don't crash when deleting "purge this vCard" messages
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
signal(SIGCONT, catch_sigcont); /* Catch SIGCONT so we can reset terminal */
arg_encrypt = RC_DEFAULT;
+#ifdef HAVE_CURSES_H
arg_screen = RC_DEFAULT;
+#endif
/*
* Handle command line options as if we were called like /bin/login
argc = shift(argc, argv, a, 1);
}
if (!strcmp(argv[a], "-s")) {
+#ifdef HAVE_CURSES_H
arg_screen = RC_NO;
+#endif
argc = shift(argc, argv, a, 1);
}
if (!strcmp(argv[a], "-S")) {
+#ifdef HAVE_CURSES_H
arg_screen = RC_YES;
+#endif
argc = shift(argc, argv, a, 1);
}
if (!strcmp(argv[a], "-p")) {
#
# The standard client looks for this file in:
# 1. $HOME/.citadelrc
-# 2. /usr/local/lib/citadel.rc
-# 3. <compiled BBSDIR>/citadel.rc
+# 2. <compiled BBSDIR>/citadel.rc
+# 3. /etc/citadel.rc
# 4. <current directory>/citadel.rc
# Set ENCRYPT to yes to force SSL/TLS encryption when connecting to a
# systems on the same machine as the client.
encrypt=default
-# Set FULLSCREN to yes to (attempt to) use full-screen curses mode.
+# Set FULLSCREEN to yes to (attempt to) use full-screen curses mode.
# This mode presents a status line and a few other niceties. Some
# people might not like this, so you can turn it off here or with the
# -s command line option. The default is to use full screen if the
#
ansi_color=user
+# PROMPT_CONTROL should be set to on/off/user to control whether the <N>ext
+# and <S>top keys are active when displaying the paginator prompt. If it
+# is set to "user" then it's a user-configurable option.
+#
+prompt_control=user
+
# If DISPLAY_MESSAGE_NUMBERS is set to 1, then messages will be displayed
# with their message numbers in the header. This is ugly but some
# people seem to like it anyway...
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];
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 */
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");
}
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]);
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]);
#define US_EXPERT 32 /* Experienced user */
#define US_UNLISTED 64 /* Unlisted userlog entry */
#define US_NOPROMPT 128 /* Don't prompt after each message */
+#define US_PROMPTCTL 256 /* <N>ext & <S>top work at prompt */
#define US_DISAPPEAR 512 /* Use "disappearing msg prompts" */
#define US_REGIS 1024 /* Registered user */
#define US_PAGINATOR 2048 /* Pause after each screen of text */
#define US_COLOR 16384 /* User wants ANSI color support */
#define US_USER_SET (US_LASTOLD | US_EXPERT | US_UNLISTED | \
US_NOPROMPT | US_DISAPPEAR | US_PAGINATOR | \
- US_FLOORS | US_COLOR )
+ US_FLOORS | US_COLOR | US_PROMPTCTL )
void serv_puts(char *buf);
void serv_gets(char *buf);
extern struct CtdlServInfo serv_info;
extern char rc_floor_mode;
extern int rc_ansi_color;
+extern int rc_prompt_control;
void back(int spaces) /* Destructive backspace */
{
scr_putc(' ');
scr_putc(13);
sttybbs(1);
- if (b == 'q' || b == 'Q' || b == 's' || b == 'S')
- b = STOP_KEY;
- if (b == 'n' || b == 'N')
- b = NEXT_KEY;
+ if ( (rc_prompt_control == 1)
+ || ((rc_prompt_control == 3) && (userflags & US_PROMPTCTL)) ) {
+ if (b == 'q' || b == 'Q' || b == 's' || b == 'S')
+ b = STOP_KEY;
+ if (b == 'n' || b == 'N')
+ b = NEXT_KEY;
+ }
if (b==NEXT_KEY) sigcaught = SIGINT;
if (b==STOP_KEY) sigcaught = SIGQUIT;
}
flags = set_attr(flags,"Use 'disappearing' prompts",US_DISAPPEAR);
flags = set_attr(flags,
"Pause after each screenful of text",US_PAGINATOR);
+ if ( (rc_prompt_control == 3) && (flags & US_PAGINATOR) ) {
+ flags = set_attr(flags,
+ "<N>ext and <S>top work at paginator prompt", US_PROMPTCTL);
+ }
if (rc_floor_mode == RC_DEFAULT) {
flags = set_attr(flags,
"View rooms by floor",US_FLOORS);