libansi: reset SGR parameters cache in cls()
authorPierre-Alexandre Meyer <pierre@mouraf.org>
Tue, 3 Nov 2009 04:53:56 +0000 (20:53 -0800)
committerPierre-Alexandre Meyer <pierre@mouraf.org>
Tue, 3 Nov 2009 04:53:56 +0000 (20:53 -0800)
commit4c87c3409e1788191541cc1e4897bc38f5fe02c6
tree316ad7795471c8b941a1484d26662c1197216e77
parentad501c9ca99dad2f52af62399c3ff7da9bfe09b5
libansi: reset SGR parameters cache in cls()

There was a bug in HDT when switching from the menu to the cli and
back to the menu: the background wasn't redrawn.

This was due to the fact that the cli bypasses the libansi library
and calls printf() directly. Unfortunately, the SGR attributes were
cached between menu initializations and the background wasn't properly
redrawn.

To fix it, invalidate the cache in the cls() routine. cls() does much
more than just erasing the screen already (e.g. initialize G1) - we
may want to rename the function at some point.

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