From aeaacb622a48de841df3d2733d63ed99db74ffbc Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 27 Mar 2015 17:37:25 +0000 Subject: Parse the new man.conf(5) "output" directive. The next step will be to actually use the parsed data. --- manpage.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'manpage.c') diff --git a/manpage.c b/manpage.c index 7cf21341..af6b8b58 100644 --- a/manpage.c +++ b/manpage.c @@ -28,7 +28,7 @@ #include #include -#include "manpath.h" +#include "manconf.h" #include "mansearch.h" static void show(const char *, const char *); @@ -43,7 +43,7 @@ main(int argc, char *argv[]) char *conf_file, *defpaths, *auxpaths, *cp; char buf[PATH_MAX]; const char *cmd; - struct manpaths paths; + struct manconf conf; char *progname; extern char *optarg; extern int optind; @@ -57,7 +57,7 @@ main(int argc, char *argv[]) ++progname; auxpaths = defpaths = conf_file = NULL; - memset(&paths, 0, sizeof(struct manpaths)); + memset(&conf, 0, sizeof(conf)); memset(&search, 0, sizeof(struct mansearch)); while (-1 != (ch = getopt(argc, argv, "C:M:m:S:s:"))) @@ -90,9 +90,9 @@ main(int argc, char *argv[]) search.outkey = "Nd"; search.argmode = ARG_EXPR; - manpath_parse(&paths, conf_file, defpaths, auxpaths); - ch = mansearch(&search, &paths, argc, argv, &res, &sz); - manpath_free(&paths); + manconf_parse(&conf, conf_file, defpaths, auxpaths); + ch = mansearch(&search, &conf.manpath, argc, argv, &res, &sz); + manconf_free(&conf); if (0 == ch) goto usage; -- cgit