hsregex.inc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. { DON'T EVEN THINK ABOUT EDITING THIS, go see regex/Makefile,
  2. * search for mkh }
  3. { ========= begin header generated by ./mkh ========= }
  4. { === regex2.h === }
  5. {#ifndef API_EXPORT
  6. #ifdef WIN32
  7. #define API_EXPORT(type) __declspec(dllexport) type __stdcall
  8. #else
  9. #define API_EXPORT(type) type
  10. #endif
  11. #endif}
  12. {#if defined(MAC_OS) || defined(MAC_OS_X_SERVER) || (defined(DARWIN) && defined(__DYNAMIC__))
  13. #define ap_private_extern __private_extern__
  14. #else
  15. #define ap_private_extern
  16. #endif}
  17. type
  18. regoff_t = Integer;
  19. {$ifdef windows}
  20. off_t = regoff_t;
  21. {$endif}
  22. Pregex_t = ^regex_t;
  23. Pre_guts = Pointer;
  24. regex_t = record
  25. re_magic: cint;
  26. re_nsub: size_t; { number of parenthesized subexpressions }
  27. re_endp: PChar; { end pointer for REG_PEND }
  28. re_g: Pre_guts; { none of your business :-) }
  29. end;
  30. regmatch_t = record
  31. rm_so: regoff_t; { start of match }
  32. rm_eo: regoff_t; { end of match }
  33. end;
  34. { === regcomp.c === }
  35. //API_EXPORT(int) regcomp(regex_t *, const char *, int);
  36. const
  37. REG_BASIC = 0000;
  38. REG_EXTENDED = 0001;
  39. REG_ICASE = 0002;
  40. REG_NOSUB = 0004;
  41. REG_NEWLINE = 0010;
  42. REG_NOSPEC = 0020;
  43. REG_PEND = 0040;
  44. REG_DUMP = 0200;
  45. { === regerror.c === }
  46. REG_NOMATCH = 1;
  47. REG_BADPAT = 2;
  48. REG_ECOLLATE = 3;
  49. REG_ECTYPE = 4;
  50. REG_EESCAPE = 5;
  51. REG_ESUBREG = 6;
  52. REG_EBRACK = 7;
  53. REG_EPAREN = 8;
  54. REG_EBRACE = 9;
  55. REG_BADBR =10;
  56. REG_ERANGE =11;
  57. REG_ESPACE =12;
  58. REG_BADRPT =13;
  59. REG_EMPTY =14;
  60. REG_ASSERT =15;
  61. REG_INVARG =16;
  62. REG_ATOI =255; { convert name to number (!) }
  63. REG_ITOA =0400; { convert number to name (!) }
  64. //API_EXPORT(size_t) regerror(int, const regex_t *, char *, size_t);
  65. { === regexec.c === }
  66. //API_EXPORT(int) regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
  67. const
  68. REG_NOTBOL = 00001;
  69. REG_NOTEOL = 00002;
  70. REG_STARTEND = 00004;
  71. REG_TRACE = 00400; { tracing of execution }
  72. REG_LARGE = 01000; { force large representation }
  73. REG_BACKR = 02000; { force use of backref code }
  74. { === regfree.c === }
  75. //API_EXPORT(void) regfree(regex_t *);
  76. { ========= end header generated by ./mkh ========= }