mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-18 09:19:24 +03:00
Ticket #1706
fixed tty_print_anychar, replaced addch to addstr when MC build with ncurses library. Signed-off-by: Ilia Maslakov <il.smind@google.com>
This commit is contained in:
parent
080b639d47
commit
db419a27c1
@ -308,18 +308,14 @@ tty_print_anychar (int c)
|
|||||||
{
|
{
|
||||||
unsigned char str[6 + 1];
|
unsigned char str[6 + 1];
|
||||||
|
|
||||||
if (c > 255) {
|
int res = g_unichar_to_utf8 (c, (char *) str);
|
||||||
int res = g_unichar_to_utf8 (c, (char *) str);
|
if (res == 0) {
|
||||||
if (res == 0) {
|
str[0] = '.';
|
||||||
str[0] = '.';
|
str[1] = '\0';
|
||||||
str[1] = '\0';
|
|
||||||
} else {
|
|
||||||
str[res] = '\0';
|
|
||||||
}
|
|
||||||
addstr (str_term_form ((char *) str));
|
|
||||||
} else {
|
} else {
|
||||||
addch (c);
|
str[res] = '\0';
|
||||||
}
|
}
|
||||||
|
addstr (str_term_form ((char *) str));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user