Cygwin: pty: Remove debug codes and organize related codes.

- Debug codes used in the early stage of pseudo console support are
  removed. (Regarding ALWAYS_USE_PCON and USE_API_HOOK) Along with
  this, the codes related to this change are organized.
This commit is contained in:
Takashi Yano
2020-02-09 23:46:02 +09:00
committed by Corinna Vinschen
parent b0474b704a
commit d5985cc45d
2 changed files with 23 additions and 81 deletions

View File

@ -1211,29 +1211,6 @@ peek_pty_slave (select_record *s, bool from_select)
goto out;
}
if (ptys->to_be_read_from_pcon ())
{
if (ptys->is_line_input ())
{
INPUT_RECORD inp[INREC_SIZE];
DWORD n;
PeekConsoleInput (ptys->get_handle (), inp, INREC_SIZE, &n);
bool end_of_line = false;
while (n-- > 0)
if (inp[n].EventType == KEY_EVENT &&
inp[n].Event.KeyEvent.bKeyDown &&
inp[n].Event.KeyEvent.uChar.AsciiChar == '\r')
end_of_line = true;
if (end_of_line)
{
gotone = s->read_ready = true;
goto out;
}
else
goto out;
}
}
if (IsEventSignalled (ptys->input_available_event))
{
gotone = s->read_ready = true;