31 lines
856 B
Plaintext
31 lines
856 B
Plaintext
$NetBSD: patch-af,v 1.2 2012/12/12 12:47:50 wiz Exp $
|
|
|
|
--- grep.c.orig 2011-01-02 22:57:56.000000000 +0000
|
|
+++ grep.c
|
|
@@ -152,7 +152,7 @@ gid(int f, int n)
|
|
/* Skip backwards over delimiters we are currently on */
|
|
while (i > 0) {
|
|
c = lgetc(curwp->w_dotp, i);
|
|
- if (isalnum(c) || c == '_')
|
|
+ if (isalnum((unsigned char)c) || c == '_')
|
|
break;
|
|
|
|
i--;
|
|
@@ -161,14 +161,14 @@ gid(int f, int n)
|
|
/* Skip the symbol itself */
|
|
for (; i > 0; i--) {
|
|
c = lgetc(curwp->w_dotp, i - 1);
|
|
- if (!isalnum(c) && c != '_')
|
|
+ if (!isalnum((unsigned char)c) && c != '_')
|
|
break;
|
|
}
|
|
/* Fill the symbol in cprompt[] */
|
|
for (j = 0; j < sizeof(cprompt) - 1 && i < llength(curwp->w_dotp);
|
|
j++, i++) {
|
|
c = lgetc(curwp->w_dotp, i);
|
|
- if (!isalnum(c) && c != '_')
|
|
+ if (!isalnum((unsigned char)c) && c != '_')
|
|
break;
|
|
cprompt[j] = c;
|
|
}
|