diff options
author | etheisen <etheisen@cvs.openbsd.org> | 1996-09-21 05:39:47 +0000 |
---|---|---|
committer | etheisen <etheisen@cvs.openbsd.org> | 1996-09-21 05:39:47 +0000 |
commit | 47d3895c0565680e9e7eba725be0896bfd06ce11 (patch) | |
tree | 921c411da39dc3da0c9f04e1732558983f372819 /usr.bin/less/regexp.h | |
parent | a2e06afb07d9a651364258a3d25e37f99d1dae46 (diff) |
Import of unmolested less-290.
Diffstat (limited to 'usr.bin/less/regexp.h')
-rw-r--r-- | usr.bin/less/regexp.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/usr.bin/less/regexp.h b/usr.bin/less/regexp.h new file mode 100644 index 00000000000..380a50769e5 --- /dev/null +++ b/usr.bin/less/regexp.h @@ -0,0 +1,33 @@ +/* + * Definitions etc. for regexp(3) routines. + * + * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], + * not the System V one. + */ + +#ifndef _REGEXP +#define _REGEXP 1 + +#define NSUBEXP 10 +typedef struct regexp { + char *startp[NSUBEXP]; + char *endp[NSUBEXP]; + char regstart; /* Internal use only. */ + char reganch; /* Internal use only. */ + char *regmust; /* Internal use only. */ + int regmlen; /* Internal use only. */ + char program[1]; /* Unwarranted chumminess with compiler. */ +} regexp; + +#if defined(__STDC__) || defined(__cplusplus) +# define _ANSI_ARGS_(x) x +#else +# define _ANSI_ARGS_(x) () +#endif + +extern regexp *regcomp _ANSI_ARGS_((char *exp)); +extern int regexec _ANSI_ARGS_((regexp *prog, char *string)); +extern void regsub _ANSI_ARGS_((regexp *prog, char *source, char *dest)); +extern void regerror _ANSI_ARGS_((char *msg)); + +#endif /* REGEXP */ |