]> diplodocus.org Git - nmh/blobdiff - uip/rmm.c
Ignore the sign mismatch warning when sbr/dtimep.c is built with
[nmh] / uip / rmm.c
index 7680008d196ca4b24c1764ac4a8f999c14e811a5..d96622ed835c3492546098874d38a303c462bd26 100644 (file)
--- a/uip/rmm.c
+++ b/uip/rmm.c
 #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
@@ -58,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++;