BSD 4_4 development
[unix-history] / .ref-BSD-4_3_Reno / usr / include / regexp.h
CommitLineData
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 *
1c15e888
C
9 * Redistribution and use in source and binary forms are permitted
10 * provided that: (1) source distributions retain this entire copyright
11 * notice and comment, and (2) distributions including binaries display
12 * the following acknowledgement: ``This product includes software
13 * developed by the University of California, Berkeley and its contributors''
14 * in the documentation or other materials provided with the distribution
15 * and in all advertising materials mentioning features or use of this
16 * software. Neither the name of the University nor the names of its
17 * contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
b0b46c19 22 *
1c15e888 23 * @(#)regexp.h 1.5 (Berkeley) 6/1/90
b0b46c19
KB
24 */
25
b403a696
KB
26/*
27 * Definitions etc. for regexp(3) routines.
28 *
29 * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof],
30 * not the System V one.
b403a696
KB
31 */
32#define NSUBEXP 10
33typedef struct regexp {
34 char *startp[NSUBEXP];
35 char *endp[NSUBEXP];
36 char regstart; /* Internal use only. */
37 char reganch; /* Internal use only. */
38 char *regmust; /* Internal use only. */
39 int regmlen; /* Internal use only. */
40 char program[1]; /* Unwarranted chumminess with compiler. */
41} regexp;
42
6670c0eb 43#if __STDC__ || c_plusplus
f7532098
KB
44extern regexp *regcomp(const char *);
45extern int regexec(const regexp *, const char *);
46extern void regsub(const regexp *, const char *, char *);
47extern void regerror(const char *);
48#else
b403a696
KB
49extern regexp *regcomp();
50extern int regexec();
51extern void regsub();
52extern void regerror();
f7532098 53#endif