added Slackware build script
[k8jam.git] / regexp.h
blob35912cf0a303e50c70bd482937cedfa448a715fa
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 */
10 #define NSUBEXP 10
11 typedef struct regexp {
12 const char *startp[NSUBEXP];
13 const char *endp[NSUBEXP];
14 char regstart; /* Internal use only. */
15 char reganch; /* Internal use only. */
16 char *regmust; /* Internal use only. */
17 int regmlen; /* Internal use only. */
18 char program[1]; /* Unwarranted chumminess with compiler. */
19 } regexp;
21 regexp *regcomp( const char *exp );
22 int regexec( regexp *prog, const char *string );
23 void regerror( const char *s );
26 * The first byte of the regexp internal "program" is actually this magic
27 * number; the start node begins in the second byte.
29 #define MAGIC 0234