* When displaying messages using MSG4, enumerate the attachments on the
authorArt Cancro <ajc@citadel.org>
Sat, 7 Sep 2002 03:24:23 +0000 (03:24 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 7 Sep 2002 03:24:23 +0000 (03:24 +0000)
  client side, because the server won't add their descriptions to the
  message text.

citadel/ChangeLog
citadel/messages.c

index 90d2f1b9c2af09f86a20ea54e78fa1cff112d480..6c0d6a6a680480d257ab1cb54d65b90c25acb232 100644 (file)
@@ -1,4 +1,9 @@
  $Log$
+ Revision 600.1  2002/09/07 03:24:23  ajc
+ * When displaying messages using MSG4, enumerate the attachments on the
+   client side, because the server won't add their descriptions to the
+   message text.
+
  Revision 600.0  2002/09/04 03:06:58  ajc
  * Committing the current code base as version 6.00
 
@@ -3969,3 +3974,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index cfd9aa41b07bc638dbc395517d85526611be6066..6d9c1f3b2e30cb74f92a0ba86729d3fe93b10094 100644 (file)
@@ -618,6 +618,29 @@ int read_message(
                ++lines_printed;
                lines_printed = checkpagin(lines_printed, pagin, screenheight);
        }
+
+       /* Enumerate any attachments */
+       if ( (pagin == 1) && (can_do_msg4) && (message->attachments) ) {
+               struct parts *ptr;
+
+               for (ptr = message->attachments; ptr; ptr = ptr->next) {
+                       if ( (!strcasecmp(ptr->disposition, "attachment"))
+                          || (!strcasecmp(ptr->disposition, "inline"))) {
+                               color(DIM_WHITE);
+                               scr_printf("Part ");
+                               color(BRIGHT_MAGENTA);
+                               scr_printf("%s", ptr->number);
+                               color(DIM_WHITE);
+                               scr_printf(": ");
+                               color(BRIGHT_CYAN);
+                               scr_printf("%s", ptr->filename);
+                               color(DIM_WHITE);
+                               scr_printf(" (%s, %ld bytes)\n", ptr->mimetype, ptr->length);
+                       }
+               }
+       }
+
+       /* Now we're done */
        free(message->text);
        free(message);