]> diplodocus.org Git - nmh/blob - h/mhcachesbr.h
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / h / mhcachesbr.h
1 /* mhcachesbr.h -- definitions for manipulating MIME content cache
2 */
3
4 /*
5 * various cache policies
6 */
7
8 #define CACHE_SWITCHES \
9 X("never", 0, CACHE_NEVER) \
10 X("private", 0, CACHE_PRIVATE) \
11 X("public", 0, CACHE_PUBLIC) \
12 X("ask", 0, CACHE_ASK) \
13
14 #define X(sw, minchars, id) id,
15 DEFINE_SWITCH_ENUM(CACHE);
16 #undef X
17 extern struct swit *cache_policy;
18
19 void cache_all_messages(CT *cts);
20 int find_cache(CT ct, int policy, int *writing, char *id,
21 char *buffer, int buflen);
22
23 extern int rcachesw;
24 extern int wcachesw;
25
26 extern char *cache_public;
27 extern char *cache_private;