aboutsummaryrefslogtreecommitdiffstats
path: root/com32/cmenu/libmenu/tui.c
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-28 22:06:12 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-01 11:43:38 -0700
commit600046a1b6f64d6a557d326d495d8d8afad5dbb9 (patch)
tree4a8e3c5928e95cc0c5fadf30b6ec9e7644bdd9c5 /com32/cmenu/libmenu/tui.c
parentd79a67642cb6200af84eaf451808b1c0d06f673b (diff)
downloadsyslinux.git-600046a1b6f64d6a557d326d495d8d8afad5dbb9.tar.gz
syslinux.git-600046a1b6f64d6a557d326d495d8d8afad5dbb9.tar.xz
syslinux.git-600046a1b6f64d6a557d326d495d8d8afad5dbb9.zip
cmenu: use VT-100 alternate character set for drawing boxes
Use the Special Characters and Line Drawing Character Set as described in http://www.vt100.net/docs/vt102-ug/table5-13.html to draw boxes around the menus. Note that to work in xterm, G1 needs to be initialized (to point to the alternate character set). This is done in the cls function ("\033)0"). Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/cmenu/libmenu/tui.c')
-rw-r--r--com32/cmenu/libmenu/tui.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/com32/cmenu/libmenu/tui.c b/com32/cmenu/libmenu/tui.c
index 81e40793..330b46f6 100644
--- a/com32/cmenu/libmenu/tui.c
+++ b/com32/cmenu/libmenu/tui.c
@@ -343,29 +343,26 @@ void drawbox(char top, char left, char bot, char right,
{
unsigned char *box_chars; // pointer to array of box chars
unsigned char x;
-
+ fputs(SO, stdout);
box_chars = getboxchars(bt);
// Top border
gotoxy(top, left, page);
- cprint(box_chars[BOX_TOPLEFT], attr, 1, page);
- gotoxy(top, left + 1, page);
- cprint(box_chars[BOX_TOP], attr, right - left, page);
- gotoxy(top, right, page);
- cprint(box_chars[BOX_TOPRIGHT], attr, 1, page);
+ cprint(TOP_LEFT_CORNER_BORDER, attr, 1, page);
+ cprint(TOP_BORDER, attr, right - left - 1, page);
+ cprint(TOP_RIGHT_CORNER_BORDER, attr, 1, page);
// Bottom border
gotoxy(bot, left, page);
- cprint(box_chars[BOX_BOTLEFT], attr, 1, page);
- gotoxy(bot, left + 1, page);
- cprint(box_chars[BOX_BOT], attr, right - left, page);
- gotoxy(bot, right, page);
- cprint(box_chars[BOX_BOTRIGHT], attr, 1, page);
+ cprint(BOTTOM_LEFT_CORNER_BORDER, attr, 1, page);
+ cprint(BOTTOM_BORDER, attr, right - left - 1, page);
+ cprint(BOTTOM_RIGHT_CORNER_BORDER, attr, 1, page);
// Left & right borders
for (x = top + 1; x < bot; x++) {
gotoxy(x, left, page);
- cprint(box_chars[BOX_LEFT], attr, 1, page);
+ cprint(LEFT_BORDER, attr, 1, page);
gotoxy(x, right, page);
- cprint(box_chars[BOX_RIGHT], attr, 1, page);
+ cprint(RIGHT_BORDER, attr, 1, page);
}
+ fputs(SI, stdout);
}
void drawhorizline(char top, char left, char right, char page, char attr,