]> diplodocus.org Git - nmh/blobdiff - uip/show.c
Use a dynamically-allocated buffer for character set conversion, and
[nmh] / uip / show.c
index 5a912f6bd1074057e2606a179af728825a5699d1..acd08afb1bc9cbe1e4ae7a1e5475b6a49ed2e25e 100644 (file)
@@ -61,13 +61,7 @@ main (int argc, char **argv)
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs_array vec = { 0, 0, NULL };
 
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs_array vec = { 0, 0, NULL };
 
-#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 (!strcasecmp (invo_name, "next")) {
        mode = NEXT;
 
     if (!strcasecmp (invo_name, "next")) {
        mode = NEXT;