beregex.h (tcpflow-1.4.5) | : | beregex.h (tcpflow-1.5.0) | ||
---|---|---|---|---|
skipping to change at line 39 | skipping to change at line 39 | |||
private: | private: | |||
void compile(); | void compile(); | |||
beregex & operator=(const beregex&that); // don't use this, please | beregex & operator=(const beregex&that); // don't use this, please | |||
public: | public: | |||
/** Bargain-basement detector of things that might be regular expressions. * / | /** Bargain-basement detector of things that might be regular expressions. * / | |||
static const char *version(); | static const char *version(); | |||
static bool is_regex(const std::string &str); | static bool is_regex(const std::string &str); | |||
std::string pat; /* our pattern */ | std::string pat; /* our pattern */ | |||
int flags; | int flags; | |||
void *nreg_; // would be regex_t *, but that's in regex.h whi | // Note: nreg_ is void* because the compiler will not allow us to define it | |||
ch is included in beregex.c | as "struct regex_t *" | |||
// We could get around this by including regex.h, but that introduces depend | ||||
encies for programs that include | ||||
// beregex.h. | ||||
void *nreg_; | ||||
beregex(const beregex &that); | beregex(const beregex &that); | |||
beregex(std::string pat_,int flags_); | beregex(std::string pat_,int flags_); | |||
~beregex(); | ~beregex(); | |||
/** | /** | |||
* perform a search for a single hit. If there is a group and something is f ound, | * perform a search for a single hit. If there is a group and something is f ound, | |||
* set *found to be what was found, *offset to be the starting offset, and * len to be | * set *found to be what was found, *offset to be the starting offset, and * len to be | |||
* the length. Note that this only handles a single group. | * the length. Note that this only handles a single group. | |||
*/ | */ | |||
int search(const std::string &line,std::string *found,size_t *offset,size_t *len) const; | int search(const std::string &line,std::string *found,size_t *offset,size_t *len) const; | |||
int search(const std::string &line,std::string *matches,int REGMAX) const; | int search(const std::string &line,std::string *matches,int REGMAX) const; | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 6 lines changed or added |