Commit a001b71f authored by bar@bar.mysql.r18.ru's avatar bar@bar.mysql.r18.ru

ctype-simple.c, ctype-mb.c:

  Win compilation problem fix
ctype-bin.c:
  Win compilation problem fix
  ,
  ,
m_ctype.h:
  Win compilation problem fix
  ,
parent 9c2867c2
...@@ -123,8 +123,8 @@ typedef struct my_collation_handler_st ...@@ -123,8 +123,8 @@ typedef struct my_collation_handler_st
int (*strcasecmp)(struct charset_info_st *, const char *, const char *); int (*strcasecmp)(struct charset_info_st *, const char *, const char *);
uint (*instr)(struct charset_info_st *, uint (*instr)(struct charset_info_st *,
const char *big, uint b_length, const char *b, uint b_length,
const char *small, uint s_length, const char *s, uint s_length,
my_match_t *match, uint nmatch); my_match_t *match, uint nmatch);
/* Hash calculation */ /* Hash calculation */
...@@ -257,8 +257,8 @@ extern void my_hash_sort_simple(CHARSET_INFO *cs, ...@@ -257,8 +257,8 @@ extern void my_hash_sort_simple(CHARSET_INFO *cs,
extern uint my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, uint length); extern uint my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, uint length);
extern uint my_instr_simple(struct charset_info_st *, extern uint my_instr_simple(struct charset_info_st *,
const char *big, uint b_length, const char *b, uint b_length,
const char *small, uint s_length, const char *s, uint s_length,
my_match_t *match, uint nmatch); my_match_t *match, uint nmatch);
...@@ -326,8 +326,8 @@ int my_wildcmp_mb(CHARSET_INFO *, ...@@ -326,8 +326,8 @@ int my_wildcmp_mb(CHARSET_INFO *,
uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e); uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos); uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
uint my_instr_mb(struct charset_info_st *, uint my_instr_mb(struct charset_info_st *,
const char *big, uint b_length, const char *b, uint b_length,
const char *small, uint s_length, const char *s, uint s_length,
my_match_t *match, uint nmatch); my_match_t *match, uint nmatch);
......
...@@ -264,8 +264,8 @@ static int my_strnxfrm_bin(CHARSET_INFO *cs __attribute__((unused)), ...@@ -264,8 +264,8 @@ static int my_strnxfrm_bin(CHARSET_INFO *cs __attribute__((unused)),
static static
uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)), uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)),
const char *big, uint b_length, const char *b, uint b_length,
const char *small, uint s_length, const char *s, uint s_length,
my_match_t *match, uint nmatch) my_match_t *match, uint nmatch)
{ {
register const uchar *str, *search, *end, *search_end; register const uchar *str, *search, *end, *search_end;
...@@ -283,10 +283,10 @@ uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)), ...@@ -283,10 +283,10 @@ uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)),
return 1; /* Empty string is always found */ return 1; /* Empty string is always found */
} }
str= (const uchar*) big; str= (const uchar*) b;
search= (const uchar*) small; search= (const uchar*) s;
end= (const uchar*) big+b_length-s_length+1; end= (const uchar*) b+b_length-s_length+1;
search_end= (const uchar*) small + s_length; search_end= (const uchar*) s + s_length;
skipp: skipp:
while (str != end) while (str != end)
...@@ -305,7 +305,7 @@ uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)), ...@@ -305,7 +305,7 @@ uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)),
if (nmatch > 0) if (nmatch > 0)
{ {
match[0].beg= 0; match[0].beg= 0;
match[0].end= str- (const uchar*)big-1; match[0].end= str- (const uchar*)b-1;
match[0].mblen= match[0].end; match[0].mblen= match[0].end;
if (nmatch > 1) if (nmatch > 1)
......
...@@ -275,11 +275,11 @@ uint my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)), ...@@ -275,11 +275,11 @@ uint my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)),
} }
uint my_instr_mb(CHARSET_INFO *cs, uint my_instr_mb(CHARSET_INFO *cs,
const char *big, uint b_length, const char *b, uint b_length,
const char *small, uint s_length, const char *s, uint s_length,
my_match_t *match, uint nmatch) my_match_t *match, uint nmatch)
{ {
register const char *end, *big0; register const char *end, *b0;
int res= 0; int res= 0;
if (s_length <= b_length) if (s_length <= b_length)
...@@ -295,20 +295,20 @@ uint my_instr_mb(CHARSET_INFO *cs, ...@@ -295,20 +295,20 @@ uint my_instr_mb(CHARSET_INFO *cs,
return 1; /* Empty string is always found */ return 1; /* Empty string is always found */
} }
big0= big; b0= b;
end= big+b_length-s_length+1; end= b+b_length-s_length+1;
while (big < end) while (b < end)
{ {
int mblen; int mblen;
if (!cs->coll->strnncoll(cs, (unsigned char*) big, s_length, if (!cs->coll->strnncoll(cs, (unsigned char*) b, s_length,
(unsigned char*) small, s_length)) (unsigned char*) s, s_length))
{ {
if (nmatch) if (nmatch)
{ {
match[0].beg= 0; match[0].beg= 0;
match[0].end= big-big0; match[0].end= b-b0;
match[0].mblen= res; match[0].mblen= res;
if (nmatch > 1) if (nmatch > 1)
{ {
...@@ -319,8 +319,8 @@ uint my_instr_mb(CHARSET_INFO *cs, ...@@ -319,8 +319,8 @@ uint my_instr_mb(CHARSET_INFO *cs,
} }
return 2; return 2;
} }
mblen= (mblen= my_ismbchar(cs, big, end)) ? mblen : 1; mblen= (mblen= my_ismbchar(cs, b, end)) ? mblen : 1;
big+= mblen; b+= mblen;
b_length-= mblen; b_length-= mblen;
res++; res++;
} }
......
...@@ -1031,8 +1031,8 @@ uint my_lengthsp_8bit(CHARSET_INFO *cs __attribute__((unused)), ...@@ -1031,8 +1031,8 @@ uint my_lengthsp_8bit(CHARSET_INFO *cs __attribute__((unused)),
uint my_instr_simple(CHARSET_INFO *cs, uint my_instr_simple(CHARSET_INFO *cs,
const char *big, uint b_length, const char *b, uint b_length,
const char *small, uint s_length, const char *s, uint s_length,
my_match_t *match, uint nmatch) my_match_t *match, uint nmatch)
{ {
register const uchar *str, *search, *end, *search_end; register const uchar *str, *search, *end, *search_end;
...@@ -1050,10 +1050,10 @@ uint my_instr_simple(CHARSET_INFO *cs, ...@@ -1050,10 +1050,10 @@ uint my_instr_simple(CHARSET_INFO *cs,
return 1; /* Empty string is always found */ return 1; /* Empty string is always found */
} }
str= (const uchar*) big; str= (const uchar*) b;
search= (const uchar*) small; search= (const uchar*) s;
end= (const uchar*) big+b_length-s_length+1; end= (const uchar*) b+b_length-s_length+1;
search_end= (const uchar*) small + s_length; search_end= (const uchar*) s + s_length;
skipp: skipp:
while (str != end) while (str != end)
...@@ -1072,7 +1072,7 @@ uint my_instr_simple(CHARSET_INFO *cs, ...@@ -1072,7 +1072,7 @@ uint my_instr_simple(CHARSET_INFO *cs,
if (nmatch > 0) if (nmatch > 0)
{ {
match[0].beg= 0; match[0].beg= 0;
match[0].end= str- (const uchar*)big-1; match[0].end= str- (const uchar*)b-1;
match[0].mblen= match[0].end; match[0].mblen= match[0].end;
if (nmatch > 1) if (nmatch > 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment