X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fsortm.c;h=4b348cf0300b8befbb0592e7515aa40eb8bc7a9b;hb=ae5aae7b9c72dbff21f87bbc6e783d7cec1941a9;hp=398045b4941781eb4045993ccac0aa1a4bd3d661;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b;p=mmh diff --git a/uip/sortm.c b/uip/sortm.c index 398045b..4b348cf 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -3,10 +3,14 @@ * sortm.c -- sort messages in a folder by date/time * * $Id$ + * + * 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 +#include /* * We allocate space for messages (msgs array) @@ -35,7 +39,7 @@ static struct swit switches[] = { #define VERSIONSW 8 { "version", 0 }, #define HELPSW 9 - { "help", 4 }, + { "help", 0 }, { NULL, 0 } }; @@ -226,13 +230,14 @@ main (int argc, char **argv) dlist[i] = &smsgs[i]; dlist[nmsgs] = 0; - if (verbose) /* announce what we're doing */ + if (verbose) { /* announce what we're doing */ if (subjsort) printf ("sorting by %s-major %s-minor\n", submajor ? subjsort : datesw, submajor ? datesw : subjsort); else printf ("sorting by datefield %s\n", datesw); + } /* first sort by date, or by subject-major, date-minor */ qsort ((char *) dlist, nmsgs, sizeof(*dlist), @@ -304,7 +309,7 @@ main (int argc, char **argv) seq_save (mp); /* synchronize message sequences */ context_save (); /* save the context file */ folder_free (mp); /* free folder/message structure */ - done (0); + return done (0); } static int