Commit 2508a9e8 authored by lenz@mysql.com's avatar lenz@mysql.com

Merge mysql.com:/space/my/mysql-4.1

into mysql.com:/space/my/mysql-4.1-build
parents 8243eeee 113e499b
...@@ -1480,7 +1480,7 @@ static ulong find_set(TYPELIB *lib, const char *x, uint length, ...@@ -1480,7 +1480,7 @@ static ulong find_set(TYPELIB *lib, const char *x, uint length,
uint find; uint find;
char buff[255]; char buff[255];
*err_pos= 0; // No error yet *err_pos= 0; /* No error yet */
while (end > x && my_isspace(system_charset_info, end[-1])) while (end > x && my_isspace(system_charset_info, end[-1]))
end--; end--;
......
...@@ -89,7 +89,7 @@ int main(int argc, char **argv) ...@@ -89,7 +89,7 @@ int main(int argc, char **argv)
} }
*to= *pos; *to= *pos;
} }
*to= *pos; // just to copy a '\0' if '\\' was used *to= *pos; /* just to copy a '\0' if '\\' was used */
} }
if (first_argument_uses_wildcards) if (first_argument_uses_wildcards)
wild= argv[--argc]; wild= argv[--argc];
......
...@@ -200,7 +200,7 @@ static int my_wildcmp_bin(CHARSET_INFO *cs, ...@@ -200,7 +200,7 @@ static int my_wildcmp_bin(CHARSET_INFO *cs,
const char *wildstr,const char *wildend, const char *wildstr,const char *wildend,
int escape, int w_one, int w_many) int escape, int w_one, int w_many)
{ {
int result= -1; // Not found, using wildcards int result= -1; /* Not found, using wildcards */
while (wildstr != wildend) while (wildstr != wildend)
{ {
...@@ -214,15 +214,15 @@ static int my_wildcmp_bin(CHARSET_INFO *cs, ...@@ -214,15 +214,15 @@ static int my_wildcmp_bin(CHARSET_INFO *cs,
} }
if (wildstr == wildend) if (wildstr == wildend)
{ {
return(str != str_end); // Match if both are at end return(str != str_end); /* Match if both are at end */
} }
result=1; // Found an anchor char result=1; /* Found an anchor char */
} }
if (*wildstr == w_one) if (*wildstr == w_one)
{ {
do do
{ {
if (str == str_end) // Skip one char if possible if (str == str_end) /* Skip one char if possible */
return(result); return(result);
str++; str++;
} while (*++wildstr == w_one && wildstr != wildend); } while (*++wildstr == w_one && wildstr != wildend);
...@@ -230,7 +230,7 @@ static int my_wildcmp_bin(CHARSET_INFO *cs, ...@@ -230,7 +230,7 @@ static int my_wildcmp_bin(CHARSET_INFO *cs,
break; break;
} }
if (*wildstr == w_many) if (*wildstr == w_many)
{ // Found w_many { /* Found w_many */
char cmp; char cmp;
wildstr++; wildstr++;
...@@ -248,11 +248,11 @@ static int my_wildcmp_bin(CHARSET_INFO *cs, ...@@ -248,11 +248,11 @@ static int my_wildcmp_bin(CHARSET_INFO *cs,
str++; str++;
continue; continue;
} }
break; // Not a wild character break; /* Not a wild character */
} }
if (wildstr == wildend) if (wildstr == wildend)
{ {
return(0); // Ok if w_many is last return(0); /* Ok if w_many is last */
} }
if (str == str_end) if (str == str_end)
{ {
...@@ -261,7 +261,7 @@ static int my_wildcmp_bin(CHARSET_INFO *cs, ...@@ -261,7 +261,7 @@ static int my_wildcmp_bin(CHARSET_INFO *cs,
if ((cmp= *wildstr) == escape && wildstr+1 != wildend) if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
cmp= *++wildstr; cmp= *++wildstr;
wildstr++; // This is compared trough cmp wildstr++; /* This is compared trough cmp */
do do
{ {
while (str != str_end && *str != cmp) while (str != str_end && *str != cmp)
......
...@@ -161,7 +161,7 @@ int my_wildcmp_mb(CHARSET_INFO *cs, ...@@ -161,7 +161,7 @@ int my_wildcmp_mb(CHARSET_INFO *cs,
const char *wildstr,const char *wildend, const char *wildstr,const char *wildend,
int escape, int w_one, int w_many) int escape, int w_one, int w_many)
{ {
int result= -1; // Not found, using wildcards int result= -1; /* Not found, using wildcards */
bool use_mb_flag=use_mb(cs); bool use_mb_flag=use_mb(cs);
...@@ -182,16 +182,16 @@ int my_wildcmp_mb(CHARSET_INFO *cs, ...@@ -182,16 +182,16 @@ int my_wildcmp_mb(CHARSET_INFO *cs,
} }
else else
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
return(1); // No match return(1); /* No match */
if (wildstr == wildend) if (wildstr == wildend)
return (str != str_end); // Match if both are at end return (str != str_end); /* Match if both are at end */
result=1; // Found an anchor char result=1; /* Found an anchor char */
} }
if (*wildstr == w_one) if (*wildstr == w_one)
{ {
do do
{ {
if (str == str_end) // Skip one char if possible if (str == str_end) /* Skip one char if possible */
return (result); return (result);
INC_PTR(cs,str,str_end); INC_PTR(cs,str,str_end);
} while (++wildstr < wildend && *wildstr == w_one); } while (++wildstr < wildend && *wildstr == w_one);
...@@ -199,7 +199,7 @@ int my_wildcmp_mb(CHARSET_INFO *cs, ...@@ -199,7 +199,7 @@ int my_wildcmp_mb(CHARSET_INFO *cs,
break; break;
} }
if (*wildstr == w_many) if (*wildstr == w_many)
{ // Found w_many { /* Found w_many */
uchar cmp; uchar cmp;
const char* mb = wildstr; const char* mb = wildstr;
int mblen=0; int mblen=0;
...@@ -217,10 +217,10 @@ int my_wildcmp_mb(CHARSET_INFO *cs, ...@@ -217,10 +217,10 @@ int my_wildcmp_mb(CHARSET_INFO *cs,
INC_PTR(cs,str,str_end); INC_PTR(cs,str,str_end);
continue; continue;
} }
break; // Not a wild character break; /* Not a wild character */
} }
if (wildstr == wildend) if (wildstr == wildend)
return(0); // Ok if w_many is last return(0); /* Ok if w_many is last */
if (str == str_end) if (str == str_end)
return -1; return -1;
...@@ -231,7 +231,7 @@ int my_wildcmp_mb(CHARSET_INFO *cs, ...@@ -231,7 +231,7 @@ int my_wildcmp_mb(CHARSET_INFO *cs,
LINT_INIT(mblen); LINT_INIT(mblen);
if (use_mb_flag) if (use_mb_flag)
mblen = my_ismbchar(cs, wildstr, wildend); mblen = my_ismbchar(cs, wildstr, wildend);
INC_PTR(cs,wildstr,wildend); // This is compared trough cmp INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */
cmp=likeconv(cs,cmp); cmp=likeconv(cs,cmp);
do do
{ {
......
...@@ -40,7 +40,7 @@ typedef unsigned char tchar; ...@@ -40,7 +40,7 @@ typedef unsigned char tchar;
#define IGNORE 0 #define IGNORE 0
// level 1 symbols & order /* level 1 symbols & order */
enum l1_symbols { enum l1_symbols {
L1_08 = TOT_LEVELS, L1_08 = TOT_LEVELS,
L1_18, L1_18,
...@@ -142,7 +142,7 @@ enum l1_symbols { ...@@ -142,7 +142,7 @@ enum l1_symbols {
L1_SARA_AI_MAIMALAI L1_SARA_AI_MAIMALAI
}; };
// level 2 symbols & order /* level 2 symbols & order */
enum l2_symbols { enum l2_symbols {
L2_BLANK = TOT_LEVELS, L2_BLANK = TOT_LEVELS,
L2_THAII, L2_THAII,
...@@ -156,7 +156,7 @@ enum l2_symbols { ...@@ -156,7 +156,7 @@ enum l2_symbols {
L2_TONE4 L2_TONE4
}; };
// level 3 symbols & order /* level 3 symbols & order */
enum l3_symbols { enum l3_symbols {
L3_BLANK = TOT_LEVELS, L3_BLANK = TOT_LEVELS,
L3_SPACE, L3_SPACE,
...@@ -201,7 +201,7 @@ enum l3_symbols { ...@@ -201,7 +201,7 @@ enum l3_symbols {
L3_V_LINE L3_V_LINE
}; };
// level 4 symbols & order /* level 4 symbols & order */
enum l4_symbols { enum l4_symbols {
L4_BLANK = TOT_LEVELS, L4_BLANK = TOT_LEVELS,
L4_MIN, L4_MIN,
......
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