00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #ifndef COMMON_AC_REGEX_H
00021 #define COMMON_AC_REGEX_H
00022 
00023 
00024 
00025 
00026 
00027 
00028 #include <common/ac/stddef.h>
00029 #include <common/ac/sys/types.h>
00030 
00031 #if HAVE_RXPOSIX_H && HAVE_LIBRX
00032 extern "C" {
00033 #include <rxposix.h>
00034 }
00035 #else
00036 #if HAVE_REGEX_H
00037 
00038 
00039 
00040 
00041 
00042 #undef __restrict_arr
00043 #define __restrict_arr
00044 #include <regex.h>
00045 #undef __restrict_arr
00046 #else
00047 
00048 
00049 
00050 
00051 #define regex_t int
00052 
00053 struct regmatch_t
00054 {
00055     int rm_so;
00056     int rm_eo;
00057 };
00058 
00059 #define REG_EXTENDED 0
00060 #define REG_NOSUB 0
00061 #define REG_NOMATCH -1
00062 #define REG_NOTBOL 0
00063 
00064 int regcomp(regex_t *preg, const char *regex, int cflags);
00065 int regexec(const regex_t *preg, const char *string, size_t nmatch,
00066     regmatch_t *pmatch, int eflags);
00067 size_t regerror(int errcode, const regex_t *preg, char *errbuf,
00068     size_t errbuf_size);
00069 void regfree(regex_t *preg);
00070 
00071 #endif
00072 #endif
00073 
00074 #endif // COMMON_AC_REGEX_H