]> diplodocus.org Git - nmh/blobdiff - h/mhcachesbr.h
Makefile.am: Alter long lists to be sorted, one entry per line.
[nmh] / h / mhcachesbr.h
index 2ef2c6da3168af0eaeaeaba131f74dbc64300d57..d02c9f1bf00d675c7514fe0cb63580a79b2d8ce5 100644 (file)
@@ -1,19 +1,20 @@
-
-/*
- * mhcachesbr.h -- definitions for manipulating MIME content cache
+/* mhcachesbr.h -- definitions for manipulating MIME content cache
  */
 
 /*
  * various cache policies
  */
-static struct swit caches[] = {
-#define CACHE_NEVER    0
-    { "never", 0, 0 },
-#define CACHE_PRIVATE  1
-    { "private", 0, 0 },
-#define CACHE_PUBLIC   2
-    { "public", 0, 0 },
-#define CACHE_ASK      3
-    { "ask", 0, 0 },
-    { NULL, 0, 0 }
-};
+
+#define CACHE_SWITCHES \
+    X("never", 0, CACHE_NEVER) \
+    X("private", 0, CACHE_PRIVATE) \
+    X("public", 0, CACHE_PUBLIC) \
+    X("ask", 0, CACHE_ASK) \
+
+#define X(sw, minchars, id) id,
+DEFINE_SWITCH_ENUM(CACHE);
+#undef X
+
+#define X(sw, minchars, id) { sw, minchars, id },
+DEFINE_SWITCH_ARRAY(CACHE, caches);
+#undef X