summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-01-17 18:14:54 +0400
committerunknown <bar@bar.mysql.r18.ru>2003-01-17 18:14:54 +0400
commit4b75a129fc22e2620f83dacb60cf42b27082e94a (patch)
treeddb0460a7f46889fe6c654065da41d91679d813f /strings
parentee0f0a81da2cfa0fd897d5b64c3649aeed91be2a (diff)
downloadmariadb-git-4b75a129fc22e2620f83dacb60cf42b27082e94a.tar.gz
New scan() function in CHARSET_INFO structure (not used yet)
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-big5.c3
-rw-r--r--strings/ctype-bin.c1
-rw-r--r--strings/ctype-czech.c3
-rw-r--r--strings/ctype-euc_kr.c3
-rw-r--r--strings/ctype-gb2312.c3
-rw-r--r--strings/ctype-gbk.c1
-rw-r--r--strings/ctype-latin1_de.c3
-rw-r--r--strings/ctype-simple.c26
-rw-r--r--strings/ctype-sjis.c3
-rw-r--r--strings/ctype-tis620.c3
-rw-r--r--strings/ctype-ujis.c3
-rw-r--r--strings/ctype-utf8.c4
-rw-r--r--strings/ctype-win1250ch.c3
-rw-r--r--strings/ctype.c70
14 files changed, 96 insertions, 33 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 3d26918f1c8..a475a36d049 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -6257,7 +6257,8 @@ CHARSET_INFO my_charset_big5 =
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
};
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c
index 3cf5bb763cd..7d174d510e2 100644
--- a/strings/ctype-bin.c
+++ b/strings/ctype-bin.c
@@ -305,6 +305,7 @@ static CHARSET_INFO my_charset_bin_st =
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit,
+ my_scan_8bit
};
diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c
index 8feb83cbeb4..6397d3d902e 100644
--- a/strings/ctype-czech.c
+++ b/strings/ctype-czech.c
@@ -634,7 +634,8 @@ CHARSET_INFO my_charset_czech =
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
};
#endif
diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c
index ff7d0e9a5ae..ee75673e1c5 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -8674,7 +8674,8 @@ CHARSET_INFO my_charset_euc_kr =
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
};
#endif
diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c
index a94778118e3..0820d03b2d0 100644
--- a/strings/ctype-gb2312.c
+++ b/strings/ctype-gb2312.c
@@ -5724,7 +5724,8 @@ CHARSET_INFO my_charset_gb2312 =
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
};
#endif
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index 7c48e239f2d..3aff098cd14 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -9912,6 +9912,7 @@ CHARSET_INFO my_charset_gbk =
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit,
+ my_scan_8bit
};
diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c
index 6891e4cf944..6a5a9b78e8d 100644
--- a/strings/ctype-latin1_de.c
+++ b/strings/ctype-latin1_de.c
@@ -452,7 +452,8 @@ CHARSET_INFO my_charset_latin1_de =
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
};
#endif
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index 4ecd3717ca1..d9270a6de93 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -968,3 +968,29 @@ my_bool my_like_range_simple(CHARSET_INFO *cs,
*min_str++ = *max_str++ = ' '; // Because if key compression
return 0;
}
+
+
+ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
+{
+ const char *str0= str;
+ switch (sq)
+ {
+ case MY_SEQ_INTTAIL:
+ if (*str == '.')
+ {
+ for(str++ ; str != end && *str == '0' ; str++);
+ return str-str0;
+ }
+ return 0;
+
+ case MY_SEQ_SPACES:
+ for (str++ ; str != end ; str++)
+ {
+ if (!my_isspace(cs,*str))
+ break;
+ }
+ return str-str0;
+ default:
+ return 0;
+ }
+}
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index b3d81bb9c8a..b19bcf1a45a 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -4498,7 +4498,8 @@ CHARSET_INFO my_charset_sjis =
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
};
#endif
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index b07b08bba9f..ac959105736 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -726,7 +726,8 @@ CHARSET_INFO my_charset_tis620 =
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
};
diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c
index eaf39ff0aa7..12e177a89be 100644
--- a/strings/ctype-ujis.c
+++ b/strings/ctype-ujis.c
@@ -8468,7 +8468,8 @@ CHARSET_INFO my_charset_ujis =
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
};
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index 2418a6ab574..2d6a37dd5a7 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -2000,6 +2000,7 @@ CHARSET_INFO my_charset_utf8 =
my_strntoll_8bit,
my_strntoull_8bit,
my_strntod_8bit,
+ my_scan_8bit
};
@@ -3073,7 +3074,8 @@ CHARSET_INFO my_charset_ucs2 =
my_strntoul_ucs2,
my_strntoll_ucs2,
my_strntoull_ucs2,
- my_strntod_ucs2
+ my_strntod_ucs2,
+ my_scan_8bit
};
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c
index 6ec96693fec..86ddb82e1a2 100644
--- a/strings/ctype-win1250ch.c
+++ b/strings/ctype-win1250ch.c
@@ -660,7 +660,8 @@ CHARSET_INFO my_charset_win1250ch =
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
};
diff --git a/strings/ctype.c b/strings/ctype.c
index 04ae5917da2..0873429f9ab 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -2849,7 +2849,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -2895,7 +2896,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -2940,7 +2942,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -2985,7 +2988,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3031,7 +3035,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3076,7 +3081,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3121,7 +3127,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3166,7 +3173,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3212,7 +3220,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3257,7 +3266,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3302,7 +3312,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3347,7 +3358,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3392,7 +3404,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3437,7 +3450,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3482,7 +3496,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3528,7 +3543,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3573,7 +3589,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3619,7 +3636,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3665,7 +3683,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3710,7 +3729,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3755,7 +3775,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3800,7 +3821,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3845,7 +3867,8 @@ static CHARSET_INFO compiled_charsets[] = {
my_strntoul_8bit,
my_strntoll_8bit,
my_strntoull_8bit,
- my_strntod_8bit
+ my_strntod_8bit,
+ my_scan_8bit
},
#endif
@@ -3891,6 +3914,7 @@ static CHARSET_INFO compiled_charsets[] = {
NULL,
NULL,
NULL,
+ NULL,
NULL
}
};