fix a char translation bug in the curses console and make the non-curses

console actually translate chars
This commit is contained in:
Bill Currie 2001-09-25 16:13:41 +00:00
parent 06da30ac89
commit 9ffe53178c
1 changed files with 10 additions and 2 deletions

View File

@ -194,7 +194,7 @@ C_Print (const char *fmt, va_list args)
txt = buffer;
while ((ch = *txt++)) {
while ((ch = (byte)*txt++)) {
ch = sys_char_map[ch] | attr_table[attr_map[ch]];
waddch (output, ch);
}
@ -202,7 +202,15 @@ C_Print (const char *fmt, va_list args)
wrefresh (output);
} else
#endif
vfprintf (stdout, fmt, args);
{
char msg[4096];
unsigned char *p;
vsnprintf (msg, sizeof (msg), fmt, args);
for (p = (unsigned char *) msg; *p; p++)
putc (sys_char_map[*p], stdout);
fflush (stdout);
}
}
static void