- BEFORE("raw");
- cur_term->Nttyb.c_lflag &= ~(ICANON | ISIG | IEXTEN);
- cur_term->Nttyb.c_iflag &= ~(COOKED_INPUT);
- cur_term->Nttyb.c_cc[VMIN] = 1;
- cur_term->Nttyb.c_cc[VTIME] = 0;
+ buf.c_lflag &= (unsigned) ~(ICANON | ISIG | IEXTEN);
+ buf.c_iflag &= (unsigned) ~(COOKED_INPUT);
+ buf.c_cc[VMIN] = 1;
+ buf.c_cc[VTIME] = 0;
+#elif defined(EXP_WIN32_DRIVER)
+ buf.dwFlagIn &= (unsigned long) ~CONMODE_NORAW;
+#else
+ buf.sg_flags |= RAW;
+#endif
+ result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
+ if (result == OK) {
+#if USE_KLIBC_KBD
+ KBDINFO kbdinfo;
+
+ kbdinfo.cb = sizeof(kbdinfo);
+ KbdGetStatus(&kbdinfo, 0);
+
+ kbdinfo.cb = sizeof(kbdinfo);
+ kbdinfo.fsMask &= ~KEYBOARD_ASCII_MODE;
+ kbdinfo.fsMask |= KEYBOARD_BINARY_MODE;
+ KbdSetStatus(&kbdinfo, 0);
+#endif
+ if (SP_PARM) {
+ SP_PARM->_raw = TRUE;
+ SP_PARM->_cbreak = 1;
+ }
+ termp->Nttyb = buf;
+ }