The world's most popular open source database
00001 #ifndef _REGEX_H_ 00002 #define _REGEX_H_ /* never again */ 00003 /* ========= begin header generated by ./mkh ========= */ 00004 #ifdef __cplusplus 00005 extern "C" { 00006 #endif 00007 00008 #include "m_ctype.h" 00009 00010 /* === regex2.h === */ 00011 #ifdef _WIN64 00012 typedef __int64 regoff_t; 00013 #else 00014 typedef off_t regoff_t; 00015 #endif 00016 struct re_guts; /* none of your business :-) */ 00017 typedef struct { 00018 int re_magic; 00019 size_t re_nsub; /* number of parenthesized subexpressions */ 00020 const char *re_endp; /* end pointer for REG_PEND */ 00021 struct re_guts *re_g; /* none of your business :-) */ 00022 CHARSET_INFO *charset; /* For ctype things */ 00023 } my_regex_t; 00024 typedef struct { 00025 regoff_t rm_so; /* start of match */ 00026 regoff_t rm_eo; /* end of match */ 00027 } my_regmatch_t; 00028 00029 00030 /* === regcomp.c === */ 00031 extern int my_regcomp(my_regex_t *, const char *, int, CHARSET_INFO *charset); 00032 #define REG_BASIC 0000 00033 #define REG_EXTENDED 0001 00034 #define REG_ICASE 0002 00035 #define REG_NOSUB 0004 00036 #define REG_NEWLINE 0010 00037 #define REG_NOSPEC 0020 00038 #define REG_PEND 0040 00039 #define REG_DUMP 0200 00040 00041 00042 /* === regerror.c === */ 00043 #define REG_NOMATCH 1 00044 #define REG_BADPAT 2 00045 #define REG_ECOLLATE 3 00046 #define REG_ECTYPE 4 00047 #define REG_EESCAPE 5 00048 #define REG_ESUBREG 6 00049 #define REG_EBRACK 7 00050 #define REG_EPAREN 8 00051 #define REG_EBRACE 9 00052 #define REG_BADBR 10 00053 #define REG_ERANGE 11 00054 #define REG_ESPACE 12 00055 #define REG_BADRPT 13 00056 #define REG_EMPTY 14 00057 #define REG_ASSERT 15 00058 #define REG_INVARG 16 00059 #define REG_ATOI 255 /* convert name to number (!) */ 00060 #define REG_ITOA 0400 /* convert number to name (!) */ 00061 extern size_t my_regerror(int, const my_regex_t *, char *, size_t); 00062 00063 00064 /* === regexec.c === */ 00065 extern int my_regexec(const my_regex_t *, const char *, size_t, my_regmatch_t [], int); 00066 #define REG_NOTBOL 00001 00067 #define REG_NOTEOL 00002 00068 #define REG_STARTEND 00004 00069 #define REG_TRACE 00400 /* tracing of execution */ 00070 #define REG_LARGE 01000 /* force large representation */ 00071 #define REG_BACKR 02000 /* force use of backref code */ 00072 00073 00074 /* === regfree.c === */ 00075 extern void my_regfree(my_regex_t *); 00076 00077 /* === reginit.c === */ 00078 00079 extern void my_regex_init(CHARSET_INFO *cs); /* Should be called for multithread progs */ 00080 extern void my_regex_end(void); /* If one wants a clean end */ 00081 00082 #ifdef __cplusplus 00083 } 00084 #endif 00085 /* ========= end header generated by ./mkh ========= */ 00086 #endif
1.4.7

