]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_raw.c
ncurses 5.9 - patch 20110507
[ncurses.git] / ncurses / tinfo / lib_raw.c
index 7f67a7525e7da4b372d71f2ca6671e62e28ccf3b..61f76bdb02ebcb82edd6bcbf51c32cfb291bfa91 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2010,2011 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            *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_raw.c,v 1.18 2009/10/24 21:56:15 tom Exp $")
-
-#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
-#define _POSIX_SOURCE
-#endif
+MODULE_ID("$Id: lib_raw.c,v 1.20 2011/04/16 16:42:10 tom Exp $")
 
 #if HAVE_SYS_TERMIO_H
 #include <sys/termio.h>                /* needed for ISC */
@@ -91,8 +87,8 @@ NCURSES_SP_NAME(raw) (NCURSES_SP_DCL0)
 
        buf = termp->Nttyb;
 #ifdef TERMIOS
-       buf.c_lflag &= ~(ICANON | ISIG | IEXTEN);
-       buf.c_iflag &= ~(COOKED_INPUT);
+       buf.c_lflag &= (unsigned) ~(ICANON | ISIG | IEXTEN);
+       buf.c_iflag &= (unsigned) ~(COOKED_INPUT);
        buf.c_cc[VMIN] = 1;
        buf.c_cc[VTIME] = 0;
 #else
@@ -132,8 +128,8 @@ NCURSES_SP_NAME(cbreak) (NCURSES_SP_DCL0)
 
        buf = termp->Nttyb;
 #ifdef TERMIOS
-       buf.c_lflag &= ~ICANON;
-       buf.c_iflag &= ~ICRNL;
+       buf.c_lflag &= (unsigned) ~ICANON;
+       buf.c_iflag &= (unsigned) ~ICRNL;
        buf.c_lflag |= ISIG;
        buf.c_cc[VMIN] = 1;
        buf.c_cc[VTIME] = 0;
@@ -175,7 +171,7 @@ NCURSES_SP_NAME(qiflush) (NCURSES_SP_DCL0)
        BEFORE("qiflush");
        buf = termp->Nttyb;
 #ifdef TERMIOS
-       buf.c_lflag &= ~(NOFLSH);
+       buf.c_lflag &= (unsigned) ~(NOFLSH);
        result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
 #else
        /* FIXME */
@@ -330,7 +326,7 @@ NCURSES_SP_NAME(intrflush) (NCURSES_SP_DCLx WINDOW *win GCC_UNUSED, bool flag)
        buf = termp->Nttyb;
 #ifdef TERMIOS
        if (flag)
-           buf.c_lflag &= ~(NOFLSH);
+           buf.c_lflag &= (unsigned) ~(NOFLSH);
        else
            buf.c_lflag |= (NOFLSH);
        result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);