Removed mts.conf; the maildelivery option went into slocal directly.
[mmh] / uip / ap.c
index 41e990a..4f7f760 100644 (file)
--- a/uip/ap.c
+++ b/uip/ap.c
@@ -63,56 +63,55 @@ main(int argc, char **argv)
 #ifdef LOCALE
        setlocale(LC_ALL, "");
 #endif
-       invo_name = r1bindex(argv[0], '/');
+       invo_name = mhbasename(argv[0]);
 
        /* read user profile/context */
        context_read();
 
-       mts_init(invo_name);
        arguments = getarguments(invo_name, argc, argv, 1);
        argp = arguments;
 
        while ((cp = *argp++)) {
                if (*cp == '-') {
                        switch (smatch(++cp, switches)) {
-                               case AMBIGSW:
-                                       ambigsw(cp, switches);
-                                       done(1);
-
-                               case UNKWNSW:
-                                       adios(NULL, "-%s unknown", cp);
-
-                               case HELPSW:
-                                       snprintf(buf, sizeof(buf), "%s [switches] addrs ...", invo_name);
-                                       print_help(buf, switches, 1);
-                                       done(1);
-                               case VERSIONSW:
-                                       print_version(invo_name);
-                                       done(1);
-
-                               case FORMSW:
-                                       if (!(form = *argp++) || *form == '-')
-                                               adios(NULL, "missing argument to %s", argp[-2]);
-                                       format = NULL;
-                                       continue;
-                               case FMTSW:
-                                       if (!(format = *argp++) || *format == '-')
-                                               adios(NULL, "missing argument to %s", argp[-2]);
-                                       form = NULL;
-                                       continue;
-
-                               case WIDTHSW:
-                                       if (!(cp = *argp++) || *cp == '-')
-                                               adios(NULL, "missing argument to %s", argp[-2]);
-                                       width = atoi(cp);
-                                       continue;
-
-                               case NORMSW:
-                                       normalize = AD_HOST;
-                                       continue;
-                               case NNORMSW:
-                                       normalize = AD_NHST;
-                                       continue;
+                       case AMBIGSW:
+                               ambigsw(cp, switches);
+                               done(1);
+
+                       case UNKWNSW:
+                               adios(NULL, "-%s unknown", cp);
+
+                       case HELPSW:
+                               snprintf(buf, sizeof(buf), "%s [switches] addrs ...", invo_name);
+                               print_help(buf, switches, 1);
+                               done(1);
+                       case VERSIONSW:
+                               print_version(invo_name);
+                               done(1);
+
+                       case FORMSW:
+                               if (!(form = *argp++) || *form == '-')
+                                       adios(NULL, "missing argument to %s", argp[-2]);
+                               format = NULL;
+                               continue;
+                       case FMTSW:
+                               if (!(format = *argp++) || *format == '-')
+                                       adios(NULL, "missing argument to %s", argp[-2]);
+                               form = NULL;
+                               continue;
+
+                       case WIDTHSW:
+                               if (!(cp = *argp++) || *cp == '-')
+                                       adios(NULL, "missing argument to %s", argp[-2]);
+                               width = atoi(cp);
+                               continue;
+
+                       case NORMSW:
+                               normalize = AD_HOST;
+                               continue;
+                       case NNORMSW:
+                               normalize = AD_NHST;
+                               continue;
                        }
                }
                if (addrp > NADDRS)