]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_raw.c
ncurses 6.2 - patch 20200906
[ncurses.git] / ncurses / tinfo / lib_raw.c
index 173b3a36551a9525eacc67a49e1e001f62d78199..91003ae4ba57dfbadb241b46d62d1c91daed4f9b 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc.              *
+ * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -49,7 +50,7 @@
 
 #include <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_raw.c,v 1.23 2017/04/15 22:24:45 tom Exp $")
+MODULE_ID("$Id: lib_raw.c,v 1.25 2020/09/05 21:29:10 tom Exp $")
 
 #if HAVE_SYS_TERMIO_H
 #include <sys/termio.h>                /* needed for ISC */
 
 #if HAVE_SYS_TERMIO_H
 #include <sys/termio.h>                /* needed for ISC */
@@ -96,6 +97,8 @@ NCURSES_SP_NAME(raw) (NCURSES_SP_DCL0)
        buf.c_iflag &= (unsigned) ~(COOKED_INPUT);
        buf.c_cc[VMIN] = 1;
        buf.c_cc[VTIME] = 0;
        buf.c_iflag &= (unsigned) ~(COOKED_INPUT);
        buf.c_cc[VMIN] = 1;
        buf.c_cc[VTIME] = 0;
+#elif defined(EXP_WIN32_DRIVER)
+       buf.dwFlagIn &= ~CONMODE_NORAW;
 #else
        buf.sg_flags |= RAW;
 #endif
 #else
        buf.sg_flags |= RAW;
 #endif
@@ -151,6 +154,9 @@ NCURSES_SP_NAME(cbreak) (NCURSES_SP_DCL0)
        buf.c_lflag |= ISIG;
        buf.c_cc[VMIN] = 1;
        buf.c_cc[VTIME] = 0;
        buf.c_lflag |= ISIG;
        buf.c_cc[VMIN] = 1;
        buf.c_cc[VTIME] = 0;
+#elif defined(EXP_WIN32_DRIVER)
+       buf.dwFlagIn |= CONMODE_NORAW;
+       buf.dwFlagIn &= ~CONMODE_NOCBREAK;
 #else
        buf.sg_flags |= CBREAK;
 #endif
 #else
        buf.sg_flags |= CBREAK;
 #endif
@@ -230,6 +236,8 @@ NCURSES_SP_NAME(noraw) (NCURSES_SP_DCL0)
        buf.c_lflag |= ISIG | ICANON |
            (termp->Ottyb.c_lflag & IEXTEN);
        buf.c_iflag |= COOKED_INPUT;
        buf.c_lflag |= ISIG | ICANON |
            (termp->Ottyb.c_lflag & IEXTEN);
        buf.c_iflag |= COOKED_INPUT;
+#elif defined(EXP_WIN32_DRIVER)
+       buf.dwFlagIn |= CONMODE_NORAW;
 #else
        buf.sg_flags &= ~(RAW | CBREAK);
 #endif
 #else
        buf.sg_flags &= ~(RAW | CBREAK);
 #endif
@@ -282,6 +290,8 @@ NCURSES_SP_NAME(nocbreak) (NCURSES_SP_DCL0)
 #ifdef TERMIOS
        buf.c_lflag |= ICANON;
        buf.c_iflag |= ICRNL;
 #ifdef TERMIOS
        buf.c_lflag |= ICANON;
        buf.c_iflag |= ICRNL;
+#elif defined(EXP_WIN32_DRIVER)
+       buf.dwFlagIn |= (CONMODE_NOCBREAK | CONMODE_NORAW);
 #else
        buf.sg_flags &= ~CBREAK;
 #endif
 #else
        buf.sg_flags &= ~CBREAK;
 #endif