From 7aa88267c1df43b50cd3236e3e06747e1830d27b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 9 Apr 2004 12:09:45 +0000 Subject: * fhandler.h (fhandler_base::status): Declare private. (fhandler_base::open_status): Ditto. (class fhandler_socket): Move status bits into private bitfield struct type status_flags. Change accessor methods appropriately. * fhandler_socket.cc (fhandler_socket::fhandler_socket): Accomodate above status bit changes. * tty.h: Remove status bit enumerator. (TTYISSETF): Remove. (TTYSETF): Remove. (TTYCLEARF): Remove. (TTYCONDSETF): Remove. (tty_min::status): Define as private bitfield struct type status_flags. Add appropriate accessor methods. * fhandler_console.cc: Use tty_min::status accessor methods throughout. * fhandler_termios.cc: Ditto. * winsup.h (__ISSETF): Remove. (__SETF): Remove. (__CLEARF): Remove. (__CONDSETF): Remove. --- winsup/cygwin/fhandler_console.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'winsup/cygwin/fhandler_console.cc') diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index afac56c40..66d92f786 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -154,10 +154,8 @@ set_console_state_for_spawn () if (shared_console_info != NULL) { /* ACK. Temporarily define for use in TTYSETF macro */ -# define tc &shared_console_info->tty_min_state SetConsoleMode (h, ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT); - TTYSETF (RSTCONS); -# undef tc + shared_console_info->tty_min_state.set_rstcons (); } CloseHandle (h); @@ -538,7 +536,7 @@ sig_exit: void fhandler_console::set_input_state () { - if (TTYISSETF (RSTCONS)) + if (tc->needs_rstcons ()) input_tcsetattr (0, &tc->ti); } @@ -660,7 +658,7 @@ fhandler_console::open (int flags, mode_t) SetConsoleMode (get_io_handle (), ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT | cflags); } - TTYCLEARF (RSTCONS); + tc->clear_rstcons (); set_open_status (); cygheap->open_fhs++; debug_printf ("incremented open_fhs, now %d", cygheap->open_fhs); @@ -844,7 +842,7 @@ fhandler_console::input_tcsetattr (int, struct termios const *t) res, t, flags, t->c_lflag, t->c_iflag); } - TTYCLEARF (RSTCONS); + tc->clear_rstcons (); return res; } -- cgit v1.2.3