]> diplodocus.org Git - nmh/blobdiff - uip/mhlistsbr.c
picksbr.c: fprintf function pointer with unsigned-long-long cast.
[nmh] / uip / mhlistsbr.c
index f7ecbc89586939de5979ea575553523bca202469..48a5a7941bdb264db03207e30b5a0f2612efa960 100644 (file)
@@ -27,7 +27,6 @@ static int list_debug (CT);
 static int list_multi (CT, int, int, int, int, int);
 static int list_partial (CT, int, int, int, int, int);
 static int list_external (CT, int, int, int, int, int);
-static int list_application (CT, int, int, int, int, int);
 static int list_encoding (CT);
 
 
@@ -121,12 +120,9 @@ list_switch (CT ct, int toplevel, int realsize, int verbose, int debug,
        case CT_AUDIO:
        case CT_IMAGE:
        case CT_VIDEO:
-           return list_content (ct, toplevel, realsize, verbose, debug, dispo);
-
        case CT_APPLICATION:
        default:
-           return list_application (ct, toplevel, realsize, verbose, debug,
-                                    dispo);
+            return list_content (ct, toplevel, realsize, verbose, debug, dispo);
     }
 
     return 0;  /* NOT REACHED */
@@ -273,7 +269,7 @@ 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",
+    fprintf (stderr, "    type %#x subtype %#x params 0x%x\n",
             ct->c_type, ct->c_subtype,
             (unsigned int)(unsigned long) ct->c_ctparams);
 
@@ -286,7 +282,7 @@ 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",
+    fprintf (stderr, "    transfer encoding %#x params 0x%x\n",
             ct->c_encoding, (unsigned int)(unsigned long) &ct->c_cefile);
 
     /* print Content-ID */
@@ -307,9 +303,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);
@@ -383,30 +378,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]");
-
     }
 
     /*
@@ -419,23 +394,6 @@ list_external (CT ct, int toplevel, int realsize, int verbose, int debug,
 }
 
 
-/*
- * list content information for type "application"
- * This no longer needs to be a separate function.  It used to
- * produce some output with verbose enabled, but that has been
- * moved to list_content ().
- */
-
-static int
-list_application (CT ct, int toplevel, int realsize, int verbose, int debug,
-                 int dispo)
-{
-    list_content (ct, toplevel, realsize, verbose, debug, dispo);
-
-    return OK;
-}
-
-
 /*
  * list information about the Content-Transfer-Encoding
  * used by a content.
@@ -446,9 +404,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;
 }