50,6 → 50,7 |
#include <stdlib.h> |
#include <string.h> |
#include <unistd.h> |
#include <io/stream.h> |
#include <console.h> |
|
#include <async.h> |
72,6 → 73,9 |
putchar(*(s++)); |
} |
|
static int con_phone; |
|
|
static void start_standout(void) |
{ |
console_set_rgb_color(0xf0f0f0, 0); |
84,7 → 88,7 |
|
void clear_screen(void) |
{ |
console_clear(); |
async_msg_0(con_phone, CONSOLE_CLEAR); |
moveto(0, 0); |
} |
|
96,7 → 100,7 |
{ |
|
resume_normal(); |
console_clear(); |
async_msg_0(con_phone, CONSOLE_CLEAR); |
curscore = -1; |
memset((char *)curscreen, 0, sizeof(curscreen)); |
} |
107,7 → 111,8 |
void |
scr_init(void) |
{ |
console_cursor_visibility(0); |
con_phone = get_cons_phone(); |
async_msg_1(con_phone, CONSOLE_CURSOR_VISIBILITY, 0); |
resume_normal(); |
scr_clear(); |
} |
114,12 → 119,12 |
|
void moveto(int r, int c) |
{ |
console_goto(r, c); |
async_msg_2(con_phone, CONSOLE_GOTO, r, c); |
} |
|
static void fflush(void) |
{ |
console_flush(); |
async_msg_0(con_phone, CONSOLE_FLUSH); |
} |
|
winsize_t winsize; |
126,7 → 131,8 |
|
static int get_display_size(winsize_t *ws) |
{ |
return console_get_size(&ws->ws_row, &ws->ws_col); |
return async_req_0_2(con_phone, CONSOLE_GETSIZE, &ws->ws_row, |
&ws->ws_col); |
} |
|
/* |