-static struct swit switches[] = {
-#define DATESW 0
- { "date", 0 },
-#define NDATESW 1
- { "nodate", 0 },
-#define NOTESW 2
- { "notify type", 0 },
-#define NNOTESW 3
- { "nonotify type", 0 },
-#define HOSTSW 4
- { "host hostname", POPminc (-4) },
-#define USERSW 5
- { "user username", POPminc (-4) },
-#define PORTSW 6
- { "port name/number", POPminc(-4) },
-#define VERSIONSW 7
- { "version", 0 },
-#define HELPSW 8
- { "help", 0 },
-#define SNOOPSW 9
- { "snoop", -5 },
-#define SASLSW 10
- { "sasl", SASLminc(-4) },
-#define SASLMECHSW 11
- { "saslmech", SASLminc(-5) },
-#define PROXYSW 12
- { "proxy command", POPminc(-5) },
- { NULL, 0 }
-};
+#ifndef TLS_SUPPORT
+# define TLSminc(a) (a)
+#else
+# define TLSminc(a) 0
+#endif
+
+#define MSGCHK_SWITCHES \
+ X("date", 0, DATESW) \
+ X("nodate", 0, NDATESW) \
+ X("notify type", 0, NOTESW) \
+ X("nonotify type", 0, NNOTESW) \
+ X("host hostname", 0, HOSTSW) \
+ X("user username", 0, USERSW) \
+ X("port name/number", 0, PORTSW) \
+ X("version", 0, VERSIONSW) \
+ X("help", 0, HELPSW) \
+ X("snoop", 0, SNOOPSW) \
+ X("sasl", SASLminc(4), SASLSW) \
+ X("nosasl", SASLminc(6), NOSASLSW) \
+ X("saslmech", SASLminc(5), SASLMECHSW) \
+ X("authservice", SASLminc(0), AUTHSERVICESW) \
+ X("initialtls", TLSminc(-10), INITTLSSW) \
+ X("notls", TLSminc(-5), NOTLSSW) \
+ X("certverify", TLSminc(-10), CERTVERSW) \
+ X("nocertverify", TLSminc(-12), NOCERTVERSW) \
+ X("proxy command", 0, PROXYSW) \
+
+#define X(sw, minchars, id) id,
+DEFINE_SWITCH_ENUM(MSGCHK);
+#undef X
+
+#define X(sw, minchars, id) { sw, minchars, id },
+DEFINE_SWITCH_ARRAY(MSGCHK, switches);
+#undef X