From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id r9RGfWDw002797 for ; Sun, 27 Oct 2013 12:41:32 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id r9RGfVmE018490; Sun, 27 Oct 2013 12:41:31 -0400 (EDT) Date: Sun, 27 Oct 2013 12:41:31 -0400 (EDT) Message-Id: <201310271641.r9RGfVmE018490@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: The code in ofmerge() only tried the source parsers if at least X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- The code in ofmerge() only tried the source parsers if at least one of the path (/man1/ .. /man9/) or the file name suffix (*.1 .. *.9) indicated a source manual. That missed source manuals with unusual names in unusual locations. Instead, as the existing comment right above already suggests, try the source parsers unless both the path and the file name suffix unambiguously indicate a preformatted manual (/cat*/*.0). This change is not expensive in practice because no real-world system will have large numbers of preformatted pages outside /cat*/*.0. The only way to make information loss even less probable would be to try the source parsers on all files, even /cat*/*.0, which wouldn't buy us much because no real-world system will call source manuals /cat*/*.0, but it will be expensive in practice, because many real-world systems have large numbers of preformatted pages called /cat*/*.0. Modified Files: -------------- mdocml: mandocdb.c Revision Data ------------- Index: mandocdb.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandocdb.c,v retrieving revision 1.74 retrieving revision 1.75 diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.74 -r1.75 --- mandocdb.c +++ mandocdb.c @@ -961,7 +961,7 @@ ofmerge(struct mchars *mc, struct mparse * source code, unless it is already known to be * formatted. Fall back to formatted mode. */ - if (FORM_SRC == of->dform || FORM_SRC == of->sform) { + if (FORM_CAT != of->dform || FORM_CAT != of->sform) { lvl = mparse_readfd(mp, -1, of->file); if (lvl < MANDOCLEVEL_FATAL) mparse_result(mp, &mdoc, &man); -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv