regex_parser.h

changeset 34
fa9bda32de17
parent 33
1a2d7298bc82
child 35
35120de6ee53
     1.1 --- a/regex_parser.h	Tue Oct 02 10:49:25 2012 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,42 +0,0 @@
     1.4 -/*
     1.5 - * regex_parser.h
     1.6 - *
     1.7 - *  Created on: 26.01.2012
     1.8 - *      Author: Mike
     1.9 - */
    1.10 -
    1.11 -#ifndef REGEX_PARSER_H_
    1.12 -#define REGEX_PARSER_H_
    1.13 -
    1.14 -#define REGEX_MAX_LINELENGTH           2048
    1.15 -
    1.16 -#include <sys/types.h>
    1.17 -#include <stdbool.h>
    1.18 -#include <regex.h>
    1.19 -#include "string_list.h"
    1.20 -
    1.21 -typedef struct {
    1.22 -  string_list_t* pattern_list; /* even entries: start ; odd entries: end */
    1.23 -  regex_t** compiled_patterns;
    1.24 -  size_t compiled_pattern_count;
    1.25 -  unsigned int pattern_match; /* save position of end pattern to match -
    1.26 -                                 NULL when a start pattern shall match first */
    1.27 -  unsigned int matched_lines;
    1.28 -} regex_parser_t;
    1.29 -
    1.30 -#ifdef _cplusplus
    1.31 -extern "C" {
    1.32 -#endif
    1.33 -
    1.34 -regex_parser_t* new_regex_parser_t();
    1.35 -void destroy_regex_parser_t(regex_parser_t*);
    1.36 -
    1.37 -bool regex_parser_matching(regex_parser_t*);
    1.38 -bool regex_compile_all(regex_parser_t*);
    1.39 -int regex_parser_do(regex_parser_t*, char*);
    1.40 -
    1.41 -#ifdef _cplusplus
    1.42 -}
    1.43 -#endif
    1.44 -
    1.45 -#endif /* REGEX_PARSER_H_ */

mercurial