X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Ffmtdump.c;h=a7fe9f450d718632f593ed4687bcb2e311c7320b;hp=d948a063d8f4372d9391a9f8577eb2b10252e1ba;hb=ffe93d6dc707aaf92529cefb38a1814956b48c9e;hpb=5d4f603fcfc7cf4a238b27de2b18567a733bb6b4 diff --git a/uip/fmtdump.c b/uip/fmtdump.c index d948a06..a7fe9f4 100644 --- a/uip/fmtdump.c +++ b/uip/fmtdump.c @@ -14,11 +14,9 @@ static struct swit switches[] = { #define FORMSW 0 { "form formatfile", 0 }, -#define FMTSW 1 - { "format string", 5 }, -#define VERSIONSW 2 +#define VERSIONSW 1 { "version", 0 }, -#define HELPSW 3 +#define HELPSW 2 { "help", 0 }, { NULL, 0 } }; @@ -45,8 +43,8 @@ int main(int argc, char **argv) { int ncomps; - char *cp, *form = NULL, *format = NULL; - char buf[BUFSIZ], *nfs, **argp, **arguments; + char *cp, *form = NULL; + char buf[BUFSIZ], *fmtstr, **argp, **arguments; struct format *fmt; #ifdef LOCALE @@ -82,13 +80,6 @@ main(int argc, char **argv) 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; } @@ -102,8 +93,8 @@ main(int argc, char **argv) /* ** Get new format string. Must be before chdir(). */ - nfs = new_fs(form, format, FORMAT); - ncomps = fmt_compile(nfs, &fmt); + fmtstr = new_fs(form, FORMAT); + ncomps = fmt_compile(fmtstr, &fmt); fmt_dump(fmt); done(0);