summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/cgi.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2014-11-11 19:03:10 +0000
committerschwarze <schwarze@openbsd.org>2014-11-11 19:03:10 +0000
commitfea7191929ced045cd419e96009c5358a79228ed (patch)
tree052de0280a591275db15292b2a47efbc942fc685 /usr.bin/mandoc/cgi.c
parentLocal APIC page doesn't need X permissions. (diff)
downloadwireguard-openbsd-fea7191929ced045cd419e96009c5358a79228ed.tar.xz
wireguard-openbsd-fea7191929ced045cd419e96009c5358a79228ed.zip
In man(1) mode without -a, stop searching after the first manual tree
that contained at least one match in order to not prefer mdoc(1) from ports over mdoc(7). As a bonus, this results in a speedup.
Diffstat (limited to 'usr.bin/mandoc/cgi.c')
-rw-r--r--usr.bin/mandoc/cgi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/cgi.c b/usr.bin/mandoc/cgi.c
index d3ac30f826f..979f570f460 100644
--- a/usr.bin/mandoc/cgi.c
+++ b/usr.bin/mandoc/cgi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgi.c,v 1.39 2014/10/28 17:35:42 schwarze Exp $ */
+/* $OpenBSD: cgi.c,v 1.40 2014/11/11 19:03:10 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@usta.de>
@@ -976,6 +976,7 @@ pg_search(const struct req *req)
search.sec = req->q.sec;
search.outkey = "Nd";
search.argmode = req->q.equal ? ARG_NAME : ARG_EXPR;
+ search.firstmatch = 1;
paths.sz = 1;
paths.paths = mandoc_malloc(sizeof(char *));