aboutsummaryrefslogtreecommitdiff
path: root/bin/ed
diff options
context:
space:
mode:
authorAndrew Moore <alm@FreeBSD.org>1993-08-09 21:34:11 +0000
committerAndrew Moore <alm@FreeBSD.org>1993-08-09 21:34:11 +0000
commit5a5100e3af3c9c536472755493a099a0de4c497c (patch)
treec5cdf2f213a43916c4b7a64995da73a45508b29d /bin/ed
parenta08d4ed348503917708d0fe6d98112b20c49c201 (diff)
downloadsrc-5a5100e3af3c9c536472755493a099a0de4c497c.tar.gz
src-5a5100e3af3c9c536472755493a099a0de4c497c.zip
added (unsiged) cast to avoid int overflow
removed REGEX directive
Notes
Notes: svn path=/head/; revision=268
Diffstat (limited to 'bin/ed')
-rw-r--r--bin/ed/Makefile2
-rw-r--r--bin/ed/README1
-rw-r--r--bin/ed/ed.h2
-rw-r--r--bin/ed/re.c7
4 files changed, 2 insertions, 10 deletions
diff --git a/bin/ed/Makefile b/bin/ed/Makefile
index e247777edace..5a6a4ea4aee8 100644
--- a/bin/ed/Makefile
+++ b/bin/ed/Makefile
@@ -1,5 +1,5 @@
PROG= ed
-CFLAGS+=-DVI_BANG -DGNU_REGEX
+CFLAGS+=-DVI_BANG
SRCS= ed.c re.c buf.c cbc.c
LINKS= ${BINDIR}/ed ${BINDIR}/red
MLINKS= ed.1 red.1
diff --git a/bin/ed/README b/bin/ed/README
index 9dada652ad02..06e302d7b116 100644
--- a/bin/ed/README
+++ b/bin/ed/README
@@ -7,7 +7,6 @@ compile with little trouble. Otherwise, the macros spl1() and spl0()
should be redefined to disable interrupts.
The following compiler directives are recognized:
-GNU_REGEX - use with GNU regex(3)
DES - use to add encryption support (requires crypt(3))
NO_REALLOC_NULL - use if realloc(3) does not accept a NULL pointer
BACKWARDS - use for backwards compatibility
diff --git a/bin/ed/ed.h b/bin/ed/ed.h
index 20d5cec9c8de..b3905370f949 100644
--- a/bin/ed/ed.h
+++ b/bin/ed/ed.h
@@ -49,7 +49,7 @@
#define BITS(type) (BITSPERBYTE * (int)sizeof(type))
#define CHARBITS BITS(char)
#define INTBITS BITS(int)
-#define INTHIBIT (1 << (INTBITS - 1))
+#define INTHIBIT (unsigned) (1 << (INTBITS - 1))
#define ERR (-2)
#define EMOD (-3)
diff --git a/bin/ed/re.c b/bin/ed/re.c
index e94475033922..3fad099c9437 100644
--- a/bin/ed/re.c
+++ b/bin/ed/re.c
@@ -84,13 +84,6 @@ optpat()
return NULL;
}
patlock = 0;
-#ifdef GNU_REGEX
- /* initialize pattern buffer */
- exp->buffer = NULL;
- exp->allocated = 0L;
- exp->fastmap = 0; /* not used by GNU regex after 0.12 */
- exp->translate = 0;
-#endif
if (n = regcomp(exp, exps, 0)) {
regerror(n, exp, errmsg, sizeof errmsg);
return NULL;