Back to index

php5  5.3.10
regex.h
Go to the documentation of this file.
00001 #ifndef _HSREGEX_H_
00002 #define _HSREGEX_H_
00003 #ifndef _HSREGEX_H
00004 #define       _HSREGEX_H    /* never again */
00005 /* ========= begin header generated by ././mkh ========= */
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009 
00010 /* === regex2.h === */
00011 #ifdef WIN32
00012 #define API_EXPORT(type)    __declspec(dllexport) type __stdcall
00013 #elif defined(__GNUC__) && __GNUC__ >= 4
00014 #define API_EXPORT(type)    __attribute__ ((visibility("default"))) type
00015 #else
00016 #define API_EXPORT(type)    type
00017 #endif
00018 
00019 typedef off_t regoff_t;
00020 typedef struct {
00021        int re_magic;
00022        size_t re_nsub;             /* number of parenthesized subexpressions */
00023        const char *re_endp; /* end pointer for REG_PEND */
00024        struct re_guts *re_g;       /* none of your business :-) */
00025 } regex_t;
00026 typedef struct {
00027        regoff_t rm_so;             /* start of match */
00028        regoff_t rm_eo;             /* end of match */
00029 } regmatch_t;
00030 
00031 
00032 /* === regcomp.c === */
00033 API_EXPORT(int) regcomp(regex_t *, const char *, int);
00034 #define       REG_BASIC     0000
00035 #define       REG_EXTENDED  0001
00036 #define       REG_ICASE     0002
00037 #define       REG_NOSUB     0004
00038 #define       REG_NEWLINE   0010
00039 #define       REG_NOSPEC    0020
00040 #define       REG_PEND      0040
00041 #define       REG_DUMP      0200
00042 
00043 
00044 /* === regerror.c === */
00045 #define       REG_OKAY       0
00046 #define       REG_NOMATCH    1
00047 #define       REG_BADPAT     2
00048 #define       REG_ECOLLATE   3
00049 #define       REG_ECTYPE     4
00050 #define       REG_EESCAPE    5
00051 #define       REG_ESUBREG    6
00052 #define       REG_EBRACK     7
00053 #define       REG_EPAREN     8
00054 #define       REG_EBRACE     9
00055 #define       REG_BADBR     10
00056 #define       REG_ERANGE    11
00057 #define       REG_ESPACE    12
00058 #define       REG_BADRPT    13
00059 #define       REG_EMPTY     14
00060 #define       REG_ASSERT    15
00061 #define       REG_INVARG    16
00062 #define       REG_ATOI      255    /* convert name to number (!) */
00063 #define       REG_ITOA      0400   /* convert number to name (!) */
00064 API_EXPORT(size_t) regerror(int, const regex_t *, char *, size_t);
00065 
00066 
00067 /* === regexec.c === */
00068 API_EXPORT(int) regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
00069 #define       REG_NOTBOL    00001
00070 #define       REG_NOTEOL    00002
00071 #define       REG_STARTEND  00004
00072 #define       REG_TRACE     00400  /* tracing of execution */
00073 #define       REG_LARGE     01000  /* force large representation */
00074 #define       REG_BACKR     02000  /* force use of backref code */
00075 
00076 
00077 /* === regfree.c === */
00078 API_EXPORT(void) regfree(regex_t *);
00079 
00080 #ifdef __cplusplus
00081 }
00082 #endif
00083 /* ========= end header generated by ././mkh ========= */
00084 #endif
00085 #endif