diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2013-04-23 09:44:36 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2013-04-23 09:44:36 +0000 |
commit | 61522196c71593da09572fce9af9e0d7dad61bc3 (patch) | |
tree | 9bf74facd67974fa2f780d6ce68b14eb7a94e371 /winsup/cygwin/fhandler_console.cc | |
parent | 1875ee55d31d3673059373c8f9837bf98f93c713 (diff) | |
download | cygnal-61522196c71593da09572fce9af9e0d7dad61bc3.tar.gz cygnal-61522196c71593da09572fce9af9e0d7dad61bc3.tar.bz2 cygnal-61522196c71593da09572fce9af9e0d7dad61bc3.zip |
* Merge in cygwin-64bit-branch.
Diffstat (limited to 'winsup/cygwin/fhandler_console.cc')
-rw-r--r-- | winsup/cygwin/fhandler_console.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index d66f3a8d7..7e7b6cf58 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -216,7 +216,7 @@ fhandler_console::setup () tty_min * tty_list::get_cttyp () { - _dev_t n = myself->ctty; + dev_t n = myself->ctty; if (iscons_dev (n)) return fhandler_console::shared_console_info ? &fhandler_console::shared_console_info->tty_min_state : NULL; @@ -944,9 +944,9 @@ fhandler_console::ioctl (unsigned int cmd, void *arg) *(int *) arg = (dev_state.metabit) ? K_METABIT : K_ESCPREFIX; return 0; case KDSKBMETA: - if ((int) arg == K_METABIT) + if ((intptr_t) arg == K_METABIT) dev_state.metabit = TRUE; - else if ((int) arg == K_ESCPREFIX) + else if ((intptr_t) arg == K_ESCPREFIX) dev_state.metabit = FALSE; else { @@ -1013,7 +1013,7 @@ fhandler_console::output_tcsetattr (int, struct termios const *t) int res = SetConsoleMode (get_output_handle (), flags) ? 0 : -1; if (res) __seterrno_from_win_error (GetLastError ()); - syscall_printf ("%d = tcsetattr(,%x) (ENABLE FLAGS %x) (lflag %x oflag %x)", + syscall_printf ("%d = tcsetattr(,%p) (ENABLE FLAGS %y) (lflag %y oflag %y)", res, t, flags, t->c_lflag, t->c_oflag); return res; } @@ -1075,7 +1075,7 @@ fhandler_console::input_tcsetattr (int, struct termios const *t) res = SetConsoleMode (get_io_handle (), flags) ? 0 : -1; if (res < 0) __seterrno (); - syscall_printf ("%d = tcsetattr(,%x) enable flags %p, c_lflag %p iflag %p", + syscall_printf ("%d = tcsetattr(,%p) enable flags %y, c_lflag %y iflag %y", res, t, flags, t->c_lflag, t->c_iflag); } @@ -1126,7 +1126,7 @@ fhandler_console::tcgetattr (struct termios *t) /* All the output bits we can ignore */ res = 0; } - syscall_printf ("%d = tcgetattr(%p) enable flags %p, t->lflag %p, t->iflag %p", + syscall_printf ("%d = tcgetattr(%p) enable flags %y, t->lflag %y, t->iflag %y", res, t, flags, t->c_lflag, t->c_iflag); return res; } @@ -2044,7 +2044,7 @@ fhandler_console::write (const void *vsrc, size_t len) tmp_pathbuf tp; write_buf = tp.w_get (); - debug_printf ("%x, %d", vsrc, len); + debug_printf ("%p, %ld", vsrc, len); while (src < end) { @@ -2211,15 +2211,15 @@ fhandler_console::write (const void *vsrc, size_t len) } } - syscall_printf ("%d = fhandler_console::write(...)", len); + syscall_printf ("%ld = fhandler_console::write(...)", len); return len; } -static struct { +static const struct { int vk; const char *val[4]; -} keytable[] NO_COPY = { +} keytable[] = { /* NORMAL */ /* SHIFT */ /* CTRL */ /* CTRL-SHIFT */ /* Unmodified and Alt-modified keypad keys comply with linux console SHIFT, CTRL, CTRL-SHIFT modifiers comply with xterm modifier usage */ @@ -2366,7 +2366,7 @@ fhandler_console::create_invisible_console (HWINSTA horig) return b; } -/* Ugly workaround for Windows 7. +/* Ugly workaround for Windows 7 and later. First try to just attach to any console which may have started this app. If that works use this as our "invisible console". |