]> diplodocus.org Git - nmh/blobdiff - h/mhcachesbr.h
new.c: Order two return statements to match comment.
[nmh] / h / mhcachesbr.h
index 9c1db6a4ba0211ba7df1e86e3b15f9a81684a030..6e6beacb839c2d5cddcd50c4f72afe9bb057b0a5 100644 (file)
@@ -1,19 +1,27 @@
-
-/*
- * 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 },
-#define CACHE_PRIVATE  1
-    { "private", 0 },
-#define CACHE_PUBLIC   2
-    { "public", 0 },
-#define CACHE_ASK      3
-    { "ask", 0 },
-    { NULL, 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
+extern struct swit *cache_policy;
+
+void cache_all_messages(CT *cts);
+int find_cache(CT ct, int policy, int *writing, char *id,
+    char *buffer, int buflen);
+
+extern int rcachesw;
+extern int wcachesw;
+
+extern char *cache_public;
+extern char *cache_private;