/* * EMX initialization */ static void Term_init_emx(term *t) { struct _KBDINFO kbdinfo; /* see structure description ?somewhere? */ v_init(); v_getctype(&curs_start, &curs_end); /* hide cursor (?) XXX XXX XXX */ v_clear(); /* the documentation I (SWD) have implies, in passing, that setting */ /* "binary mode" on the keyboard device will prevent the O/S from */ /* acting on keys such as ^S (pause) and ^P (printer echo). */ /* note also that "KbdSetStatus is ignored for a Vio-windowed application." */ /* so there may well be problems with running this in a window. Damnit. */ /* this is kind of a nasty structure, as you can't just flip a bit */ /* to change binary/ASCII mode, or echo on/off mode... nor can you */ /* clear the whole thing -- certain bits need to be preserved. */ KbdGetStatus(&kbdinfo, (HKBD)0); kbdinfo.fsMask &= ~ (KEYBOARD_ECHO_ON| /* clear lowest four bits */ KEYBOARD_ECHO_OFF|KEYBOARD_BINARY_MODE|KEYBOARD_ASCII_MODE); kbdinfo.fsMask |= (KEYBOARD_BINARY_MODE); /* set bit two */ KbdSetStatus(&kbdinfo, (HKBD)0); #if 1 /* turn off for debug */ signal(SIGHUP, SIG_IGN); signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); /* signal(SIGILL,SIG_IGN); */ /* signal(SIGTRAP,SIG_IGN); */ /* signal(SIGABRT,SIG_IGN); */ /* signal(SIGEMT,SIG_IGN); */ /* signal(SIGFPE,SIG_IGN); */ /* signal(SIGBUS,SIG_IGN); */ /* signal(SIGSEGV,SIG_IGN); */ /* signal(SIGSYS,SIG_IGN); */ signal(SIGPIPE, SIG_IGN); signal(SIGALRM, SIG_IGN); /* signal(SIGTERM,SIG_IGN); */ signal(SIGUSR1, SIG_IGN); signal(SIGUSR2, SIG_IGN); signal(SIGCHLD, SIG_IGN); signal(SIGBREAK, SIG_IGN); #endif }
static void vm_getcursorsize(char *start, char *end) { if (_osmode == DOS_MODE) { int cstart, cend; vi_init(); v_getctype(&cstart, &cend); *start = (char)cstart; *end = (char)cend; } else { VIOCURSORINFO vi; VioGetCurType(&vi, 0); *start = vi.yStart; *end = vi.cEnd; } }
int PDC_get_cursor_mode(void) /***********************************************************************/ { #ifdef EMXVIDEO int curstart=0, curend=0; #else VIOCURSORINFO cursorInfo; #endif short cmode=0; #ifdef PDCDEBUG if (trace_on) PDC_debug("PDC_get_cursor_mode() - called\n"); #endif #ifdef EMXVIDEO v_getctype (&curstart, &curend); cmode = ((curstart << 8) | (curend)); #else VioGetCurType (&cursorInfo, 0); /* I am not sure about this JGB */ cmode = ((cursorInfo.yStart << 8) | (cursorInfo.cEnd)); #endif return(cmode); }