static int vidc_getchar(void) { if (vidc_ischar()) { v86.ctl = 0; v86.addr = 0x18; v86.eax = 0x0; v86int(); return (v86.eax & 0xff); } else { return (-1); } }
static int vidc_init(int arg) { int i; if (vidc_started && arg == 0) return (0); vidc_started = 1; #ifdef TERM_EMU /* Init terminal emulator */ end_term(); get_pos(&curx, &cury); curs_move(&curx, &cury, curx, cury); fg_c = DEFAULT_FGCOLOR; bg_c = DEFAULT_BGCOLOR; #endif for (i = 0; i < 10 && vidc_ischar(); i++) (void)vidc_getchar(); return (0); /* XXX reinit? */ }