Change use of BOOL, TRUE, FALSE to bool, true, false, as appropriate,
throughout. * tty.cc (tty::common_init): Remove call to SetKernelObjectSecurity and edit some comments. * cygheap.h (init_cygheap::ctty): Add new element. * devices.in (device::parse): Remove special handling for /dev/tty. * devices.cc: Regenerate. * dtable.cc (build_fh_pc): Don't reset /dev/tty device. Let the device opener do that. * fhandler_termios.cc (tty_min::set_ctty): Redefine to _pinfo class. * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Avoid setting noninherit flag for ctty. * tty.h: Move BOOLs to bools. (tty_min::set_ctty): Redeclare to _pinfo class. * pinfo.cc (_pinfo::set_ctty): Define new function based on tty_min::set_ctty. Change first argument from tty number to tty_min class. * pinfo.h (_pinfo::set_ctty): Declare. * fhandler_console.cc (fhandler_console::get_tty_stuff): Reflect move of set_ctty to _pinfo class. * fhandler_tty.cc (fhandler_tty_slave::open): Treat FH_TTY specially. Use saved cygheap value if it exists. Otherwise convert to real device and save on first time open. (fhandler_tty_common::dup): Potentially set controlling tty if duping a slave tty. * syscalls.cc (setsid): Close controlling tty in cygheap. * tty.cc: Change some BOOLs to bools.
This commit is contained in:
@ -526,7 +526,7 @@ fhandler_serial::tcsetattr (int action, const struct termios *t)
|
||||
TCSAFLUSH: flush output and discard input, then change attributes.
|
||||
*/
|
||||
|
||||
BOOL dropDTR = FALSE;
|
||||
bool dropDTR = false;
|
||||
COMMTIMEOUTS to;
|
||||
DCB ostate, state;
|
||||
unsigned int ovtime = vtime_, ovmin = vmin_;
|
||||
@ -557,7 +557,7 @@ fhandler_serial::tcsetattr (int action, const struct termios *t)
|
||||
case B0:
|
||||
/* Drop DTR - but leave DCB-resident bitrate as-is since
|
||||
0 is an invalid bitrate in Win32 */
|
||||
dropDTR = TRUE;
|
||||
dropDTR = true;
|
||||
break;
|
||||
case B110:
|
||||
state.BaudRate = CBR_110;
|
||||
@ -740,7 +740,7 @@ fhandler_serial::tcsetattr (int action, const struct termios *t)
|
||||
set_r_binary ((t->c_iflag & IGNCR) ? 0 : 1);
|
||||
set_w_binary ((t->c_oflag & ONLCR) ? 0 : 1);
|
||||
|
||||
if (dropDTR == TRUE)
|
||||
if (dropDTR)
|
||||
{
|
||||
EscapeCommFunction (get_handle (), CLRDTR);
|
||||
tmpDtr = 0;
|
||||
@ -951,7 +951,7 @@ fhandler_serial::tcgetattr (struct termios *t)
|
||||
/* -------------- Parity errors ------------------ */
|
||||
|
||||
/* fParity combines the function of INPCK and NOT IGNPAR */
|
||||
if (state.fParity == TRUE)
|
||||
if (state.fParity)
|
||||
t->c_iflag |= INPCK;
|
||||
else
|
||||
t->c_iflag |= IGNPAR; /* not necessarily! */
|
||||
@ -976,8 +976,7 @@ fhandler_serial::tcgetattr (struct termios *t)
|
||||
this is what we do. */
|
||||
|
||||
/* Input flow-control */
|
||||
if ((state.fRtsControl == RTS_CONTROL_HANDSHAKE) &&
|
||||
(state.fOutxCtsFlow == TRUE))
|
||||
if ((state.fRtsControl == RTS_CONTROL_HANDSHAKE) && state.fOutxCtsFlow)
|
||||
t->c_cflag |= CRTSCTS;
|
||||
if (state.fRtsControl == RTS_CONTROL_HANDSHAKE)
|
||||
t->c_cflag |= CRTSXOFF;
|
||||
@ -988,7 +987,7 @@ fhandler_serial::tcgetattr (struct termios *t)
|
||||
/* FIXME: If tcsetattr() hasn't been called previously, this may
|
||||
give a false CLOCAL. */
|
||||
|
||||
if (state.fDsrSensitivity == FALSE)
|
||||
if (!state.fDsrSensitivity)
|
||||
t->c_cflag |= CLOCAL;
|
||||
|
||||
/* FIXME: need to handle IGNCR */
|
||||
|
Reference in New Issue
Block a user