mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
Eliding a variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4660 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
cc7fef723d
commit
0b2f84322a
@ -1,3 +1,7 @@
|
||||
2014-03-21 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/chars.c (is_punct_mbchar, mbstrchr) - Elide a variable,
|
||||
thus making two ifs identical to six others.
|
||||
|
||||
2014-03-19 Benno Schulenberg <bensberg@justemail.net>
|
||||
* doc/nanorc.sample.in - Document the changed whitespace defaults.
|
||||
* src/global.c, doc/man/nanorc.5 - Allow softwrap to be rebound.
|
||||
|
@ -184,9 +184,8 @@ bool is_punct_mbchar(const char *c)
|
||||
#ifdef ENABLE_UTF8
|
||||
if (use_utf8) {
|
||||
wchar_t wc;
|
||||
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
|
||||
|
||||
if (c_mb_len < 0) {
|
||||
if (mbtowc(&wc, c, MB_CUR_MAX) < 0) {
|
||||
mbtowc_reset();
|
||||
wc = bad_wchar;
|
||||
}
|
||||
@ -788,9 +787,8 @@ char *mbstrchr(const char *s, const char *c)
|
||||
char *s_mb = charalloc(MB_CUR_MAX);
|
||||
const char *q = s;
|
||||
wchar_t ws, wc;
|
||||
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
|
||||
|
||||
if (c_mb_len < 0) {
|
||||
if (mbtowc(&wc, c, MB_CUR_MAX) < 0) {
|
||||
mbtowc_reset();
|
||||
wc = (unsigned char)*c;
|
||||
bad_c_mb = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user