]> diplodocus.org Git - nmh/blobdiff - uip/mhlistsbr.c
Fixed removal of <> in test-dist and test-rcvdist.
[nmh] / uip / mhlistsbr.c
index bc29243b8e6ee1e4d2b41c49745685f055ff0ed0..3c36871006bc624223df96dedabf1375f8bd3224 100644 (file)
@@ -11,8 +11,6 @@
 #include <h/mh.h>
 #include <fcntl.h>
 #include <h/signals.h>
-#include <errno.h>
-#include <signal.h>
 #include <h/mts.h>
 #include <h/tws.h>
 #include <h/mime.h>
@@ -46,14 +44,14 @@ static int list_encoding (CT);
 /*
  * various formats for -list option
  */
-#define        LSTFMT1         "%4s %-5s %-24s %5s %-36s\n"
+#define        LSTFMT1         "%4s %-5s %-24s %5s %s\n"
 #define        LSTFMT2a        "%4d "
 #define        LSTFMT2b        "%-5s %-24.24s "
 #define        LSTFMT2c1       "%5lu"
 #define        LSTFMT2c2       "%4lu%c"
 #define        LSTFMT2c3       "huge "
 #define        LSTFMT2c4       "     "
-#define        LSTFMT2d1       " %-36.36s"
+#define        LSTFMT2d1       " %.36s"
 #define        LSTFMT2d2       "\t     %-65.65s\n"
 
 
@@ -280,7 +278,7 @@ list_debug (CT ct)
 
     /* print internal flags for transfer encoding */
     fprintf (stderr, "    transfer encoding 0x%x params 0x%x\n",
-            ct->c_encoding, (unsigned int)(unsigned long) ct->c_cefile);
+            ct->c_encoding, (unsigned int)(unsigned long) &ct->c_cefile);
 
     /* print Content-ID */
     if (ct->c_id)
@@ -422,12 +420,11 @@ list_application (CT ct, int toplevel, int realsize, int verbose, int debug)
 static int
 list_encoding (CT ct)
 {
-    CE ce;
+    CE ce = &ct->c_cefile;
 
-    if ((ce = ct->c_cefile))
-       fprintf (stderr, "    decoded fp 0x%x file \"%s\"\n",
-                (unsigned int)(unsigned long) ce->ce_fp,
-                ce->ce_file ? ce->ce_file : "");
+    fprintf (stderr, "    decoded fp 0x%x file \"%s\"\n",
+            (unsigned int)(unsigned long) ce->ce_fp,
+            ce->ce_file ? ce->ce_file : "");
 
     return OK;
 }