$NetBSD: patch-af,v 1.4 2023/04/25 21:53:01 nikita Exp $ Include limits.h for INT_{MIN,MAX} --- grep.c.orig 2011-01-02 22:57:56.000000000 +0000 +++ grep.c @@ -152,7 +153,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 +162,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; }