Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(720)

Issue 154046: Source_file: remove mbrtowc() in favor of utf8_char_len() (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 5 months ago by Patrick McCarty
Modified:
14 years, 5 months ago
Reviewers:
Neil Puttock
CC:
lilypond-devel_gnu.org
Visibility:
Public.

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.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -88 lines) Patch
M config.hh.in View 2 chunks +0 lines, -6 lines 0 comments Download
M configure.in View 1 chunk +1 line, -3 lines 0 comments Download
M lily/include/input.hh View 1 chunk +1 line, -1 line 0 comments Download
M lily/include/misc.hh View 1 chunk +1 line, -0 lines 0 comments Download
M lily/include/source-file.hh View 1 chunk +1 line, -1 line 0 comments Download
M lily/input.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M lily/input-scheme.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M lily/misc.cc View 2 chunks +20 lines, -0 lines 0 comments Download
M lily/source-file.cc View 6 chunks +18 lines, -44 lines 0 comments Download
M lily/text-interface.cc View 2 chunks +12 lines, -23 lines 0 comments Download

Messages

Total messages: 2
Neil Puttock
Hi Patrick, This looks fine to me. Cheers, Neil
14 years, 5 months ago (2009-11-12 20:38:57 UTC) #1
Patrick McCarty
14 years, 5 months ago (2009-11-13 00:41:15 UTC) #2
On 2009/11/12 20:38:57, Neil Puttock wrote:
> Hi Patrick,
> 
> This looks fine to me.

Thanks, Neil.  I pushed the patches.

-Patrick
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b