summaryrefslogtreecommitdiff
path: root/com32/cmenu
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-05 10:23:00 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-05 10:23:00 -0700
commitb6474284a9543dfd65d1e71996af9497e0215006 (patch)
treeda586595c0dfce00f73ff5b790216e6951b9e39a /com32/cmenu
parentbb20566b9561f58bdf042e29c99f4ccfc78aaf18 (diff)
downloadsyslinux-b6474284a9543dfd65d1e71996af9497e0215006.tar.gz
cmenu: remove legacy box drawing code
Lines are now printed via the Line Drawing Character Set. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/cmenu')
-rw-r--r--com32/cmenu/libmenu/menu.c13
-rw-r--r--com32/cmenu/libmenu/menu.h2
-rw-r--r--com32/cmenu/libmenu/tui.c45
-rw-r--r--com32/cmenu/libmenu/tui.h21
4 files changed, 0 insertions, 81 deletions
diff --git a/com32/cmenu/libmenu/menu.c b/com32/cmenu/libmenu/menu.c
index ad076505..7918b47b 100644
--- a/com32/cmenu/libmenu/menu.c
+++ b/com32/cmenu/libmenu/menu.c
@@ -673,9 +673,6 @@ pt_menusystem init_menusystem(const char *title)
if (ms->maxmenuheight > MAXMENUHEIGHT)
ms->maxmenuheight = MAXMENUHEIGHT;
- // Set up the look of the box
- set_box_type(MENUBOXTYPE);
-
openconsole(&dev_stdcon_r, &dev_ansiserial_w);
return ms;
@@ -740,16 +737,6 @@ void set_misc_info(uchar fillchar, uchar fillattr, uchar spacechar,
ms->shadowattr = shadowattr;
}
-void set_box_type(boxtype bt)
-{
- uchar *bxc;
- ms->menubt = bt;
- bxc = getboxchars(bt);
- ms->box_horiz = bxc[BOX_HORIZ]; // The char used to draw top line
- ms->box_ltrt = bxc[BOX_LTRT];
- ms->box_rtlt = bxc[BOX_RTLT];
-}
-
void set_menu_options(uchar maxmenuheight)
{
if (maxmenuheight != 0xFF)
diff --git a/com32/cmenu/libmenu/menu.h b/com32/cmenu/libmenu/menu.h
index ecd18e35..7d290ec9 100644
--- a/com32/cmenu/libmenu/menu.h
+++ b/com32/cmenu/libmenu/menu.h
@@ -217,7 +217,6 @@ typedef struct s_menusystem {
int maxcol, mincol, numcols; // Number of columns in the window
// Menu box look
- boxtype menubt; // What type of boxes should be drawn
char box_horiz, box_ltrt, box_rtlt; // Some chars of the box, for redrawing portions of the box
} t_menusystem;
@@ -242,7 +241,6 @@ void set_title_info(uchar tfillchar, uchar titleattr);
void set_misc_info(uchar fillchar, uchar fillattr, uchar spacechar,
uchar shadowattr);
-void set_box_type(boxtype bt);
void set_window_size(uchar top, uchar left, uchar bot, uchar right); // Set the window which menusystem should use
diff --git a/com32/cmenu/libmenu/tui.c b/com32/cmenu/libmenu/tui.c
index e256502a..ecc65bdf 100644
--- a/com32/cmenu/libmenu/tui.c
+++ b/com32/cmenu/libmenu/tui.c
@@ -211,51 +211,6 @@ void getuserinput(char *stra, unsigned int size, unsigned int password,
//////////////////////////////Box Stuff
-// This order of numbers must match
-// the values of BOX_TOPLEFT,... in the header file
-
-unsigned char SINSIN_CHARS[] = { 218, 192, 191, 217, //Corners
- 196, 179, // Horiz and Vertical
- 195, 180, 194, 193, 197
-}; // Connectors & Middle
-
-unsigned char DBLDBL_CHARS[] = { 201, 200, 187, 188, // Corners
- 205, 186, // Horiz and Vertical
- 199, 182, 203, 202, 206
-}; // Connectors & Middle
-
-unsigned char SINDBL_CHARS[] = { 214, 211, 183, 189, // Corners
- 196, 186, // Horiz & Vert
- 199, 182, 210, 208, 215
-}; // Connectors & Middle
-
-unsigned char DBLSIN_CHARS[] = { 213, 212, 184, 190, // Corners
- 205, 179, // Horiz & Vert
- 198, 181, 209, 207, 216
-}; // Connectors & Middle
-
-unsigned char *getboxchars(boxtype bt)
-{
- switch (bt) {
- case BOX_SINSIN:
- return SINSIN_CHARS;
- break;
- case BOX_DBLDBL:
- return DBLDBL_CHARS;
- break;
- case BOX_SINDBL:
- return SINDBL_CHARS;
- break;
- case BOX_DBLSIN:
- return DBLSIN_CHARS;
- break;
- default:
- return SINSIN_CHARS;
- break;
- }
- return SINSIN_CHARS;
-}
-
// Draw box and lines
void drawbox(const char top, const char left, const char bot,
const char right, const char attr)
diff --git a/com32/cmenu/libmenu/tui.h b/com32/cmenu/libmenu/tui.h
index c72a41d2..b386ac4b 100644
--- a/com32/cmenu/libmenu/tui.h
+++ b/com32/cmenu/libmenu/tui.h
@@ -64,27 +64,6 @@ static inline void getpwd(char *str, unsigned int size)
getuserinput(str, size, 1, 0);
}
-// Box drawing Chars offsets into array
-#define BOX_TOPLEFT 0x0
-#define BOX_BOTLEFT 0x1
-#define BOX_TOPRIGHT 0x2
-#define BOX_BOTRIGHT 0x3
-#define BOX_TOP 0x4 // TOP = BOT = HORIZ
-#define BOX_BOT 0x4
-#define BOX_HORIZ 0x4
-#define BOX_LEFT 0x5
-#define BOX_RIGHT 0x5
-#define BOX_VERT 0x5 // LEFT=RIGHT=VERT
-#define BOX_LTRT 0x6
-#define BOX_RTLT 0x7
-#define BOX_TOPBOT 0x8
-#define BOX_BOTTOP 0x9
-#define BOX_MIDDLE 0xA
-
-typedef enum { BOX_SINSIN, BOX_DBLDBL, BOX_SINDBL, BOX_DBLSIN } boxtype;
-
-unsigned char *getboxchars(boxtype bt);
-
void drawbox(const char, const char, const char, const char,
const char);