From 3d245920080dcf9d2446a91b56c6e69e9738dc90 Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 29 Nov 2010 05:11:49 +0000 Subject: [PATCH] * win32/win32.c (rb_w32_write_console): fixed indentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ win32/win32.c | 15 ++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 134cb006eb..5ac2f91e92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Nov 29 14:10:55 2010 NAKAMURA Usaku + + * win32/win32.c (rb_w32_write_console): fixed indentation. + Sun Nov 28 22:13:39 2010 Koichi Sasada * thread_pthread.c (NATIVE_MUTEX_LOCK_DEBUG): move and use it. diff --git a/win32/win32.c b/win32/win32.c index 6637dcb9e3..f55fe9c278 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -5296,15 +5296,16 @@ rb_w32_write_console(VALUE str, int fd) if (disable) return -1L; handle = (HANDLE)_osfhnd(fd); if (!GetConsoleMode(handle, &dwMode) || - !rb_econv_has_convpath_p(rb_enc_name(rb_enc_get(str)), "UTF-16LE")) - return -1L; + !rb_econv_has_convpath_p(rb_enc_name(rb_enc_get(str)), "UTF-16LE")) + return -1L; str = rb_str_encode(str, rb_enc_from_encoding(rb_enc_find("UTF-16LE")), 0, - Qnil); - if (!WriteConsoleW(handle, (LPWSTR)RSTRING_PTR(str), RSTRING_LEN(str)/2, &reslen, NULL)) { - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - disable = TRUE; - return -1L; + Qnil); + if (!WriteConsoleW(handle, (LPWSTR)RSTRING_PTR(str), RSTRING_LEN(str)/2, + &reslen, NULL)) { + if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + disable = TRUE; + return -1L; } return (long)reslen; }