1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Regex library is switched to use new ctype tools

to allow usage of many character sets at a time.


include/m_ctype.h:
  Added condition to simplify migrating from old ctype
  Added new style toupper, tolower which accepts charset in first argument
regex/debug.c:
  Added charset argument
regex/debug.ih:
  added charset argument
regex/engine.c:
  added charset argument
regex/engine.ih:
  added charset arguent
regex/main.c:
  added charset argument
regex/regcomp.c:
  added CHARSET_INFO field
regex/regcomp.ih:
  Added charset argument
regex/regex.h:
  Added #include <m_ctype.h> for CHARSET_INFO
  Added charset argument for regcomp()
regex/regex2.h:
  New charset argument for ISWORD()
regex/regexec.c:
  New charset argument
regex/reginit.c:
  Move to new style ctype. 
  However still needs fixes:
    instead of single static cclass variable,
    each charset must have it's own variable.
sql/item_cmpfunc.cc:
  Pass charset field into regcomp()
  This will be fixed tommorow to use String->charset
    instead of default_charset_info
This commit is contained in:
unknown
2002-03-06 20:04:13 +04:00
parent 325c22a784
commit 654db69b82
13 changed files with 126 additions and 100 deletions

View File

@ -5,6 +5,8 @@
extern "C" {
#endif
#include "m_ctype.h"
/* === regex2.h === */
#ifdef _WIN64
typedef __int64 regoff_t;
@ -17,6 +19,7 @@ typedef struct {
size_t re_nsub; /* number of parenthesized subexpressions */
const char *re_endp; /* end pointer for REG_PEND */
struct re_guts *re_g; /* none of your business :-) */
CHARSET_INFO *charset; /* For ctype things */
} regex_t;
typedef struct {
regoff_t rm_so; /* start of match */
@ -25,7 +28,7 @@ typedef struct {
/* === regcomp.c === */
extern int regcomp(regex_t *, const char *, int);
extern int regcomp(regex_t *, const char *, int, CHARSET_INFO *charset);
#define REG_BASIC 0000
#define REG_EXTENDED 0001
#define REG_ICASE 0002