X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/a691b01d3c341059f53c726943f9381943abe885..06e772791dc47315932f53848223fb405328c2d4:/manpath.c diff --git a/manpath.c b/manpath.c index 6da3620e..54f7a6b1 100644 --- a/manpath.c +++ b/manpath.c @@ -1,4 +1,4 @@ -/* $Id: manpath.c,v 1.32 2017/01/27 13:47:10 schwarze Exp $ */ +/* $Id: manpath.c,v 1.35 2017/07/01 09:47:30 schwarze Exp $ */ /* * Copyright (c) 2011, 2014, 2015, 2017 Ingo Schwarze * Copyright (c) 2011 Kristaps Dzonsons @@ -91,6 +91,13 @@ manconf_parse(struct manconf *conf, const char *file, manpath_parseline(&conf->manpath, defp, 0); } +void +manpath_base(struct manpaths *dirs) +{ + char path_base[] = MANPATH_BASE; + manpath_parseline(dirs, path_base, 0); +} + /* * Parse a FULL pathname from a colon-separated list of arrays. */ @@ -226,7 +233,7 @@ manconf_output(struct manoutput *conf, const char *cp, int fromfile) { const char *const toks[] = { "includes", "man", "paper", "style", - "indent", "width", "fragment", "mdoc" + "indent", "width", "fragment", "mdoc", "noval" }; const char *errstr; @@ -299,7 +306,7 @@ manconf_output(struct manoutput *conf, const char *cp, int fromfile) mandoc_asprintf(&oldval, "%zu", conf->width); break; } - conf->width = strtonum(cp, 58, 1000, &errstr); + conf->width = strtonum(cp, 1, 1000, &errstr); if (errstr == NULL) return 0; warnx("-O width=%s is %s", cp, errstr); @@ -310,6 +317,9 @@ manconf_output(struct manoutput *conf, const char *cp, int fromfile) case 7: conf->mdoc = 1; return 0; + case 8: + conf->noval = 1; + return 0; default: if (fromfile) warnx("-O %s: Bad argument", cp);