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