diff options
author | 2015-03-27 17:37:25 +0000 | |
---|---|---|
committer | 2015-03-27 17:37:25 +0000 | |
commit | 0376f290310249f2701221cdaaf7138fae3c6989 (patch) | |
tree | af23aca22eb3b9d3fa8f3fe749fb6ea4ce2e9a72 /manpage.c | |
parent | 0094b52bf5ae4780a23fccaab7adc5bf71c2c161 (diff) | |
download | mandoc-0376f290310249f2701221cdaaf7138fae3c6989.tar.gz mandoc-0376f290310249f2701221cdaaf7138fae3c6989.tar.zst mandoc-0376f290310249f2701221cdaaf7138fae3c6989.zip |
Parse the new man.conf(5) "output" directive.
The next step will be to actually use the parsed data.
Diffstat (limited to 'manpage.c')
-rw-r--r-- | manpage.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,4 +1,4 @@ -/* $Id: manpage.c,v 1.10 2015/02/10 08:05:30 schwarze Exp $ */ +/* $Id: manpage.c,v 1.11 2015/03/27 17:37:25 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -28,7 +28,7 @@ #include <string.h> #include <unistd.h> -#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; |