home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tkisrc04.zip / tcl / generic / tclRegexp.h
C/C++ Source or Header  |  1998-08-07  |  1KB  |  41 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.  * SCCS: @(#) tclRegexp.h 1.6 96/04/02 18:43:57
  8.  */
  9.  
  10. #ifndef _REGEXP
  11. #define _REGEXP 1
  12.  
  13. #ifndef _TCL
  14. #include "tcl.h"
  15. #endif
  16.  
  17. /*
  18.  * NSUBEXP must be at least 10, and no greater than 117 or the parser
  19.  * will not work properly.
  20.  */
  21.  
  22. #define NSUBEXP  20
  23.  
  24. typedef struct regexp {
  25.     char *startp[NSUBEXP];
  26.     char *endp[NSUBEXP];
  27.     char regstart;        /* Internal use only. */
  28.     char reganch;        /* Internal use only. */
  29.     char *regmust;        /* Internal use only. */
  30.     int regmlen;        /* Internal use only. */
  31.     char program[1];    /* Unwarranted chumminess with compiler. */
  32. } regexp;
  33.  
  34. EXTERN regexp *TclRegComp _ANSI_ARGS_((char *exp));
  35. EXTERN int TclRegExec _ANSI_ARGS_((regexp *prog, char *string, char *start));
  36. EXTERN void TclRegSub _ANSI_ARGS_((regexp *prog, char *source, char *dest));
  37. EXTERN void TclRegError _ANSI_ARGS_((char *msg));
  38. EXTERN char *TclGetRegError _ANSI_ARGS_((void));
  39.  
  40. #endif /* REGEXP */
  41.