pkgsrc/textproc/bsdgrep-devel/patches/patch-ae
2004-12-21 16:09:44 +00:00

31 lines
817 B
Text

$NetBSD: patch-ae,v 1.2 2004/12/21 16:09:44 agc Exp $
--- util.c.orig Wed Aug 27 13:01:54 2003
+++ util.c Wed Aug 27 13:02:02 2003
@@ -36,6 +36,7 @@
#include <sys/stat.h>
#include <ctype.h>
+#include <zlib.h>
#include <err.h>
#include <errno.h>
#include <fts.h>
@@ -44,7 +45,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <zlib.h>
#include "grep.h"
@@ -228,8 +228,8 @@
continue;
if (r == 0) {
if (wflag) {
- if ((pmatch.rm_so != 0 && isword(l->dat[pmatch.rm_so - 1]))
- || (pmatch.rm_eo != l->len && isword(l->dat[pmatch.rm_eo])))
+ if ((pmatch.rm_so != 0 && isword((unsigned char)l->dat[pmatch.rm_so - 1]))
+ || (pmatch.rm_eo != l->len && isword((unsigned char)l->dat[pmatch.rm_eo])))
r = REG_NOMATCH;
}
if (xflag) {