72 int main(
int argc,
char **argv)
76 int ovector[PCRE_OVECCOUNT];
86 info(0,
"step 1: generic functions");
89 if ((regexp = gw_pcre_comp(re, 0)) == NULL)
90 panic(0,
"pcre compilation failed!");
93 rc = gw_pcre_exec(regexp, os, 0, 0, ovector, PCRE_OVECCOUNT);
94 if (rc == PCRE_ERROR_NOMATCH) {
95 info(0,
"RE: pcre <%s> did not match on string <%s>.",
98 error(0,
"RE: pcre <%s> execution failed with error %d.",
104 info(0,
"step 2: wrapper functions");
106 debug(
"pcre",0,
"RE: pcre_match <%s> on <%s> did: %s",
108 gw_pcre_match(re, os) ?
"match" :
"NOT match");
110 debug(
"pcre",0,
"RE: pcre_match_pre on <%s> did: %s",
112 gw_pcre_match_pre(regexp, os) ?
"match" :
"NOT match");
121 int main(
int argc,
char **argv)
void error(int err, const char *fmt,...)
void info(int err, const char *fmt,...)
#define octstr_get_cstr(ostr)
int main(int argc, char **argv)
void octstr_destroy(Octstr *ostr)
#define octstr_create(cstr)
void debug(const char *place, int err, const char *fmt,...)
void gwlib_shutdown(void)
int get_and_set_debugs(int argc, char **argv, int(*find_own)(int index, int argc, char **argv))