Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-07-30 21:58:48 +0400
committerChristopher Faylor <me@cgf.cx>2000-07-30 21:58:48 +0400
commita9867e1b58dc5c8c3c29f4a54be5a23310254eab (patch)
tree6e77f2ea1858d7400c189e62e42d66b0b0e27120 /winsup/cygwin/select.cc
parentf0a69f46bbb1ec8e08a30f6ae63776d65a572804 (diff)
* fhandler_console.cc: Remove VK_DIVIDE detection.
(get_nonascii_key): Simplify previous patch to return ascii char if it is non-zero. Add a second "temporary buffer" argument to help with thread safety. * select.cc (peek_console): Pass a temporary buffer argument to get_nonascii_key.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r--winsup/cygwin/select.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index fa2933125..951d80dd2 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -597,7 +597,7 @@ fhandler_pipe::select_except (select_record *s)
static int
peek_console (select_record *me, int ignra)
{
- extern const char * get_nonascii_key (INPUT_RECORD& input_rec);
+ extern const char * get_nonascii_key (INPUT_RECORD& input_rec, char *);
fhandler_console *fh = (fhandler_console *)me->fh;
if (!me->read_selected)
@@ -618,6 +618,7 @@ peek_console (select_record *me, int ignra)
INPUT_RECORD irec;
DWORD events_read;
HANDLE h;
+ char tmpbuf[17];
set_handle_or_return_if_not_open (h, me);
for (;;)
@@ -630,7 +631,7 @@ peek_console (select_record *me, int ignra)
if (irec.EventType == WINDOW_BUFFER_SIZE_EVENT)
kill_pgrp (fh->tc->getpgid (), SIGWINCH);
else if (irec.EventType == KEY_EVENT && irec.Event.KeyEvent.bKeyDown == TRUE &&
- (irec.Event.KeyEvent.uChar.AsciiChar || get_nonascii_key (irec)))
+ (irec.Event.KeyEvent.uChar.AsciiChar || get_nonascii_key (irec, tmpbuf)))
return me->read_ready = 1;
/* Read and discard the event */