]> diplodocus.org Git - nmh/commitdiff
nmh_init(): Replace integer parameter with two bools.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 30 Oct 2017 20:58:46 +0000 (20:58 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 30 Oct 2017 20:58:46 +0000 (20:58 +0000)
Removes the 0, 1, or 2 passed by callers.  If the options get more
complex then an enum of possible actions might be a better fit.

52 files changed:
h/utils.h
sbr/utils.c
uip/ali.c
uip/anno.c
uip/ap.c
uip/burst.c
uip/comp.c
uip/dist.c
uip/dp.c
uip/flist.c
uip/fmtdump.c
uip/fmttest.c
uip/folder.c
uip/forw.c
uip/imaptest.c
uip/inc.c
uip/install-mh.c
uip/mark.c
uip/mhbuild.c
uip/mhfixmsg.c
uip/mhical.c
uip/mhl.c
uip/mhlist.c
uip/mhlogin.c
uip/mhn.c
uip/mhparam.c
uip/mhpath.c
uip/mhshow.c
uip/mhstore.c
uip/mkstemp.c
uip/msgchk.c
uip/new.c
uip/packf.c
uip/pick.c
uip/post.c
uip/prompter.c
uip/rcvdist.c
uip/rcvpack.c
uip/rcvstore.c
uip/rcvtty.c
uip/refile.c
uip/repl.c
uip/rmf.c
uip/rmm.c
uip/scan.c
uip/send.c
uip/show.c
uip/slocal.c
uip/sortm.c
uip/viamail.c
uip/whatnow.c
uip/whom.c

index 7cb96ef..91c637d 100644 (file)
--- a/h/utils.h
+++ b/h/utils.h
@@ -112,12 +112,10 @@ char *m_strn(int value, unsigned int width);
  * program initialization
  *
  * argv0        - argv[0], presumably the program name
  * program initialization
  *
  * argv0        - argv[0], presumably the program name
- * read_context - 0: don't read context
- *              - 1: read context, check nmh version, and issue warning message
- *                   if non-existent or old
- *              - 2: read context, don't check nmh version
+ * read_context - whether to read the context
+ * check_version - if read_context, whether to check the version, and issue warning message if non-existent or old
  */
  */
-int nmh_init(const char *argv0, int read_context);
+int nmh_init(const char *argv0, bool read_context, bool check_version);
 
 /*
  * Compares prior version of nmh with current version.  Returns 1
 
 /*
  * Compares prior version of nmh with current version.  Returns 1
index 839670b..efb0cde 100644 (file)
@@ -417,8 +417,8 @@ void to_upper(char *s)
 }
 
 
 }
 
 
-int
-nmh_init(const char *argv0, int read_context) {
+int nmh_init(const char *argv0, bool read_context, bool check_version)
+{
     int status = OK;
     char *locale;
 
     int status = OK;
     char *locale;
 
@@ -441,7 +441,7 @@ nmh_init(const char *argv0, int read_context) {
 
         context_read();
 
 
         context_read();
 
-        if (read_context != 1  ||
+        if (!check_version ||
             ((cp = context_find ("Welcome")) && strcasecmp (cp, "disable") == 0)) {
             allow_version_check = 0;
         } else if ((cp = getenv ("MHCONTEXT")) != NULL && *cp != '\0') {
             ((cp = context_find ("Welcome")) && strcasecmp (cp, "disable") == 0)) {
             allow_version_check = 0;
         } else if ((cp = getenv ("MHCONTEXT")) != NULL && *cp != '\0') {
@@ -453,7 +453,7 @@ nmh_init(const char *argv0, int read_context) {
 
         /* Check to see if the user is running a different (or older, if
            specified) version of nmh than they had run before, and notify them
 
         /* Check to see if the user is running a different (or older, if
            specified) version of nmh than they had run before, and notify them
-           if so.  But only if read_context was set to a value to enable. */
+           if so. */
         if (allow_version_check  &&  isatty (fileno (stdin))  &&
             isatty (fileno (stdout))  &&  isatty (fileno (stderr))) {
             if (nmh_version_changed (check_older_version)) {
         if (allow_version_check  &&  isatty (fileno (stdin))  &&
             isatty (fileno (stdout))  &&  isatty (fileno (stderr))) {
             if (nmh_version_changed (check_older_version)) {
index 760a26f..bcf8c79 100644 (file)
--- a/uip/ali.c
+++ b/uip/ali.c
@@ -52,7 +52,7 @@ main (int argc, char **argv)
     char **vec = mh_xmalloc (argc * sizeof (char *)), **arguments;
     struct aka *ak;
 
     char **vec = mh_xmalloc (argc * sizeof (char *)), **arguments;
     struct aka *ak;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
index 56935c2..21a5987 100644 (file)
@@ -94,7 +94,7 @@ main (int argc, char **argv)
     bool       list;                   /* list header elements if set */
     int                number = 0;             /* delete specific number of like elements if set */
 
     bool       list;                   /* list header elements if set */
     int                number = 0;             /* delete specific number of like elements if set */
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index fbcf62b..140160c 100644 (file)
--- a/uip/ap.c
+++ b/uip/ap.c
@@ -53,7 +53,7 @@ main (int argc, char **argv)
     char buf[BUFSIZ], **argp;
     char *addrs[NADDRS + 1]; /* Includes terminating NULL. */
 
     char buf[BUFSIZ], **argp;
     char *addrs[NADDRS + 1]; /* Includes terminating NULL. */
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     mts_init ();
 
 
     mts_init ();
 
index 6bd96ea..dd1970c 100644 (file)
@@ -76,7 +76,7 @@ main (int argc, char **argv)
     struct smsg *smsgs;
     struct msgs *mp;
 
     struct smsg *smsgs;
     struct msgs *mp;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index 3667f2e..1aba280 100644 (file)
@@ -83,7 +83,7 @@ main (int argc, char **argv)
     struct format *fmt;
     struct stat st;
 
     struct format *fmt;
     struct stat st;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index ad42e1f..4fb33bf 100644 (file)
@@ -83,7 +83,7 @@ main (int argc, char **argv)
     struct msgs *mp = NULL;
     struct stat st;
 
     struct msgs *mp = NULL;
     struct stat st;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index c2bed42..656440f 100644 (file)
--- a/uip/dp.c
+++ b/uip/dp.c
@@ -51,7 +51,7 @@ main (int argc, char **argv)
     char buf[BUFSIZ], **argp;
     char *dates[NDATES + 1]; /* Includes terminating NULL. */
 
     char buf[BUFSIZ], **argp;
     char *dates[NDATES + 1]; /* Includes terminating NULL. */
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     argp = getarguments (invo_name, argc, argv, 1);
     while ((cp = *argp++)) {
 
     argp = getarguments (invo_name, argc, argv, 1);
     while ((cp = *argp++)) {
index 99009ca..fec2c84 100644 (file)
@@ -113,7 +113,7 @@ main(int argc, char **argv)
     char **arguments;
     char buf[BUFSIZ];
 
     char **arguments;
     char buf[BUFSIZ];
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     /*
      * If program was invoked with name ending
 
     /*
      * If program was invoked with name ending
index abcffef..7293e13 100644 (file)
@@ -51,7 +51,7 @@ main (int argc, char **argv)
     char buf[BUFSIZ], *nfs, **argp, **arguments;
     struct format *fmt;
 
     char buf[BUFSIZ], *nfs, **argp, **arguments;
     struct format *fmt;
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index c5e9079..91a83a5 100644 (file)
@@ -123,7 +123,7 @@ main (int argc, char **argv)
     int dat[5];
     struct fmt_callbacks cb, *cbp = NULL;
 
     int dat[5];
     struct fmt_callbacks cb, *cbp = NULL;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index 2be4426..e7dc187 100644 (file)
@@ -112,7 +112,7 @@ main (int argc, char **argv)
     char *cp, *dp, *msg = NULL, *argfolder = NULL;
     char **ap, **argp, buf[BUFSIZ], **arguments;
 
     char *cp, *dp, *msg = NULL, *argfolder = NULL;
     char **ap, **argp, buf[BUFSIZ], **arguments;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     /*
      * If program was invoked with name ending
 
     /*
      * If program was invoked with name ending
index ac2f765..3d52696 100644 (file)
@@ -118,7 +118,7 @@ main (int argc, char **argv)
     struct msgs_array msgs = { 0, 0, NULL };
     int buildsw = 0;
 
     struct msgs_array msgs = { 0, 0, NULL };
     int buildsw = 0;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index c250c21..baa18d1 100644 (file)
@@ -97,7 +97,7 @@ main (int argc, char **argv)
     size_t len;
     struct timeval tv_start, tv_connect, tv_auth;
 
     size_t len;
     struct timeval tv_start, tv_connect, tv_auth;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index 6c49b3d..d65c46f 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -205,7 +205,7 @@ main (int argc, char **argv)
     SAVEGROUPPRIVS();
     TRYDROPGROUPPRIVS();
 
     SAVEGROUPPRIVS();
     TRYDROPGROUPPRIVS();
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
index fb01e8d..b118489 100644 (file)
@@ -41,7 +41,7 @@ main (int argc, char **argv)
     FILE *in, *out;
     int                check;
 
     FILE *in, *out;
     int                check;
 
-    if (nmh_init(argv[0], 0 /* use context_foil() */ )) { return 1; }
+    if (nmh_init(argv[0], false, false)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 0);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 0);
     argp = arguments;
index 00cc2fb..8c02825 100644 (file)
@@ -52,7 +52,7 @@ main (int argc, char **argv)
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs *mp;
 
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs *mp;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index c506432..c94002d 100644 (file)
@@ -102,7 +102,7 @@ main (int argc, char **argv)
     int header_encoding = CE_UNKNOWN;
     size_t n;
 
     int header_encoding = CE_UNKNOWN;
     size_t n;
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index cbfc08c..7a298e0 100644 (file)
@@ -144,7 +144,7 @@ main (int argc, char **argv) {
     fx.lf_line_endings = 0;
     fx.textcharset = NULL;
 
     fx.lf_line_endings = 0;
     fx.textcharset = NULL;
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index 9cae3c3..6cf7c0e 100644 (file)
@@ -77,7 +77,7 @@ main (int argc, char *argv[]) {
 
     icaldebug = 0;  /* Global provided by bison (with name-prefix "ical"). */
 
 
     icaldebug = 0;  /* Global provided by bison (with name-prefix "ical"). */
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index e360820..3554381 100644 (file)
--- a/uip/mhl.c
+++ b/uip/mhl.c
@@ -13,7 +13,7 @@
 int
 main (int argc, char **argv)
 {
 int
 main (int argc, char **argv)
 {
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     done (mhl (argc, argv));
     return 1;
 
     done (mhl (argc, argv));
     return 1;
index 77e2227..5b14b88 100644 (file)
@@ -78,7 +78,7 @@ main (int argc, char **argv)
     struct msgs *mp = NULL;
     CT ct, *ctp;
 
     struct msgs *mp = NULL;
     CT ct, *ctp;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     set_done(freects_done);
 
 
     set_done(freects_done);
 
index 64885d1..4a82c5c 100644 (file)
@@ -143,7 +143,7 @@ main(int argc, char **argv)
     const char *user = NULL, *saslmech = NULL, *svc = NULL, *browser = NULL;
     int snoop = 0;
 
     const char *user = NULL, *saslmech = NULL, *svc = NULL, *browser = NULL;
     int snoop = 0;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index ce53279..c361c5b 100644 (file)
--- a/uip/mhn.c
+++ b/uip/mhn.c
@@ -117,7 +117,7 @@ main (int argc, char **argv)
     FILE *fp;
     mhstoreinfo_t info;
 
     FILE *fp;
     mhstoreinfo_t info;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     set_done(freects_done);
 
 
     set_done(freects_done);
 
index abb44b3..ad41ad3 100644 (file)
@@ -145,7 +145,7 @@ main(int argc, char **argv)
     char *cp, buf[BUFSIZ], **argp;
     char **arguments, *comps[MAXARGS];
 
     char *cp, buf[BUFSIZ], **argp;
     char **arguments, *comps[MAXARGS];
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index ceed476..3eefb11 100644 (file)
@@ -32,7 +32,7 @@ main(int argc, char **argv)
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs *mp;
 
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs *mp;
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index f03c570..f868065 100644 (file)
@@ -92,7 +92,7 @@ main (int argc, char **argv)
     CT ct, *ctp;
     FILE *fp;
 
     CT ct, *ctp;
     FILE *fp;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     set_done(freects_done);
 
 
     set_done(freects_done);
 
index a848224..e09be9d 100644 (file)
@@ -77,7 +77,7 @@ main (int argc, char **argv)
     int files_not_clobbered;
     mhstoreinfo_t info;
 
     int files_not_clobbered;
     mhstoreinfo_t info;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     set_done(freects_done);
 
 
     set_done(freects_done);
 
index 3cb95ff..f066c53 100644 (file)
@@ -152,7 +152,7 @@ process_args(int argc, char **argv, const char **directory,
     NMH_UNUSED(suffix);
 #   endif /* ! HAVE_MKSTEMPS */
 
     NMH_UNUSED(suffix);
 #   endif /* ! HAVE_MKSTEMPS */
 
-    if (nmh_init(argv[0], 2)) { done(1); }
+    if (nmh_init(argv[0], true, false)) { done(1); }
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
index dac9cda..a553300 100644 (file)
@@ -86,7 +86,7 @@ main (int argc, char **argv)
     char **argp, **arguments, *vec[MAXVEC];
     struct passwd *pw;
 
     char **argp, **arguments, *vec[MAXVEC];
     struct passwd *pw;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     mts_init ();
 
 
     mts_init ();
 
index 2d035a1..d6f524a 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -444,7 +444,7 @@ main(int argc, char **argv)
     char *unseen;
     struct node *folder;
 
     char *unseen;
     struct node *folder;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index 1dce11e..8022e38 100644 (file)
@@ -45,7 +45,7 @@ main (int argc, char **argv)
     struct msgs *mp;
     struct stat st;
 
     struct msgs *mp;
     struct stat st;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     set_done(mbxclose_done);
 
 
     set_done(mbxclose_done);
 
index 0a1ea24..4bfc17a 100644 (file)
@@ -71,7 +71,7 @@ main (int argc, char **argv)
     int reverse = 0;
     int start, end, inc;
 
     int reverse = 0;
     int start, end, inc;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     set_done(putzero_done);
 
 
     set_done(putzero_done);
 
index dbe936b..ee0d380 100644 (file)
@@ -326,7 +326,7 @@ main (int argc, char **argv)
     FILE *in, *out;
     m_getfld_state_t gstate;
 
     FILE *in, *out;
     m_getfld_state_t gstate;
 
-    if (nmh_init(argv[0], 0 /* use context_foil() */)) { return 1; }
+    if (nmh_init(argv[0], false, false)) { return 1; }
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 0);
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 0);
index 4336ff2..6dcf3bb 100644 (file)
@@ -67,7 +67,7 @@ main (int argc, char **argv)
     char *tmpfil;
     m_getfld_state_t gstate;
 
     char *tmpfil;
     m_getfld_state_t gstate;
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index eaa66bf..e906740 100644 (file)
@@ -48,7 +48,7 @@ main (int argc, char **argv)
     FILE *fp;
     char *tfile = NULL;
 
     FILE *fp;
     char *tfile = NULL;
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     set_done(unlink_done);
 
 
     set_done(unlink_done);
 
index f641667..086d353 100644 (file)
@@ -40,7 +40,7 @@ main (int argc, char **argv)
     char *cp, *file = NULL, buf[BUFSIZ];
     char **argp, **arguments;
 
     char *cp, *file = NULL, buf[BUFSIZ];
     char **argp, **arguments;
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
index a3f4d3c..fb0a8b9 100644 (file)
@@ -57,7 +57,7 @@ main (int argc, char **argv)
     struct msgs *mp;
     struct stat st;
 
     struct msgs *mp;
     struct stat st;
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     set_done(unlink_done);
 
 
     set_done(unlink_done);
 
index cb164b5..693cd81 100644 (file)
@@ -78,7 +78,7 @@ main (int argc, char **argv)
     char **argp, **arguments, *vec[MAXARGS];
     struct utmpx *utp;
 
     char **argp, **arguments, *vec[MAXARGS];
     struct utmpx *utp;
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
index 4cba2e1..f9d3b54 100644 (file)
@@ -69,7 +69,7 @@ main (int argc, char **argv)
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs *mp;
 
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs *mp;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index ca35a9d..83e64a5 100644 (file)
@@ -134,7 +134,7 @@ main (int argc, char **argv)
 
     int buildsw = 0;
 
 
     int buildsw = 0;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index 6faaa4f..724bd26 100644 (file)
--- a/uip/rmf.c
+++ b/uip/rmf.c
@@ -40,7 +40,7 @@ main (int argc, char **argv)
     char buf[BUFSIZ], **argp, **arguments;
     char *fp;
 
     char buf[BUFSIZ], **argp, **arguments;
     char *fp;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index c49bf65..0d71be9 100644 (file)
--- a/uip/rmm.c
+++ b/uip/rmm.c
@@ -37,7 +37,7 @@ main (int argc, char **argv)
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs *mp;
 
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs *mp;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index 592cc0a..7fd636a 100644 (file)
@@ -53,7 +53,7 @@ main (int argc, char **argv)
     struct msgs *mp;
     FILE *in;
 
     struct msgs *mp;
     FILE *in;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
index 52fbbd1..7bf3c7c 100644 (file)
@@ -125,7 +125,7 @@ main (int argc, char **argv)
     int snoop = 0;
     char *auth_svc = NULL;
 
     int snoop = 0;
     char *auth_svc = NULL;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index 5153ffb..25ede02 100644 (file)
@@ -75,7 +75,7 @@ main (int argc, char **argv)
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs_array vec = { 0, 0, NULL }, non_mhl_vec = { 0, 0, NULL };
 
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs_array vec = { 0, 0, NULL }, non_mhl_vec = { 0, 0, NULL };
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     if (!strcasecmp (invo_name, "next")) {
        mode = NEXT;
 
     if (!strcasecmp (invo_name, "next")) {
        mode = NEXT;
index 9f1d8a4..98c1af1 100644 (file)
@@ -189,7 +189,7 @@ main (int argc, char **argv)
     char mailbox[BUFSIZ], tmpfil[BUFSIZ];
     char **argp, **arguments;
 
     char mailbox[BUFSIZ], tmpfil[BUFSIZ];
     char **argp, **arguments;
 
-    if (nmh_init(argv[0], 0 /* use context_foil() */)) { return 1; }
+    if (nmh_init(argv[0], false, false)) { return 1; }
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 0);
 
     mts_init ();
     arguments = getarguments (invo_name, argc, argv, 0);
index 41652ec..9807a02 100644 (file)
@@ -78,7 +78,7 @@ main (int argc, char **argv)
     struct smsg **dlist;
     int checksw = 0;
 
     struct smsg **dlist;
     int checksw = 0;
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], true, true)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
index 4bfd50c..7d9214e 100644 (file)
@@ -58,7 +58,7 @@ main (int argc, char **argv)
     char *cp, buf[BUFSIZ];
     char **argp, **arguments;
 
     char *cp, buf[BUFSIZ];
     char **argp, **arguments;
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 0);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 0);
     argp = arguments;
index 86a17f9..450d9e3 100644 (file)
@@ -12,7 +12,7 @@
 int
 main (int argc, char **argv)
 {
 int
 main (int argc, char **argv)
 {
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     return WhatNow (argc, argv);
 }
 
     return WhatNow (argc, argv);
 }
index 3432382..da34146 100644 (file)
@@ -66,7 +66,7 @@ main (int argc, char **argv)
     char *msg = NULL, **ap, **argp, backup[BUFSIZ];
     char buf[BUFSIZ], **arguments, *vec[MAXARGS];
 
     char *msg = NULL, **ap, **argp, backup[BUFSIZ];
     char buf[BUFSIZ], **arguments, *vec[MAXARGS];
 
-    if (nmh_init(argv[0], 2)) { return 1; }
+    if (nmh_init(argv[0], true, false)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;