From 941c55925566094cc0f618fed4301deb4706ee17 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 27 Oct 2013 17:01:18 +0000 Subject: 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. --- mandocdb.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'mandocdb.c') 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 * Copyright (c) 2011, 2012, 2013 Ingo Schwarze @@ -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 = ""; /* -- cgit v1.2.3-56-ge451