From ca931f04ac90b5decc4a212f8943fda4bedf332c Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 2 Jan 2006 16:34:17 +0000 Subject: [PATCH] (file::get_counts)[!HAVE_MBRTOWC]: Bugfix, do not invoke mbrtowc. --- ChangeLog | 3 +++ lily/source-file.cc | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index b997bb2cdb..bd4b1b9ff3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-01-02 Jan Nieuwenhuizen + * lily/source-file.cc (file::get_counts)[!HAVE_MBRTOWC]: Bugfix, + do not invoke mbrtowc. + * lily/relocate.cc (setup_paths): Add more debugging verbosity. 2006-01-02 Han-Wen Nienhuys diff --git a/lily/source-file.cc b/lily/source-file.cc index 2fdeb9fd28..4acdfd6ecf 100644 --- a/lily/source-file.cc +++ b/lily/source-file.cc @@ -269,7 +269,11 @@ Source_file::get_counts (char const *pos_str0, /* FIXME, this is apparently locale dependent. */ +#if HAVE_MBRTOWC size_t thislen = mbrtowc (multibyte, line_chars, left, &state); +#else + size_t thislen = 1; +#endif /* !HAVE_MBRTOWC */ /* Stop converting at invalid character; this can mean we have read just the first part -- 2.39.2