39 ret->pattern_match = 0; |
39 ret->pattern_match = 0; |
40 ret->compiled_patterns = NULL; |
40 ret->compiled_patterns = NULL; |
41 ret->compiled_pattern_count = 0; |
41 ret->compiled_pattern_count = 0; |
42 } |
42 } |
43 return ret; |
43 return ret; |
|
44 } |
|
45 |
|
46 void regex_parser_reset(regex_parser_t* parser) { |
|
47 parser->pattern_match = parser->matched_lines = 0; |
44 } |
48 } |
45 |
49 |
46 void regex_destcomppats(regex_parser_t* parser) { |
50 void regex_destcomppats(regex_parser_t* parser) { |
47 if (parser->compiled_patterns != NULL) { |
51 if (parser->compiled_patterns != NULL) { |
48 for (int i = 0 ; i < parser->compiled_pattern_count ; i++) { |
52 for (int i = 0 ; i < parser->compiled_pattern_count ; i++) { |