Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/makemandb Reintroduce case insensitive comparison o...



details:   https://anonhg.NetBSD.org/src/rev/579c61323693
branches:  trunk
changeset: 999105:579c61323693
user:      leot <leot%NetBSD.org@localhost>
date:      Sat May 18 10:28:57 2019 +0000

description:
Reintroduce case insensitive comparison of name accidentally lost in last
revision.

Discussed with <abhinav> via PR misc/54213, thanks!

diffstat:

 usr.sbin/makemandb/whatis.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 3f75da5351a0 -r 579c61323693 usr.sbin/makemandb/whatis.c
--- a/usr.sbin/makemandb/whatis.c       Sat May 18 10:21:03 2019 +0000
+++ b/usr.sbin/makemandb/whatis.c       Sat May 18 10:28:57 2019 +0000
@@ -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 <joerg%NetBSD.org@localhost>
  * 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 @@
 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;



Home | Main Index | Thread Index | Old Index