Drop main() prototype. Syncs with NetBSD-8
[minix.git] / external / bsd / less / dist / regexp.h
blobf7d8ea6c1fe26fa1ca4dddfb7903bbbfab5597bd
1 /* $NetBSD: regexp.h,v 1.3 2013/09/04 19:44:21 tron Exp $ */
3 /*
4 * Definitions etc. for regexp(3) routines.
6 * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof],
7 * not the System V one.
8 */
10 #ifndef _REGEXP
11 #define _REGEXP 1
13 #define NSUBEXP 10
14 typedef 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;
24 #if defined(__STDC__) || defined(__cplusplus)
25 # define _ANSI_ARGS_(x) x
26 #else
27 # define _ANSI_ARGS_(x) ()
28 #endif
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));
36 #endif /* REGEXP */