home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / elvis184.zip / src / regexp.h < prev    next >
C/C++ Source or Header  |  1995-05-26  |  785b  |  23 lines

  1. /*
  2.  * Definitions etc. for regexp(3) routines.
  3.  *
  4.  * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
  5.  * not the System V one.
  6.  */
  7. #define NSUBEXP  10
  8.  
  9. typedef struct regexp {
  10.     char    *startp[NSUBEXP];/* start of text matching a subexpr */
  11.     char    *endp[NSUBEXP];    /* end of a text matching a subexpr */
  12.     char    *leavep;    /* pointer to text matching \= */
  13.     int    minlen;        /* length of shortest possible match */
  14.     char    first;        /* first character, if known; else \0 */
  15.     char    bol;        /* boolean: must start at beginning of line? */
  16.     char    program[1];    /* Unwarranted chumminess with compiler. */
  17. } regexp;
  18.  
  19. extern regexp *regcomp P_((char *));
  20. extern int regexec P_((regexp *, char *, int));
  21. extern void regsub P_((regexp *, char *, char *));
  22. extern void regerror P_((char *));
  23.