From e88843d3cf10d0a6a10f4cd58e8cb1bff1c58961 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Wed, 11 Jan 1995 05:07:00 +0000 Subject: [PATCH] Use -lgnuregex Tune for 8bit ctype --- gnu/usr.bin/grep/Makefile | 5 ++++- gnu/usr.bin/grep/dfa.c | 16 +--------------- gnu/usr.bin/grep/search.c | 2 +- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/gnu/usr.bin/grep/Makefile b/gnu/usr.bin/grep/Makefile index c8d491588091..a7811a3c656c 100644 --- a/gnu/usr.bin/grep/Makefile +++ b/gnu/usr.bin/grep/Makefile @@ -1,5 +1,5 @@ PROG= grep -SRCS= dfa.c grep.c getopt.c kwset.c obstack.c regex.c search.c +SRCS= dfa.c grep.c getopt.c kwset.c obstack.c search.c CFLAGS+=-DGREP -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_UNISTD_H=1 \ -DHAVE_GETPAGESIZE=1 -DHAVE_MEMCHR=1 -DHAVE_STRERROR=1 \ -DHAVE_VALLOC=1 @@ -8,6 +8,9 @@ LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/fgrep MLINKS= grep.1 egrep.1 grep.1 fgrep.1 +DPADD+= ${LIBGNUREGEX} +LDADD+= -lgnuregex + check: all sh ${.CURDIR}/tests/check.sh ${.CURDIR}/tests diff --git a/gnu/usr.bin/grep/dfa.c b/gnu/usr.bin/grep/dfa.c index fc649af0cbe5..4a02d0d953c2 100644 --- a/gnu/usr.bin/grep/dfa.c +++ b/gnu/usr.bin/grep/dfa.c @@ -42,19 +42,6 @@ extern void free(); #define isgraph(C) (isprint(C) && !isspace(C)) #endif -#ifdef isascii -#define ISALPHA(C) (isascii(C) && isalpha(C)) -#define ISUPPER(C) (isascii(C) && isupper(C)) -#define ISLOWER(C) (isascii(C) && islower(C)) -#define ISDIGIT(C) (isascii(C) && isdigit(C)) -#define ISXDIGIT(C) (isascii(C) && isxdigit(C)) -#define ISSPACE(C) (isascii(C) && isspace(C)) -#define ISPUNCT(C) (isascii(C) && ispunct(C)) -#define ISALNUM(C) (isascii(C) && isalnum(C)) -#define ISPRINT(C) (isascii(C) && isprint(C)) -#define ISGRAPH(C) (isascii(C) && isgraph(C)) -#define ISCNTRL(C) (isascii(C) && iscntrl(C)) -#else #define ISALPHA(C) isalpha(C) #define ISUPPER(C) isupper(C) #define ISLOWER(C) islower(C) @@ -66,10 +53,9 @@ extern void free(); #define ISPRINT(C) isprint(C) #define ISGRAPH(C) isgraph(C) #define ISCNTRL(C) iscntrl(C) -#endif #include "dfa.h" -#include "regex.h" +#include "gnuregex.h" #if __STDC__ typedef void *ptr_t; diff --git a/gnu/usr.bin/grep/search.c b/gnu/usr.bin/grep/search.c index d2be489f5757..43c2d1262fa8 100644 --- a/gnu/usr.bin/grep/search.c +++ b/gnu/usr.bin/grep/search.c @@ -59,7 +59,7 @@ extern char *memchr(); #include "grep.h" #include "dfa.h" #include "kwset.h" -#include "regex.h" +#include "gnuregex.h" #define NCHAR (UCHAR_MAX + 1)