From fb1565af68af4aebff40c7c7917a51970f749b72 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 9 May 2014 14:28:48 +0000 Subject: [PATCH] * signal.cc (sigprocmask): Fix strace output to include "how". * fhandler_console.cc (dev_console::save_restore): Only current dwEnd line rather than the one after that. --- winsup/cygwin/ChangeLog | 7 +++++++ winsup/cygwin/fhandler_console.cc | 12 +++++++----- winsup/cygwin/signal.cc | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 978ef63fe..96e6b556f 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2014-05-09 Christopher Faylor + + * signal.cc (sigprocmask): Fix strace output to include "how". + + * fhandler_console.cc (dev_console::save_restore): Only current dwEnd + line rather than the one after that. + 2014-05-08 Corinna Vinschen * uinfo.cc (cygheap_user::init): Fix formatting in debug output. diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 27471581a..44ee1c404 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -84,6 +84,7 @@ fhandler_console::open_shared_console (HWND hw, HANDLE& h, bool& create) create = m != SH_JUSTOPEN; return res; } + class console_unit { int n; @@ -1457,7 +1458,7 @@ dev_console::save_restore (HANDLE h, char c) { fillin (h); save_bufsize.X = b.dwSize.X; - if ((save_bufsize.Y = dwEnd.Y + 2) > b.dwSize.Y) + if ((save_bufsize.Y = dwEnd.Y + 1) > b.dwSize.Y) save_bufsize.X = b.dwSize.Y; if (save_buf) @@ -1500,6 +1501,7 @@ dev_console::save_restore (HANDLE h, char c) cob.X = 0; cob.Y = save_top; + /* CGF: NOOP? Doesn't seem to position screen as expected */ /* Temporarily position at top of screen */ if (!SetConsoleCursorPosition (h, cob)) debug_printf ("SetConsoleCursorInfo(%p, cob) failed during restore, %E", h); @@ -1677,23 +1679,23 @@ fhandler_console::char_command (char c) if (con.saw_space) { CONSOLE_CURSOR_INFO console_cursor_info; - GetConsoleCursorInfo (get_output_handle (), & console_cursor_info); + GetConsoleCursorInfo (get_output_handle (), &console_cursor_info); switch (con.args[0]) { case 0: /* blinking block */ case 1: /* blinking block (default) */ case 2: /* steady block */ console_cursor_info.dwSize = 100; - SetConsoleCursorInfo (get_output_handle (), & console_cursor_info); + SetConsoleCursorInfo (get_output_handle (), &console_cursor_info); break; case 3: /* blinking underline */ case 4: /* steady underline */ console_cursor_info.dwSize = 10; /* or Windows default 25? */ - SetConsoleCursorInfo (get_output_handle (), & console_cursor_info); + SetConsoleCursorInfo (get_output_handle (), &console_cursor_info); break; default: /* use value as percentage */ console_cursor_info.dwSize = con.args[0]; - SetConsoleCursorInfo (get_output_handle (), & console_cursor_info); + SetConsoleCursorInfo (get_output_handle (), &console_cursor_info); break; } } diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 2501c1922..dc01337c2 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -183,7 +183,7 @@ sigprocmask (int how, const sigset_t *set, sigset_t *oldset) set_errno (res); res = -1; } - syscall_printf ("%R = sigprocmask (%d, %p, %p)", res, set, oldset); + syscall_printf ("%R = sigprocmask (%d, %p, %p)", res, how, set, oldset); return res; }