| 19 | |
| 20 | |
| 21 | regexp * regex_compile( OBJECT * pattern ) |
| 22 | { |
| 23 | int found; |
| 24 | regex_entry * e ; |
| 25 | |
| 26 | if ( !regex_hash ) |
| 27 | regex_hash = hashinit( sizeof( regex_entry ), "regex" ); |
| 28 | |
| 29 | e = (regex_entry *)hash_insert( regex_hash, pattern, &found ); |
| 30 | if ( !found ) |
| 31 | { |
| 32 | e->pattern = object_copy( pattern ); |
| 33 | e->regex = regcomp( (char *)pattern ); |
| 34 | } |
| 35 | |
| 36 | return e->regex; |
| 37 | } |
| 38 | |
| 39 | |
| 40 | LIST * builtin_subst( FRAME * frame, int flags ) |
no test coverage detected