summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/grep
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-01-11 05:07:00 +0000
committerache <ache@FreeBSD.org>1995-01-11 05:07:00 +0000
commite2db76d317fedcd79b57bbc426905c746789a5c3 (patch)
tree2fd5cca78d92b7ade4de94e86d395acae8c49418 /gnu/usr.bin/grep
parentf15a1abdd698097203581d1d7a8bec269bff4870 (diff)
downloadFreeBSD-src-e2db76d317fedcd79b57bbc426905c746789a5c3.zip
FreeBSD-src-e2db76d317fedcd79b57bbc426905c746789a5c3.tar.gz
Use -lgnuregex
Tune for 8bit ctype
Diffstat (limited to 'gnu/usr.bin/grep')
-rw-r--r--gnu/usr.bin/grep/Makefile5
-rw-r--r--gnu/usr.bin/grep/dfa.c16
-rw-r--r--gnu/usr.bin/grep/search.c2
3 files changed, 6 insertions, 17 deletions
diff --git a/gnu/usr.bin/grep/Makefile b/gnu/usr.bin/grep/Makefile
index c8d4915..a7811a3 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 fc649af..4a02d0d 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 d2be489..43c2d12 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)
OpenPOWER on IntegriCloud