1/*	$NetBSD: regexp.h,v 1.4 2023/10/06 05:49:49 simonb Exp $	*/
2
3/*
4 * Definitions etc. for regexp(3) routines.
5 *
6 * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
7 * not the System V one.
8 */
9
10#ifndef _REGEXP
11#define _REGEXP 1
12
13#define NSUBEXP  10
14typedef struct regexp {
15        char *startp[NSUBEXP];
16        char *endp[NSUBEXP];
17        char regstart;          /* Internal use only. */
18        char reganch;           /* Internal use only. */
19        char *regmust;          /* Internal use only. */
20        int regmlen;            /* Internal use only. */
21        char program[1];        /* Unwarranted chumminess with compiler. */
22} regexp;
23
24#if defined(__STDC__) || defined(__cplusplus)
25#   define _ANSI_ARGS_(x)       x
26#else
27#   define _ANSI_ARGS_(x)       ()
28#endif
29
30extern regexp *regcomp _ANSI_ARGS_((char *exp));
31extern int regexec _ANSI_ARGS_((regexp *prog, char *string));
32extern int regexec2 _ANSI_ARGS_((regexp *prog, char *string, int notbol));
33extern void regsub _ANSI_ARGS_((regexp *prog, char *source, char *dest));
34extern void regerror _ANSI_ARGS_((char *msg));
35
36#endif /* REGEXP */
37