Re: [dev] [st utf8 1/4] Use utf8len instead of utf8decode.

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Mon, 27 Apr 2015 09:00:12 +0200

Applied, thanks.

attached mail follows:



---
 st.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/st.c b/st.c
index 0204b2e..b756a40 100644
--- a/st.c
+++ b/st.c
_AT_@ -3672,7 +3672,6 @@ drawregion(int x1, int y1, int x2, int y2) {
 	Glyph base, new;
 	char buf[DRAW_BUF_SIZ];
 	bool ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN);
-	long unicodep;
 
 	if(!(xw.state & WIN_VISIBLE))
 		return;
_AT_@ -3701,7 +3700,7 @@ drawregion(int x1, int y1, int x2, int y2) {
 				base = new;
 			}
 
-			sl = utf8decode(new.c, &unicodep, UTF_SIZ);
+			sl = utf8len(new.c);
 			memcpy(buf+ib, new.c, sl);
 			ib += sl;
 			ic += (new.mode & ATTR_WIDE)? 2 : 1;
-- 
1.8.4
Received on Mon Apr 27 2015 - 09:00:12 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 27 2015 - 09:12:08 CEST