1 #ifndef MY_REGEX_INCLUDED 2 #define MY_REGEX_INCLUDED 3 4 /* ========= begin header generated by ./mkh ========= */ 5 6 #include "m_ctype.h" 7 8 #ifdef __cplusplus 9 extern "C" { 10 #endif 11 12 /* === regex2.h === */ 13 #ifdef _WIN64 14 typedef __int64 my_regoff_t; 15 #else 16 typedef off_t my_regoff_t; 17 #endif 18 struct re_guts; /* none of your business :-) */ 19 typedef struct { 20 int re_magic; 21 size_t re_nsub; /* number of parenthesized subexpressions */ 22 const char *re_endp; /* end pointer for MY_REG_PEND */ 23 struct re_guts *re_g; /* none of your business :-) */ 24 const CHARSET_INFO *charset; /* For ctype things */ 25 } my_regex_t; 26 typedef struct { 27 my_regoff_t rm_so; /* start of match */ 28 my_regoff_t rm_eo; /* end of match */ 29 } my_regmatch_t; 30 31 32 /* === regcomp.c === */ 33 typedef int (*my_regex_stack_check_t)(int); 34 extern int my_regcomp(my_regex_t *, const char *, int, 35 const CHARSET_INFO *charset); 36 #define MY_REG_BASIC 0000 37 #define MY_REG_EXTENDED 0001 38 #define MY_REG_ICASE 0002 39 #define MY_REG_NOSUB 0004 40 #define MY_REG_NEWLINE 0010 41 #define MY_REG_NOSPEC 0020 42 #define MY_REG_PEND 0040 43 #define MY_REG_DUMP 0200 44 45 46 /* === regerror.c === */ 47 #define MY_REG_NOMATCH 1 48 #define MY_REG_BADPAT 2 49 #define MY_REG_ECOLLATE 3 50 #define MY_REG_ECTYPE 4 51 #define MY_REG_EESCAPE 5 52 #define MY_REG_ESUBREG 6 53 #define MY_REG_EBRACK 7 54 #define MY_REG_EPAREN 8 55 #define MY_REG_EBRACE 9 56 #define MY_REG_BADBR 10 57 #define MY_REG_ERANGE 11 58 #define MY_REG_ESPACE 12 59 #define MY_REG_BADRPT 13 60 #define MY_REG_EMPTY 14 61 #define MY_REG_ASSERT 15 62 #define MY_REG_INVARG 16 63 #define MY_REG_ATOI 255 /* convert name to number (!) */ 64 #define MY_REG_ITOA 0400 /* convert number to name (!) */ 65 extern size_t my_regerror(int, const my_regex_t *, char *, size_t); 66 67 68 /* === regexec.c === */ 69 extern int my_regexec(const my_regex_t *, const char *, size_t, my_regmatch_t [], int); 70 #define MY_REG_NOTBOL 00001 71 #define MY_REG_NOTEOL 00002 72 #define MY_REG_STARTEND 00004 73 #define MY_REG_TRACE 00400 /* tracing of execution */ 74 #define MY_REG_LARGE 01000 /* force large representation */ 75 #define MY_REG_BACKR 02000 /* force use of backref code */ 76 77 78 /* === regfree.c === */ 79 extern void my_regfree(my_regex_t *); 80 81 /* === reginit.c === */ 82 83 /* Should be called for multithread progs */ 84 extern void my_regex_init(const CHARSET_INFO *cs, 85 my_regex_stack_check_t func); 86 extern void my_regex_end(void); /* If one wants a clean end */ 87 88 #ifdef __cplusplus 89 } 90 #endif 91 /* ========= end header generated by ./mkh ========= */ 92 93 #endif // MY_REGEX_INCLUDED 94