+#include <stdio.h>
#include <curses.h>
#include <console.h>
+static void ansiscr_reset(struct _curses_screen *scr) __nonnull;
+static void ansiscr_movetoyx(struct _curses_screen *scr,
+ unsigned int y, unsigned int x) __nonnull;
+static void ansiscr_putc(struct _curses_screen *scr, chtype c) __nonnull;
+
unsigned short _COLS = 80;
unsigned short _LINES = 24;
-static void ansiscr_init ( struct _curses_screen *scr ) {
+static void ansiscr_reset ( struct _curses_screen *scr ) {
/* Reset terminal attributes and clear screen */
scr->attrs = 0;
scr->curs_x = 0;
printf ( "\033[0m\033[2J\033[1;1H" );
}
-static void ansiscr_exit ( struct _curses_screen *scr __unused ) {
-}
-
static void ansiscr_movetoyx ( struct _curses_screen *scr,
unsigned int y, unsigned int x ) {
if ( ( x != scr->curs_x ) || ( y != scr->curs_y ) ) {
}
SCREEN _ansi_screen = {
- .init = ansiscr_init,
- .exit = ansiscr_exit,
+ .init = ansiscr_reset,
+ .exit = ansiscr_reset,
.movetoyx = ansiscr_movetoyx,
.putc = ansiscr_putc,
.getc = ansiscr_getc,