|
|
|
|
@@ -64,8 +64,7 @@ extern char *re_syntax_table;
|
|
|
|
|
|
|
|
|
|
static char re_syntax_table[CHAR_SET_SIZE];
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
init_syntax_once ()
|
|
|
|
|
static void init_syntax_once(void)
|
|
|
|
|
{
|
|
|
|
|
register int c;
|
|
|
|
|
static int done = 0;
|
|
|
|
|
@@ -380,10 +379,7 @@ typedef enum
|
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
static void
|
|
|
|
|
extract_number (dest, source)
|
|
|
|
|
int *dest;
|
|
|
|
|
unsigned char *source;
|
|
|
|
|
static void extract_number(int *dest, unsigned char *source)
|
|
|
|
|
{
|
|
|
|
|
int temp = SIGN_EXTEND_CHAR (*(source + 1));
|
|
|
|
|
*dest = *source & 0377;
|
|
|
|
|
@@ -407,10 +403,8 @@ extract_number (dest, source)
|
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
static void
|
|
|
|
|
extract_number_and_incr (destination, source)
|
|
|
|
|
int *destination;
|
|
|
|
|
unsigned char **source;
|
|
|
|
|
static void extract_number_and_incr(int *destination,
|
|
|
|
|
unsigned char **source)
|
|
|
|
|
{
|
|
|
|
|
extract_number (destination, *source);
|
|
|
|
|
*source += 2;
|
|
|
|
|
@@ -455,9 +449,7 @@ extern void printchar ();
|
|
|
|
|
|
|
|
|
|
/* Print the fastmap in human-readable form. */
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
print_fastmap (fastmap)
|
|
|
|
|
char *fastmap;
|
|
|
|
|
void print_fastmap(char *fastmap)
|
|
|
|
|
{
|
|
|
|
|
unsigned was_a_range = 0;
|
|
|
|
|
unsigned i = 0;
|
|
|
|
|
@@ -487,10 +479,8 @@ print_fastmap (fastmap)
|
|
|
|
|
/* Print a compiled pattern string in human-readable form, starting at
|
|
|
|
|
the START pointer into it and ending just before the pointer END. */
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
print_partial_compiled_pattern (start, end)
|
|
|
|
|
unsigned char *start;
|
|
|
|
|
unsigned char *end;
|
|
|
|
|
void print_partial_compiled_pattern(unsigned char *start,
|
|
|
|
|
unsigned char *end)
|
|
|
|
|
{
|
|
|
|
|
int mcnt, mcnt2;
|
|
|
|
|
unsigned char *p = start;
|
|
|
|
|
@@ -695,9 +685,7 @@ print_partial_compiled_pattern (start, end)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
print_compiled_pattern (bufp)
|
|
|
|
|
struct re_pattern_buffer *bufp;
|
|
|
|
|
void print_compiled_pattern(struct re_pattern_buffer *bufp)
|
|
|
|
|
{
|
|
|
|
|
unsigned char *buffer = bufp->buffer;
|
|
|
|
|
|
|
|
|
|
@@ -722,13 +710,9 @@ print_compiled_pattern (bufp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
print_double_string (where, string1, size1, string2, size2)
|
|
|
|
|
const char *where;
|
|
|
|
|
const char *string1;
|
|
|
|
|
const char *string2;
|
|
|
|
|
int size1;
|
|
|
|
|
int size2;
|
|
|
|
|
void print_double_string(const char *where,
|
|
|
|
|
const char *string1, int size1,
|
|
|
|
|
const char *string2, int size2)
|
|
|
|
|
{
|
|
|
|
|
unsigned this_char;
|
|
|
|
|
|
|
|
|
|
@@ -777,9 +761,7 @@ reg_syntax_t re_syntax_options = RE_SYNTAX_EMACS;
|
|
|
|
|
The argument SYNTAX is a bit mask comprised of the various bits
|
|
|
|
|
defined in regex.h. We return the old syntax. */
|
|
|
|
|
|
|
|
|
|
reg_syntax_t
|
|
|
|
|
re_set_syntax (syntax)
|
|
|
|
|
reg_syntax_t syntax;
|
|
|
|
|
reg_syntax_t re_set_syntax(reg_syntax_t syntax)
|
|
|
|
|
{
|
|
|
|
|
reg_syntax_t ret = re_syntax_options;
|
|
|
|
|
|
|
|
|
|
@@ -1031,12 +1013,9 @@ typedef struct
|
|
|
|
|
The `fastmap' and `newline_anchor' fields are neither
|
|
|
|
|
examined nor set. */
|
|
|
|
|
|
|
|
|
|
static reg_errcode_t
|
|
|
|
|
regex_compile (pattern, size, syntax, bufp)
|
|
|
|
|
const char *pattern;
|
|
|
|
|
int size;
|
|
|
|
|
reg_syntax_t syntax;
|
|
|
|
|
struct re_pattern_buffer *bufp;
|
|
|
|
|
static reg_errcode_t regex_compile(const char *pattern,
|
|
|
|
|
int size, reg_syntax_t syntax,
|
|
|
|
|
struct re_pattern_buffer *bufp)
|
|
|
|
|
{
|
|
|
|
|
/* We fetch characters from PATTERN here. Even though PATTERN is
|
|
|
|
|
`char *' (i.e., signed), we declare these variables as unsigned, so
|
|
|
|
|
@@ -2036,11 +2015,8 @@ regex_compile (pattern, size, syntax, bufp)
|
|
|
|
|
|
|
|
|
|
/* Store OP at LOC followed by two-byte integer parameter ARG. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
store_op1 (op, loc, arg)
|
|
|
|
|
re_opcode_t op;
|
|
|
|
|
unsigned char *loc;
|
|
|
|
|
int arg;
|
|
|
|
|
static void store_op1(re_opcode_t op, unsigned char *loc,
|
|
|
|
|
int arg)
|
|
|
|
|
{
|
|
|
|
|
*loc = (unsigned char) op;
|
|
|
|
|
STORE_NUMBER (loc + 1, arg);
|
|
|
|
|
@@ -2049,11 +2025,8 @@ store_op1 (op, loc, arg)
|
|
|
|
|
|
|
|
|
|
/* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
store_op2 (op, loc, arg1, arg2)
|
|
|
|
|
re_opcode_t op;
|
|
|
|
|
unsigned char *loc;
|
|
|
|
|
int arg1, arg2;
|
|
|
|
|
static void store_op2(re_opcode_t op, unsigned char *loc,
|
|
|
|
|
int arg1, int arg2)
|
|
|
|
|
{
|
|
|
|
|
*loc = (unsigned char) op;
|
|
|
|
|
STORE_NUMBER (loc + 1, arg1);
|
|
|
|
|
@@ -2064,12 +2037,8 @@ store_op2 (op, loc, arg1, arg2)
|
|
|
|
|
/* Copy the bytes from LOC to END to open up three bytes of space at LOC
|
|
|
|
|
for OP followed by two-byte integer parameter ARG. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
insert_op1 (op, loc, arg, end)
|
|
|
|
|
re_opcode_t op;
|
|
|
|
|
unsigned char *loc;
|
|
|
|
|
int arg;
|
|
|
|
|
unsigned char *end;
|
|
|
|
|
static void insert_op1(re_opcode_t op, unsigned char *loc,
|
|
|
|
|
int arg, unsigned char *end)
|
|
|
|
|
{
|
|
|
|
|
register unsigned char *pfrom = end;
|
|
|
|
|
register unsigned char *pto = end + 3;
|
|
|
|
|
@@ -2083,12 +2052,8 @@ insert_op1 (op, loc, arg, end)
|
|
|
|
|
|
|
|
|
|
/* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
insert_op2 (op, loc, arg1, arg2, end)
|
|
|
|
|
re_opcode_t op;
|
|
|
|
|
unsigned char *loc;
|
|
|
|
|
int arg1, arg2;
|
|
|
|
|
unsigned char *end;
|
|
|
|
|
static void insert_op2(re_opcode_t op, unsigned char *loc,
|
|
|
|
|
int arg1, int arg2, unsigned char *end)
|
|
|
|
|
{
|
|
|
|
|
register unsigned char *pfrom = end;
|
|
|
|
|
register unsigned char *pto = end + 5;
|
|
|
|
|
@@ -2104,10 +2069,8 @@ insert_op2 (op, loc, arg1, arg2, end)
|
|
|
|
|
after an alternative or a begin-subexpression. We assume there is at
|
|
|
|
|
least one character before the ^. */
|
|
|
|
|
|
|
|
|
|
static boolean
|
|
|
|
|
at_begline_loc_p (pattern, p, syntax)
|
|
|
|
|
const char *pattern, *p;
|
|
|
|
|
reg_syntax_t syntax;
|
|
|
|
|
static boolean at_begline_loc_p(const char *pattern,
|
|
|
|
|
const char *p, reg_syntax_t syntax)
|
|
|
|
|
{
|
|
|
|
|
const char *prev = p - 2;
|
|
|
|
|
boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
|
|
|
|
|
@@ -2123,10 +2086,8 @@ at_begline_loc_p (pattern, p, syntax)
|
|
|
|
|
/* The dual of at_begline_loc_p. This one is for $. We assume there is
|
|
|
|
|
at least one character after the $, i.e., `P < PEND'. */
|
|
|
|
|
|
|
|
|
|
static boolean
|
|
|
|
|
at_endline_loc_p (p, pend, syntax)
|
|
|
|
|
const char *p, *pend;
|
|
|
|
|
int syntax;
|
|
|
|
|
static boolean at_endline_loc_p(const char *p,
|
|
|
|
|
const char *pend, int syntax)
|
|
|
|
|
{
|
|
|
|
|
const char *next = p;
|
|
|
|
|
boolean next_backslash = *next == '\\';
|
|
|
|
|
@@ -2145,10 +2106,8 @@ at_endline_loc_p (p, pend, syntax)
|
|
|
|
|
/* Returns true if REGNUM is in one of COMPILE_STACK's elements and
|
|
|
|
|
false if it's not. */
|
|
|
|
|
|
|
|
|
|
static boolean
|
|
|
|
|
group_in_compile_stack (compile_stack, regnum)
|
|
|
|
|
compile_stack_type compile_stack;
|
|
|
|
|
regnum_t regnum;
|
|
|
|
|
static boolean group_in_compile_stack(compile_stack_type
|
|
|
|
|
compile_stack, regnum_t regnum)
|
|
|
|
|
{
|
|
|
|
|
int this_element;
|
|
|
|
|
|
|
|
|
|
@@ -2173,12 +2132,9 @@ group_in_compile_stack (compile_stack, regnum)
|
|
|
|
|
We use these short variable names so we can use the same macros as
|
|
|
|
|
`regex_compile' itself. */
|
|
|
|
|
|
|
|
|
|
static reg_errcode_t
|
|
|
|
|
compile_range (p_ptr, pend, translate, syntax, b)
|
|
|
|
|
const char **p_ptr, *pend;
|
|
|
|
|
char *translate;
|
|
|
|
|
reg_syntax_t syntax;
|
|
|
|
|
unsigned char *b;
|
|
|
|
|
static reg_errcode_t compile_range(const char **p_ptr,
|
|
|
|
|
const char *pend, char *translate,
|
|
|
|
|
reg_syntax_t syntax, unsigned char *b)
|
|
|
|
|
{
|
|
|
|
|
unsigned this_char;
|
|
|
|
|
|
|
|
|
|
@@ -2505,9 +2461,7 @@ typedef struct
|
|
|
|
|
|
|
|
|
|
Returns 0 if we succeed, -2 if an internal error. */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
re_compile_fastmap (bufp)
|
|
|
|
|
struct re_pattern_buffer *bufp;
|
|
|
|
|
int re_compile_fastmap(struct re_pattern_buffer *bufp)
|
|
|
|
|
{
|
|
|
|
|
int j, k;
|
|
|
|
|
fail_stack_type fail_stack;
|
|
|
|
|
@@ -2790,12 +2744,10 @@ re_compile_fastmap (bufp)
|
|
|
|
|
PATTERN_BUFFER will allocate its own register data, without
|
|
|
|
|
freeing the old data. */
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
re_set_registers (bufp, regs, num_regs, starts, ends)
|
|
|
|
|
struct re_pattern_buffer *bufp;
|
|
|
|
|
struct re_registers *regs;
|
|
|
|
|
unsigned num_regs;
|
|
|
|
|
regoff_t *starts, *ends;
|
|
|
|
|
void re_set_registers(struct re_pattern_buffer *bufp,
|
|
|
|
|
struct re_registers *regs,
|
|
|
|
|
unsigned num_regs,
|
|
|
|
|
regoff_t *starts, regoff_t *ends)
|
|
|
|
|
{
|
|
|
|
|
if (num_regs)
|
|
|
|
|
{
|
|
|
|
|
@@ -2817,12 +2769,10 @@ re_set_registers (bufp, regs, num_regs, starts, ends)
|
|
|
|
|
/* Like re_search_2, below, but only one string is specified, and
|
|
|
|
|
doesn't let you say where to stop matching. */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
re_search (bufp, string, size, startpos, range, regs)
|
|
|
|
|
struct re_pattern_buffer *bufp;
|
|
|
|
|
const char *string;
|
|
|
|
|
int size, startpos, range;
|
|
|
|
|
struct re_registers *regs;
|
|
|
|
|
int re_search(struct re_pattern_buffer *bufp,
|
|
|
|
|
const char *string, int size,
|
|
|
|
|
int startpos, int range,
|
|
|
|
|
struct re_registers *regs)
|
|
|
|
|
{
|
|
|
|
|
return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
|
|
|
|
|
regs, size);
|
|
|
|
|
@@ -2850,15 +2800,11 @@ re_search (bufp, string, size, startpos, range, regs)
|
|
|
|
|
found, -1 if no match, or -2 if error (such as failure
|
|
|
|
|
stack overflow). */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
|
|
|
|
|
struct re_pattern_buffer *bufp;
|
|
|
|
|
const char *string1, *string2;
|
|
|
|
|
int size1, size2;
|
|
|
|
|
int startpos;
|
|
|
|
|
int range;
|
|
|
|
|
struct re_registers *regs;
|
|
|
|
|
int stop;
|
|
|
|
|
int re_search_2(struct re_pattern_buffer *bufp,
|
|
|
|
|
const char *string1, int size1,
|
|
|
|
|
const char *string2, int size2,
|
|
|
|
|
int startpos, int range,
|
|
|
|
|
struct re_registers *regs, int stop)
|
|
|
|
|
{
|
|
|
|
|
int val;
|
|
|
|
|
register char *fastmap = bufp->fastmap;
|
|
|
|
|
@@ -3109,12 +3055,9 @@ typedef union
|
|
|
|
|
#ifndef emacs /* Emacs never uses this. */
|
|
|
|
|
/* re_match is like re_match_2 except it takes only a single string. */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
re_match (bufp, string, size, pos, regs)
|
|
|
|
|
struct re_pattern_buffer *bufp;
|
|
|
|
|
const char *string;
|
|
|
|
|
int size, pos;
|
|
|
|
|
struct re_registers *regs;
|
|
|
|
|
int re_match(struct re_pattern_buffer *bufp,
|
|
|
|
|
const char *string, int size, int pos,
|
|
|
|
|
struct re_registers *regs)
|
|
|
|
|
{
|
|
|
|
|
return re_match_2 (bufp, NULL, 0, string, size, pos, regs, size);
|
|
|
|
|
}
|
|
|
|
|
@@ -3134,14 +3077,10 @@ re_match (bufp, string, size, pos, regs)
|
|
|
|
|
failure stack overflowing). Otherwise, we return the length of the
|
|
|
|
|
matched substring. */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
|
|
|
|
|
struct re_pattern_buffer *bufp;
|
|
|
|
|
const char *string1, *string2;
|
|
|
|
|
int size1, size2;
|
|
|
|
|
int pos;
|
|
|
|
|
struct re_registers *regs;
|
|
|
|
|
int stop;
|
|
|
|
|
int re_match_2(struct re_pattern_buffer *bufp,
|
|
|
|
|
const char *string1, int size1,
|
|
|
|
|
const char *string2, int size2,
|
|
|
|
|
int pos, struct re_registers *regs, int stop)
|
|
|
|
|
{
|
|
|
|
|
/* General temporaries. */
|
|
|
|
|
int mcnt;
|
|
|
|
|
@@ -4330,10 +4269,9 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
|
|
|
|
|
|
|
|
|
|
We don't handle duplicates properly (yet). */
|
|
|
|
|
|
|
|
|
|
static boolean
|
|
|
|
|
group_match_null_string_p (p, end, reg_info)
|
|
|
|
|
unsigned char **p, *end;
|
|
|
|
|
register_info_type *reg_info;
|
|
|
|
|
static boolean group_match_null_string_p(unsigned char **p,
|
|
|
|
|
unsigned char *end,
|
|
|
|
|
register_info_type *reg_info)
|
|
|
|
|
{
|
|
|
|
|
int mcnt;
|
|
|
|
|
/* Point to after the args to the start_memory. */
|
|
|
|
|
@@ -4439,10 +4377,9 @@ group_match_null_string_p (p, end, reg_info)
|
|
|
|
|
It expects P to be the first byte of a single alternative and END one
|
|
|
|
|
byte past the last. The alternative can contain groups. */
|
|
|
|
|
|
|
|
|
|
static boolean
|
|
|
|
|
alt_match_null_string_p (p, end, reg_info)
|
|
|
|
|
unsigned char *p, *end;
|
|
|
|
|
register_info_type *reg_info;
|
|
|
|
|
static boolean alt_match_null_string_p(unsigned char *p,
|
|
|
|
|
unsigned char *end,
|
|
|
|
|
register_info_type *reg_info)
|
|
|
|
|
{
|
|
|
|
|
int mcnt;
|
|
|
|
|
unsigned char *p1 = p;
|
|
|
|
|
@@ -4476,10 +4413,9 @@ alt_match_null_string_p (p, end, reg_info)
|
|
|
|
|
|
|
|
|
|
Sets P to one after the op and its arguments, if any. */
|
|
|
|
|
|
|
|
|
|
static boolean
|
|
|
|
|
common_op_match_null_string_p (p, end, reg_info)
|
|
|
|
|
unsigned char **p, *end;
|
|
|
|
|
register_info_type *reg_info;
|
|
|
|
|
static boolean common_op_match_null_string_p(unsigned char **p,
|
|
|
|
|
unsigned char *end,
|
|
|
|
|
register_info_type *reg_info)
|
|
|
|
|
{
|
|
|
|
|
int mcnt;
|
|
|
|
|
boolean ret;
|
|
|
|
|
@@ -4564,13 +4500,8 @@ common_op_match_null_string_p (p, end, reg_info)
|
|
|
|
|
/* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN
|
|
|
|
|
bytes; nonzero otherwise. */
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
bcmp_translate(
|
|
|
|
|
unsigned char *s1,
|
|
|
|
|
unsigned char *s2,
|
|
|
|
|
int len,
|
|
|
|
|
char *translate
|
|
|
|
|
)
|
|
|
|
|
static int bcmp_translate(unsigned char *s1, unsigned char *s2,
|
|
|
|
|
int len, char *translate)
|
|
|
|
|
{
|
|
|
|
|
register unsigned char *p1 = s1, *p2 = s2;
|
|
|
|
|
while (len)
|
|
|
|
|
@@ -4592,11 +4523,8 @@ bcmp_translate(
|
|
|
|
|
|
|
|
|
|
We call regex_compile to do the actual compilation. */
|
|
|
|
|
|
|
|
|
|
const char *
|
|
|
|
|
re_compile_pattern (pattern, length, bufp)
|
|
|
|
|
const char *pattern;
|
|
|
|
|
int length;
|
|
|
|
|
struct re_pattern_buffer *bufp;
|
|
|
|
|
const char *re_compile_pattern(const char *pattern,
|
|
|
|
|
int length, struct re_pattern_buffer *bufp)
|
|
|
|
|
{
|
|
|
|
|
reg_errcode_t ret;
|
|
|
|
|
|
|
|
|
|
@@ -4625,9 +4553,7 @@ re_compile_pattern (pattern, length, bufp)
|
|
|
|
|
/* BSD has one and only one pattern buffer. */
|
|
|
|
|
static struct re_pattern_buffer re_comp_buf;
|
|
|
|
|
|
|
|
|
|
char *
|
|
|
|
|
re_comp (s)
|
|
|
|
|
const char *s;
|
|
|
|
|
char *re_comp(const char *s)
|
|
|
|
|
{
|
|
|
|
|
reg_errcode_t ret;
|
|
|
|
|
|
|
|
|
|
@@ -4663,9 +4589,7 @@ re_comp (s)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
re_exec (s)
|
|
|
|
|
const char *s;
|
|
|
|
|
int re_exec(const char *s)
|
|
|
|
|
{
|
|
|
|
|
const int len = strlen (s);
|
|
|
|
|
return
|
|
|
|
|
@@ -4711,11 +4635,7 @@ re_exec (s)
|
|
|
|
|
It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for
|
|
|
|
|
the return codes and their meanings.) */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
regcomp (preg, pattern, cflags)
|
|
|
|
|
regex_t *preg;
|
|
|
|
|
const char *pattern;
|
|
|
|
|
int cflags;
|
|
|
|
|
int regcomp(regex_t *preg, const char *pattern, int cflags)
|
|
|
|
|
{
|
|
|
|
|
reg_errcode_t ret;
|
|
|
|
|
unsigned syntax
|
|
|
|
|
@@ -4786,13 +4706,9 @@ regcomp (preg, pattern, cflags)
|
|
|
|
|
|
|
|
|
|
We return 0 if we find a match and REG_NOMATCH if not. */
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
regexec (preg, string, nmatch, pmatch, eflags)
|
|
|
|
|
const regex_t *preg;
|
|
|
|
|
const char *string;
|
|
|
|
|
size_t nmatch;
|
|
|
|
|
regmatch_t pmatch[];
|
|
|
|
|
int eflags;
|
|
|
|
|
int regexec(const regex_t *preg, const char *string,
|
|
|
|
|
size_t nmatch, regmatch_t pmatch[],
|
|
|
|
|
int eflags)
|
|
|
|
|
{
|
|
|
|
|
int ret;
|
|
|
|
|
struct re_registers regs;
|
|
|
|
|
@@ -4892,9 +4808,7 @@ regerror(int errcode, const regex_t *preg,
|
|
|
|
|
|
|
|
|
|
/* Free dynamically allocated space used by PREG. */
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
regfree (preg)
|
|
|
|
|
regex_t *preg;
|
|
|
|
|
void regfree(regex_t *preg)
|
|
|
|
|
{
|
|
|
|
|
if (preg->buffer != NULL)
|
|
|
|
|
free (preg->buffer);
|
|
|
|
|
|