Loading client/mysqltest.c +10 −9 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ #include <stdarg.h> #include <sys/stat.h> #include <violite.h> #include <regex.h> /* Our own version of lib */ #include "my_regex.h" /* Our own version of lib */ #ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> #endif Loading Loading @@ -188,7 +188,7 @@ static int got_end_timer= FALSE; static void timer_output(void); static ulonglong timer_now(void); static regex_t ps_re; /* Holds precompiled re for valid PS statements */ static my_regex_t ps_re; /* Holds precompiled re for valid PS statements */ static void ps_init_re(void); static int ps_match_re(char *); static char *ps_eprint(int); Loading Loading @@ -3585,12 +3585,13 @@ static void ps_init_re(void) "[[:space:]]*UPDATE[[:space:]]+MULTI[[:space:]]|" "[[:space:]]*INSERT[[:space:]]+SELECT[[:space:]])"; int err= regcomp(&ps_re, ps_re_str, (REG_EXTENDED | REG_ICASE | REG_NOSUB), int err= my_regcomp(&ps_re, ps_re_str, (REG_EXTENDED | REG_ICASE | REG_NOSUB), &my_charset_latin1); if (err) { char erbuf[100]; int len= regerror(err, &ps_re, erbuf, sizeof(erbuf)); int len= my_regerror(err, &ps_re, erbuf, sizeof(erbuf)); fprintf(stderr, "error %s, %d/%d `%s'\n", ps_eprint(err), len, (int)sizeof(erbuf), erbuf); exit(1); Loading @@ -3600,7 +3601,7 @@ static void ps_init_re(void) static int ps_match_re(char *stmt_str) { int err= regexec(&ps_re, stmt_str, (size_t)0, NULL, 0); int err= my_regexec(&ps_re, stmt_str, (size_t)0, NULL, 0); if (err == 0) return 1; Loading @@ -3609,7 +3610,7 @@ static int ps_match_re(char *stmt_str) else { char erbuf[100]; int len= regerror(err, &ps_re, erbuf, sizeof(erbuf)); int len= my_regerror(err, &ps_re, erbuf, sizeof(erbuf)); fprintf(stderr, "error %s, %d/%d `%s'\n", ps_eprint(err), len, (int)sizeof(erbuf), erbuf); exit(1); Loading @@ -3619,7 +3620,7 @@ static int ps_match_re(char *stmt_str) static char *ps_eprint(int err) { static char epbuf[100]; size_t len= regerror(REG_ITOA|err, (regex_t *)NULL, epbuf, sizeof(epbuf)); size_t len= my_regerror(REG_ITOA|err, (my_regex_t *)NULL, epbuf, sizeof(epbuf)); assert(len <= sizeof(epbuf)); return(epbuf); } Loading @@ -3627,7 +3628,7 @@ static char *ps_eprint(int err) static void ps_free_reg(void) { regfree(&ps_re); my_regfree(&ps_re); } /****************************************************************************/ Loading os2/MySQL-Source.icc +2 −2 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ group client_global_pch = 'm_ctype.h', 'mysqld_error.h', 'my_list.h', 'my_sys.h', 'my_net.h', 'myisam.h', 'myisampack.h', '.\myisam\myisamdef.h', '.\regex\regex.h' '.\regex\my_regex.h' group server_global_pch = 'os2.h', Loading @@ -38,7 +38,7 @@ group server_global_pch = 'my_tree.h', '..\mysys\my_static.h', 'netdb.h', 'thr_alarm.h', 'heap.h', '..\myisam\fulltext.h', '..\myisam\ftdefs.h', 'myisammrg.h', '.\regex\regex.h' '.\regex\my_regex.h' group server_pch = 'ha_heap.h', 'ha_myisammrg.h', 'opt_ft.h', Loading regex/Makefile.am +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ INCLUDES = @MT_INCLUDES@ \ -I$(top_builddir)/include -I$(top_srcdir)/include noinst_LIBRARIES = libregex.a LDADD= libregex.a $(top_builddir)/strings/libmystrings.a noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c regex.h noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c my_regex.h libregex_a_SOURCES = regerror.c regcomp.c regexec.c regfree.c reginit.c noinst_PROGRAMS = re re_SOURCES = split.c debug.c main.c Loading regex/debug.c +3 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,8 @@ #include <m_ctype.h> #include <m_string.h> #include <sys/types.h> #include <regex.h> #include "my_regex.h" #include "utils.h" #include "regex2.h" #include "debug.ih" Loading @@ -15,7 +16,7 @@ */ void regprint(r, d) regex_t *r; my_regex_t *r; FILE *d; { register struct re_guts *g = r->re_g; Loading regex/debug.ih +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ extern "C" { #endif /* === debug.c === */ void regprint(regex_t *r, FILE *d); void regprint(my_regex_t *r, FILE *d); static void s_print(CHARSET_INFO *charset, register struct re_guts *g, FILE *d); static char *regchar(CHARSET_INFO *charset, int ch,char *buf); Loading Loading
client/mysqltest.c +10 −9 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ #include <stdarg.h> #include <sys/stat.h> #include <violite.h> #include <regex.h> /* Our own version of lib */ #include "my_regex.h" /* Our own version of lib */ #ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> #endif Loading Loading @@ -188,7 +188,7 @@ static int got_end_timer= FALSE; static void timer_output(void); static ulonglong timer_now(void); static regex_t ps_re; /* Holds precompiled re for valid PS statements */ static my_regex_t ps_re; /* Holds precompiled re for valid PS statements */ static void ps_init_re(void); static int ps_match_re(char *); static char *ps_eprint(int); Loading Loading @@ -3585,12 +3585,13 @@ static void ps_init_re(void) "[[:space:]]*UPDATE[[:space:]]+MULTI[[:space:]]|" "[[:space:]]*INSERT[[:space:]]+SELECT[[:space:]])"; int err= regcomp(&ps_re, ps_re_str, (REG_EXTENDED | REG_ICASE | REG_NOSUB), int err= my_regcomp(&ps_re, ps_re_str, (REG_EXTENDED | REG_ICASE | REG_NOSUB), &my_charset_latin1); if (err) { char erbuf[100]; int len= regerror(err, &ps_re, erbuf, sizeof(erbuf)); int len= my_regerror(err, &ps_re, erbuf, sizeof(erbuf)); fprintf(stderr, "error %s, %d/%d `%s'\n", ps_eprint(err), len, (int)sizeof(erbuf), erbuf); exit(1); Loading @@ -3600,7 +3601,7 @@ static void ps_init_re(void) static int ps_match_re(char *stmt_str) { int err= regexec(&ps_re, stmt_str, (size_t)0, NULL, 0); int err= my_regexec(&ps_re, stmt_str, (size_t)0, NULL, 0); if (err == 0) return 1; Loading @@ -3609,7 +3610,7 @@ static int ps_match_re(char *stmt_str) else { char erbuf[100]; int len= regerror(err, &ps_re, erbuf, sizeof(erbuf)); int len= my_regerror(err, &ps_re, erbuf, sizeof(erbuf)); fprintf(stderr, "error %s, %d/%d `%s'\n", ps_eprint(err), len, (int)sizeof(erbuf), erbuf); exit(1); Loading @@ -3619,7 +3620,7 @@ static int ps_match_re(char *stmt_str) static char *ps_eprint(int err) { static char epbuf[100]; size_t len= regerror(REG_ITOA|err, (regex_t *)NULL, epbuf, sizeof(epbuf)); size_t len= my_regerror(REG_ITOA|err, (my_regex_t *)NULL, epbuf, sizeof(epbuf)); assert(len <= sizeof(epbuf)); return(epbuf); } Loading @@ -3627,7 +3628,7 @@ static char *ps_eprint(int err) static void ps_free_reg(void) { regfree(&ps_re); my_regfree(&ps_re); } /****************************************************************************/ Loading
os2/MySQL-Source.icc +2 −2 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ group client_global_pch = 'm_ctype.h', 'mysqld_error.h', 'my_list.h', 'my_sys.h', 'my_net.h', 'myisam.h', 'myisampack.h', '.\myisam\myisamdef.h', '.\regex\regex.h' '.\regex\my_regex.h' group server_global_pch = 'os2.h', Loading @@ -38,7 +38,7 @@ group server_global_pch = 'my_tree.h', '..\mysys\my_static.h', 'netdb.h', 'thr_alarm.h', 'heap.h', '..\myisam\fulltext.h', '..\myisam\ftdefs.h', 'myisammrg.h', '.\regex\regex.h' '.\regex\my_regex.h' group server_pch = 'ha_heap.h', 'ha_myisammrg.h', 'opt_ft.h', Loading
regex/Makefile.am +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ INCLUDES = @MT_INCLUDES@ \ -I$(top_builddir)/include -I$(top_srcdir)/include noinst_LIBRARIES = libregex.a LDADD= libregex.a $(top_builddir)/strings/libmystrings.a noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c regex.h noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c my_regex.h libregex_a_SOURCES = regerror.c regcomp.c regexec.c regfree.c reginit.c noinst_PROGRAMS = re re_SOURCES = split.c debug.c main.c Loading
regex/debug.c +3 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,8 @@ #include <m_ctype.h> #include <m_string.h> #include <sys/types.h> #include <regex.h> #include "my_regex.h" #include "utils.h" #include "regex2.h" #include "debug.ih" Loading @@ -15,7 +16,7 @@ */ void regprint(r, d) regex_t *r; my_regex_t *r; FILE *d; { register struct re_guts *g = r->re_g; Loading
regex/debug.ih +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ extern "C" { #endif /* === debug.c === */ void regprint(regex_t *r, FILE *d); void regprint(my_regex_t *r, FILE *d); static void s_print(CHARSET_INFO *charset, register struct re_guts *g, FILE *d); static char *regchar(CHARSET_INFO *charset, int ch,char *buf); Loading