X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhlist.c;h=7129ce5a973343ef092060916ccc5f0925c9dad6;hp=66f9d894a414211bb08f4ada0fd01cce42e0199d;hb=32b2354dbaf4bf934936eb5b102a4a3d2fdd209a;hpb=31dc797eb5178970d68962ca8939da3fd9a8efda diff --git a/uip/mhlist.c b/uip/mhlist.c index 66f9d89..7129ce5 100644 --- a/uip/mhlist.c +++ b/uip/mhlist.c @@ -14,37 +14,24 @@ #include #include #include -#include #include static struct swit switches[] = { -#define HEADSW 0 - { "headers", 0 }, -#define NHEADSW 1 - { "noheaders", 0 }, -#define SIZESW 2 - { "realsize", 0 }, -#define NSIZESW 3 - { "norealsize", 0 }, -#define VERBSW 4 +#define VERBSW 0 { "verbose", 0 }, -#define NVERBSW 5 +#define NVERBSW 1 { "noverbose", 0 }, -#define FILESW 6 /* interface from show */ +#define FILESW 2 /* interface from show */ { "file file", 0 }, -#define PARTSW 7 +#define PARTSW 3 { "part number", 0 }, -#define TYPESW 8 +#define TYPESW 4 { "type content", 0 }, -#define RCACHESW 9 - { "rcache policy", 0 }, -#define WCACHESW 10 - { "wcache policy", 0 }, -#define VERSIONSW 11 - { "version", 0 }, -#define HELPSW 12 +#define VERSIONSW 5 + { "Version", 0 }, +#define HELPSW 6 { "help", 0 }, -#define DEBUGSW 13 +#define DEBUGSW 7 { "debug", -5 }, { NULL, 0 } }; @@ -53,12 +40,6 @@ static struct swit switches[] = { /* mhparse.c */ extern char *tmp; /* directory to place temp files */ -/* mhcachesbr.c */ -extern int rcachesw; -extern int wcachesw; -extern char *cache_public; -extern char *cache_private; - /* mhmisc.c */ extern int npart; extern int ntype; @@ -87,7 +68,7 @@ void set_endian(void); void flush_errors(void); /* mhlistsbr.c */ -void list_all_messages(CT *, int, int, int, int); +void list_all_messages(CT *, int, int); /* mhfree.c */ void free_content(CT); @@ -103,8 +84,7 @@ static void pipeser(int); int main(int argc, char **argv) { - int sizesw = 1, headsw = 1; - int msgnum, *icachesw; + int msgnum; char *cp, *file = NULL, *folder = NULL; char *maildir, buf[100], **argp; char **arguments; @@ -145,39 +125,6 @@ main(int argc, char **argv) print_version(invo_name); done(1); - case RCACHESW: - icachesw = &rcachesw; - goto do_cache; - case WCACHESW: - icachesw = &wcachesw; -do_cache: - if (!(cp = *argp++) || *cp == '-') - adios(NULL, "missing argument to %s", argp[-2]); - switch (*icachesw = smatch(cp, caches)) { - case AMBIGSW: - ambigsw(cp, caches); - done(1); - case UNKWNSW: - adios(NULL, "%s unknown", cp); - default: - break; - } - continue; - - case HEADSW: - headsw = 1; - continue; - case NHEADSW: - headsw = 0; - continue; - - case SIZESW: - sizesw = 1; - continue; - case NSIZESW: - sizesw = 0; - continue; - case PARTSW: if (!(cp = *argp++) || *cp == '-') adios(NULL, "missing argument to %s", @@ -229,15 +176,6 @@ do_cache: set_endian(); - /* Check for public cache location */ - if ((cache_public = context_find(nmhcache)) && *cache_public != '/') - cache_public = NULL; - - /* Check for private cache location */ - if (!(cache_private = context_find(nmhprivcache))) - cache_private = ".cache"; - cache_private = getcpy(toabsdir(cache_private)); - /* ** Check for storage directory. If specified, ** then store temporary files there. Else we @@ -329,7 +267,7 @@ do_cache: /* ** List the message content */ - list_all_messages(cts, headsw, sizesw, verbosw, debugsw); + list_all_messages(cts, verbosw, debugsw); /* Now free all the structures for the content */ for (ctp = cts; *ctp; ctp++)