diff options
author | Colin Watson <cjwatson@debian.org> | 2007-08-28 18:41:40 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2007-08-28 18:41:40 +0100 |
commit | 3972f917a15541fcdb691f68009902fd14711bea (patch) | |
tree | 1fce01f743a2478eff230b41f5c69a74453ee5f1 /src/manp.c | |
parent | 53473775ba41ccbc4edee85afd4756c6981de342 (diff) |
Add a configuration file flag (NOCACHE) to disable cat page caching
(thanks, Ralph Corderoy; Debian bug #196642).
* src/manp.c (add_to_dirlist): Recognise NOCACHE.
* src/man.c (display): Don't save a cat page if NOCACHE is set.
* src/man_db.conf.in: Document NOCACHE.
* man/man5/manpath.man5 (FORMAT): Document NOCACHE.
* docs/NEWS: Document this.
Diffstat (limited to 'src/manp.c')
-rw-r--r-- | src/manp.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -98,6 +98,7 @@ static struct list *namestore, *tailstore; static char *tmplist[MAXDIRS]; char *user_config_file = NULL; +int disable_cache; static void mkcatdirs (const char *mandir, const char *catdir); static __inline__ char *get_manpath_from_path (const char *path); @@ -705,6 +706,8 @@ static void add_to_dirlist (FILE *config, int user) */ if (*bp == '#' || *bp == '\0') continue; + else if (strncmp (bp, "NOCACHE", 7) == 0) + disable_cache = 1; else if (strncmp (bp, "NO", 2) == 0) continue; /* match any word starting with NO */ else if (sscanf (bp, "MANBIN %*s") == 1) |