aboutsummaryrefslogtreecommitdiffstats
path: root/com32/cmenu/libmenu
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-28 22:09:53 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-01 11:43:38 -0700
commit898bc8932dc080e14046402c1a510c1da15202ae (patch)
tree9f84273d5d320c0a2c41ad96a67a0c9ee30bfe14 /com32/cmenu/libmenu
parent600046a1b6f64d6a557d326d495d8d8afad5dbb9 (diff)
downloadsyslinux-898bc8932dc080e14046402c1a510c1da15202ae.tar.gz
syslinux-898bc8932dc080e14046402c1a510c1da15202ae.tar.xz
syslinux-898bc8932dc080e14046402c1a510c1da15202ae.zip
cmenu: refactor cprint functions
Some refactoring: * Make cprint_vga2ansi static, as it is an internal function. * Simplify the logic in cprint(). Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/cmenu/libmenu')
-rw-r--r--com32/cmenu/libmenu/com32io.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/com32/cmenu/libmenu/com32io.c b/com32/cmenu/libmenu/com32io.c
index 778ab97a..7daf67a5 100644
--- a/com32/cmenu/libmenu/com32io.c
+++ b/com32/cmenu/libmenu/com32io.c
@@ -17,7 +17,7 @@
com32sys_t inreg, outreg; // Global register sets for use
-void cprint_vga2ansi(char chr, char attr)
+static void cprint_vga2ansi(char chr, char attr)
{
static const char ansi_char[8] = "04261537";
static uint8_t last_attr = 0x07;
@@ -67,19 +67,8 @@ void cprint(char chr, char attr, unsigned int times, char disppage)
{
// XXX disppage
- /*
- * Mimic INT 10h, AH=09h: the cursor is not moved even
- * if more than one character is written, unless the same
- * character is repeated
- */
- if (times == 1) {
+ while (times--)
cprint_vga2ansi(chr, attr);
- printf(CSI "D");
- } else {
- while (times--)
- cprint_vga2ansi(chr, attr);
- //printf(CSI "%dm%c", ansi_attr, chr);
- }
}
void setdisppage(char num) // Set the display page to specified number