home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / language / perl / Source / H / Regexp < prev    next >
Encoding:
Text File  |  1990-08-14  |  1.2 KB  |  40 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.  
  8. /* $Header: regexp.h,v 3.0.1.1 90/08/09 05:12:55 lwall Locked $
  9.  *
  10.  * $Log:    regexp.h,v $
  11.  * Revision 3.0.1.1  90/08/09  05:12:55  lwall
  12.  * patch19: $' broke on embedded nulls
  13.  * 
  14.  * Revision 3.0  89/10/18  15:22:46  lwall
  15.  * 3.0 baseline
  16.  * 
  17.  */
  18.  
  19. #define NSUBEXP  10
  20.  
  21. typedef struct regexp {
  22.     char *startp[NSUBEXP];
  23.     char *endp[NSUBEXP];
  24.     STR *regstart;        /* Internal use only. */
  25.     char *regstclass;
  26.     STR *regmust;        /* Internal use only. */
  27.     int regback;        /* Can regmust locate first try? */
  28.     char *precomp;        /* pre-compilation regular expression */
  29.     char *subbase;        /* saved string so \digit works forever */
  30.     char *subend;        /* end of subbase */
  31.     char reganch;        /* Internal use only. */
  32.     char do_folding;    /* do case-insensitive match? */
  33.     char lastparen;        /* last paren matched */
  34.     char nparens;        /* number of parentheses */
  35.     char program[1];    /* Unwarranted chumminess with compiler. */
  36. } regexp;
  37.  
  38. extern regexp *regcomp PROTO((char *, char *, int));
  39. extern int regexec PROTO((regexp *, char *, char *, char *, int, STR *, int));
  40.