home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 2 / MECOMP-CD-II.iso / amiga / tools / libs / regexp / include / libraries / regexp.h
Encoding:
C/C++ Source or Header  |  1998-02-19  |  1.6 KB  |  50 lines

  1. #ifndef LIBRARIES_REGEXP_H
  2. #define LIBRARIES_REGEXP_H
  3. /*
  4. **    $VER: regexp.h 37.1 (19.2.98)
  5. **
  6. **    (L) Copyleft 1998 Matthias Bethke
  7. */
  8.  
  9. #ifndef DOS_DOS_H
  10. #include "dos/dos.h"
  11. #endif
  12.  
  13.  
  14. #define REXPERR_NULLARG -1                        /* "NULL argument" */
  15. #define REXPERR_REXPTOOBIG -2                    /* "regexp too big */
  16. #define REXPERR_TOOMANYPARENS -3                /* "too many parentheses" */
  17. #define REXPERR_UNMATCHEDPARENS -4            /* "unmatched parentheses */
  18. #define REXPERR_JUNKONEND -5                    /* "junk on end" (should never happen) */
  19. #define REXPERR_ARSKPLUSCBE -6                /* "*+ operand could be empty" */
  20. #define REXPERR_NESTEDARSKQMPLUS -7            /* "nested *?+" */
  21. #define REXPERR_INVALIDABRKTRANGE -8        /* "invalid [] range" */
  22. #define REXPERR_UNMATCHEDABRKT -9            /* "unmatched []" */
  23. #define REXPERR_INTERNALURP -10                /* "internal urp" */
  24. #define REXPERR_QMPLUSARSKFN -11                /* "?+* follows nothing" */
  25. #define REXPERR_TRAILINGDSLASH -12            /* "trailing \\" */
  26. /* returned by RegMatch() only */
  27. #define REXPERR_CORRUPTEDPROG -13            /* "corrupted program" */
  28. #define REXPERR_CORRUPTEDMEM -14                /* "corrupted memory" */
  29. #define REXPERR_CORRUPTEDPTRS -15            /* "corrupted pointers" */
  30. #define REXPERR_INTERNALFOULUP -16            /* "internal foulup" */
  31.  
  32. /*
  33. ** better don't mess with struct regexp, use it as an abstract
  34. ** handle for expressions only!
  35. */
  36.  
  37. #define NSUBEXP  10
  38. typedef struct regexp {
  39.     char *startp[NSUBEXP];
  40.     char *endp[NSUBEXP];
  41.     char regstart;        /* Internal use only. */
  42.     char reganch;        /* Internal use only. */
  43.     char *regmust;        /* Internal use only. */
  44.     int regmlen;        /* Internal use only. */
  45.     char program[1];    /* Unwarranted chumminess with compiler. */
  46. } regexp;
  47.  
  48.  
  49. #endif /* LIBRARIES_REGEXP_H */
  50.