Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/usr.bin/systat Pull up revision 1.10 (requested by he):
details: https://anonhg.NetBSD.org/src/rev/337152dad5b2
branches: netbsd-1-4
changeset: 469501:337152dad5b2
user: he <he%NetBSD.org@localhost>
date: Sun Sep 26 13:38:54 1999 +0000
description:
Pull up revision 1.10 (requested by he):
Do not downcase input, which prevented "ignore X11" in the
"netstat" display from working. Fixes PR#7655.
diffstat:
usr.bin/systat/cmds.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (40 lines):
diff -r d29b4e1503e1 -r 337152dad5b2 usr.bin/systat/cmds.c
--- a/usr.bin/systat/cmds.c Sun Sep 26 13:38:01 1999 +0000
+++ b/usr.bin/systat/cmds.c Sun Sep 26 13:38:54 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cmds.c,v 1.9 1998/12/19 22:26:13 christos Exp $ */
+/* $NetBSD: cmds.c,v 1.9.2.1 1999/09/26 13:38:54 he Exp $ */
/*-
* Copyright (c) 1980, 1992, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/29/95";
#endif
-__RCSID("$NetBSD: cmds.c,v 1.9 1998/12/19 22:26:13 christos Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.9.2.1 1999/09/26 13:38:54 he Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -185,13 +185,19 @@
error("Showing %s, refresh every %d seconds.", curcmd->c_name, naptime);
}
+/* case insensitive prefix comparison */
int
prefix(s1, s2)
char *s1, *s2;
{
+ char c1, c2;
- while (*s1 == *s2) {
- if (*s1 == '\0')
+ while (1) {
+ c1 = *s1 >= 'A' && *s1 <= 'Z' ? *s1 + 'a' - 'A' : *s1;
+ c2 = *s2 >= 'A' && *s2 <= 'Z' ? *s2 + 'a' - 'A' : *s2;
+ if (c1 != c2)
+ break;
+ if (c1 == '\0')
return (1);
s1++, s2++;
}
Home |
Main Index |
Thread Index |
Old Index