Removed `-format string' switches but made -form accept `=formatstring'.
[mmh] / uip / dp.c
index a9940d3..66f0f42 100644 (file)
--- a/uip/dp.c
+++ b/uip/dp.c
 #define WIDTH 78
 #define WBUFSIZ BUFSIZ
 
-#define FORMAT "%<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%>"
+#define FORMAT "=%<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%>"
 
 static struct swit switches[] = {
 #define FORMSW  0
        { "form formatfile", 0 },
-#define FMTSW  1
-       { "format string", 5 },
-#define WIDTHSW  2
+#define WIDTHSW  1
        { "width columns", 0 },
-#define VERSIONSW  3
+#define VERSIONSW  2
        { "version", 0 },
-#define HELPSW  4
+#define HELPSW  3
        { "help", 0 },
        { NULL, 0 }
 };
@@ -50,7 +48,7 @@ int
 main(int argc, char **argv)
 {
        int datep = 0, width = 0, status = 0;
-       char *cp, *form = NULL, *format = NULL, *nfs;
+       char *cp, *form = NULL, *nfs;
        char buf[BUFSIZ], **argp, **arguments;
        char *dates[NDATES];
 
@@ -86,13 +84,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;
 
                        case WIDTHSW:
@@ -114,7 +105,7 @@ main(int argc, char **argv)
                adios(NULL, "usage: %s [switches] dates ...", invo_name);
 
        /* get new format string */
-       nfs = new_fs(form, format, NULL, FORMAT);
+       nfs = new_fs(form, FORMAT);
 
        if (width == 0) {
                if ((width = sc_width()) < WIDTH / 2)