home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcl2-73c.zip / tcl7.3 / tclRegexp.h < prev    next >
C/C++ Source or Header  |  1993-07-29  |  831b  |  31 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. #ifndef _TCL
  9. #include "tcl.h"
  10. #endif
  11. #ifndef _REGEXP
  12. #define _REGEXP 1
  13.  
  14. #define NSUBEXP  10
  15. typedef struct regexp {
  16.     char *startp[NSUBEXP];
  17.     char *endp[NSUBEXP];
  18.     char regstart;        /* Internal use only. */
  19.     char reganch;        /* Internal use only. */
  20.     char *regmust;        /* Internal use only. */
  21.     int regmlen;        /* Internal use only. */
  22.     char program[1];    /* Unwarranted chumminess with compiler. */
  23. } regexp;
  24.  
  25. extern regexp *TclRegComp _ANSI_ARGS_((char *exp));
  26. extern int TclRegExec _ANSI_ARGS_((regexp *prog, char *string, char *start));
  27. extern void TclRegSub _ANSI_ARGS_((regexp *prog, char *source, char *dest));
  28. extern void TclRegError _ANSI_ARGS_((char *msg));
  29.  
  30. #endif /* REGEXP */
  31.