diff options
author | bar@bar.mysql.r18.ru <> | 2003-01-31 17:08:14 +0400 |
---|---|---|
committer | bar@bar.mysql.r18.ru <> | 2003-01-31 17:08:14 +0400 |
commit | 4f62ac93f0b98753375647a6d56893827207f767 (patch) | |
tree | d7600d5601cd0f458ff39152714c428bd55349bc /strings | |
parent | 24be8669a051d8a4edc189821247b629ba8890e8 (diff) | |
download | mariadb-git-4f62ac93f0b98753375647a6d56893827207f767.tar.gz |
More use of new CHARSET_INFO functions and two bug fixes
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-mb.c | 8 | ||||
-rw-r--r-- | strings/ctype-utf8.c | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index f5b7000cb18..aa4ccdb6af7 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -289,12 +289,10 @@ uint my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)), } uint my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)), - const char *b __attribute__((unused)), - const char *e __attribute__((unused)), - uint pos) + const char *b, const char *e, uint pos) { - uint res=0, mblen; - const char *b0; + uint mblen; + const char *b0=b; while (pos && b<e) { diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 6eebcb022a5..e63405001f9 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -3079,7 +3079,7 @@ uint my_charpos_ucs2(CHARSET_INFO *cs __attribute__((unused)), const char *e __attribute__((unused)), uint pos) { - return pos/2; + return pos*2; } CHARSET_INFO my_charset_ucs2 = |