Module Name: src
Committed By: leot
Date: Sat May 18 10:28:57 UTC 2019
Modified Files:
src/usr.sbin/makemandb: whatis.c
Log Message:
Reintroduce case insensitive comparison of name accidentally lost in last
revision.
Discussed with <abhinav> via PR misc/54213, thanks!
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/makemandb/whatis.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/makemandb/whatis.c
diff -u src/usr.sbin/makemandb/whatis.c:1.8 src/usr.sbin/makemandb/whatis.c:1.9
--- src/usr.sbin/makemandb/whatis.c:1.8 Sat May 18 07:56:43 2019
+++ src/usr.sbin/makemandb/whatis.c Sat May 18 10:28:57 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: whatis.c,v 1.8 2019/05/18 07:56:43 abhinav Exp $ */
+/* $NetBSD: whatis.c,v 1.9 2019/05/18 10:28:57 leot Exp $ */
/*-
* Copyright (c) 2012 Joerg Sonnenberger <[email protected]>
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: whatis.c,v 1.8 2019/05/18 07:56:43 abhinav Exp $");
+__RCSID("$NetBSD: whatis.c,v 1.9 2019/05/18 10:28:57 leot Exp $");
#include <err.h>
#include <stdio.h>
@@ -49,8 +49,11 @@ static int
whatis(sqlite3 *db, const char *cmd)
{
static const char sqlstr[] = "SELECT link AS name, section, name_desc"
- " FROM mandb_links WHERE link=? UNION SELECT name, section, name_desc"
- " FROM mandb WHERE name MATCH ? AND name=? ORDER BY section";
+ " FROM mandb_links WHERE link=?"
+ " UNION"
+ " SELECT name, section, name_desc"
+ " FROM mandb WHERE name MATCH ? AND name=? COLLATE NOCASE"
+ " ORDER BY section";
sqlite3_stmt *stmt = NULL;
int retval;
int i;