]> diplodocus.org Git - nmh/blobdiff - uip/rmm.c
Support for the address duplication done by repl, and also clean up
[nmh] / uip / rmm.c
index 15302896d629f10b393d70e7a6895ce5bc1e7e39..d96622ed835c3492546098874d38a303c462bd26 100644 (file)
--- a/uip/rmm.c
+++ b/uip/rmm.c
@@ -2,8 +2,6 @@
 /*
  * rmm.c -- remove a message(s)
  *
- * $Id$
- *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  * complete copyright information.
 #include <h/mh.h>
 #include <h/utils.h>
 
-static struct swit switches[] = {
-#define UNLINKSW      0
-    { "unlink", 0 },
-#define NUNLINKSW    1
-    { "nounlink", 0 },
-#define VERSIONSW     2
-    { "version", 0 },
-#define        HELPSW        3
-    { "help", 0 },
-    { NULL, 0 }
-};
+#define RMM_SWITCHES \
+    X("unlink", 0, UNLINKSW) \
+    X("nounlink", 0, NUNLINKSW) \
+    X("version", 0, VERSIONSW) \
+    X("help", 0, HELPSW) \
+
+#define X(sw, minchars, id) id,
+DEFINE_SWITCH_ENUM(RMM);
+#undef X
+
+#define X(sw, minchars, id) { sw, minchars, id },
+DEFINE_SWITCH_ARRAY(RMM, switches);
+#undef X
 
 
 int
@@ -60,10 +60,10 @@ main (int argc, char **argv)
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
                          invo_name);
                print_help (buf, switches, 1);
-               done (1);
+               done (0);
            case VERSIONSW:
                print_version(invo_name);
-               done (1);
+               done (0);
 
            case UNLINKSW:
                unlink_msgs++;