1
0
Fork 0
forked from fte/fteqw

don't show link gibberish on stdout

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4127 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2012-10-14 10:53:50 +00:00
parent cac1e0fb57
commit 670dadcecf

View file

@ -164,11 +164,26 @@ void Sys_Printf (char *fmt, ...)
for (c = ctext; c < e; c++)
{
if (*c & CON_HIDDEN)
continue;
ApplyColour(*c);
w = *c & 0x0ffff;
if (w >= 0xe000 && w < 0xe100)
{
putc(w&0x7f, stdout);
/*not all quake chars are ascii compatible, so map those control chars to safe ones so we don't mess up anyone's xterm*/
if ((w & 0x7f) > 0x20)
putc(w&0x7f, stdout);
else if (w & 0x80)
{
static char tab[32] = "---#@.@@@@ # >.." "[]0123456789.---";
putc(tab[w&31], stdout);
}
else
{
static char tab[32] = ".####.#### # >.." "[]0123456789.---";
putc(tab[w&31], stdout);
}
}
else
{