xref: /csrg-svn/include/regexp.h (revision 61068)
132275Sbostic /*
237392Sbostic  * Copyright (c) 1986 by University of Toronto.
3*61068Sbostic  * Copyright (c) 1989, 1993
4*61068Sbostic  *	The Regents of the University of California.  All rights reserved.
537392Sbostic  *
637392Sbostic  * This code is derived from software contributed to Berkeley
737392Sbostic  * by Henry Spencer.
837392Sbostic  *
942614Sbostic  * %sccs.include.redist.c%
1037392Sbostic  *
11*61068Sbostic  *	@(#)regexp.h	8.1 (Berkeley) 06/02/93
1237392Sbostic  */
1337392Sbostic 
1447778Sbostic #ifndef	_REGEXP_H_
1547778Sbostic #define	_REGEXP_H_
1647778Sbostic 
1737392Sbostic /*
1832275Sbostic  * Definitions etc. for regexp(3) routines.
1932275Sbostic  *
2032275Sbostic  * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
2132275Sbostic  * not the System V one.
2232275Sbostic  */
2332275Sbostic #define NSUBEXP  10
2432275Sbostic typedef struct regexp {
2532275Sbostic 	char *startp[NSUBEXP];
2632275Sbostic 	char *endp[NSUBEXP];
2732275Sbostic 	char regstart;		/* Internal use only. */
2832275Sbostic 	char reganch;		/* Internal use only. */
2932275Sbostic 	char *regmust;		/* Internal use only. */
3032275Sbostic 	int regmlen;		/* Internal use only. */
3132275Sbostic 	char program[1];	/* Unwarranted chumminess with compiler. */
3232275Sbostic } regexp;
3332275Sbostic 
3446281Sbostic #include <sys/cdefs.h>
3546281Sbostic 
3646281Sbostic __BEGIN_DECLS
3746281Sbostic regexp *regcomp __P((const char *));
3846281Sbostic int regexec __P((const  regexp *, const char *));
3946281Sbostic void regsub __P((const  regexp *, const char *, char *));
4046281Sbostic void regerror __P((const char *));
4146281Sbostic __END_DECLS
4247778Sbostic 
4347778Sbostic #endif /* !_REGEXP_H_ */
44