summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2002-11-13 17:13:29 +0400
committerunknown <bar@bar.mysql.r18.ru>2002-11-13 17:13:29 +0400
commit81d428bd5a61708b711d18814becde5c16502c74 (patch)
treeac51f8204a2054cf259d00f873f6bd37b3c1ed92 /strings
parente0ad88a2ff751d62853fa4f81d007d1b55fc71f4 (diff)
downloadmariadb-git-81d428bd5a61708b711d18814becde5c16502c74.tar.gz
Preparing to embed string to number conversion functions into charset structure
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-big5.c7
-rw-r--r--strings/ctype-czech.c7
-rw-r--r--strings/ctype-euc_kr.c7
-rw-r--r--strings/ctype-gb2312.c7
-rw-r--r--strings/ctype-gbk.c7
-rw-r--r--strings/ctype-latin1_de.c7
-rw-r--r--strings/ctype-simple.c30
-rw-r--r--strings/ctype-sjis.c7
-rw-r--r--strings/ctype-tis620.c7
-rw-r--r--strings/ctype-ujis.c7
-rw-r--r--strings/ctype-utf8.c44
-rw-r--r--strings/ctype-win1250ch.c7
-rw-r--r--strings/ctype.c122
13 files changed, 253 insertions, 13 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 8dff0d860a0..0efa36d4a19 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -6248,7 +6248,12 @@ CHARSET_INFO my_charset_big5 =
my_hash_caseup_simple,
my_hash_sort_simple,
0,
- my_snprintf_8bit
+ my_snprintf_8bit,
+ my_strtol_8bit,
+ my_strtoul_8bit,
+ my_strtoll_8bit,
+ my_strtoull_8bit,
+ my_strtod_8bit
};
diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c
index 3ec4491001d..46ba1af13b2 100644
--- a/strings/ctype-czech.c
+++ b/strings/ctype-czech.c
@@ -626,7 +626,12 @@ CHARSET_INFO my_charset_czech =
my_hash_caseup_simple,
my_hash_sort_simple,
0,
- my_snprintf_8bit
+ my_snprintf_8bit,
+ my_strtol_8bit,
+ my_strtoul_8bit,
+ my_strtoll_8bit,
+ my_strtoull_8bit,
+ my_strtod_8bit
};
#endif
diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c
index 154fada271e..4e5a0e3b525 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -8665,7 +8665,12 @@ CHARSET_INFO my_charset_euc_kr =
my_hash_caseup_simple,
my_hash_sort_simple,
0,
- my_snprintf_8bit
+ my_snprintf_8bit,
+ my_strtol_8bit,
+ my_strtoul_8bit,
+ my_strtoll_8bit,
+ my_strtoull_8bit,
+ my_strtod_8bit
};
#endif
diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c
index ecd15830b3f..c7a34f73f46 100644
--- a/strings/ctype-gb2312.c
+++ b/strings/ctype-gb2312.c
@@ -5715,7 +5715,12 @@ CHARSET_INFO my_charset_gb2312 =
my_hash_caseup_simple,
my_hash_sort_simple,
0,
- my_snprintf_8bit
+ my_snprintf_8bit,
+ my_strtol_8bit,
+ my_strtoul_8bit,
+ my_strtoll_8bit,
+ my_strtoull_8bit,
+ my_strtod_8bit
};
#endif
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index bdfdfb9b256..81a95eea026 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -9903,7 +9903,12 @@ CHARSET_INFO my_charset_gbk =
my_hash_caseup_simple,
my_hash_sort_simple,
0,
- my_snprintf_8bit
+ my_snprintf_8bit,
+ my_strtol_8bit,
+ my_strtoul_8bit,
+ my_strtoll_8bit,
+ my_strtoull_8bit,
+ my_strtod_8bit
};
diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c
index d829296fd78..65c66f8cca8 100644
--- a/strings/ctype-latin1_de.c
+++ b/strings/ctype-latin1_de.c
@@ -444,7 +444,12 @@ CHARSET_INFO my_charset_latin1_de =
my_hash_caseup_simple,
my_hash_sort_simple,
0,
- my_snprintf_8bit
+ my_snprintf_8bit,
+ my_strtol_8bit,
+ my_strtoul_8bit,
+ my_strtoll_8bit,
+ my_strtoull_8bit,
+ my_strtod_8bit
};
#endif
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index 3393ed09ee0..73978ffeeb5 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -244,3 +244,33 @@ void my_hash_sort_simple(CHARSET_INFO *cs,
nr2[0]+=3;
}
}
+
+long my_strtol_8bit(CHARSET_INFO *cs __attribute__((unused)),
+ const char *s, char **e, int base)
+{
+ return strtol(s,e,base);
+}
+
+ulong my_strtoul_8bit(CHARSET_INFO *cs __attribute__((unused)),
+ const char *s, char **e, int base)
+{
+ return strtoul(s,e,base);
+}
+
+longlong my_strtoll_8bit(CHARSET_INFO *cs __attribute__((unused)),
+ const char *s, char **e, int base)
+{
+ return strtoll(s,e,base);
+}
+
+ulonglong my_strtoull_8bit(CHARSET_INFO *cs __attribute__((unused)),
+ const char *s, char **e, int base)
+{
+ return strtoul(s,e,base);
+}
+
+double my_strtod_8bit(CHARSET_INFO *cs __attribute__((unused)),
+ const char *s, char **e)
+{
+ return strtod(s,e);
+}
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index d657405137e..5d5beed0d44 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -4490,7 +4490,12 @@ CHARSET_INFO my_charset_sjis =
my_hash_caseup_simple,
my_hash_sort_simple,
0,
- my_snprintf_8bit
+ my_snprintf_8bit,
+ my_strtol_8bit,
+ my_strtoul_8bit,
+ my_strtoll_8bit,
+ my_strtoull_8bit,
+ my_strtod_8bit
};
#endif
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index 44d0dde65f5..04bf7107647 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -718,7 +718,12 @@ CHARSET_INFO my_charset_tis620 =
my_hash_caseup_simple,
my_hash_sort_simple,
0,
- my_snprintf_8bit
+ my_snprintf_8bit,
+ my_strtol_8bit,
+ my_strtoul_8bit,
+ my_strtoll_8bit,
+ my_strtoull_8bit,
+ my_strtod_8bit
};
diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c
index 85b51b0469c..0eb82cc91dc 100644
--- a/strings/ctype-ujis.c
+++ b/strings/ctype-ujis.c
@@ -8459,7 +8459,12 @@ CHARSET_INFO my_charset_ujis =
my_hash_caseup_simple,
my_hash_sort_simple,
0,
- my_snprintf_8bit
+ my_snprintf_8bit,
+ my_strtol_8bit,
+ my_strtoul_8bit,
+ my_strtoll_8bit,
+ my_strtoull_8bit,
+ my_strtod_8bit
};
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index e4afa4a0cee..898cc72b65c 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -1984,7 +1984,12 @@ CHARSET_INFO my_charset_utf8 =
my_hash_caseup_utf8,/* hash_caseup */
my_hash_sort_utf8, /* hash_sort */
0,
- my_snprintf_8bit
+ my_snprintf_8bit,
+ my_strtol_8bit,
+ my_strtoul_8bit,
+ my_strtoll_8bit,
+ my_strtoull_8bit,
+ my_strtod_8bit
};
@@ -2433,6 +2438,36 @@ 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)
+{
+ return strtol(s,e,base);
+}
+
+static ulong my_strtoul_ucs2(CHARSET_INFO *cs __attribute__((unused)),
+ const char *s, char **e, int base)
+{
+ return strtoul(s,e,base);
+}
+
+static longlong my_strtoll_ucs2(CHARSET_INFO *cs __attribute__((unused)),
+ const char *s, char **e, int base)
+{
+ return strtoll(s,e,base);
+}
+
+static ulonglong my_strtoull_ucs2(CHARSET_INFO *cs __attribute__((unused)),
+ const char *s, char **e, int base)
+{
+ return strtoul(s,e,base);
+}
+
+double my_strtod_ucs2(CHARSET_INFO *cs __attribute__((unused)),
+ const char *s, char **e)
+{
+ return strtod(s,e);
+}
+
CHARSET_INFO my_charset_ucs2 =
{
@@ -2466,7 +2501,12 @@ CHARSET_INFO my_charset_ucs2 =
my_hash_caseup_ucs2,/* hash_caseup */
my_hash_sort_ucs2, /* hash_sort */
0,
- my_snprintf_ucs2
+ my_snprintf_ucs2,
+ my_strtol_ucs2,
+ my_strtoul_ucs2,
+ my_strtoll_ucs2,
+ my_strtoull_ucs2,
+ my_strtod_ucs2
};
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c
index 9c418e2e6f5..3ef5b426bb4 100644
--- a/strings/ctype-win1250ch.c
+++ b/strings/ctype-win1250ch.c
@@ -652,7 +652,12 @@ CHARSET_INFO my_charset_win1250ch =
my_hash_caseup_simple,
my_hash_sort_simple,
0,
- my_snprintf_8bit
+ my_snprintf_8bit,
+ my_strtol_8bit,
+ my_strtoul_8bit,
+ my_strtoll_8bit,
+ my_strtoull_8bit,
+ my_strtod_8bit
};
diff --git a/strings/ctype.c b/strings/ctype.c
index 96003f8baab..4c16c47ae07 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -2839,7 +2839,12 @@ static CHARSET_INFO compiled_charsets[] = {
my_hash_caseup_simple,
my_hash_sort_simple,
0,
- my_snprintf_8bit
+ my_snprintf_8bit,
+ my_strtol_8bit,
+ my_strtoul_8bit,
+ my_strtoll_8bit,
+ my_strtoull_8bit,
+ my_strtod_8bit
},
#endif
@@ -2877,6 +2882,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
},
#endif
@@ -2913,6 +2923,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
},
#endif
@@ -2949,6 +2964,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
},
#endif
@@ -2986,6 +3006,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
},
#endif
@@ -3022,6 +3047,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
},
#endif
@@ -3058,6 +3088,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
},
#endif
@@ -3094,6 +3129,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
},
#endif
@@ -3131,6 +3171,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
},
#endif
@@ -3167,6 +3212,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
},
#endif
@@ -3203,6 +3253,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
},
#endif
@@ -3239,6 +3294,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
},
#endif
@@ -3275,6 +3335,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
},
#endif
@@ -3311,6 +3376,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
},
#endif
@@ -3347,6 +3417,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
},
#endif
@@ -3384,6 +3459,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
},
#endif
@@ -3420,6 +3500,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
},
#endif
@@ -3457,6 +3542,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
},
#endif
@@ -3494,6 +3584,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
},
#endif
@@ -3530,6 +3625,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
},
#endif
@@ -3566,6 +3666,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
},
#endif
@@ -3602,6 +3707,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
},
#endif
@@ -3638,6 +3748,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
},
#endif
@@ -3674,6 +3789,11 @@ static CHARSET_INFO compiled_charsets[] = {
NULL, /* hash_caseup */
NULL, /* hash_sort */
0,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
NULL
}
};