]> diplodocus.org Git - nmh/blobdiff - uip/mhlistsbr.c
inc/test-eom-align: Create test mboxes in less steps.
[nmh] / uip / mhlistsbr.c
index a96843d9d43c9f9ea9f4a9791e68a143e2f1a355..d58d43f9caedc36b1e2b69b8996d10012ad4aa5d 100644 (file)
 #include <h/mime.h>
 #include <h/mhparse.h>
 #include <h/utils.h>
-
-/* mhmisc.c */
-int part_ok (CT);
-int type_ok (CT, int);
-void flush_errors (void);
+#include "mhmisc.h"
 
 /*
  * static prototypes
@@ -269,9 +265,8 @@ list_debug (CT ct)
                 get_param_value(pm, '?'));
 
     /* print internal flags for type/subtype */
-    fprintf (stderr, "    type 0x%x subtype 0x%x params 0x%x\n",
-            ct->c_type, ct->c_subtype,
-            (unsigned int)(unsigned long) ct->c_ctparams);
+    fprintf(stderr, "    type %#x subtype %#x params %p\n",
+        ct->c_type, ct->c_subtype, (void *)ct->c_ctparams);
 
     fprintf (stderr, "    showproc  \"%s\"\n", FENDNULL(ct->c_showproc));
     fprintf (stderr, "    termproc  \"%s\"\n", FENDNULL(ct->c_termproc));
@@ -282,8 +277,8 @@ list_debug (CT ct)
        fprintf (stderr, "  %s:%s", ENCODING_FIELD, ct->c_celine);
 
     /* 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);
+    fprintf(stderr, "    transfer encoding %#x params %p\n",
+        ct->c_encoding, (void *)&ct->c_cefile);
 
     /* print Content-ID */
     if (ct->c_id)
@@ -303,9 +298,8 @@ list_debug (CT ct)
        fprintf (stderr, "      %s=\"%s\"\n", pm->pm_name,
                 get_param_value(pm, '?'));
 
-    fprintf (stderr, "    read fp 0x%x file \"%s\" begin %ld end %ld\n",
-            (unsigned int)(unsigned long) ct->c_fp, FENDNULL(ct->c_file),
-            ct->c_begin, ct->c_end);
+    fprintf(stderr, "    read fp %p file \"%s\" begin %ld end %ld\n",
+        (void *)ct->c_fp, FENDNULL(ct->c_file), ct->c_begin, ct->c_end);
 
     /* print more information about transfer encoding */
     list_encoding (ct);
@@ -379,30 +373,10 @@ list_external (CT ct, int toplevel, int realsize, int verbose, int debug,
     list_content (ct, toplevel, realsize, verbose, debug, dispo);
 
     if (verbose) {
-       if (e->eb_name)
-           printf ("\t     name=\"%s\"\n", e->eb_name);
-       if (e->eb_dir)
-           printf ("\t     directory=\"%s\"\n", e->eb_dir);
-       if (e->eb_site)
-           printf ("\t     site=\"%s\"\n", e->eb_site);
-       if (e->eb_server)
-           printf ("\t     server=\"%s\"\n", e->eb_server);
-       if (e->eb_subject)
-           printf ("\t     subject=\"%s\"\n", e->eb_subject);
-       if (e->eb_url)
-           printf ("\t     url=\"%s\"\n", e->eb_url);
-
-       /* This must be defined */
-       printf     ("\t     access-type=\"%s\"\n", e->eb_access);
-
-       if (e->eb_mode)
-           printf ("\t     mode=\"%s\"\n", e->eb_mode);
-       if (e->eb_permission)
-           printf ("\t     permission=\"%s\"\n", e->eb_permission);
-
+        if (!e->eb_access)
+            puts("\t     [missing access-type]"); /* Must be defined. */
        if (e->eb_flags == NOTOK)
            puts("\t     [service unavailable]");
-
     }
 
     /*
@@ -425,9 +399,8 @@ list_encoding (CT ct)
 {
     CE ce = &ct->c_cefile;
 
-    fprintf (stderr, "    decoded fp 0x%x file \"%s\"\n",
-            (unsigned int)(unsigned long) ce->ce_fp,
-            FENDNULL(ce->ce_file));
+    fprintf(stderr, "    decoded fp %p file \"%s\"\n",
+        (void *)ce->ce_fp, FENDNULL(ce->ce_file));
 
     return OK;
 }