]> diplodocus.org Git - nmh/blobdiff - uip/dist.c
Implement OAuth 2.0 [1] for XOAUTH2 in SMTP [2] and POP3 [3].
[nmh] / uip / dist.c
index 3d247181b5c9c50f03faefc9ef7f6a768407f461..5a35e59a7385b052b918a9f3b47b81f2ac308114 100644 (file)
@@ -83,13 +83,7 @@ main (int argc, char **argv)
     struct msgs *mp = NULL;
     struct stat st;
 
-#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;
@@ -281,7 +275,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 */