=================================================================== RCS file: /cvs/mandoc/main.c,v retrieving revision 1.317 retrieving revision 1.321 diff -u -p -r1.317 -r1.321 --- mandoc/main.c 2019/01/10 06:29:00 1.317 +++ mandoc/main.c 2019/03/04 18:15:06 1.321 @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.317 2019/01/10 06:29:00 schwarze Exp $ */ +/* $Id: main.c,v 1.321 2019/03/04 18:15:06 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2012, 2014-2019 Ingo Schwarze @@ -21,7 +21,6 @@ #include #include #include /* MACHINE */ -#include #include #include @@ -40,6 +39,7 @@ #include #include #include +#include #include #include @@ -561,7 +561,7 @@ main(int argc, char *argv[]) } } else mandoc_msg(MANDOCERR_FILE, 0, 0, - "%s", strerror(errno)); + "%s: %s", thisarg, strerror(errno)); if (curp.wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK) break; @@ -797,7 +797,11 @@ fs_search(const struct mansearch *cfg, const struct ma } if (res != NULL && *ressz == lastsz && strchr(*argv, '/') == NULL) { - if (cfg->sec == NULL) + if (cfg->arch != NULL && + arch_valid(cfg->arch, OSENUM) == 0) + warnx("Unknown architecture \"%s\".", + cfg->arch); + else if (cfg->sec == NULL) warnx("No entry for %s in the manual.", *argv); else @@ -835,6 +839,8 @@ parse(struct curparse *curp, int fd, const char *file) if (curp->outdata == NULL) outdata_alloc(curp); + else if (curp->outtype == OUTT_HTML) + html_reset(curp); mandoc_xr_reset(); meta = mparse_result(curp->mp);