diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2019-04-30 18:51:57 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2019-04-30 18:51:57 +0000 |
commit | d756850b9bce47856068b05130c6277125b6f0a1 (patch) | |
tree | 7df759c59f9fe2bb9c502bad08c2b331ddb0d685 /main.c | |
parent | ee0b68f80757c3f0a4e09e9fdbde02dcd76fa6e8 (diff) | |
download | mandoc-d756850b9bce47856068b05130c6277125b6f0a1.tar.gz |
In man(1) mode, i.e. when asking for a single manual page by name,
prefer file name matches over .Dt/.TH matches over first NAME matches
over later NAME matches, but do not change the ordering for apropos(1)
nor for man -a.
This reverts main.c rev. 1.310 and mansearch.h rev. 1.29
and includes a partial revert of mansearch.c rev. 1.79.
Regression reported by Lorenzo Beretta <loreb at github>
as part of https://github.com/void-linux/void-packages/issues/9868 .
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -411,6 +411,7 @@ main(int argc, char *argv[]) res[sz].file = mandoc_strdup(argv[c]); res[sz].names = NULL; res[sz].output = NULL; + res[sz].bits = 0; res[sz].ipath = SIZE_MAX; res[sz].sec = 10; res[sz].form = FORM_SRC; @@ -761,6 +762,7 @@ found: page->file = file; page->names = NULL; page->output = NULL; + page->bits = NAME_FILE & NAME_MASK; page->ipath = ipath; page->sec = (*sec >= '1' && *sec <= '9') ? *sec - '1' + 1 : 10; page->form = form; |