|
|
char * term_emx_rawkey_string[P4_NUM_KEYS] = |
static int c_interrupt_key (char ch) { return 0; } |
static void c_interactive_terminal (void) { v_init (); } |
static void c_system_terminal (void) {} |
static void c_query_winsize (void) {} |
static int c_prepare_terminal (void) { v_init (); v_dimen (&PFE.cols, &PFE.rows); return 1; } |
static void
c_cleanup_terminal (void)
{
return; |
|
static int c_keypressed (void) { int c; if (nxch != NOCH) return 1; c = _read_kbd (0, 0, 0); if (c == -1) return 0; nxch = c; return 1; } |
static int getch0 (void) { if (nxch != NOCH) { int ch = nxch; nxch = NOCH; return ch; } for (;;) { int c = _read_kbd (0, 1, 0); if (c != -1) return c; } } |
static int |
static void c_putc_noflush (char c) { int x, y; switch (c) |
static void c_put_flush (void) { } |
static void c_putc (char c) { p4_putc_noflush (c); } |
static void c_puts (const char *s) { while (*s) p4_putc_noflush (*s++); } |
static void c_gotoxy (int x, int y) { v_gotoxy (x, y); } |
static void c_wherexy (int *x, int *y) { v_getxy (x, y); } |
static void _addxy (int x, int y) { int col, row; v_getxy (&col, &row); col += x; row += y; v_gotoxy (col, row); } |
static void _clrdown (void) { int i, row, col; v_getxy (&col, &row); v_clreol (); for (i = row + 1; i < PFE.rows; i++) { v_gotoxy (0, i); v_clreol (); } v_gotoxy (col, row); } |
static void c_tput (int attr) { switch (attr) { case P4_TERM_GOLEFT: _addxy (-1, 0); break; case P4_TERM_GORIGHT: _addxy ( 1, 0); break; case P4_TERM_GOUP: _addxy ( 0, -1); break; case P4_TERM_GODOWN: _addxy ( 0, 1); break; |
|
p4_term_struct p4_term_ios =
{
|
|