/*
- * mhcachesbr.c -- routines to manipulate the MIME content cache
- *
- * This code is Copyright (c) 2002, by the authors of nmh. See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
+** mhcachesbr.c -- routines to manipulate the MIME content cache
+**
+** This code is Copyright (c) 2002, by the authors of nmh. See the
+** COPYRIGHT file in the root directory of the nmh distribution for
+** complete copyright information.
+*/
#include <h/mh.h>
#include <fcntl.h>
int wcachesw = CACHE_ASK;
/*
- * Location of public and private cache. These must
- * be set before these routines are called.
- */
+** Location of public and private cache. These must
+** be set before these routines are called.
+*/
char *cache_public;
char *cache_private;
void flush_errors (void);
/*
- * prototypes
- */
+** prototypes
+*/
void cache_all_messages (CT *);
int find_cache (CT, int, int *, char *, char *, int);
/*
- * static prototypes
- */
+** static prototypes
+*/
static void cache_content (CT);
static int find_cache_aux (int, char *, char *, char *, int);
static int find_cache_aux2 (char *, char *, char *, int);
/*
- * Top level entry point to cache content
- * from a group of messages
- */
+** Top level entry point to cache content
+** from a group of messages
+*/
void
cache_all_messages (CT *cts)
/*
- * Entry point to cache content from external sources.
- */
+** Entry point to cache content from external sources.
+*/
static void
cache_content (CT ct)
FILE *fp;
if (debugsw)
- fprintf (stderr, "caching by copying %s...\n", ce->ce_file);
+ fprintf (stderr, "caching by copying %s...\n",
+ ce->ce_file);
file = NULL;
if ((*ct->c_ceopenfnx) (ct, &file) == NOTOK)
}
fclose (fp);
} else
- content_error (cachefile, ct, "unable to fopen for writing");
+ content_error (cachefile, ct,
+ "unable to fopen for writing");
reset_umask:
umask (mask);
} else {
id = trimcpy (id);
if (debugsw)
- fprintf (stderr, "find_cache %s(%d) %s %s\n", caches[policy].sw,
- policy, writing ? "writing" : "reading", id);
+ fprintf (stderr, "find_cache %s(%d) %s %s\n",
+ caches[policy].sw, policy,
+ writing ? "writing" : "reading", id);
switch (policy) {
case CACHE_NEVER: