X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1ca8f21e0edfe448b71ac86de1b0cd987547a002..04ee0c3f6ad7e4177cc43a0c57f046013a4fbac9:/uip/sortm.c diff --git a/uip/sortm.c b/uip/sortm.c index a47eb9e4..8013c055 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -5,10 +5,14 @@ * complete copyright information. */ -#include -#include +#include "h/mh.h" +#include "sbr/path.h" +#include "sbr/print_version.h" +#include "sbr/print_help.h" +#include "sbr/error.h" +#include "h/tws.h" #include "h/done.h" -#include +#include "h/utils.h" #include "sbr/m_maildir.h" #define SORTM_SWITCHES \ @@ -46,8 +50,8 @@ int nmsgs; char *subjsort; /* sort on subject if != 0 */ time_t datelimit = 0; -int submajor = 0; /* if true, sort on subject-major */ -int verbose; +bool submajor; /* if true, sort on subject-major */ +bool verbose; int allmsgs = 1; int check_failed = 0; @@ -131,7 +135,7 @@ main (int argc, char **argv) while (*cp == '0') cp++; /* skip any leading zeros */ if (!*cp) { /* hit end of string */ - submajor++; /* sort subject-major */ + submajor = true; /* sort subject-major */ continue; } if (!isdigit((unsigned char) *cp) || !(datelimit = atoi(cp))) @@ -139,15 +143,15 @@ main (int argc, char **argv) datelimit *= 60*60*24; continue; case NLIMSW: - submajor = 0; /* use date-major, but */ - datelimit = 0; /* use no limit */ + submajor = false; /* use date-major, but */ + datelimit = 0; /* use no limit */ continue; case VERBSW: - verbose++; + verbose = true; continue; case NVERBSW: - verbose = 0; + verbose = false; continue; case ALLMSGS: