X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhtest.c;h=f8e6e3870a02b1903bd78c0ef5e70180c34bbd30;hp=9f21c012b2ef123b1ea4a103c89348cd8cca588a;hb=ced6090a330d3d83d0bce709f756aa3d7d65fea4;hpb=a485ed478abbd599d8c9aab48934e7a26733ecb1 diff --git a/uip/mhtest.c b/uip/mhtest.c index 9f21c01..f8e6e38 100644 --- a/uip/mhtest.c +++ b/uip/mhtest.c @@ -1,10 +1,10 @@ /* - * mhtest.c -- test harness for MIME routines - * - * This code is Copyright (c) 2002, by the authors of nmh. See the - * COPYRIGHT file in the root directory of the nmh distribution for - * complete copyright information. - */ +** mhtest.c -- test harness for MIME routines +** +** This code is Copyright (c) 2002, by the authors of nmh. See the +** COPYRIGHT file in the root directory of the nmh distribution for +** complete copyright information. +*/ #include #include @@ -50,8 +50,8 @@ static struct swit switches[] = { { "help", 0 }, /* - * switches for debugging - */ +** switches for debugging +*/ #define DEBUGSW 12 { "debug", -5 }, { NULL, 0 } @@ -77,9 +77,9 @@ extern char *types[NTYPES + 1]; extern int userrs; /* - * This is currently needed to keep mhparse happy. - * This needs to be changed. - */ +** This is currently needed to keep mhparse happy. +** This needs to be changed. +*/ pid_t xpid = 0; int debugsw = 0; @@ -105,8 +105,8 @@ extern CT *cts; void freects_done (int) NORETURN; /* - * static prototypes - */ +** static prototypes +*/ static int write_content (CT *, char *); static RETSIGTYPE pipeser (int); @@ -136,8 +136,8 @@ main (int argc, char **argv) argp = arguments; /* - * Parse arguments - */ + ** Parse arguments + */ while ((cp = *argp++)) { if (*cp == '-') { switch (smatch (++cp, switches)) { @@ -148,8 +148,7 @@ main (int argc, char **argv) adios (NULL, "-%s unknown", cp); case HELPSW: - snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]", - invo_name); + snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]", invo_name); print_help (buf, switches, 1); done (1); case VERSIONSW: @@ -229,7 +228,7 @@ do_cache: else folder = pluspath (cp); } else - app_msgarg(&msgs, cp); + app_msgarg(&msgs, cp); } /* null terminate the list of acceptable parts/types */ @@ -251,10 +250,10 @@ do_cache: cache_private = getcpy (m_maildir (cache_private)); /* - * Check for storage directory. If specified, - * then store temporary files there. Else we - * store them in standard nmh directory. - */ + ** Check for storage directory. If specified, + ** then store temporary files there. Else we + ** store them in standard nmh directory. + */ if ((cp = context_find (nmhstorage)) && *cp) tmp = concat (cp, "/", invo_name, NULL); else @@ -267,8 +266,8 @@ do_cache: adios (NULL, "cannot specify msg and file at same time!"); /* - * check if message is coming from file - */ + ** check if message is coming from file + */ if (file) { if (!(cts = (CT *) calloc ((size_t) 2, sizeof(*cts)))) adios (NULL, "out of memory"); @@ -278,8 +277,8 @@ do_cache: *ctp++ = ct; } else { /* - * message(s) are coming from a folder - */ + ** message(s) are coming from a folder + */ if (!msgs.size) app_msgarg(&msgs, "cur"); if (!folder) @@ -326,8 +325,8 @@ do_cache: SIGNAL (SIGPIPE, pipeser); /* - * Get the associated umask for the relevant contents. - */ + ** Get the associated umask for the relevant contents. + */ for (ctp = cts; *ctp; ctp++) { struct stat st; @@ -341,8 +340,8 @@ do_cache: } /* - * Write the content to a file - */ + ** Write the content to a file + */ write_content (cts, outfile); /* Now free all the structures for the content */