|
Revision 207, 0.9 kB
(checked in by root, 5 years ago)
|
Initial import.
|
| Line | |
|---|
| 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 |
#ifndef REGEXP_DWA20011023_H |
|---|
| 8 |
# define REGEXP_DWA20011023_H |
|---|
| 9 |
|
|---|
| 10 |
#define NSUBEXP 20 |
|---|
| 11 |
typedef struct regexp { |
|---|
| 12 |
char *startp[NSUBEXP]; |
|---|
| 13 |
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; |
|---|
| 20 |
|
|---|
| 21 |
regexp *regcomp( char *exp ); |
|---|
| 22 |
int regexec( regexp *prog, char *string ); |
|---|
| 23 |
void regerror( char *s ); |
|---|
| 24 |
void regsub(regexp *prog, char *source, char *dest); |
|---|
| 25 |
|
|---|
| 26 |
/* |
|---|
| 27 |
* The first byte of the regexp internal "program" is actually this magic |
|---|
| 28 |
* number; the start node begins in the second byte. |
|---|
| 29 |
*/ |
|---|
| 30 |
#define MAGIC 0234 |
|---|
| 31 |
|
|---|
| 32 |
#endif // REGEXP_DWA20011023_H |
|---|