first in 2.5.10 series
[k8jam.git] / src / regexp.h
blob8f4bc29e622e366e5907332b7e9399b642f2c72e
1 /*
2 * Definitions etc. for regexp(3) routines.
4 * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof],
5 * not the System V one.
7 * 11/04/02 (seiwald) - const-ing for string literals
8 */
9 #ifndef JAMH_REGEXP_H
10 #define JAMH_REGEXP_H
13 #define NSUBEXP 10
14 typedef struct regexp {
15 const char *startp[NSUBEXP];
16 const char *endp[NSUBEXP];
17 char regstart; /* Internal use only */
18 char reganch; /* Internal use only */
19 char *regmust; /* Internal use only */
20 int regmlen; /* Internal use only */
21 char program[1]; /* unwarranted chumminess with compiler */
22 } regexp;
24 extern regexp *regcomp (const char *exp);
25 extern int regexec (regexp *prog, const char *string);
26 extern void regerror (const char *s);
29 * The first byte of the regexp internal "program" is actually this magic
30 * number; the start node begins in the second byte.
32 #define MAGIC 0234
35 #endif