]> code.citadel.org Git - citadel.git/commitdiff
* messages.c, citadel.rc: added the ability to display message numbers
authorArt Cancro <ajc@citadel.org>
Thu, 8 Oct 1998 21:15:11 +0000 (21:15 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 8 Oct 1998 21:15:11 +0000 (21:15 +0000)
          in the header when reading messages.  I think this is butt ugly, but
          some of the DaveCode afficionados seem to like it...

citadel/ChangeLog
citadel/citadel.rc
citadel/commands.c
citadel/messages.c

index 9e988bdd6e472adc0a8b62e176e6e505944d97ca..62ffe0e6735f0865fee07707f13a9fc21acdb518 100644 (file)
@@ -1,3 +1,8 @@
+Thu Oct  8 17:13:27 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
+       * messages.c, citadel.rc: added the ability to display message numbers
+         in the header when reading messages.  I think this is butt ugly, but
+         some of the DaveCode afficionados seem to like it...
+
 Thu Oct  8 15:34:45 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * room_ops.c: Added is_noneditable() function to replace all of the
          duplicated code present in all functions which edit room parameters.
index 661f96505a3117b2921193796efcbaf9d0208af7..aeb845f5b64cdf39f0d3efedf57ae274f2d48373 100644 (file)
@@ -32,6 +32,12 @@ editor=/usr/local/bin/simped
 #
 local_screen_dimensions=0
 
+# 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...
+#
+display_message_numbers=0
+
 # USE_FLOORS determines whether the user sees floors, or a flat room space.
 # Set it to YES to always use floors, NO to never use floors, or DEFAULT
 # to use the setting in the user's configuration (which is normally the case).
index 2cacea76ab1cc5b242cec053e701cfaba1a5794a..a99d8be7eb1eb9e3fa43a87e716206c05ebad351 100644 (file)
@@ -50,6 +50,7 @@ struct citcmd {
 int rc_exp_beep;
 char rc_exp_cmd[256];
 int rc_allow_attachments;
+int rc_display_message_numbers;
 
 char *gl_string;
 
@@ -299,6 +300,7 @@ void load_command_set(void) {
        rc_exp_beep = 1;
        rc_allow_attachments = 0;
        strcpy(rc_exp_cmd, "");
+       rc_display_message_numbers = 0;
 
        /* now try to open the citadel.rc file */
 
@@ -349,6 +351,10 @@ void load_command_set(void) {
                rc_allow_attachments = atoi(&buf[18]);
                }
 
+           if (!struncmp(buf,"display_message_numbers=", 24)) {
+               rc_display_message_numbers = atoi(&buf[24]);
+               }
+
            if (!struncmp(buf,"username=",9))
                strcpy(rc_username,&buf[9]);
 
index dc8b5c21048176dc7b0d28ad70e6783f24a27e12..5c102c6aecb1ca2471ed60d918bd0a7ad378a99f 100644 (file)
@@ -67,6 +67,7 @@ extern char sigcaught;
 extern char editor_path[];
 extern char printcmd[];
 extern int rc_allow_attachments;
+extern int rc_display_message_numbers;
 
 extern int editor_pid;
 
@@ -382,6 +383,9 @@ int read_message(long int num, char pagin) /* Read a message from the server */
                if (nhdr==1) buf[0]='_';
                if (!struncmp(buf,"type=",5))
                        format_type=atoi(&buf[5]);
+               if ((!struncmp(buf,"msgn=",5))&&(rc_display_message_numbers)) {
+                       printf("[#%s] ",&buf[5]);
+                       }
                if (!struncmp(buf,"from=",5)) {
                        printf("from %s ",&buf[5]);
                        }