aboutsummaryrefslogtreecommitdiff
path: root/oldcurses.c
diff options
context:
space:
mode:
Diffstat (limited to 'oldcurses.c')
-rw-r--r--oldcurses.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/oldcurses.c b/oldcurses.c
index 44ff6b3..c8702d5 100644
--- a/oldcurses.c
+++ b/oldcurses.c
@@ -75,6 +75,29 @@ void clrtobot() {
gotoxy(oldx, oldy);
}
+/* TODO: rewrite in asm */
+void clrtobot() {
+ unsigned char rows, cols, y, oldx, oldy;
+ oldx = wherex();
+ oldy = wherey();
+ screensize(&cols, &rows);
+ cclear(cols - wherex()); /* leaves cursor at start of next line */
+ for(y = wherey(); y < rows; y++)
+ cclearxy(0, y, cols);
+ gotoxy(oldx, oldy);
+}
+
+/* TODO: rewrite in asm */
+void clrtoeol() {
+ unsigned char cols, rows, oldx, oldy;
+ oldx = wherex();
+ oldy = wherey();
+ screensize(&cols, &rows);
+ cclear(cols - wherex());
+ gotoxy(oldx, oldy);
+}
+
+
/* one-to-one mapping between some of the conio API and the curses one */
#define clear() clrscr()
#define printw cprintf