$Log$
+ Revision 590.64 2002/01/15 12:41:53 error
+ * Implement alternate_semantics (see comments in citadel.rc file)
+
Revision 590.63 2002/01/15 11:07:51 ajc
* vcard.c: updated vCard "object methods" to handle multiple instances of
the same key name when necessary.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
get_serv_info(telnet_client_host);
- if (!starttls()) {
- printf("Session will not be encrypted.\n");
- }
-
look_for_ansi();
cls(0);
color(7);
+ if (!starttls()) {
+ printf("Session will not be encrypted.\n");
+ }
+
printf("%-24s\n%s\n%s\n", serv_info.serv_software, serv_info.serv_humannode,
- serv_info.serv_bbs_city);
+ serv_info.serv_bbs_city);
+
screenwidth = 80; /* default screen dimensions */
screenheight = 24;
-
+
printf(" pause next stop\n");
printf(" ctrl-s ctrl-o ctrl-c\n\n");
formout("hello"); /* print the opening greeting */
gotonext();
break;
case 47:
- updatelsa();
+ if (!rc_alt_semantics)
+ updatelsa();
gotonext();
break;
+ case 90:
+ if (!rc_alt_semantics)
+ updatelsa();
+ dotgoto(argbuf, 0);
+ break;
case 58:
updatelsa();
dotgoto("_MAIL_", 1);
break;
case 20:
updatels();
+ dotgoto(argbuf, 0);
+ break;
case 52:
+ if (rc_alt_semantics)
+ updatelsa();
dotgoto(argbuf, 0);
break;
case 10:
validate();
break;
case 29:
- updatels();
+ if (!rc_alt_semantics)
+ updatels();
termn8 = 1;
break;
case 30:
- updatels();
+ if (!rc_alt_semantics)
+ updatels();
termn8 = 1;
break;
case 48:
break;
case 6:
+ if (rc_alt_semantics)
+ updatelsa();
gotonext();
break;
#urlcmd=netscape -remote "openURL(%s)"
+# MESSAGE READING SEMANTICS (experimental)
+#
+# A new set of message reading semantics is now available. If you set
+# alternate_semantics, the following changes are made:
+#
+# * Messages are marked as read when you read them, rather than when you
+# leave the room. This means read <N>ew will display a new message
+# at most once, unless last old on new is turned on.
+# * Reading <F>orward or <R>everse does not mark messages as read.
+# * When you leave a room with <G>oto, <J>ump, etc., only messages that
+# were in the room when you arrived are marked as read. The original
+# semantics mark all messages read that were in the room at the time
+# you leave the room. This occasionally causes messages to be "lost."
+# * When you leave with <T>erminate, no additional messages are marked
+# as read.
+# * The <S>kip and <A>bandon commands are reversed.
+#
+# This set of semantics should make Citadel easier to use on very busy
+# systems, where many messages may be posted while reading. Users
+# accustomed to D.O.C. or its variants will want to set this option.
+#
+alternate_semantics=no
+
+
# COMMAND SET CONFIGURATION
#
# All lines starting with "cmd=" are considered to be commands. This allows
cmd=16,0,&Ungoto
cmd=17,0,&Who is online
cmd=47,0,&Abandon ^r^c goto...
+#cmd=90,0,&Abandon ^r^c goto:
cmd=50,0,toggle e&Xpert mode
cmd=49,0,read &Info file
cmd=18,2,&! <shell>
extern char rc_floor_mode;
extern char rc_encrypt; /* from the citadel.rc file */
extern char arg_encrypt; /* from the command line */
+extern char rc_alt_semantics;
extern char express_msgs;
void logoff(int code);
void formout(char *name);
rc_ansi_color = 0;
strcpy(rc_url_cmd, "");
rc_encrypt = RC_DEFAULT;
+ rc_alt_semantics = 0;
/* now try to open the citadel.rc file */
if (!strncasecmp(buf, "urlcmd=", 7))
strcpy(rc_url_cmd, &buf[7]);
+ if (!strncasecmp(buf, "alternate_semantics=", 20)) {
+ if (!strncasecmp(&buf[11], "yes", 3))
+ rc_alt_semantics = 1;
+ if (!strncasecmp(&buf[11], "no", 2))
+ rc_alt_semantics = 0;
+ }
if (!strncasecmp(buf, "cmd=", 4)) {
strcpy(buf, &buf[4]);
char reply_to[512];
long msg_arr[MAXMSGS];
int num_msgs;
+char rc_alt_semantics;
extern char room_name[];
extern unsigned room_flags;
extern long highest_msg_read;
}
if (num_msgs == 0) {
+ if (c == 3) return;
printf("*** There are no ");
if (c == 1) printf("new ");
if (c == 2) printf("old ");
} while ((g != f) && (g >= 0));
printf("Message printed.\n");
}
+ if (rc_alt_semantics && c == 1) {
+ char buf[SIZ];
+
+ snprintf(buf, sizeof(buf), "SEEN %ld", msg_arr[a]);
+ serv_puts(buf);
+ serv_gets(buf); /* Don't need to check this? */
+ }
if (e == 3)
return;
if (((userflags & US_NOPROMPT) || (e == 2))
void updatels(void)
{ /* make all messages old in current room */
char buf[SIZ];
- serv_puts("SLRP HIGHEST");
+
+ if (rc_alt_semantics) {
+ if (maxmsgnum == highest_msg_read == 0) {
+ /* fprintf(stderr, "maxmsgnum == highest_msg_read == 0\n"); */
+ return;
+ }
+ snprintf(buf, sizeof(buf), "SLRP %ld",
+ (maxmsgnum > highest_msg_read) ?
+ maxmsgnum : highest_msg_read);
+ serv_puts(buf);
+ } else {
+ serv_puts("SLRP HIGHEST");
+ }
serv_gets(buf);
if (buf[0] != '2')
printf("%s\n", &buf[4]);
void updatelsa(void)
{
char buf[SIZ];
+
sprintf(buf, "SLRP %ld", highest_msg_read);
serv_puts(buf);
serv_gets(buf);