]> diplodocus.org Git - nmh/blobdiff - uip/mhparam.c
Update manpages to use .TP for tagged paragraphs (part I).
[nmh] / uip / mhparam.c
index 90d17fa2df2b502d99cb319c4d4f52b1758cbb42..1fb50a724d41d9e57592fa68db7dccc0c7e67e35 100644 (file)
@@ -17,21 +17,21 @@ extern char *mhetcdir;
 
 char *sbackup = BACKUP_PREFIX;
 
-static struct swit switches[] = {
-#define        COMPSW    0
-    { "components", 0 },
-#define        NCOMPSW   1
-    { "nocomponents", 0 },
-#define        ALLSW     2
-    { "all", 0 },
-#define VERSIONSW 3
-    { "version", 0 },
-#define        HELPSW    4
-    { "help", 0 },
-#define DEBUGSW   5
-    { "debug", -5 },
-    { NULL, 0 }
-};
+#define MHPARAM_SWITCHES \
+    X("components", 0, COMPSW) \
+    X("nocomponents", 0, NCOMPSW) \
+    X("all", 0, ALLSW) \
+    X("version", 0, VERSIONSW) \
+    X("help", 0, HELPSW) \
+    X("debug", 5, DEBUGSW) \
+
+#define X(sw, minchars, id) id,
+DEFINE_SWITCH_ENUM(MHPARAM);
+#undef X
+
+#define X(sw, minchars, id) { sw, minchars, id },
+DEFINE_SWITCH_ARRAY(MHPARAM, switches);
+#undef X
 
 struct proc {
     char *p_name;
@@ -42,7 +42,6 @@ static struct proc procs [] = {
      { "context",       &context },
      { "mh-sequences",  &mh_seq },
      { "buildmimeproc", &buildmimeproc },
-     { "faceproc",      &faceproc },
      { "fileproc",      &fileproc },
      { "foldprot",      &foldprot },
      { "formatproc",   &formatproc },
@@ -107,10 +106,10 @@ main(int argc, char **argv)
                    snprintf (buf, sizeof(buf), "%s [profile-components] [switches]",
                        invo_name);
                    print_help (buf, switches, 1);
-                   done (1);
+                   done (0);
                case VERSIONSW:
                    print_version(invo_name);
-                   done (1);
+                   done (0);
 
                case COMPSW:
                    components = 1;