aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-10-27 17:01:18 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-10-27 17:01:18 +0000
commit941c55925566094cc0f618fed4301deb4706ee17 (patch)
tree8ef99e5097d35a43724123a3aede97bc4dd6838a /mandocdb.c
parent574ab36c0e06c06785d95ad51eac94f7759cc8fa (diff)
downloadmandoc-941c55925566094cc0f618fed4301deb4706ee17.tar.gz
mandoc-941c55925566094cc0f618fed4301deb4706ee17.tar.zst
mandoc-941c55925566094cc0f618fed4301deb4706ee17.zip
The man(7) language has no syntax to specify architectures, but it
can still be used to write architecture-specific manuals, of course. So just derive the architecture a man(7) manual belongs to from the directory where it is located and refrain from warning about each and every architecture-specific man(7) manual found. While here, delete some trailing whitespace in the neighbourhood.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/mandocdb.c b/mandocdb.c
index fab515de..36ce96cc 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.75 2013/10/27 16:41:31 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.76 2013/10/27 17:01:18 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
@@ -950,10 +950,6 @@ ofmerge(struct mchars *mc, struct mparse *mp, int check_reachable)
mparse_reset(mp);
mdoc = NULL;
man = NULL;
- form = 0;
- msec = of->dsec;
- march = of->arch;
- mtitle = of->name;
match = 1;
/*
@@ -965,7 +961,7 @@ ofmerge(struct mchars *mc, struct mparse *mp, int check_reachable)
lvl = mparse_readfd(mp, -1, of->file);
if (lvl < MANDOCLEVEL_FATAL)
mparse_result(mp, &mdoc, &man);
- }
+ }
if (NULL != mdoc) {
form = 1;
@@ -975,15 +971,20 @@ ofmerge(struct mchars *mc, struct mparse *mp, int check_reachable)
} else if (NULL != man) {
form = 1;
msec = man_meta(man)->msec;
- march = "";
+ march = of->arch;
mtitle = man_meta(man)->title;
- }
+ } else {
+ form = 0;
+ msec = of->dsec;
+ march = of->arch;
+ mtitle = of->name;
+ }
- if (NULL == msec)
+ if (NULL == msec)
msec = "";
- if (NULL == march)
+ if (NULL == march)
march = "";
- if (NULL == mtitle)
+ if (NULL == mtitle)
mtitle = "";
/*