Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/makemandb Make the name comparison case insensitive.



details:   https://anonhg.NetBSD.org/src/rev/3c56b322ccc7
branches:  trunk
changeset: 824103:3c56b322ccc7
user:      abhinav <abhinav%NetBSD.org@localhost>
date:      Tue May 23 15:27:54 2017 +0000

description:
Make the name comparison case insensitive.

(The old whatis(1) also used to do case insensitive string comparisons).

diffstat:

 usr.sbin/makemandb/whatis.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 056073fe753e -r 3c56b322ccc7 usr.sbin/makemandb/whatis.c
--- a/usr.sbin/makemandb/whatis.c       Tue May 23 14:11:08 2017 +0000
+++ b/usr.sbin/makemandb/whatis.c       Tue May 23 15:27:54 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: whatis.c,v 1.6 2017/04/23 16:56:49 abhinav Exp $       */
+/*     $NetBSD: whatis.c,v 1.7 2017/05/23 15:27:54 abhinav 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.6 2017/04/23 16:56:49 abhinav Exp $");
+__RCSID("$NetBSD: whatis.c,v 1.7 2017/05/23 15:27:54 abhinav Exp $");
 
 #include <err.h>
 #include <stdio.h>
@@ -49,7 +49,7 @@
 whatis(sqlite3 *db, const char *cmd)
 {
        static const char sqlstr[] = "SELECT name, section, name_desc"
-               " FROM mandb WHERE name MATCH ? AND name=?"
+               " FROM mandb WHERE name MATCH ? AND name=? COLLATE NOCASE"
                " UNION"
                " SELECT b.link AS name, b.section, a.name_desc FROM mandb a"
                " JOIN"



Home | Main Index | Thread Index | Old Index