X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fap.c;h=a4e218946f0cfda7e0879b62ec8b909241fbb97c;hp=b835acb9491793dd3e53fb4f1c92f41b9de23459;hb=a0b824f146a18ad99633addede9e81a470d4cb59;hpb=240013872c392fe644bd4f79382d9f5314b4ea60 diff --git a/uip/ap.c b/uip/ap.c index b835acb..a4e2189 100644 --- a/uip/ap.c +++ b/uip/ap.c @@ -9,7 +9,6 @@ #include #include #include -#include #define NADDRS 100 @@ -68,51 +67,50 @@ main(int argc, char **argv) /* 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) @@ -126,7 +124,7 @@ main(int argc, char **argv) adios(NULL, "usage: %s [switches] addrs ...", invo_name); /* get new format string */ - nfs = new_fs(form, format, FORMAT); + nfs = new_fs(form, format, NULL, FORMAT); if (width == 0) { if ((width = sc_width()) < WIDTH / 2)