mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
* dcrt0.cc (build_argv): Remove unneeded variable.
* select.cc (peek_pipe): Don't check for "ready" if it's already set. (peek_console): Ditto. (peek_serial): Ditto. (peek_socket): Ditto. (peek_windows): Ditto.
This commit is contained in:
parent
5640cadbc5
commit
41010c6a53
@ -1,3 +1,12 @@
|
|||||||
|
Fri May 12 21:35:54 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
|
* dcrt0.cc (build_argv): Remove unneeded variable.
|
||||||
|
* select.cc (peek_pipe): Don't check for "ready" if it's already set.
|
||||||
|
(peek_console): Ditto.
|
||||||
|
(peek_serial): Ditto.
|
||||||
|
(peek_socket): Ditto.
|
||||||
|
(peek_windows): Ditto.
|
||||||
|
|
||||||
Fri May 12 20:31:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
Fri May 12 20:31:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler_raw.cc (write_file, read_file): New wrapper functions
|
* fhandler_raw.cc (write_file, read_file): New wrapper functions
|
||||||
|
@ -382,7 +382,6 @@ static void __stdcall
|
|||||||
build_argv (char *cmd, char **&argv, int &argc, int winshell)
|
build_argv (char *cmd, char **&argv, int &argc, int winshell)
|
||||||
{
|
{
|
||||||
int argvlen = 0;
|
int argvlen = 0;
|
||||||
int alloc_cmd = 0; // command allocated by insert_file
|
|
||||||
int nesting = 0; // monitor "nesting" from insert_file
|
int nesting = 0; // monitor "nesting" from insert_file
|
||||||
|
|
||||||
argc = 0;
|
argc = 0;
|
||||||
|
@ -409,6 +409,12 @@ peek_pipe (select_record *s, int ignra)
|
|||||||
|
|
||||||
if (s->read_selected)
|
if (s->read_selected)
|
||||||
{
|
{
|
||||||
|
if (s->read_ready)
|
||||||
|
{
|
||||||
|
select_printf ("already ready");
|
||||||
|
gotone = 1;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
if (fh->bg_check (SIGTTIN) <= 0)
|
if (fh->bg_check (SIGTTIN) <= 0)
|
||||||
{
|
{
|
||||||
gotone = s->read_ready = 1;
|
gotone = s->read_ready = 1;
|
||||||
@ -594,6 +600,12 @@ peek_console (select_record *me, int ignra)
|
|||||||
return me->read_ready = 1;
|
return me->read_ready = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (me->read_ready)
|
||||||
|
{
|
||||||
|
select_printf ("already ready");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
INPUT_RECORD irec;
|
INPUT_RECORD irec;
|
||||||
DWORD events_read;
|
DWORD events_read;
|
||||||
HANDLE h;
|
HANDLE h;
|
||||||
@ -777,6 +789,14 @@ peek_serial (select_record *s, int)
|
|||||||
HANDLE h;
|
HANDLE h;
|
||||||
set_handle_or_return_if_not_open (h, s);
|
set_handle_or_return_if_not_open (h, s);
|
||||||
int ready = 0;
|
int ready = 0;
|
||||||
|
|
||||||
|
if (s->read_selected && s->read_ready || (s->write_selected && s->write_ready))
|
||||||
|
{
|
||||||
|
select_printf ("already ready");
|
||||||
|
ready = 1;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
(void) SetCommMask (h, EV_RXCHAR);
|
(void) SetCommMask (h, EV_RXCHAR);
|
||||||
|
|
||||||
if (!fh->overlapped_armed)
|
if (!fh->overlapped_armed)
|
||||||
@ -843,6 +863,7 @@ peek_serial (select_record *s, int)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
return ready;
|
return ready;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
@ -1078,11 +1099,11 @@ peek_socket (select_record *me, int)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WINSOCK_FD_ISSET (h, &ws_readfds))
|
if (WINSOCK_FD_ISSET (h, &ws_readfds) || (me->read_selected && me->read_ready))
|
||||||
gotone = me->read_ready = TRUE;
|
gotone = me->read_ready = TRUE;
|
||||||
if (WINSOCK_FD_ISSET (h, &ws_writefds))
|
if (WINSOCK_FD_ISSET (h, &ws_writefds) || (me->write_selected && me->write_ready))
|
||||||
gotone = me->write_ready = TRUE;
|
gotone = me->write_ready = TRUE;
|
||||||
if (WINSOCK_FD_ISSET (h, &ws_exceptfds))
|
if (WINSOCK_FD_ISSET (h, &ws_exceptfds) || (me->except_selected && me->except_ready))
|
||||||
gotone = me->except_ready = TRUE;
|
gotone = me->except_ready = TRUE;
|
||||||
return gotone;
|
return gotone;
|
||||||
}
|
}
|
||||||
@ -1308,6 +1329,10 @@ peek_windows (select_record *me, int)
|
|||||||
MSG m;
|
MSG m;
|
||||||
HANDLE h;
|
HANDLE h;
|
||||||
set_handle_or_return_if_not_open (h, me);
|
set_handle_or_return_if_not_open (h, me);
|
||||||
|
|
||||||
|
if (me->read_selected && me->read_ready)
|
||||||
|
return 1;
|
||||||
|
|
||||||
if (PeekMessage (&m, (HWND) h, 0, 0, PM_NOREMOVE))
|
if (PeekMessage (&m, (HWND) h, 0, 0, PM_NOREMOVE))
|
||||||
{
|
{
|
||||||
me->read_ready = TRUE;
|
me->read_ready = TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user