]> granicus.if.org Git - mutt/commitdiff
Type cast nit from Gero Treuner.
authorThomas Roessler <roessler@does-not-exist.org>
Sat, 14 Nov 1998 08:22:02 +0000 (08:22 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Sat, 14 Nov 1998 08:22:02 +0000 (08:22 +0000)
handler.c
help.c

index a115c69d4f3872230fda0f89ba6aec513840b6a2..ede357c2fd069697fda6eef183f07eae6fd9f299 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -1246,21 +1246,46 @@ static void external_body_handler (BODY *b, STATE *s)
   {
     if (s->flags & M_DISPLAY)
     {
-      fprintf (s->fpout, _("[-- This %s/%s attachment is deleted --]\n"),
+      char *length;
+      char pretty_size[10];
+
+      state_printf (s, _("[-- This %s/%s attachment "),
               TYPE(b->parts), b->parts->subtype);
+      length = mutt_get_parameter ("length", b->parameter);
+      if (length)
+      {
+       mutt_pretty_size (pretty_size, sizeof (pretty_size),
+                         strtol (length, NULL, 10));
+       state_printf (s, _("(size %s bytes) "), pretty_size);
+      }
+      state_puts (_("has been deleted --]\n"), s);
+
       if (expire != -1)
-       fprintf (s->fpout, _("[-- on %s --]\n"), expiration);
+       state_printf (s, _("[-- on %s --]\n"), expiration);
       mutt_copy_hdr (s->fpin, s->fpout, ftell (s->fpin), b->parts->offset,
                     (option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) |
                     CH_DECODE , NULL);
     }
   }
+  else if(expire < time(NULL))
+  {
+    if (s->flags & M_DISPLAY)
+    {
+      state_printf (s, _("[-- This %s/%s attachment is not included, --]\n"
+                        "[-- and the indicated external source has --]\n"
+                        "[-- expired. --]\n"),
+                   TYPE(b->parts), b->parts->subtype);
+      mutt_copy_hdr(s->fpin, s->fpout, ftell (s->fpin), b->parts->offset,
+                   (option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) |
+                   CH_DECODE, NULL);
+    }
+  }
   else
   {
     if (s->flags & M_DISPLAY)
     {
-      fprintf (s->fpout,
-              _("[-- This %s/%s attachment is not included --]\n"
+      state_printf (s,
+              _("[-- This %s/%s attachment is not included, --]\n"
                 "[-- and the indicated access-type %s is unsupported --]\n"),
               TYPE(b->parts), b->parts->subtype, access_type);
       mutt_copy_hdr (s->fpin, s->fpout, ftell (s->fpin), b->parts->offset,
diff --git a/help.c b/help.c
index bc9c4dc93d86735f8b90a9f134b9982405954f41..eaedf7b0a6a2a59c36f667f7d997cf6a7d0af659 100644 (file)
--- a/help.c
+++ b/help.c
@@ -131,7 +131,7 @@ static int print_macro (FILE *f, int maxchar, const char **macro)
     {
       --n;
       fputc(c, f);
-      c = *++*macro;
+      c = (unsigned char) *++*macro;
     }
     else
       c = 0;