]> diplodocus.org Git - nmh/blobdiff - uip/refile.c
Update for post-1.6.
[nmh] / uip / refile.c
index 19e12661a1bd16cabd3611a250204abeec15fcb2..ecbe346627504d0e0467eb233f7f8d283de0689c 100644 (file)
@@ -68,13 +68,7 @@ main (int argc, char **argv)
     struct msgs_array msgs = { 0, 0, NULL };
     struct msgs *mp;
 
-#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;
@@ -344,7 +338,7 @@ remove_files (int filep, char **files)
     /* Else just unlink the files */
     files++;   /* advance past filevec[0] */
     for (i = 0; i < filep; i++) {
-       if (unlink (files[i]) == NOTOK)
+       if (m_unlink (files[i]) == NOTOK)
            admonish (files[i], "unable to unlink");
     }
 }