diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-10-27 17:01:18 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-10-27 17:01:18 +0000 |
commit | 7060543d3ac7d6f6e1d6b536c216cb625a399ae8 (patch) | |
tree | 4416dbfbc50026f358abddc676100f75f0b85170 /mandocdb.c | |
parent | c47678add39e26a9ea194b1804414fb58c2198f6 (diff) | |
download | mandoc-7060543d3ac7d6f6e1d6b536c216cb625a399ae8.tar.gz |
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.c | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -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 = ""; /* |