aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mansearch.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-12 14:00:25 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-12 14:00:25 +0000
commita105065cfe8f89a3f86b6dce6a234db45bbe6c78 (patch)
tree5c8dd99f0df482d46d78653d47dc211af261012b /mansearch.h
parent65a30b6a8483e0d463be04baf7c765ac4de2aa90 (diff)
downloadmandoc-a105065cfe8f89a3f86b6dce6a234db45bbe6c78.tar.gz
mandoc-a105065cfe8f89a3f86b6dce6a234db45bbe6c78.tar.zst
mandoc-a105065cfe8f89a3f86b6dce6a234db45bbe6c78.zip
Fix whatis(1) to correctly match words instead of any substrings.
While here, also provide an internal mode (MANSEARCH_MAN) to match complete names, to be used by man.cgi(8).
Diffstat (limited to 'mansearch.h')
-rw-r--r--mansearch.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/mansearch.h b/mansearch.h
index c78b00ac..2832ce31 100644
--- a/mansearch.h
+++ b/mansearch.h
@@ -1,4 +1,4 @@
-/* $Id: mansearch.h,v 1.13 2014/04/11 15:46:52 schwarze Exp $ */
+/* $Id: mansearch.h,v 1.14 2014/07/12 14:00:25 schwarze Exp $ */
/*
* Copyright (c) 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -82,7 +82,8 @@ struct mansearch {
const char *sec; /* mansection/NULL */
uint64_t deftype; /* type if no key */
int flags;
-#define MANSEARCH_WHATIS 0x01 /* whatis mode: equality, no key */
+#define MANSEARCH_WHATIS 0x01 /* whatis(1) mode: whole words, no keys */
+#define MANSEARCH_MAN 0x02 /* man(1) mode: string equality, no keys */
};
int mansearch_setup(int);