/****************************************************************************
- * 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.17 2009/08/01 23:11:02 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 */
int result = ERR;
TERMINAL *termp;
- T((T_CALLED("raw(%p)"), SP_PARM));
+ T((T_CALLED("raw(%p)"), (void *) SP_PARM));
if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
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
int result = ERR;
TERMINAL *termp;
- T((T_CALLED("cbreak(%p)"), SP_PARM));
+ T((T_CALLED("cbreak(%p)"), (void *) SP_PARM));
if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
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;
int result = ERR;
TERMINAL *termp;
- T((T_CALLED("qiflush(%p)"), SP_PARM));
+ T((T_CALLED("qiflush(%p)"), (void *) SP_PARM));
if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
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 */
int result = ERR;
TERMINAL *termp;
- T((T_CALLED("noraw(%p)"), SP_PARM));
+ T((T_CALLED("noraw(%p)"), (void *) SP_PARM));
if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
int result = ERR;
TERMINAL *termp;
- T((T_CALLED("nocbreak(%p)"), SP_PARM));
+ T((T_CALLED("nocbreak(%p)"), (void *) SP_PARM));
if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
int result = ERR;
TERMINAL *termp;
- T((T_CALLED("noqiflush(%p)"), SP_PARM));
+ T((T_CALLED("noqiflush(%p)"), (void *) SP_PARM));
if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
int result = ERR;
TERMINAL *termp;
- T((T_CALLED("intrflush(%p,%d)"), SP_PARM, flag));
+ T((T_CALLED("intrflush(%p,%d)"), (void *) SP_PARM, flag));
if (SP_PARM == 0)
returnCode(ERR);
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);