aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mansearch.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-01-19 23:09:30 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-01-19 23:09:30 +0000
commit1928d6432634b701efc4bfc596f7f4f7b39b7f3f (patch)
tree27e3d394e72b62a595d7f963a34423c04810f339 /mansearch.c
parent3d2cb06de5bcade35e7057d631b37a78695a8d06 (diff)
downloadmandoc-1928d6432634b701efc4bfc596f7f4f7b39b7f3f.tar.gz
mandoc-1928d6432634b701efc4bfc596f7f4f7b39b7f3f.tar.zst
mandoc-1928d6432634b701efc4bfc596f7f4f7b39b7f3f.zip
Always compare arch case-insensitively.
Diffstat (limited to 'mansearch.c')
-rw-r--r--mansearch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mansearch.c b/mansearch.c
index 0192ccd4..24828c08 100644
--- a/mansearch.c
+++ b/mansearch.c
@@ -1,4 +1,4 @@
-/* $Id: mansearch.c,v 1.20 2014/01/19 01:18:34 schwarze Exp $ */
+/* $Id: mansearch.c,v 1.21 2014/01/19 23:09:30 schwarze Exp $ */
/*
* Copyright (c) 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -608,6 +608,8 @@ exprterm(const struct mansearch *search, char *buf, int cs)
e->bits = search->deftype;
if ('~' == *v++) {
+ if (NULL != strstr(buf, "arch"))
+ cs = 0;
if (0 != (irc = regcomp(&e->regexp, v,
REG_EXTENDED | REG_NOSUB | (cs ? 0 : REG_ICASE)))) {
regerror(irc, &e->regexp, errbuf, sizeof(errbuf));