X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhlistsbr.c;h=08f35c73048fb1917fe178fe43e76f5103822bfc;hp=5dee1157766191485bf2e641bf8f5ee33e79b8d6;hb=55eda7c77fdf33b0a7175968471df55e2600379c;hpb=2433122c20baccb10b70b49c04c6b0497b5b3b60 diff --git a/uip/mhlistsbr.c b/uip/mhlistsbr.c index 5dee115..08f35c7 100644 --- a/uip/mhlistsbr.c +++ b/uip/mhlistsbr.c @@ -9,9 +9,7 @@ #include #include -#include #include -#include #include #include #include @@ -25,17 +23,17 @@ void flush_errors(void); /* ** prototypes */ -void list_all_messages(CT *, int, int, int, int); -int list_switch(CT, int, int, int, int); -int list_content(CT, int, int, int, int); +void list_all_messages(CT *, int, int); +int list_switch(CT, int, int, int); +int list_content(CT, int, int, int); /* ** static prototypes */ -static void list_single_message(CT, int, int, int); +static void list_single_message(CT, int, int); static int list_debug(CT); -static int list_multi(CT, int, int, int, int); -static int list_partial(CT, int, int, int, int); +static int list_multi(CT, int, int, int); +static int list_partial(CT, int, int, int); static int list_encoding(CT); @@ -57,19 +55,15 @@ static int list_encoding(CT); ** Top level entry point to list group of messages */ void -list_all_messages(CT *cts, int headers, int realsize, int verbose, int debug) +list_all_messages(CT *cts, int verbose, int debug) { CT ct, *ctp; - if (headers) - printf(LSTFMT1, "msg", "part", "type/subtype", "size", - "description"); - + printf(LSTFMT1, "msg", "part", "type/subtype", "size", "description"); for (ctp = cts; *ctp; ctp++) { ct = *ctp; - list_single_message(ct, realsize, verbose, debug); + list_single_message(ct, verbose, debug); } - flush_errors(); } @@ -78,11 +72,11 @@ list_all_messages(CT *cts, int headers, int realsize, int verbose, int debug) ** Entry point to list a single message */ static void -list_single_message(CT ct, int realsize, int verbose, int debug) +list_single_message(CT ct, int verbose, int debug) { if (type_ok(ct, 1)) { umask(ct->c_umask); - list_switch(ct, 1, realsize, verbose, debug); + list_switch(ct, 1, verbose, debug); if (ct->c_fp) { fclose(ct->c_fp); ct->c_fp = NULL; @@ -97,20 +91,18 @@ list_single_message(CT ct, int realsize, int verbose, int debug) ** Primary switching routine to list information about a content */ int -list_switch(CT ct, int toplevel, int realsize, int verbose, int debug) +list_switch(CT ct, int toplevel, int verbose, int debug) { switch (ct->c_type) { case CT_MULTIPART: - return list_multi(ct, toplevel, realsize, verbose, debug); + return list_multi(ct, toplevel, verbose, debug); break; case CT_MESSAGE: if (ct->c_subtype == MESSAGE_PARTIAL) { - return list_partial(ct, toplevel, realsize, verbose, - debug); + return list_partial(ct, toplevel, verbose, debug); } else { - return list_content(ct, toplevel, realsize, verbose, - debug); + return list_content(ct, toplevel, verbose, debug); } break; @@ -119,7 +111,7 @@ list_switch(CT ct, int toplevel, int realsize, int verbose, int debug) case CT_IMAGE: case CT_VIDEO: case CT_APPLICATION: - return list_content(ct, toplevel, realsize, verbose, debug); + return list_content(ct, toplevel, verbose, debug); break; default: @@ -138,7 +130,7 @@ list_switch(CT ct, int toplevel, int realsize, int verbose, int debug) ** Method for listing information about a simple/generic content */ int -list_content(CT ct, int toplevel, int realsize, int verbose, int debug) +list_content(CT ct, int toplevel, int verbose, int debug) { unsigned long size; char *cp, buffer[BUFSIZ]; @@ -150,7 +142,7 @@ list_content(CT ct, int toplevel, int realsize, int verbose, int debug) empty(ci->ci_subtype)); printf(LSTFMT2b, empty(ct->c_partno), buffer); - if (ct->c_cesizefnx && realsize) + if (ct->c_cesizefnx) size = (*ct->c_cesizefnx) (ct); else size = ct->c_end - ct->c_begin; @@ -293,20 +285,20 @@ list_debug(CT ct) ** list content information for type "multipart" */ static int -list_multi(CT ct, int toplevel, int realsize, int verbose, int debug) +list_multi(CT ct, int toplevel, int verbose, int debug) { struct multipart *m = (struct multipart *) ct->c_ctparams; struct part *part; /* list the content for toplevel of this multipart */ - list_content(ct, toplevel, realsize, verbose, debug); + list_content(ct, toplevel, verbose, debug); /* now list for all the subparts */ for (part = m->mp_parts; part; part = part->mp_next) { CT p = part->mp_part; if (part_ok(p, 1) && type_ok(p, 1)) - list_switch(p, 0, realsize, verbose, debug); + list_switch(p, 0, verbose, debug); } return OK; @@ -317,11 +309,11 @@ list_multi(CT ct, int toplevel, int realsize, int verbose, int debug) ** list content information for type "message/partial" */ static int -list_partial(CT ct, int toplevel, int realsize, int verbose, int debug) +list_partial(CT ct, int toplevel, int verbose, int debug) { struct partial *p = (struct partial *) ct->c_ctparams; - list_content(ct, toplevel, realsize, verbose, debug); + list_content(ct, toplevel, verbose, debug); if (verbose) { printf("\t [message %s, part %d", p->pm_partid, p->pm_partno);