comparison lib/regex.c @ 263:39c6d5681ff0

GNU text utilities
author Jim Meyering <jim@meyering.net>
date Wed, 19 Oct 1994 03:29:01 +0000
parents 8cf333566445
children ef0e0232e54e
comparison
equal deleted inserted replaced
262:a70a20230879 263:39c6d5681ff0
259 static int re_match_2_internal (); 259 static int re_match_2_internal ();
260 260
261 /* These are the command codes that appear in compiled regular 261 /* These are the command codes that appear in compiled regular
262 expressions. Some opcodes are followed by argument bytes. A 262 expressions. Some opcodes are followed by argument bytes. A
263 command code can specify any interpretation whatsoever for its 263 command code can specify any interpretation whatsoever for its
264 arguments. Zero bytes may appear in the compiled regular expression. 264 arguments. Zero bytes may appear in the compiled regular expression. */
265
266 The value of `exactn' is needed in search.c (search_buffer) in Emacs.
267 So regex.h defines a symbol `RE_EXACTN_VALUE' to be 1; the value of
268 `exactn' we use here must also be 1. */
269 265
270 typedef enum 266 typedef enum
271 { 267 {
272 no_op = 0, 268 no_op = 0,
273 269
274 /* Followed by one byte giving n, then by n literal bytes. */ 270 /* Followed by one byte giving n, then by n literal bytes. */
275 exactn = 1, 271 exactn,
276 272
277 /* Matches any (more or less) character. */ 273 /* Matches any (more or less) character. */
278 anychar, 274 anychar,
279 275
280 /* Matches any one char belonging to specified set. First 276 /* Matches any one char belonging to specified set. First
902 898
903 /* Normally, this is fine. */ 899 /* Normally, this is fine. */
904 #define MATCH_MAY_ALLOCATE 900 #define MATCH_MAY_ALLOCATE
905 901
906 /* The match routines may not allocate if (1) they would do it with malloc 902 /* The match routines may not allocate if (1) they would do it with malloc
907 and (2) it's not safe for htem to use malloc. */ 903 and (2) it's not safe for them to use malloc. */
908 #if (defined (C_ALLOCA) || defined (REGEX_MALLOC)) && (defined (emacs) || defined (REL_ALLOC)) 904 #if (defined (C_ALLOCA) || defined (REGEX_MALLOC)) && (defined (emacs) || defined (REL_ALLOC))
909 #undef MATCH_MAY_ALLOCATE 905 #undef MATCH_MAY_ALLOCATE
910 #endif 906 #endif
911 907
912 908