Preparing to use better string-to-number functions to avoid c_ptr() call,

wich is slower and is not ucs2 compatible
This commit is contained in:
bar@bar.mysql.r18.ru 2002-11-27 15:47:39 +04:00
commit 61141a30ee
17 changed files with 231 additions and 230 deletions

View file

@ -6249,11 +6249,11 @@ CHARSET_INFO my_charset_big5 =
my_hash_sort_simple,
0,
my_snprintf_8bit,
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
};

View file

@ -270,11 +270,11 @@ static CHARSET_INFO my_charset_bin_st =
my_hash_sort_bin, /* hash_sort */
255, /* max_sort_char */
my_snprintf_8bit, /* snprintf */
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
};

View file

@ -627,11 +627,11 @@ CHARSET_INFO my_charset_czech =
my_hash_sort_simple,
0,
my_snprintf_8bit,
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
};
#endif

View file

@ -8667,11 +8667,11 @@ CHARSET_INFO my_charset_euc_kr =
my_hash_sort_simple,
0,
my_snprintf_8bit,
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
};
#endif

View file

@ -5717,11 +5717,11 @@ CHARSET_INFO my_charset_gb2312 =
my_hash_sort_simple,
0,
my_snprintf_8bit,
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
};
#endif

View file

@ -9904,11 +9904,11 @@ CHARSET_INFO my_charset_gbk =
my_hash_sort_simple,
0,
my_snprintf_8bit,
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
};

View file

@ -445,11 +445,11 @@ CHARSET_INFO my_charset_latin1_de =
my_hash_sort_simple,
0,
my_snprintf_8bit,
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
};
#endif

View file

@ -244,34 +244,34 @@ void my_hash_sort_simple(CHARSET_INFO *cs,
}
}
long my_strtol_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *s, char **e, int base)
long my_strntol_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *s, uint l, char **e, int base)
{
return strtol(s,e,base);
return 0;
}
ulong my_strtoul_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *s, char **e, int base)
ulong my_strntoul_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *s, uint l, char **e, int base)
{
return strtoul(s,e,base);
return 0;
}
longlong my_strtoll_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *s, char **e, int base)
longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *s, uint l, char **e, int base)
{
return strtoll(s,e,base);
return 0;
}
ulonglong my_strtoull_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *s, char **e, int base)
ulonglong my_strntoull_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *s, uint l, char **e, int base)
{
return strtoul(s,e,base);
return 0;
}
double my_strtod_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *s, char **e)
double my_strntod_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *s, uint l, char **e)
{
return strtod(s,e);
return 0;
}

View file

@ -4491,11 +4491,11 @@ CHARSET_INFO my_charset_sjis =
my_hash_sort_simple,
0,
my_snprintf_8bit,
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
};
#endif

View file

@ -719,11 +719,11 @@ CHARSET_INFO my_charset_tis620 =
my_hash_sort_simple,
0,
my_snprintf_8bit,
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
};

View file

@ -8461,11 +8461,11 @@ CHARSET_INFO my_charset_ujis =
my_hash_sort_simple,
0,
my_snprintf_8bit,
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
};

View file

@ -1986,11 +1986,11 @@ CHARSET_INFO my_charset_utf8 =
my_hash_sort_utf8, /* hash_sort */
0,
my_snprintf_8bit,
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
};
@ -2439,34 +2439,34 @@ static int my_snprintf_ucs2(CHARSET_INFO *cs __attribute__((unused))
}
static long my_strtol_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *s, char **e, int base)
static long my_strntol_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *s, uint l, char **e, int base)
{
return strtol(s,e,base);
return 0;
}
static ulong my_strtoul_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *s, char **e, int base)
static ulong my_strntoul_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *s, uint l, char **e, int base)
{
return strtoul(s,e,base);
return 0;
}
static longlong my_strtoll_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *s, char **e, int base)
static longlong my_strntoll_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *s, uint l, char **e, int base)
{
return strtoll(s,e,base);
return 0;
}
static ulonglong my_strtoull_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *s, char **e, int base)
static ulonglong my_strntoull_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *s, uint l, char **e, int base)
{
return strtoul(s,e,base);
return 0;
}
double my_strtod_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *s, char **e)
double my_strntod_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *s, uint l, char **e)
{
return strtod(s,e);
return 0;
}
@ -2504,11 +2504,11 @@ CHARSET_INFO my_charset_ucs2 =
my_hash_sort_ucs2, /* hash_sort */
0,
my_snprintf_ucs2,
my_strtol_ucs2,
my_strtoul_ucs2,
my_strtoll_ucs2,
my_strtoull_ucs2,
my_strtod_ucs2
my_strntol_ucs2,
my_strntoul_ucs2,
my_strntoll_ucs2,
my_strntoull_ucs2,
my_strntod_ucs2
};

View file

@ -653,11 +653,11 @@ CHARSET_INFO my_charset_win1250ch =
my_hash_sort_simple,
0,
my_snprintf_8bit,
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
};

View file

@ -2841,11 +2841,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit,
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -2884,11 +2884,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -2926,11 +2926,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -2968,11 +2968,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3011,11 +3011,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3053,11 +3053,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3095,11 +3095,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3137,11 +3137,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3180,11 +3180,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3222,11 +3222,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3264,11 +3264,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3306,11 +3306,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3348,11 +3348,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3390,11 +3390,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3432,11 +3432,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3475,11 +3475,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3517,11 +3517,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3560,11 +3560,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3603,11 +3603,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3645,11 +3645,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3687,11 +3687,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3729,11 +3729,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif
@ -3771,11 +3771,11 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_sort_simple,
0,
my_snprintf_8bit
my_strtol_8bit,
my_strtoul_8bit,
my_strtoll_8bit,
my_strtoull_8bit,
my_strtod_8bit
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit
},
#endif