version 1.9, 2012/06/08 10:32:40 |
version 1.13, 2014/03/23 11:25:26 |
|
|
#include "config.h" |
#include "config.h" |
#endif |
#endif |
|
|
#include <sys/param.h> |
|
|
|
#include <assert.h> |
#include <assert.h> |
#include <ctype.h> |
#include <ctype.h> |
#include <limits.h> |
#include <limits.h> |
|
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
#include "mandoc.h" |
#include "mandoc_aux.h" |
#include "manpath.h" |
#include "manpath.h" |
|
|
#define MAN_CONF_FILE "/etc/man.conf" |
#define MAN_CONF_FILE "/etc/man.conf" |
Line 42 manpath_parse(struct manpaths *dirs, const char *file, |
|
Line 40 manpath_parse(struct manpaths *dirs, const char *file, |
|
char *defp, char *auxp) |
char *defp, char *auxp) |
{ |
{ |
#ifdef USE_MANPATH |
#ifdef USE_MANPATH |
char cmd[(MAXPATHLEN * 3) + 20]; |
char cmd[(PATH_MAX * 3) + 20]; |
FILE *stream; |
FILE *stream; |
char *buf; |
char *buf; |
size_t sz, bsz; |
size_t sz, bsz; |
Line 90 manpath_parse(struct manpaths *dirs, const char *file, |
|
Line 88 manpath_parse(struct manpaths *dirs, const char *file, |
|
char *insert; |
char *insert; |
|
|
/* Always prepend -m. */ |
/* Always prepend -m. */ |
manpath_parseline(dirs, auxp); |
manpath_parseline(dirs, auxp); |
|
|
/* If -M is given, it overrides everything else. */ |
/* If -M is given, it overrides everything else. */ |
if (NULL != defp) { |
if (NULL != defp) { |
manpath_parseline(dirs, defp); |
manpath_parseline(dirs, defp); |
Line 211 manpath_manconf(struct manpaths *dirs, const char *fil |
|
Line 209 manpath_manconf(struct manpaths *dirs, const char *fil |
|
if (strncmp(MAN_CONF_KEY, p, keysz)) |
if (strncmp(MAN_CONF_KEY, p, keysz)) |
continue; |
continue; |
p += keysz; |
p += keysz; |
while (isspace(*p)) |
while (isspace((unsigned char)*p)) |
p++; |
p++; |
if ('\0' == *p) |
if ('\0' == *p) |
continue; |
continue; |