aboutsummaryrefslogtreecommitdiffstats
path: root/com32/cmenu
diff options
context:
space:
mode:
Diffstat (limited to 'com32/cmenu')
-rw-r--r--com32/cmenu/libmenu/menu.c11
-rw-r--r--com32/cmenu/libmenu/tui.c4
-rw-r--r--com32/cmenu/libmenu/tui.h5
3 files changed, 11 insertions, 9 deletions
diff --git a/com32/cmenu/libmenu/menu.c b/com32/cmenu/libmenu/menu.c
index eff05c45..a00c0ce7 100644
--- a/com32/cmenu/libmenu/menu.c
+++ b/com32/cmenu/libmenu/menu.c
@@ -83,8 +83,11 @@ char getch(char *scan)
return 0;
}
-/* Print a menu item */
-/* attr[0] is non-hilite attr, attr[1] is highlight attr */
+/*
+ * Print a menu item
+ *
+ * attr[0] is non-hilite attr, attr[1] is highlight attr
+ */
void printmenuitem(const char *str, uchar * attr)
{
uchar page = getdisppage();
@@ -185,7 +188,7 @@ void printmenu(pt_menu menu, int curr, uchar top, uchar left, uchar first)
attr = (x == curr ? ms->revinactattr : ms->inactattr);
break;
case OPT_SUBMENU:
- lchar[0] = SUBMENUCHAR;
+ lchar[0] = '>';
lchar[1] = 0;
break;
case OPT_RADIOMENU:
@@ -221,7 +224,7 @@ void printmenu(pt_menu menu, int curr, uchar top, uchar left, uchar first)
gotoxy(top + row, left, ms->menupage);
printmenuitem(str, attr); // Print main part
gotoxy(top + row, left + menuwidth - 1, ms->menupage); // Last char if any
- csprint(lchar, attr[NOHLITE]); // Print last part
+ fputs(lchar, stdout); // Print last part
}
// Check if we need to MOREABOVE and MOREBELOW to be added
// reuse x
diff --git a/com32/cmenu/libmenu/tui.c b/com32/cmenu/libmenu/tui.c
index e707df47..d4e08286 100644
--- a/com32/cmenu/libmenu/tui.c
+++ b/com32/cmenu/libmenu/tui.c
@@ -311,7 +311,7 @@ void drawbox(char top, char left, char bot, char right,
char page, char attr, boxtype bt)
{
unsigned char x;
- fputs(SO, stdout);
+ putchar(SO);
// Top border
gotoxy(top, left, page);
cprint(TOP_LEFT_CORNER_BORDER, attr, 1, page);
@@ -329,7 +329,7 @@ void drawbox(char top, char left, char bot, char right,
gotoxy(x, right, page);
cprint(RIGHT_BORDER, attr, 1, page);
}
- fputs(SI, stdout);
+ putchar(SI);
}
void drawhorizline(char top, char left, char right, char page, char attr,
diff --git a/com32/cmenu/libmenu/tui.h b/com32/cmenu/libmenu/tui.h
index 28c680eb..5cf5dd7a 100644
--- a/com32/cmenu/libmenu/tui.h
+++ b/com32/cmenu/libmenu/tui.h
@@ -22,9 +22,8 @@
#define NULL ((void *)0)
#endif
-/* "", not ''! */
-#define SO "\016"
-#define SI "\017"
+#define SO '\016'
+#define SI '\017'
#define TOP_LEFT_CORNER_BORDER '\154'
#define TOP_BORDER '\161'