diff options
Diffstat (limited to 'manpath.c')
-rw-r--r-- | manpath.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -36,7 +36,8 @@ static void manpath_add(struct manpaths *, const char *); void -manpath_parse(struct manpaths *dirs, char *defp, char *auxp) +manpath_parse(struct manpaths *dirs, const char *file, + char *defp, char *auxp) { manpath_parseline(dirs, auxp); @@ -45,7 +46,7 @@ manpath_parse(struct manpaths *dirs, char *defp, char *auxp) defp = getenv("MANPATH"); if (NULL == defp) - manpath_parseconf(dirs); + manpath_parseconf(dirs, file); else manpath_parseline(dirs, defp); } @@ -91,7 +92,7 @@ manpath_add(struct manpaths *dirs, const char *dir) } void -manpath_parseconf(struct manpaths *dirs) +manpath_parseconf(struct manpaths *dirs, const char *file) { #ifdef USE_MANPATH FILE *stream; @@ -124,7 +125,7 @@ manpath_parseconf(struct manpaths *dirs) free(buf); pclose(stream); #else - manpath_manconf(MAN_CONF_FILE, dirs); + manpath_manconf(dirs, file ? file : MAN_CONF_FILE); #endif } @@ -140,7 +141,7 @@ manpath_free(struct manpaths *p) } void -manpath_manconf(const char *file, struct manpaths *dirs) +manpath_manconf(struct manpaths *dirs, const char *file) { FILE *stream; char *p, *q; |