From 9ac20c85b079f3dc834558e9cf0cd373c9649d56 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Wed, 5 Jan 2005 20:41:55 +0000 Subject: [PATCH] remove redundant code git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2238 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/winio.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/winio.c b/src/winio.c index 7d86081e..df3d1791 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2206,9 +2206,7 @@ size_t display_string_len(const char *buf, size_t start_col, size_t /* If we have a control character, add one byte to account * for the "^" that will be displayed in front of it, and * then add the number of bytes for its visible equivalent - * as returned by control_rep(). If we have an invalid - * multibyte control character, interpret that character as - * though it's a normal control character. */ + * as returned by control_rep(). */ else if (is_cntrl_char(wide_buf)) { char ctrl_wide_buf = control_rep((unsigned char)wide_buf); @@ -2222,25 +2220,6 @@ size_t display_string_len(const char *buf, size_t start_col, size_t /* If we have a normal character, add its width in bytes * normally. */ } else -#ifdef NANO_WIDE - /* If buf contains an invalid multibyte non-control - * character, interpret that character as though it's a - * normal non-control character. */ - if (!ISSET(NO_UTF8) && bad_char) { - char *bad_wide_buf = charalloc(MB_CUR_MAX); - int bad_wide_buf_len; - - bad_wide_buf_len = wctomb(bad_wide_buf, - (wchar_t)wide_buf); - - free(bad_wide_buf); - - if (bad_wide_buf_len != -1) - retval += bad_wide_buf_len; - else - retval++; - } else -#endif retval += wide_buf_len; #ifdef NANO_WIDE } -- 2.39.5