=================================================================== RCS file: /cvs/mandoc/main.c,v retrieving revision 1.319 retrieving revision 1.322 diff -u -p -r1.319 -r1.322 --- mandoc/main.c 2019/03/03 13:02:11 1.319 +++ mandoc/main.c 2019/03/06 10:18:58 1.322 @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.319 2019/03/03 13:02:11 schwarze Exp $ */ +/* $Id: main.c,v 1.322 2019/03/06 10:18:58 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 @@ -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 @@ -1157,7 +1161,9 @@ spawn_pager(struct tag_files *tag_files) char *argv[MAX_PAGER_ARGS]; const char *pager; char *cp; +#if HAVE_LESS_T size_t cmdlen; +#endif int argc, use_ofn; pid_t pager_pid; @@ -1189,6 +1195,7 @@ spawn_pager(struct tag_files *tag_files) /* For less(1), use the tag file. */ use_ofn = 1; +#if HAVE_LESS_T if ((cmdlen = strlen(argv[0])) >= 4) { cp = argv[0] + cmdlen - 4; if (strcmp(cp, "less") == 0) { @@ -1201,6 +1208,7 @@ spawn_pager(struct tag_files *tag_files) } } } +#endif if (use_ofn) argv[argc++] = tag_files->ofn; argv[argc] = NULL;