diff options
author | Pierre-Alexandre Meyer <pierre@mouraf.org> | 2009-08-28 22:09:53 -0700 |
---|---|---|
committer | Pierre-Alexandre Meyer <pierre@mouraf.org> | 2009-09-01 11:43:38 -0700 |
commit | 898bc8932dc080e14046402c1a510c1da15202ae (patch) | |
tree | 9f84273d5d320c0a2c41ad96a67a0c9ee30bfe14 /com32/cmenu | |
parent | 600046a1b6f64d6a557d326d495d8d8afad5dbb9 (diff) | |
download | syslinux.git-898bc8932dc080e14046402c1a510c1da15202ae.tar.gz syslinux.git-898bc8932dc080e14046402c1a510c1da15202ae.tar.xz syslinux.git-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')
-rw-r--r-- | com32/cmenu/libmenu/com32io.c | 15 |
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 |