]> diplodocus.org Git - nmh/blobdiff - uip/folder.c
Fixed fixup of sbr/dtimep.c with flex 2.5.36.
[nmh] / uip / folder.c
index e4defc70552a79d3318b5a73442019b2701e1e27..98ecde68d70f27ac102083dfb6012e8e04a799a7 100644 (file)
@@ -12,7 +12,6 @@
 #include <h/mh.h>
 #include <h/crawl_folders.h>
 #include <h/utils.h>
 #include <h/mh.h>
 #include <h/crawl_folders.h>
 #include <h/utils.h>
-#include <errno.h>
 
 #define FOLDER_SWITCHES \
     X("all", 0, ALLSW) \
 
 #define FOLDER_SWITCHES \
     X("all", 0, ALLSW) \
@@ -102,13 +101,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;
 
-#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; }
 
     /*
      * If program was invoked with name ending
 
     /*
      * If program was invoked with name ending
@@ -403,7 +396,7 @@ get_folder_info_body (char *fold, char *msg, boolean *crawl_children)
        /*
         * create message structure and get folder info
         */
        /*
         * create message structure and get folder info
         */
-       if (!(mp = folder_read (fold))) {
+       if (!(mp = folder_read (fold, 1))) {
            admonish (NULL, "unable to read folder %s", fold);
            return 0;
        }
            admonish (NULL, "unable to read folder %s", fold);
            return 0;
        }