]> diplodocus.org Git - nmh/blobdiff - uip/repl.c
mhshow.man: fix an incorrect 'mhn' reference
[nmh] / uip / repl.c
index b089dbac1e7585fae6513a4c074e54a4f247e85e..7b0ab4a03d55dff683ba1707d75bb3040173407d 100644 (file)
@@ -88,7 +88,7 @@ static struct swit aqrl[] = {
     { "replace", 0, YESW },
     { "list", 0, LISTDSW },
     { "refile +folder", 0, REFILSW },
-    { NULL, 0 }
+    { NULL, 0, 0 }
 };
 
 short ccto = -1;               /* global for replsbr */
@@ -96,13 +96,13 @@ short cccc = -1;
 short ccme = -1;
 short querysw = 0;
 
-short outputlinelen = OUTPUTLINELEN;
-short groupreply = 0;          /* Is this a group reply?        */
+static short outputlinelen = OUTPUTLINELEN;
+static short groupreply = 0;           /* Is this a group reply?        */
 
-int mime = 0;                  /* include original as MIME part */
-char *form   = NULL;           /* form (components) file        */
-char *filter = NULL;           /* message filter file           */
-char *fcc    = NULL;           /* folders to add to Fcc: header */
+static int mime = 0;                   /* include original as MIME part */
+static char *form   = NULL;            /* form (components) file        */
+static char *filter = NULL;            /* message filter file           */
+static char *fcc    = NULL;            /* folders to add to Fcc: header */
 
 
 /*
@@ -129,13 +129,7 @@ main (int argc, char **argv)
 
     int buildsw = 0;
 
-#ifdef LOCALE
-    setlocale(LC_ALL, "");
-#endif
-    invo_name = r1bindex (argv[0], '/');
-
-    /* read user profile/context */
-    context_read();
+    if (nmh_init(argv[0], 1)) { return 1; }
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
@@ -386,7 +380,7 @@ try_it_again:
            adios (maildir, "unable to change directory to");
 
        /* read folder and create message structure */
-       if (!(mp = folder_read (folder)))
+       if (!(mp = folder_read (folder, 1)))
            adios (NULL, "unable to read folder %s", folder);
 
        /* check for empty folder */