X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/dbdbd49d59ae5c14e66b1c148a63b8abc9d076ab..0b7286788a95dd854d1826b8493eda431d8e8aac:/uip/mhn.c diff --git a/uip/mhn.c b/uip/mhn.c index c361c5be..95aed5db 100644 --- a/uip/mhn.c +++ b/uip/mhn.c @@ -5,18 +5,28 @@ * complete copyright information. */ -#include +#include "h/mh.h" +#include "sbr/folder_read.h" +#include "sbr/context_save.h" +#include "sbr/context_replace.h" +#include "sbr/context_find.h" +#include "sbr/readconfig.h" +#include "sbr/ambigsw.h" +#include "sbr/path.h" +#include "sbr/print_version.h" +#include "sbr/print_help.h" +#include "sbr/error.h" #include -#include -#include -#include -#include -#include -#include -#include -#include +#include "h/signals.h" +#include "h/md5.h" +#include "h/mts.h" +#include "h/tws.h" +#include "h/fmt_scan.h" +#include "h/mime.h" +#include "h/mhparse.h" +#include "h/mhcachesbr.h" #include "h/done.h" -#include +#include "h/utils.h" #include "mhmisc.h" #include "sbr/m_maildir.h" #include "mhfree.h" @@ -83,16 +93,16 @@ int verbosw = 0; /* * variables for mhbuild (mhn -build) */ -static int buildsw = 0; +static bool buildsw; static int rfc934sw = 0; /* * what action to take? */ -static int cachesw = 0; -static int listsw = 0; -static int showsw = 0; -static int storesw = 0; +static bool cachesw; +static bool listsw; +static bool showsw; +static bool storesw; #define quitser pipeser @@ -105,7 +115,9 @@ static void pipeser (int); int main (int argc, char **argv) { - int sizesw = 1, headsw = 1, autosw = 0; + bool sizesw = true; + bool headsw = true; + bool autosw = false; int msgnum, *icachesw; char *cp, *file = NULL, *folder = NULL; char *maildir, buf[100], **argp; @@ -146,17 +158,17 @@ main (int argc, char **argv) done (0); case AUTOSW: - autosw++; + autosw = true; continue; case NAUTOSW: - autosw = 0; + autosw = false; continue; case CACHESW: - cachesw++; + cachesw = true; continue; case NCACHESW: - cachesw = 0; + cachesw = false; continue; case RCACHESW: @@ -186,38 +198,38 @@ do_cache: continue; case HEADSW: - headsw = 1; + headsw = true; continue; case NHEADSW: - headsw = 0; + headsw = false; continue; case LISTSW: - listsw = 1; + listsw = true; continue; case NLISTSW: - listsw = 0; + listsw = false; continue; case SHOWSW: - showsw = 1; + showsw = true; continue; case NSHOWSW: - showsw = 0; + showsw = false; continue; case SIZESW: - sizesw = 1; + sizesw = true; continue; case NSIZESW: - sizesw = 0; + sizesw = false; continue; case STORESW: - storesw = 1; + storesw = true; continue; case NSTORESW: - storesw = 0; + storesw = false; continue; case PARTSW: @@ -272,10 +284,10 @@ do_cache: * Switches for mhbuild */ case BUILDSW: - buildsw = 1; + buildsw = true; continue; case NBUILDSW: - buildsw = 0; + buildsw = false; continue; case RFC934SW: rfc934sw = 1; @@ -466,9 +478,9 @@ do_cache: /* If no action is specified, assume -show */ if (!listsw && !showsw && !storesw && !cachesw) - showsw = 1; + showsw = true; - userrs = 1; + userrs = true; SIGNAL (SIGQUIT, quitser); SIGNAL (SIGPIPE, pipeser);