Commit 2e28ab24 authored by unknown's avatar unknown

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

  Win compilation problem fix
ctype-bin.c:
  Win compilation problem fix
  ,
  ,
m_ctype.h:
  Win compilation problem fix
  ,


include/m_ctype.h:
  Win compilation problem fix
  ,
strings/ctype-bin.c:
  Win compilation problem fix
  ,
  ,
strings/ctype-mb.c:
  Win compilation problem fix
strings/ctype-simple.c:
  Win compilation problem fix
parent 8759d030
......@@ -123,8 +123,8 @@ typedef struct my_collation_handler_st
int (*strcasecmp)(struct charset_info_st *, const char *, const char *);
uint (*instr)(struct charset_info_st *,
const char *big, uint b_length,
const char *small, uint s_length,
const char *b, uint b_length,
const char *s, uint s_length,
my_match_t *match, uint nmatch);
/* Hash calculation */
......@@ -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_instr_simple(struct charset_info_st *,
const char *big, uint b_length,
const char *small, uint s_length,
const char *b, uint b_length,
const char *s, uint s_length,
my_match_t *match, uint nmatch);
......@@ -326,8 +326,8 @@ int my_wildcmp_mb(CHARSET_INFO *,
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_instr_mb(struct charset_info_st *,
const char *big, uint b_length,
const char *small, uint s_length,
const char *b, uint b_length,
const char *s, uint s_length,
my_match_t *match, uint nmatch);
......
......@@ -264,8 +264,8 @@ static int my_strnxfrm_bin(CHARSET_INFO *cs __attribute__((unused)),
static
uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)),
const char *big, uint b_length,
const char *small, uint s_length,
const char *b, uint b_length,
const char *s, uint s_length,
my_match_t *match, uint nmatch)
{
register const uchar *str, *search, *end, *search_end;
......@@ -283,10 +283,10 @@ uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)),
return 1; /* Empty string is always found */
}
str= (const uchar*) big;
search= (const uchar*) small;
end= (const uchar*) big+b_length-s_length+1;
search_end= (const uchar*) small + s_length;
str= (const uchar*) b;
search= (const uchar*) s;
end= (const uchar*) b+b_length-s_length+1;
search_end= (const uchar*) s + s_length;
skipp:
while (str != end)
......@@ -305,7 +305,7 @@ uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)),
if (nmatch > 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;
if (nmatch > 1)
......
......@@ -275,11 +275,11 @@ uint my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)),
}
uint my_instr_mb(CHARSET_INFO *cs,
const char *big, uint b_length,
const char *small, uint s_length,
const char *b, uint b_length,
const char *s, uint s_length,
my_match_t *match, uint nmatch)
{
register const char *end, *big0;
register const char *end, *b0;
int res= 0;
if (s_length <= b_length)
......@@ -295,20 +295,20 @@ uint my_instr_mb(CHARSET_INFO *cs,
return 1; /* Empty string is always found */
}
big0= big;
end= big+b_length-s_length+1;
b0= b;
end= b+b_length-s_length+1;
while (big < end)
while (b < end)
{
int mblen;
if (!cs->coll->strnncoll(cs, (unsigned char*) big, s_length,
(unsigned char*) small, s_length))
if (!cs->coll->strnncoll(cs, (unsigned char*) b, s_length,
(unsigned char*) s, s_length))
{
if (nmatch)
{
match[0].beg= 0;
match[0].end= big-big0;
match[0].end= b-b0;
match[0].mblen= res;
if (nmatch > 1)
{
......@@ -319,8 +319,8 @@ uint my_instr_mb(CHARSET_INFO *cs,
}
return 2;
}
mblen= (mblen= my_ismbchar(cs, big, end)) ? mblen : 1;
big+= mblen;
mblen= (mblen= my_ismbchar(cs, b, end)) ? mblen : 1;
b+= mblen;
b_length-= mblen;
res++;
}
......
......@@ -1031,8 +1031,8 @@ uint my_lengthsp_8bit(CHARSET_INFO *cs __attribute__((unused)),
uint my_instr_simple(CHARSET_INFO *cs,
const char *big, uint b_length,
const char *small, uint s_length,
const char *b, uint b_length,
const char *s, uint s_length,
my_match_t *match, uint nmatch)
{
register const uchar *str, *search, *end, *search_end;
......@@ -1050,10 +1050,10 @@ uint my_instr_simple(CHARSET_INFO *cs,
return 1; /* Empty string is always found */
}
str= (const uchar*) big;
search= (const uchar*) small;
end= (const uchar*) big+b_length-s_length+1;
search_end= (const uchar*) small + s_length;
str= (const uchar*) b;
search= (const uchar*) s;
end= (const uchar*) b+b_length-s_length+1;
search_end= (const uchar*) s + s_length;
skipp:
while (str != end)
......@@ -1072,7 +1072,7 @@ uint my_instr_simple(CHARSET_INFO *cs,
if (nmatch > 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;
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