]> git.ipfire.org Git - people/arne_f/kernel.git/blame - net/netfilter/regexp/regexp.h
netfilter: import layer7 patchset
[people/arne_f/kernel.git] / net / netfilter / regexp / regexp.h
CommitLineData
9697c820
AF
1/*
2 * Definitions etc. for regexp(3) routines.
3 *
4 * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof],
5 * not the System V one.
6 */
7
8#ifndef REGEXP_H
9#define REGEXP_H
10
11
12/*
13http://www.opensource.apple.com/darwinsource/10.3/expect-1/expect/expect.h ,
14which contains a version of this library, says:
15
16 *
17 * NSUBEXP must be at least 10, and no greater than 117 or the parser
18 * will not work properly.
19 *
20
21However, it looks rather like this library is limited to 10. If you think
22otherwise, let us know.
23*/
24
25#define NSUBEXP 10
26typedef struct regexp {
27 char *startp[NSUBEXP];
28 char *endp[NSUBEXP];
29 char regstart; /* Internal use only. */
30 char reganch; /* Internal use only. */
31 char *regmust; /* Internal use only. */
32 int regmlen; /* Internal use only. */
33 char program[1]; /* Unwarranted chumminess with compiler. */
34} regexp;
35
36regexp * regcomp(char *exp, int *patternsize);
37int regexec(regexp *prog, char *string);
38void regsub(regexp *prog, char *source, char *dest);
39void regerror(char *s);
40
41#endif