X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/cff8de7654cf393a494b01a587bd4d503d15a5e3..a0a83a5f49e737fb20e3d406ae78b8fc2fbca5f9:/uip/conflict.c diff --git a/uip/conflict.c b/uip/conflict.c index 2324c650..d8c45669 100644 --- a/uip/conflict.c +++ b/uip/conflict.c @@ -26,17 +26,19 @@ */ #define NGRPS 100 -static struct swit switches[] = { -#define MAILSW 0 - { "mail name", 0 }, -#define SERCHSW 1 - { "search directory", 0 }, -#define VERSIONSW 2 - { "version", 0 }, -#define HELPSW 3 - { "help", 0 }, - { NULL, 0 } -}; +#define CONFLICT_SWITCHES \ + X("mail name", 0, MAILSW) \ + X("search directory", 0, SERCHSW) \ + X("version", 0, VERSIONSW) \ + X("help", 0, HELPSW) \ + +#define X(sw, minchars, id) id, +DEFINE_SWITCH_ENUM(CONFLICT); +#undef X + +#define X(sw, minchars, id) { sw, minchars, id }, +DEFINE_SWITCH_ARRAY(CONFLICT, switches); +#undef X static char *mail = NULL; static char *dirs[NDIRS];