diff -r 853a1181884b -r 95a958e3de88 regex_parser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/regex_parser.h Thu Jan 26 15:55:52 2012 +0100 @@ -0,0 +1,40 @@ +/* + * regex_parser.h + * + * Created on: 26.01.2012 + * Author: Mike + */ + +#ifndef REGEX_PARSER_H_ +#define REGEX_PARSER_H_ + +#define REGEX_MAX_LINELENGTH 2048 + +#include +#include +#include +#include "string_list.h" + +typedef struct { + string_list_t* pattern_list; /* even entries: start ; odd entries: end */ + regex_t** compiled_patterns; + unsigned int pattern_match; /* save position of end pattern to match - + NULL when a start pattern shall match first */ + unsigned int matched_lines; +} regex_parser_t; + +#ifdef _cplusplus +extern "C" { +#endif + +regex_parser_t* new_regex_parser_t(); +void destroy_regex_parser_t(regex_parser_t*); + +bool regex_parser_matching(regex_parser_t*); +void regex_compile_all(regex_parser_t*); + +#ifdef _cplusplus +} +#endif + +#endif /* REGEX_PARSER_H_ */