aboutsummaryrefslogtreecommitdiffstats
path: root/com32/cmenu
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-28 22:27:22 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-01 11:43:38 -0700
commitba30de7fcf3e0547864521e71ab3116f6f194be3 (patch)
tree929c06172b4b79c470fc46cca28097274a3366a7 /com32/cmenu
parentf5a66e7b9f19b8781037da3bd2cf3a615f6c5096 (diff)
downloadsyslinux-ba30de7fcf3e0547864521e71ab3116f6f194be3.tar.gz
syslinux-ba30de7fcf3e0547864521e71ab3116f6f194be3.tar.xz
syslinux-ba30de7fcf3e0547864521e71ab3116f6f194be3.zip
cmenu: refactor cswprint function
Now that cprint is smarter, cswprint can be simplified. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/cmenu')
-rw-r--r--com32/cmenu/libmenu/tui.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/com32/cmenu/libmenu/tui.c b/com32/cmenu/libmenu/tui.c
index 330b46f6..c8461ed3 100644
--- a/com32/cmenu/libmenu/tui.c
+++ b/com32/cmenu/libmenu/tui.c
@@ -216,24 +216,9 @@ void cswprint(const char *str, char attr, char left)
{
char page = getdisppage();
char newattr = 0, cha, chb;
- char row, col;
- char nr, nc;
- nr = getnumrows();
- nc = getnumcols();
- getpos(&row, &col, page);
while (*str) {
switch (*str) {
- case '\b':
- --col;
- break;
- case '\n':
- ++row;
- col = left;
- break;
- case '\r':
- //col=left;
- break;
case BELL: // Bell Char
beep();
break;
@@ -257,18 +242,8 @@ void cswprint(const char *str, char attr, char left)
}
break;
default:
- putch(*str, attr, page);
- ++col;
+ cprint(*str, attr, 1, page);
}
- if (col >= nc) {
- ++row;
- col = left;
- }
- if (row > nr) {
- scrollup();
- row = nr;
- }
- gotoxy(row, col, page);
str++;
}
}