libslang/libslang-1.4.9-utf8-fix.patch
Silvan Calarco 28c850952b rebuilt with --enable-wide-chars
build with libonig [release 2.2.4-2mamba;Thu Jul 26 2012]
2024-01-06 05:47:30 +01:00

35 lines
855 B
Diff

--- slang-1.4.5/src/slsmg.c.jj 2003-02-21 12:11:37.000000000 -0500
+++ slang-1.4.5/src/slsmg.c 2003-02-21 14:09:28.000000000 -0500
@@ -378,8 +378,10 @@ void SLsmg_write_nwchars (wchar_t *str,
for (i = 0; i < n; i++, str) {
ch = *str++;
#ifndef IBMPC_SYSTEM
- if (alt_char_set_flag)
+ if (alt_char_set_flag) {
ch = Alt_Char_Set[ch & 0x7F];
+ w = 1;
+ } else
#endif
w = wcwidth(ch);
--- slang-1.4.5/src/sldisply.c.jj 2003-02-21 12:11:37.000000000 -0500
+++ slang-1.4.5/src/sldisply.c 2003-02-21 15:51:43.000000000 -0500
@@ -1498,6 +1498,17 @@ static void write_wstring_with_care (SLs
}
}
+ if (Current_Fgbg & SLTT_ALTC_MASK)
+ {
+ char c;
+ while (len--)
+ {
+ c = *str++;
+ tt_write(&c, 1);
+ }
+ return;
+ }
+
memset (&mbstate, 0, sizeof (mbstate));
while (len--)
{