[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Source_file: remove mbrtowc() in favor of utf8_char_len()
From: |
pnorcks |
Subject: |
Re: Source_file: remove mbrtowc() in favor of utf8_char_len() |
Date: |
Fri, 13 Nov 2009 00:41:16 +0000 |
Reviewers: Neil Puttock,
Message:
On 2009/11/12 20:38:57, Neil Puttock wrote:
Hi Patrick,
This looks fine to me.
Thanks, Neil. I pushed the patches.
-Patrick
Description:
Source_file: remove mbrtowc() in favor of utf8_char_len()
- Move the routine to determine length of UTF-8 characters into a
separate function.
- Use this new function in Source_file::get_counts() instead of
the problematic mbrtowc() function.
- In get_counts(), revert the line_char variable to its original
behavior: keeping track of the character count, not the byte
offset.
- Introduce a new parameter to get_counts() to keep track of the
byte offset.
- Use the byte offset data in Source_file::quote_input() to make
sure the source line is split at the correct place.
- Remove outdated configure checks, since mbrtowc() is no longer
used.
Please review this at http://codereview.appspot.com/154046
Affected files:
M config.hh.in
M configure.in
M lily/include/input.hh
M lily/include/misc.hh
M lily/include/source-file.hh
M lily/input-scheme.cc
M lily/input.cc
M lily/misc.cc
M lily/source-file.cc
M lily/text-interface.cc