mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Reorganization to restore generating charset C files from conf files
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
|
||||
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include
|
||||
noinst_LIBRARIES = libregex.a
|
||||
LDADD = libregex.a ../strings/libmystrings.a ../mysys/libmysys.a
|
||||
LDADD = libregex.a ../strings/libmystrings.a
|
||||
noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c regex.h
|
||||
libregex_a_SOURCES = regerror.c regcomp.c regexec.c regfree.c reginit.c
|
||||
noinst_PROGRAMS = re
|
||||
|
@ -74,7 +74,7 @@ char *argv[];
|
||||
exit(status);
|
||||
}
|
||||
|
||||
err = regcomp(&re, argv[optind++], copts, default_charset_info);
|
||||
err = regcomp(&re, argv[optind++], copts, my_charset_latin1);
|
||||
if (err) {
|
||||
len = regerror(err, &re, erbuf, sizeof(erbuf));
|
||||
fprintf(stderr, "error %s, %d/%d `%s'\n",
|
||||
@ -226,7 +226,7 @@ int opts; /* may not match f1 */
|
||||
strcpy(f0copy, f0);
|
||||
re.re_endp = (opts®_PEND) ? f0copy + strlen(f0copy) : NULL;
|
||||
fixstr(f0copy);
|
||||
err = regcomp(&re, f0copy, opts, default_charset_info);
|
||||
err = regcomp(&re, f0copy, opts, my_charset_latin1);
|
||||
if (err != 0 && (!opt('C', f1) || err != efind(f2))) {
|
||||
/* unexpected error or wrong error */
|
||||
len = regerror(err, &re, erbuf, sizeof(erbuf));
|
||||
|
@ -117,7 +117,7 @@ CHARSET_INFO *charset;
|
||||
# define GOODFLAGS(f) ((f)&~REG_DUMP)
|
||||
#endif
|
||||
|
||||
regex_init(); /* Init cclass if neaded */
|
||||
regex_init(charset); /* Init cclass if neaded */
|
||||
preg->charset=charset;
|
||||
cflags = GOODFLAGS(cflags);
|
||||
if ((cflags®_EXTENDED) && (cflags®_NOSPEC))
|
||||
|
@ -76,7 +76,7 @@ extern void regfree(regex_t *);
|
||||
|
||||
/* === reginit.c === */
|
||||
|
||||
extern void regex_init(void); /* Should be called for multithread progs */
|
||||
extern void regex_init(CHARSET_INFO *cs); /* Should be called for multithread progs */
|
||||
extern void regex_end(void); /* If one wants a clean end */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -7,12 +7,11 @@
|
||||
|
||||
static bool regex_inited=0;
|
||||
|
||||
void regex_init()
|
||||
void regex_init(CHARSET_INFO *cs)
|
||||
{
|
||||
char buff[CCLASS_LAST][256];
|
||||
int count[CCLASS_LAST];
|
||||
uint i;
|
||||
CHARSET_INFO *cs=default_charset_info;
|
||||
|
||||
if (!regex_inited)
|
||||
{
|
||||
|
Reference in New Issue
Block a user