diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-11-24 10:44:56 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-11-24 10:44:56 +0000 |
commit | 2d1ee60475147395c6882b1d665727e5ca188f69 (patch) | |
tree | 4c490b4cc49a49b076ab6da69e6b3a97e0e5498a | |
parent | 9a148299955838a8d5925f8323a7a2763082b8cd (diff) | |
download | mandoc-2d1ee60475147395c6882b1d665727e5ca188f69.tar.gz |
Allow man.conf file to be assignable.
-rw-r--r-- | manpath.c | 6 | ||||
-rw-r--r-- | manpath.h | 2 |
2 files changed, 4 insertions, 4 deletions
@@ -123,7 +123,7 @@ manpath_parseconf(struct manpaths *dirs) free(buf); pclose(stream); #else - manpath_manconf(dirs); + manpath_manconf(MAN_CONF_FILE, dirs); #endif } @@ -139,7 +139,7 @@ manpath_free(struct manpaths *p) } void -manpath_manconf(struct manpaths *dirs) +manpath_manconf(const char *file, struct manpaths *dirs) { FILE *stream; char *p, *q; @@ -148,7 +148,7 @@ manpath_manconf(struct manpaths *dirs) keysz = strlen(MAN_CONF_KEY); assert(keysz > 0); - if (NULL == (stream = fopen(MAN_CONF_FILE, "r"))) + if (NULL == (stream = fopen(file, "r"))) return; while (NULL != (p = fgetln(stream, &len))) { @@ -29,7 +29,7 @@ struct manpaths { __BEGIN_DECLS -void manpath_manconf(struct manpaths *); +void manpath_manconf(const char *, struct manpaths *); void manpath_parse(struct manpaths *, char *, char *); void manpath_parseconf(struct manpaths *); void manpath_parseline(struct manpaths *, char *); |