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 | * |
863005e5 | 11 | * @(#)regexp.h 1.5 (Berkeley) %G% |
b0b46c19 KB |
12 | */ |
13 | ||
b403a696 KB |
14 | /* |
15 | * Definitions etc. for regexp(3) routines. | |
16 | * | |
17 | * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], | |
18 | * not the System V one. | |
b403a696 KB |
19 | */ |
20 | #define NSUBEXP 10 | |
21 | typedef struct regexp { | |
22 | char *startp[NSUBEXP]; | |
23 | char *endp[NSUBEXP]; | |
24 | char regstart; /* Internal use only. */ | |
25 | char reganch; /* Internal use only. */ | |
26 | char *regmust; /* Internal use only. */ | |
27 | int regmlen; /* Internal use only. */ | |
28 | char program[1]; /* Unwarranted chumminess with compiler. */ | |
29 | } regexp; | |
30 | ||
6670c0eb | 31 | #if __STDC__ || c_plusplus |
f7532098 KB |
32 | extern regexp *regcomp(const char *); |
33 | extern int regexec(const regexp *, const char *); | |
34 | extern void regsub(const regexp *, const char *, char *); | |
35 | extern void regerror(const char *); | |
36 | #else | |
b403a696 KB |
37 | extern regexp *regcomp(); |
38 | extern int regexec(); | |
39 | extern void regsub(); | |
40 | extern void regerror(); | |
f7532098 | 41 | #endif |