path: root/com32/cmenu/libmenu/com32io.h
diff options
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-30 17:06:30 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-09-01 11:43:39 -0700
commit9eacdefabc99e6c98cc9373ee04dce23dc6d49bc (patch)
tree319ea49256dde1e4b33c8b96c864e59bdbe1d73b /com32/cmenu/libmenu/com32io.h
parent0ca265e1a55ddfda946efdd49277803b2c0beacb (diff)
cmenu: remove multi pages support
The cmenu used to display the help on a separate page. Since we can't have multi pages on the serial line, get rid of them completely. This has a fairly big impact as the external cmenu API has changed. adv_menu.tpl and HDT have been patched accordingly. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/cmenu/libmenu/com32io.h')
1 files changed, 25 insertions, 15 deletions
diff --git a/com32/cmenu/libmenu/com32io.h b/com32/cmenu/libmenu/com32io.h
index 938eceeb..54593328 100644
--- a/com32/cmenu/libmenu/com32io.h
+++ b/com32/cmenu/libmenu/com32io.h
@@ -34,23 +34,38 @@ static inline beep()
// i.e. \n in str will move cursor to column left
// Print a C str (NUL-terminated)
-void csprint(const char *str, char attr);
+void csprint(const char *, const char);
-static inline void cswprint(const char *str, char attr, char left)
- csprint(str, attr);
+//static inline void cswprint(const char *str, const char attr)
+// csprint(str, attr);
+void cprint(const char, const char, unsigned int);
-void cprint(char chr, char attr, unsigned int times, char disppage); // Print a char
+static inline void putch(const char x, char attr)
+ cprint(x, attr, 1);
-void setdisppage(char num); // Set the display page to specified number
+void clearwindow(const char, const char, const char, const char,
+ const char, const char);
-char getdisppage(); // Get current display page
+ * cls - clear and initialize the entire screen
+ *
+ * Note: when initializing xterm, one has to specify that
+ * G1 points to the alternate character set (this is not true
+ * by default). Without the initial printf "\033)0", line drawing
+ * characters won't be displayed.
+ */
+static inline void cls(void)
+ fputs("\033e\033%@\033)0\033(B\1#0\033[?25l\033[2J", stdout);
-static inline void gotoxy(char row, char col, char page)
+static inline void gotoxy(const char row, const char col)
- // XXX page
printf(CSI "%d;%dH", row + 1, col + 1);
@@ -58,11 +73,6 @@ void getpos(char *row, char *col, char page);
char inputc(char *scancode); // Return ASCII char by val, and scancode by reference
-static inline void putch(char x, char attr, char page)
- cprint(x, attr, 1, page);
void setcursorshape(char start, char end); // Set cursor shape
void getcursorshape(char *start, char *end); // Get shape for current page