summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manpath.c6
-rw-r--r--manpath.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/manpath.c b/manpath.c
index 7c305e4c..333092a6 100644
--- a/manpath.c
+++ b/manpath.c
@@ -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))) {
diff --git a/manpath.h b/manpath.h
index 6b9837aa..7e6950d0 100644
--- a/manpath.h
+++ b/manpath.h
@@ -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 *);