Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libcurses/slave tests/libcurses: replace remaining...



details:   https://anonhg.NetBSD.org/src/rev/bf0dc19c9dad
branches:  trunk
changeset: 959364:bf0dc19c9dad
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Feb 09 20:39:20 2021 +0000

description:
tests/libcurses: replace remaining strcasecmp with strcmp

There is no reason to write special functions in a different case than
the canonical one, just like for the regular curses functions.

diffstat:

 tests/lib/libcurses/slave/commands.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (27 lines):

diff -r 4b95d751c2e2 -r bf0dc19c9dad tests/lib/libcurses/slave/commands.c
--- a/tests/lib/libcurses/slave/commands.c      Tue Feb 09 20:31:02 2021 +0000
+++ b/tests/lib/libcurses/slave/commands.c      Tue Feb 09 20:39:20 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: commands.c,v 1.8 2021/02/09 20:24:02 rillig Exp $      */
+/*     $NetBSD: commands.c,v 1.9 2021/02/09 20:39:20 rillig Exp $      */
 
 /*-
  * Copyright 2009 Brett Lymn <blymn%NetBSD.org@localhost>
@@ -61,12 +61,12 @@
                if (strcmp(func, commands[i].name) == 0) {
                        /* Check only restricted set of functions is called before
                         * initscr/newterm */
-                       if(!initdone){
+                       if (!initdone){
                                j = 0;
-                               while(j < nrcmds) {
-                                       if(strcasecmp(func, restricted_commands[j]) == 0){
-                                               if(strcasecmp(func, "initscr") == 0  ||
-                                                       strcasecmp(func, "newterm") == 0)
+                               while (j < nrcmds) {
+                                       if (strcmp(func, restricted_commands[j]) == 0) {
+                                               if (strcmp(func, "initscr") == 0  ||
+                                                       strcmp(func, "newterm") == 0)
                                                        initdone = 1;
                                                /* matched function */
                                                commands[i].func(nargs, args);



Home | Main Index | Thread Index | Old Index