home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / os2 / less / regexp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-27  |  732 b   |  26 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. #define NSUBEXP  10
  9.  
  10. typedef struct regexp
  11. {
  12.   char *startp[NSUBEXP];
  13.   char *endp[NSUBEXP];
  14.   char regstart;          /* Internal use only. */
  15.   char reganch;           /* Internal use only. */
  16.   char *regmust;          /* Internal use only. */
  17.   int regmlen;            /* Internal use only. */
  18.   char program[1];        /* Unwarranted chumminess with compiler. */
  19. }
  20. regexp;
  21.  
  22. extern regexp *regcomp(char *exp);
  23. extern int regexec(regexp *prog, char *string);
  24. extern void regsub(regexp *prog, char *source, char *dest);
  25. extern void regerror(char *msg);
  26.