-#include <h/mh.h>
-#include <pwd.h>
-
-static struct swit switches[] = {
-#define AUTOSW 0
- { "auto", 0 },
-#define VERSIONSW 1
- { "version", 0 },
-#define HELPSW 2
- { "help", 4 },
- { NULL, 0 }
-};
-
-static char *message[] = {
- "Prior to using nmh, it is necessary to have a file in your login",
- "directory (%s) named %s which contains information",
- "to direct certain nmh operations. The only item which is required",
- "is the path to use for all nmh folder operations. The suggested nmh",
- "path for you is %s/Mail...",
- NULL
-};
-
-/*
- * static prototypes
- */
-static char *geta(void);
+#include <h/mh.h> /* mh internals */
+#include <h/utils.h>
+#include "../sbr/m_maildir.h"
+#include "../sbr/makedir.h"
+#include <pwd.h> /* structure for getpwuid() results */
+
+#define INSTALLMH_SWITCHES \
+ X("auto", 0, AUTOSW) \
+ X("version", 0, VERSIONSW) \
+ X("help", 0, HELPSW) \
+ X("check", 1, CHECKSW) \
+
+#define X(sw, minchars, id) id,
+DEFINE_SWITCH_ENUM(INSTALLMH);
+#undef X
+
+#define X(sw, minchars, id) { sw, minchars, id },
+DEFINE_SWITCH_ARRAY(INSTALLMH, switches);
+#undef X