diff options
author | unknown <bar@bar.mysql.r18.ru> | 2002-11-14 16:07:29 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2002-11-14 16:07:29 +0400 |
commit | e7bbe3aa0b2f9dda5f6883a3e1998377a9071db5 (patch) | |
tree | 0e7e8871bc2c798c18440f74365d16aed91a4d2d /include | |
parent | 948a867123539742518d033c856eeb2caa94525d (diff) | |
download | mariadb-git-e7bbe3aa0b2f9dda5f6883a3e1998377a9071db5.tar.gz |
New wildcmp() function in CHARSET_INFO structure
Diffstat (limited to 'include')
-rw-r--r-- | include/m_ctype.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/include/m_ctype.h b/include/m_ctype.h index bee6e51c483..414bd86a412 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -83,19 +83,23 @@ typedef struct charset_info_st my_bool (*like_range)(struct charset_info_st *, const char *, uint, pchar, uint, char *, char *, uint *, uint *); - + int (*wildcmp)(struct charset_info_st *, + const char *str,const char *str_end, + const char *wildstr,const char *wildend, + int escape,int w_one, int w_many); + /* Multibyte routines */ uint mbmaxlen; int (*ismbchar)(struct charset_info_st *, const char *, const char *); my_bool (*ismbhead)(struct charset_info_st *, uint); int (*mbcharlen)(struct charset_info_st *, uint); - + /* Unicode convertion */ int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc, const unsigned char *s,const unsigned char *e); int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc, unsigned char *s,unsigned char *e); - + /* Functions for case and sort convertion */ void (*caseup_str)(struct charset_info_st *, char *); void (*casedn_str)(struct charset_info_st *, char *); @@ -107,7 +111,7 @@ typedef struct charset_info_st int (*strcasecmp)(struct charset_info_st *, const char *, const char *); int (*strncasecmp)(struct charset_info_st *, const char *, const char *, uint); - + /* Hash calculation */ uint (*hash_caseup)(struct charset_info_st *cs, const byte *key, uint len); void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len, @@ -169,6 +173,11 @@ ulonglong my_strtoull_8bit(CHARSET_INFO *, const char *s, char **e, int base); double my_strtod_8bit(CHARSET_INFO *, const char *s, char **e); +int my_wildcmp_8bit(CHARSET_INFO *, + const char *str,const char *str_end, + const char *wildstr,const char *wildend, + int escape, int w_one, int w_many); + #ifdef USE_MB /* Functions for multibyte charsets */ @@ -178,6 +187,10 @@ extern void my_caseup_mb(CHARSET_INFO *, char *, uint); extern void my_casedn_mb(CHARSET_INFO *, char *, uint); extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *); extern int my_strncasecmp_mb(CHARSET_INFO * cs,const char *, const char *t, uint); +int my_wildcmp_mb(CHARSET_INFO *, + const char *str,const char *str_end, + const char *wildstr,const char *wildend, + int escape, int w_one, int w_many); #endif @@ -219,6 +232,7 @@ extern int my_strncasecmp_mb(CHARSET_INFO * cs,const char *, const char *t, uint #define my_strnncoll(s, a, b, c, d) ((s)->strnncoll((s), (a), (b), (c), (d))) #define my_like_range(s, a, b, c, d, e, f, g, h) \ ((s)->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h))) +#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->wildcmp,(s),(se),(w),(we),(e),(o),(m)) #define use_mb(s) ((s)->ismbchar != NULL) #define my_ismbchar(s, a, b) ((s)->ismbchar((s), (a), (b))) |