X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regcomp.h;h=7554a026973a4183b6730b7a9bbdfcc2509b1bba;hb=ea7d701d8a9efe1ba3e2127e0a97460c9f0c134c;hp=74df7abf863a5225590caea9013cd89fabf59ae7;hpb=0111c4fd47c4cca05ba4f96d1ff28f7e9ff79155;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regcomp.h b/regcomp.h index 74df7ab..7554a02 100644 --- a/regcomp.h +++ b/regcomp.h @@ -1,7 +1,7 @@ /* regcomp.h * * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - * 2000, 2001, 2002, 2003, by Larry Wall and others + * 2000, 2001, 2002, 2003, 2005 by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -15,7 +15,7 @@ typedef OP OP_4tree; /* Will be redefined later. */ * compile to execute that permits the execute phase to run lots faster on * simple cases. They are: * - * regstart sv that must begin a match; Nullch if none obvious + * regstart sv that must begin a match; NULL if none obvious * reganch is the match anchored (at beginning-of-line only)? * regmust string (pointer into program) that match must include, or NULL * [regmust changed to SV* for bminstr()--law] @@ -154,15 +154,9 @@ struct regnode_charclass_class { /* has [[:blah:]] classes */ #undef NEXT_OFF #undef NODE_ALIGN -#ifndef lint -# define NEXT_OFF(p) ((p)->next_off) -# define NODE_ALIGN(node) -# define NODE_ALIGN_FILL(node) ((node)->flags = 0xde) /* deadbeef */ -#else /* lint */ -# define NEXT_OFF(p) 0 -# define NODE_ALIGN(node) -# define NODE_ALIGN_FILL(node) -#endif /* lint */ +#define NEXT_OFF(p) ((p)->next_off) +#define NODE_ALIGN(node) +#define NODE_ALIGN_FILL(node) ((node)->flags = 0xde) /* deadbeef */ #define SIZE_ALIGN NODE_ALIGN @@ -309,15 +303,11 @@ struct regnode_charclass_class { /* has [[:blah:]] classes */ /* * Utility definitions. */ -#ifndef lint #ifndef CHARMASK -#define UCHARAT(p) ((int)*(U8*)(p)) +# define UCHARAT(p) ((int)*(const U8*)(p)) #else -#define UCHARAT(p) ((int)*(p)&CHARMASK) +# define UCHARAT(p) ((int)*(p)&CHARMASK) #endif -#else /* lint */ -#define UCHARAT(p) PL_regdummy -#endif /* lint */ #define EXTRA_SIZE(guy) ((sizeof(guy)-1)/sizeof(struct regnode)) @@ -412,11 +402,7 @@ struct reg_substr_data { /* trie related stuff */ -/* an accepting state/position*/ -struct _reg_trie_accepted { - U8 *endpos; - U16 wordnum; -}; + /* a transition record for the state machine. the check field determines which state "owns" the transition. the char the transition is for is @@ -451,7 +437,6 @@ struct _reg_trie_state { -typedef struct _reg_trie_accepted reg_trie_accepted; typedef struct _reg_trie_state reg_trie_state; typedef struct _reg_trie_trans reg_trie_trans; @@ -528,7 +513,7 @@ typedef struct _reg_trie_data reg_trie_data; #ifdef DEBUGGING -#define GET_RE_DEBUG_FLAGS_DECL SV *re_debug_flags; GET_RE_DEBUG_FLAGS; +#define GET_RE_DEBUG_FLAGS_DECL SV *re_debug_flags = NULL; GET_RE_DEBUG_FLAGS; #else #define GET_RE_DEBUG_FLAGS_DECL #endif