1 /* $NetBSD: regexp.h,v 1.3 2013/09/04 19:44:21 tron Exp $ */
4 * Definitions etc. for regexp(3) routines.
6 * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof],
7 * not the System V one.
14 typedef struct regexp
{
15 char *startp
[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. */
24 #if defined(__STDC__) || defined(__cplusplus)
25 # define _ANSI_ARGS_(x) x
27 # define _ANSI_ARGS_(x) ()
30 extern regexp
*regcomp
_ANSI_ARGS_((char *exp
));
31 extern int regexec
_ANSI_ARGS_((regexp
*prog
, char *string
));
32 extern int regexec2
_ANSI_ARGS_((regexp
*prog
, char *string
, int notbol
));
33 extern void regsub
_ANSI_ARGS_((regexp
*prog
, char *source
, char *dest
));
34 extern void regerror
_ANSI_ARGS_((char *msg
));