nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 9765c2faa0669c4dc645c617d1d9cdf50f2af28b
parent 85ebe971e205084655a8abeaff42e3b0ff27d752
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Thu, 15 Dec 2016 19:28:43 +0100

tweaks: elide a function that is called just once

Diffstat:
Msrc/chars.c | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/chars.c b/src/chars.c @@ -88,11 +88,6 @@ void mbtowc_reset(void) IGNORE_CALL_RESULT(mbtowc(NULL, NULL, 0)); } -void wctomb_reset(void) -{ - IGNORE_CALL_RESULT(wctomb(NULL, 0)); -} - /* This function is equivalent to isalpha() for multibyte characters. */ bool is_alpha_mbchar(const char *c) { @@ -353,7 +348,7 @@ char *make_mbchar(long chr, int *chr_mb_len) /* Reject invalid Unicode characters. */ if (*chr_mb_len < 0 || !is_valid_unicode((wchar_t)chr)) { - wctomb_reset(); + IGNORE_CALL_RESULT(wctomb(NULL, 0)); *chr_mb_len = 0; } } else