added (unsiged) cast to avoid int overflow
removed REGEX directive
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
PROG= ed
|
PROG= ed
|
||||||
CFLAGS+=-DVI_BANG -DGNU_REGEX
|
CFLAGS+=-DVI_BANG
|
||||||
SRCS= ed.c re.c buf.c cbc.c
|
SRCS= ed.c re.c buf.c cbc.c
|
||||||
LINKS= ${BINDIR}/ed ${BINDIR}/red
|
LINKS= ${BINDIR}/ed ${BINDIR}/red
|
||||||
MLINKS= ed.1 red.1
|
MLINKS= ed.1 red.1
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ compile with little trouble. Otherwise, the macros spl1() and spl0()
|
|||||||
should be redefined to disable interrupts.
|
should be redefined to disable interrupts.
|
||||||
|
|
||||||
The following compiler directives are recognized:
|
The following compiler directives are recognized:
|
||||||
GNU_REGEX - use with GNU regex(3)
|
|
||||||
DES - use to add encryption support (requires crypt(3))
|
DES - use to add encryption support (requires crypt(3))
|
||||||
NO_REALLOC_NULL - use if realloc(3) does not accept a NULL pointer
|
NO_REALLOC_NULL - use if realloc(3) does not accept a NULL pointer
|
||||||
BACKWARDS - use for backwards compatibility
|
BACKWARDS - use for backwards compatibility
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@
|
|||||||
#define BITS(type) (BITSPERBYTE * (int)sizeof(type))
|
#define BITS(type) (BITSPERBYTE * (int)sizeof(type))
|
||||||
#define CHARBITS BITS(char)
|
#define CHARBITS BITS(char)
|
||||||
#define INTBITS BITS(int)
|
#define INTBITS BITS(int)
|
||||||
#define INTHIBIT (1 << (INTBITS - 1))
|
#define INTHIBIT (unsigned) (1 << (INTBITS - 1))
|
||||||
|
|
||||||
#define ERR (-2)
|
#define ERR (-2)
|
||||||
#define EMOD (-3)
|
#define EMOD (-3)
|
||||||
|
|||||||
@@ -84,13 +84,6 @@ optpat()
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
patlock = 0;
|
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)) {
|
if (n = regcomp(exp, exps, 0)) {
|
||||||
regerror(n, exp, errmsg, sizeof errmsg);
|
regerror(n, exp, errmsg, sizeof errmsg);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user