X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/5dd6771b28c257af405d7248639ed0e3bcdce38b..d205d39a:/h/mhcachesbr.h?ds=inline diff --git a/h/mhcachesbr.h b/h/mhcachesbr.h index 9c1db6a4..6e6beacb 100644 --- a/h/mhcachesbr.h +++ b/h/mhcachesbr.h @@ -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;