X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/6ba5b855ebc737cc46cabfbe799b0c7706f437f4..0a7838e0e8026cbfe8a8924ef256ad9e930fb03d:/uip/mhlistsbr.c diff --git a/uip/mhlistsbr.c b/uip/mhlistsbr.c index 0b4e439f..f5676a49 100644 --- a/uip/mhlistsbr.c +++ b/uip/mhlistsbr.c @@ -106,40 +106,32 @@ list_switch (CT ct, int toplevel, int realsize, int verbose, int debug) switch (ct->c_type) { case CT_MULTIPART: return list_multi (ct, toplevel, realsize, verbose, debug); - break; case CT_MESSAGE: switch (ct->c_subtype) { case MESSAGE_PARTIAL: return list_partial (ct, toplevel, realsize, verbose, debug); - break; case MESSAGE_EXTERNAL: return list_external (ct, toplevel, realsize, verbose, debug); - break; case MESSAGE_RFC822: default: return list_content (ct, toplevel, realsize, verbose, debug); - break; } - break; case CT_TEXT: case CT_AUDIO: case CT_IMAGE: case CT_VIDEO: return list_content (ct, toplevel, realsize, verbose, debug); - break; case CT_APPLICATION: return list_application (ct, toplevel, realsize, verbose, debug); - break; default: /* list_debug (ct); */ adios (NULL, "unknown content type %d", ct->c_type); - break; } return 0; /* NOT REACHED */ @@ -207,11 +199,13 @@ list_content (CT ct, int toplevel, int realsize, int verbose, int debug) printf ("\n"); if (verbose) { - char **ap, **ep; CI ci = &ct->c_ctinfo; + PM pm; - for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++) - printf ("\t %s=\"%s\"\n", *ap, *ep); + for (pm = ci->ci_first_pm; pm; pm = pm->pm_next) { + printf ("\t %s=\"%s\"\n", pm->pm_name, + get_param_value(pm, '?')); + } /* * If verbose, print any RFC-822 comments in the @@ -241,8 +235,8 @@ list_content (CT ct, int toplevel, int realsize, int verbose, int debug) static int list_debug (CT ct) { - char **ap, **ep; CI ci = &ct->c_ctinfo; + PM pm; fflush (stdout); fprintf (stderr, " partno \"%s\"\n", empty (ct->c_partno)); @@ -263,8 +257,9 @@ list_debug (CT ct) /* print parsed parameters attached to content type */ fprintf (stderr, " parameters\n"); - for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++) - fprintf (stderr, " %s=\"%s\"\n", *ap, *ep); + for (pm = ci->ci_first_pm; pm; pm = pm->pm_next) + fprintf (stderr, " %s=\"%s\"\n", pm->pm_name, + get_param_value(pm, '?')); /* print internal flags for type/subtype */ fprintf (stderr, " type 0x%x subtype 0x%x params 0x%x\n",