-/* $Id: manpath.c,v 1.2 2011/11/24 10:43:55 kristaps Exp $ */
+/* $Id: manpath.c,v 1.3 2011/11/24 10:44:56 kristaps Exp $ */
/*
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
free(buf);
pclose(stream);
#else
- manpath_manconf(dirs);
+ manpath_manconf(MAN_CONF_FILE, dirs);
#endif
}
}
void
-manpath_manconf(struct manpaths *dirs)
+manpath_manconf(const char *file, struct manpaths *dirs)
{
FILE *stream;
char *p, *q;
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))) {
-/* $Id: manpath.h,v 1.2 2011/11/24 10:43:55 kristaps Exp $ */
+/* $Id: manpath.h,v 1.3 2011/11/24 10:44:56 kristaps Exp $ */
/*
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
__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 *);