X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/cff8de7654cf393a494b01a587bd4d503d15a5e3..ccafa1944:/uip/rmm.c?ds=inline diff --git a/uip/rmm.c b/uip/rmm.c index 28c26fb4..d96622ed 100644 --- a/uip/rmm.c +++ b/uip/rmm.c @@ -10,17 +10,19 @@ #include #include -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