(INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
authorhanda <handa>
Mon, 21 Jun 2004 00:44:10 +0000 (00:44 +0000)
committerhanda <handa>
Mon, 21 Jun 2004 00:44:10 +0000 (00:44 +0000)
commite7a0725f2ae1b9ce41758f1daac601e41d31cabc
tree817bcf637a29560bb7cfc8f9426569c07af6af36
parent4ae73bb6cb07bcb25656b25de9be3e77bcbb11d6
(INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
(compare): Pay attention to format other than utf-8.
(copy): Delete this function.
(count_by_utf_8, count_by_utf_16, insert): New functions.
(count_utf_16_chars): Fix handling of a surrogate pair.
(find_char_forward, find_char_backward): Likewise.
(mtext__from_data): Delete unnecessary check.  Fix number of
allocated bytes.
(mtext_from_data): Don't count items.
(mtext_ref_char): Optimize the code.
(mtext_set_char): Pay attention to format other than utf-8.
(mtext_cat_char): Likewise.
(mtext_dup): Don't call copy, instead do allocation here.
(mtext_cat): Call insert instead of copy.
(mtext_ncat): Likewise.
(mtext_cpy): Delete character at first and call insert instead of
copy.
(mtext_ncpy): Likewise.
(mtext_copy): Likewise.
(mtext_duplicate): Call insert instead of copy.
(mtext_del): Pay attention to format other than utf-8.
(mtext_ins): Simply call insert.
(mtext_ins_char): Pay attention to format other than utf-8.
(mtext_tok): Call insert instead of copy.
(mtext_text): Call UNIT_BYTES.
src/mtext.c