Commit | Line | Data |
---|---|---|
b0b46c19 KB |
1 | /* |
2 | * Copyright (c) 1986 by University of Toronto. | |
3 | * Copyright (c) 1989 The Regents of the University of California. | |
4 | * All rights reserved. | |
5 | * | |
6 | * This code is derived from software contributed to Berkeley | |
7 | * by Henry Spencer. | |
8 | * | |
863005e5 | 9 | * %sccs.include.redist.c% |
b0b46c19 | 10 | * |
d2b7358e | 11 | * @(#)regexp.h 5.2 (Berkeley) %G% |
b0b46c19 KB |
12 | */ |
13 | ||
d2b7358e KB |
14 | #ifndef _REGEXP_H_ |
15 | #define _REGEXP_H_ | |
16 | ||
b403a696 KB |
17 | /* |
18 | * Definitions etc. for regexp(3) routines. | |
19 | * | |
20 | * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], | |
21 | * not the System V one. | |
b403a696 KB |
22 | */ |
23 | #define NSUBEXP 10 | |
24 | typedef struct regexp { | |
25 | char *startp[NSUBEXP]; | |
26 | char *endp[NSUBEXP]; | |
27 | char regstart; /* Internal use only. */ | |
28 | char reganch; /* Internal use only. */ | |
29 | char *regmust; /* Internal use only. */ | |
30 | int regmlen; /* Internal use only. */ | |
31 | char program[1]; /* Unwarranted chumminess with compiler. */ | |
32 | } regexp; | |
33 | ||
91befe9c KB |
34 | #include <sys/cdefs.h> |
35 | ||
36 | __BEGIN_DECLS | |
37 | regexp *regcomp __P((const char *)); | |
38 | int regexec __P((const regexp *, const char *)); | |
39 | void regsub __P((const regexp *, const char *, char *)); | |
40 | void regerror __P((const char *)); | |
41 | __END_DECLS | |
d2b7358e KB |
42 | |
43 | #endif /* !_REGEXP_H_ */ |