diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2004-04-10 13:45:10 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2004-04-10 13:45:10 +0000 |
commit | 56551a9bfbb369e29b12d1b60dc810cd5a3356b9 (patch) | |
tree | bb1236158cf45f47b3dbe897aefb0854f8eff5f2 /winsup/cygwin/fhandler_console.cc | |
parent | 56a188d1f3c3fb3d38c380f0052c16c5ee046c9b (diff) | |
download | cygnal-56551a9bfbb369e29b12d1b60dc810cd5a3356b9.tar.gz cygnal-56551a9bfbb369e29b12d1b60dc810cd5a3356b9.tar.bz2 cygnal-56551a9bfbb369e29b12d1b60dc810cd5a3356b9.zip |
* Use new unified status_flag accessor methods from classes fhandler_*,
tty_min, mtinfo and fs_info thoroughout.
* fhandler.h: Redefine all set_close_on_exec methods to take a bool
argument.
(enum conn_state): Rename from connect_state.
(class fhandler_base): Rename some status flags to align with
accessor method names. Drop encoded flag entirely. Unify status
accessor methods. Const'ify all read accessor methods.
(class fhandler_socket): Ditto.
(class fhandler_dev_raw): Ditto.
* fhandler_disk_file.cc (fhandler_base::fstat_fs): Use fs.fs_is_fat()
instead of evaluating FATness of file system here.
(fhandler_disk_file::opendir): Drop call to set_encoded().
(fhandler_disk_file::readdir): Use pc.isencoded() directly.
* mtinfo.h (class mtinfo_drive): Const'ify all read accessor methods.
* path.cc (fsinfo_cnt): Add.
(fs_info::update): Accomodate class changes. Evaluate file system
name specific flags right here. Add thread safety for reading and
writing global fsinfo array.
* path.h (enum path_types): Drop values for flags kept in fs already.
(struct fs_info): Move status informatin into private struct type
status_flags. Add accessor methods. Remove path and file system
name string arrays in favor of status bits.
(class path_conv): Use new fs_info status information where
appropriate.
(path_conf::fs_has_ea): Rename from fs_fast_ea.
(path_conf::fs_has_acls): New method.
(path_conf::root_dir): Remove.
(path_conf::volname): Remove.
* syscalls (statfs): Evaluate root dir locally.
* tty.h (class tty_min): Unify status accessor methods. Const'ify
all read accessor methods.
Diffstat (limited to 'winsup/cygwin/fhandler_console.cc')
-rw-r--r-- | winsup/cygwin/fhandler_console.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 66d92f786..640db218e 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -155,7 +155,7 @@ set_console_state_for_spawn () { /* ACK. Temporarily define for use in TTYSETF macro */ SetConsoleMode (h, ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT); - shared_console_info->tty_min_state.set_rstcons (); + shared_console_info->tty_min_state.rstcons (true); } CloseHandle (h); @@ -536,7 +536,7 @@ sig_exit: void fhandler_console::set_input_state () { - if (tc->needs_rstcons ()) + if (tc->rstcons ()) input_tcsetattr (0, &tc->ti); } @@ -633,7 +633,7 @@ fhandler_console::open (int flags, mode_t) return 0; } set_io_handle (h); - set_r_no_interrupt (1); // Handled explicitly in read code + uninterruptible_io (true); // Handled explicitly in read code h = CreateFile ("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, &sec_none, @@ -658,7 +658,7 @@ fhandler_console::open (int flags, mode_t) SetConsoleMode (get_io_handle (), ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT | cflags); } - tc->clear_rstcons (); + tc->rstcons (false); set_open_status (); cygheap->open_fhs++; debug_printf ("incremented open_fhs, now %d", cygheap->open_fhs); @@ -789,7 +789,7 @@ fhandler_console::input_tcsetattr (int, struct termios const *t) #if 0 /* Enable/disable LF -> CRLF conversions */ - set_r_binary ((t->c_iflag & INLCR) ? 0 : 1); + rbinary ((t->c_iflag & INLCR) ? false : true); #endif /* There's some disparity between what we need and what's @@ -842,7 +842,7 @@ fhandler_console::input_tcsetattr (int, struct termios const *t) res, t, flags, t->c_lflag, t->c_iflag); } - tc->clear_rstcons (); + tc->rstcons (false); return res; } @@ -1742,7 +1742,7 @@ fhandler_console::igncr_enabled (void) } void -fhandler_console::set_close_on_exec (int val) +fhandler_console::set_close_on_exec (bool val) { fhandler_base::set_close_on_exec (val); set_no_inheritance (output_handle, val); @@ -1761,7 +1761,7 @@ fhandler_console::fixup_after_fork (HANDLE) if (!open (O_NOCTTY | get_flags (), 0)) system_printf ("error opening console after fork, %E"); - if (!get_close_on_exec ()) + if (!close_on_exec ()) { CloseHandle (h); CloseHandle (oh); |