version 1.33, 2017/02/10 15:45:28 |
version 1.36, 2018/10/02 14:56:47 |
|
|
/* $Id$ */ |
/* $Id$ */ |
/* |
/* |
* Copyright (c) 2011, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org> |
* Copyright (c) 2011,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org> |
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
Line 91 manconf_parse(struct manconf *conf, const char *file, |
|
Line 91 manconf_parse(struct manconf *conf, const char *file, |
|
manpath_parseline(&conf->manpath, defp, 0); |
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. |
* Parse a FULL pathname from a colon-separated list of arrays. |
*/ |
*/ |
Line 226 manconf_output(struct manoutput *conf, const char *cp, |
|
Line 233 manconf_output(struct manoutput *conf, const char *cp, |
|
{ |
{ |
const char *const toks[] = { |
const char *const toks[] = { |
"includes", "man", "paper", "style", |
"includes", "man", "paper", "style", |
"indent", "width", "fragment", "mdoc", "noval" |
"indent", "width", "fragment", "mdoc", "noval", "toc" |
}; |
}; |
|
|
const char *errstr; |
const char *errstr; |
Line 299 manconf_output(struct manoutput *conf, const char *cp, |
|
Line 306 manconf_output(struct manoutput *conf, const char *cp, |
|
mandoc_asprintf(&oldval, "%zu", conf->width); |
mandoc_asprintf(&oldval, "%zu", conf->width); |
break; |
break; |
} |
} |
conf->width = strtonum(cp, 58, 1000, &errstr); |
conf->width = strtonum(cp, 1, 1000, &errstr); |
if (errstr == NULL) |
if (errstr == NULL) |
return 0; |
return 0; |
warnx("-O width=%s is %s", cp, errstr); |
warnx("-O width=%s is %s", cp, errstr); |
Line 312 manconf_output(struct manoutput *conf, const char *cp, |
|
Line 319 manconf_output(struct manoutput *conf, const char *cp, |
|
return 0; |
return 0; |
case 8: |
case 8: |
conf->noval = 1; |
conf->noval = 1; |
|
return 0; |
|
case 9: |
|
conf->toc = 1; |
return 0; |
return 0; |
default: |
default: |
if (fromfile) |
if (fromfile) |