imapfilter/src/regexp.h
Lefteris Chatzimparmpas 4fe1a3d649 Change file and directory structure
Move the source code to the src dir, the man pages to the doc dir, and
the example configuration files to the samples dir, and update all
relevant files to reflect the changes.
2011-03-06 13:34:44 +01:00

25 lines
532 B
C

#ifndef REGEXP_H
#define REGEXP_H
#include <stdio.h>
#include <sys/types.h>
#include <regex.h>
/* Regular expression convenience structure. */
typedef struct regexp {
const char *pattern; /* Regular expression pattern string. */
regex_t *preg; /* Compiled regular expression. */
size_t nmatch; /* Number of subexpressions in pattern. */
regmatch_t *pmatch; /* Structure for substrings that matched. */
} regexp;
/* regexp.c */
void regexp_compile(regexp *reg);
void regexp_free(regexp *reg);
#endif /* REGEXP_H */