source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: Enter dangling .so links into the database, to avoid harassing
Date: Fri, 3 May 2019 13:17:42 -0500 (EST)	[thread overview]
Message-ID: <e3fef6b60ba65bc1@fantadrom.bsd.lv> (raw)

Log Message:
-----------
Enter dangling .so links into the database, to avoid harassing 
users of man(1) about running makewhatis(8), which won't help.
Seeing the content of the broken .so request might even help
users to figure out how to access the manual page they want.

Fixing the last issue reported by Lorenzo Beretta <loreb at github>
as part of https://github.com/void-linux/void-packages/issues/9868 .

Modified Files:
--------------
    mandoc:
        mandocdb.c

Revision Data
-------------
Index: mandocdb.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandocdb.c,v
retrieving revision 1.262
retrieving revision 1.263
diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.262 -r1.263
--- mandocdb.c
+++ mandocdb.c
@@ -1,7 +1,7 @@
 /*	$Id$ */
 /*
  * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2011-2018 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2011-2019 Ingo Schwarze <schwarze@openbsd.org>
  * Copyright (c) 2016 Ed Maste <emaste@freebsd.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -1186,9 +1186,11 @@ mpages_merge(struct dba *dba, struct mpa
 				mlink->next = mlink_dest->next;
 				mlink_dest->next = mpage->mlinks;
 				mpage->mlinks = NULL;
+				goto nextpage;
 			}
-			goto nextpage;
-		} else if (meta != NULL && meta->macroset == MACROSET_MDOC) {
+			meta->macroset = MACROSET_NONE;
+		}
+		if (meta != NULL && meta->macroset == MACROSET_MDOC) {
 			mpage->form = FORM_SRC;
 			mpage->sec = meta->msec;
 			mpage->sec = mandoc_strdup(
@@ -1208,12 +1210,15 @@ mpages_merge(struct dba *dba, struct mpa
 		}
 
 		assert(mpage->desc == NULL);
-		if (meta == NULL) {
-			mpage->form = FORM_CAT;
+		if (meta == NULL || meta->sodest != NULL) {
 			mpage->sec = mandoc_strdup(mlink->dsec);
 			mpage->arch = mandoc_strdup(mlink->arch);
 			mpage->title = mandoc_strdup(mlink->name);
-			parse_cat(mpage, fd);
+			if (meta == NULL) {
+				mpage->form = FORM_CAT;
+				parse_cat(mpage, fd);
+			} else
+				mpage->form = FORM_SRC;
 		} else if (meta->macroset == MACROSET_MDOC)
 			parse_mdoc(mpage, meta, meta->first);
 		else
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

                 reply	other threads:[~2019-05-03 18:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3fef6b60ba65bc1@fantadrom.bsd.lv \
    --to=schwarze@mandoc.bsd.lv \
    --cc=source@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).