aboutsummaryrefslogtreecommitdiffstats
path: root/com32/include
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-11-02 20:53:56 -0800
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-11-02 20:53:56 -0800
commit4c87c3409e1788191541cc1e4897bc38f5fe02c6 (patch)
tree316ad7795471c8b941a1484d26662c1197216e77 /com32/include
parentad501c9ca99dad2f52af62399c3ff7da9bfe09b5 (diff)
downloadsyslinux-4c87c3409e1788191541cc1e4897bc38f5fe02c6.tar.gz
syslinux-4c87c3409e1788191541cc1e4897bc38f5fe02c6.tar.xz
syslinux-4c87c3409e1788191541cc1e4897bc38f5fe02c6.zip
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>
Diffstat (limited to 'com32/include')
-rw-r--r--com32/include/libansi.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/com32/include/libansi.h b/com32/include/libansi.h
index f51c9a06..d813f9fc 100644
--- a/com32/include/libansi.h
+++ b/com32/include/libansi.h
@@ -71,18 +71,7 @@ static inline void putch(const char x, char attr)
cprint(x, attr, 1);
}
-/*
- * cls - clear and initialize the entire screen
- *
- * Note: when initializing xterm, one has to specify that
- * G1 points to the alternate character set (this is not true
- * by default). Without the initial printf "\033)0", line drawing
- * characters won't be displayed.
- */
-static inline void cls(void)
-{
- fputs("\033e\033%@\033)0\033(B\1#0\033[?25l\033[2J", stdout);
-}
+void cls(void);
static inline void cursoroff(void)
{