Remove trailing underscore from fhandler_base and friends, throughout.

* fhandler.h (fhandler_base::set_open_status): New method.  Stores original
open status.
(fhandler_base::get_open_status): New method.  Retrieves original open status.
(fhandler_base::reset_to_open_binmode): New method.
* fhandler.cc (fhandler_base::open): Save open status.
(fhandler_base::init): Ditto.
* fhandler_clipboard.cc (fhandler_clipboard::open): Ditto.
* fhandler_console.cc (fhandler_console::open): Ditto.
* fhandler_dsp.cc (fhandler_dsp::open): Ditto.
* fhandler_dev_mem.cc (fhandler_dev_mem::open): Ditto.
* fhandler_dev_random.cc (fhandler_dev_random::open): Ditto.
* fhandler_serial.cc (fhandler_serial::open): Ditto.
* fhandler_tty_slave.cc (fhandler_tty_slave::open): Ditto.
* fhandler_tty_master.cc (fhandler_tty_master::open): Ditto.
* fhandler_dev_zero.cc (fhandler_dev_zero::open): Ditto.
* syscalls.cc (setmode): Rework so that 0 mode value causes reversion to open
state.
* fhandler_tty_slave.cc (fhandler_tty_slave::read): Use correct multiplier when
converting from deciseconds to milliseconds.
This commit is contained in:
Christopher Faylor
2001-04-24 02:07:58 +00:00
parent 9cf9c14668
commit f3ea62a847
13 changed files with 113 additions and 66 deletions

View File

@@ -1651,21 +1651,18 @@ setmode (int fd, int mode)
else
res = 0;
if (mode & O_BINARY)
if (!mode)
p->reset_to_open_binmode ();
else if (mode & O_BINARY)
{
p->set_w_binary (1);
p->set_r_binary (1);
}
else if (mode & O_TEXT)
else
{
p->set_w_binary (0);
p->set_r_binary (0);
}
else
{
p->clear_w_binary ();
p->clear_r_binary ();
}
if (_cygwin_istext_for_stdio (fd))
setmode_mode = O_TEXT;
@@ -1677,7 +1674,6 @@ setmode (int fd, int mode)
syscall_printf ("setmode (%d<%s>, %s) returns %s\n", fd, p->get_name (),
mode & O_TEXT ? "text" : "binary",
res & O_TEXT ? "text" : "binary");
return res;
}