X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fregex.c;h=c239e2fd10bc933a53c416e70beef0fbe831088c;hb=c39edfa52bd0437fbf662c63c148612d85691e95;hp=fd3c6a88526e9576b9c18a6a93e5bdc3cb813b02;hpb=398d529018aa39aee3f654e5c7094426e6664c05;p=gnulib.git diff --git a/lib/regex.c b/lib/regex.c index fd3c6a885..c239e2fd1 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -261,18 +261,14 @@ static int re_match_2_internal (); /* These are the command codes that appear in compiled regular expressions. Some opcodes are followed by argument bytes. A command code can specify any interpretation whatsoever for its - arguments. Zero bytes may appear in the compiled regular expression. - - The value of `exactn' is needed in search.c (search_buffer) in Emacs. - So regex.h defines a symbol `RE_EXACTN_VALUE' to be 1; the value of - `exactn' we use here must also be 1. */ + arguments. Zero bytes may appear in the compiled regular expression. */ typedef enum { no_op = 0, /* Followed by one byte giving n, then by n literal bytes. */ - exactn = 1, + exactn, /* Matches any (more or less) character. */ anychar, @@ -904,7 +900,7 @@ static const char *re_error_msg[] = #define MATCH_MAY_ALLOCATE /* The match routines may not allocate if (1) they would do it with malloc - and (2) it's not safe for htem to use malloc. */ + and (2) it's not safe for them to use malloc. */ #if (defined (C_ALLOCA) || defined (REGEX_MALLOC)) && (defined (emacs) || defined (REL_ALLOC)) #undef MATCH_MAY_ALLOCATE #endif @@ -4942,9 +4938,9 @@ re_compile_pattern (pattern, length, bufp) } /* Entry points compatible with 4.2 BSD regex library. We don't define - them if this is an Emacs or POSIX compilation. */ + them unless specifically requested. */ -#if !defined (emacs) && !defined (_POSIX_SOURCE) +#ifdef _REGEX_RE_COMP /* BSD has one and only one pattern buffer. */ static struct re_pattern_buffer re_comp_buf; @@ -4995,7 +4991,7 @@ re_exec (s) return 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0); } -#endif /* not emacs and not _POSIX_SOURCE */ +#endif /* _REGEX_RE_COMP */ /* POSIX.2 functions. Don't define these for Emacs. */