libansi: correctly reset attributes
authorPierre-Alexandre Meyer <pierre@mouraf.org>
Sat, 5 Sep 2009 18:42:29 +0000 (11:42 -0700)
committerPierre-Alexandre Meyer <pierre@mouraf.org>
Sat, 5 Sep 2009 18:42:29 +0000 (11:42 -0700)
commit71fb86d8596fb12a6ddf1d182116044406b2b8ca
tree6fce8b0c45d6ed3069ed5fac9d48744550a8694a
parent000488937dfc3748dc287600c5f92f76880120ec
libansi: correctly reset attributes

When resetting the attributes, we were updating last_attr to the unknown value
0x300, which doesn't always work.

For instance, when requesting reset and normal attributes, i.e.
"\e[0;30;47m" with the previous attribute being "\e[1;30;47m", we where printing
"\e[0;47m", which behaves like "\e[0;39;47m". This is incorrect.

This patch adds a flag to explicitly set background and foreground colors after
a reset.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
com32/lib/sys/libansi.c