fixed regex initialization

This commit is contained in:
alm 1993-06-16 07:41:14 +00:00
parent 5f39183d4b
commit bd8e434d6d
3 changed files with 7 additions and 7 deletions

View File

@ -408,7 +408,7 @@ compile_re(p, repp)
/* initialize pattern buffer */
(*repp)->buffer = NULL;
(*repp)->allocated = 0L;
(*repp)->fastmap = (char *) malloc(FASTMAP_SIZE);
(*repp)->fastmap = 0; /* fastmap not used by regex > 0.12 */
(*repp)->translate = 0;
#endif
if (p && (eval = regcomp(*repp, re, 0)) != 0)

View File

@ -1,5 +1,5 @@
#!/bin/sh
SED=./sed
SED=sed
PRINTF=printf
# tests that a delimiter okay in ccl, i.e., s/[/]// deletes a /

View File

@ -1,7 +1,7 @@
/*-
* Copyright (c) 1992 Diomidis Spinellis.
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
* Copyright (c) 1992 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Diomidis Spinellis of Imperial College, University of London.
@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)defs.h 8.1 (Berkeley) 6/6/93
* @(#)defs.h 5.3 (Berkeley) 8/28/92
*/
/*
@ -74,7 +74,7 @@ struct s_subst {
/*
* An internally compiled command.
* Initialy, label references are stored in t, on a second pass they
* Initialy, label references are stored in u.t, on a second pass they
* are updated to pointers.
*/
struct s_command {
@ -115,11 +115,11 @@ enum e_args {
struct s_appends {
enum {AP_STRING, AP_FILE} type;
char *s;
size_t len;
};
enum e_spflag {
APPEND, /* Append to the contents. */
APPENDNL, /* Append, with newline. */
REPLACE, /* Replace the contents. */
};