aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-05-03 18:17:12 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-05-03 18:17:12 +0000
commit8c6e6e7279fc3ad85066d3f459f4ac9289f096c0 (patch)
treef77cc4ae70187471eba139768cbcc5c95d8ac92b /mandocdb.c
parentfeaca3814c803930a197fc98e4de5900cc8516f6 (diff)
downloadmandoc-8c6e6e7279fc3ad85066d3f459f4ac9289f096c0.tar.gz
mandoc-8c6e6e7279fc3ad85066d3f459f4ac9289f096c0.tar.zst
mandoc-8c6e6e7279fc3ad85066d3f459f4ac9289f096c0.zip
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 .
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 222350c9..64ac1011 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,7 +1,7 @@
-/* $Id: mandocdb.c,v 1.262 2018/12/30 00:49:55 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.263 2019/05/03 18:17:12 schwarze Exp $ */
/*
* 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 mparse *mp)
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 mparse *mp)
}
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