src/regex_parser.c

changeset 54
76d46533b9a9
parent 48
0d2c13c24fd0
child 57
68018eac46c3
equal deleted inserted replaced
53:32b9e0a5cebd 54:76d46533b9a9
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++) {

mercurial