* 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> | ||||
| 
 | ||||
| 	* 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) | ||||
| { | ||||
|   int argvlen = 0; | ||||
|   int alloc_cmd = 0;	// command allocated by insert_file
 | ||||
|   int nesting = 0;		// monitor "nesting" from insert_file
 | ||||
| 
 | ||||
|   argc = 0; | ||||
|  |  | |||
|  | @ -409,6 +409,12 @@ peek_pipe (select_record *s, int ignra) | |||
| 
 | ||||
|   if (s->read_selected) | ||||
|     { | ||||
|       if (s->read_ready) | ||||
| 	{ | ||||
| 	  select_printf ("already ready"); | ||||
| 	  gotone = 1; | ||||
| 	  goto out; | ||||
| 	} | ||||
|       if (fh->bg_check (SIGTTIN) <= 0) | ||||
| 	{ | ||||
| 	  gotone = s->read_ready = 1; | ||||
|  | @ -594,6 +600,12 @@ peek_console (select_record *me, int ignra) | |||
|       return me->read_ready = 1; | ||||
|     } | ||||
| 
 | ||||
|   if (me->read_ready) | ||||
|     { | ||||
|       select_printf ("already ready"); | ||||
|       return 1; | ||||
|     } | ||||
| 
 | ||||
|   INPUT_RECORD irec; | ||||
|   DWORD events_read; | ||||
|   HANDLE h; | ||||
|  | @ -777,6 +789,14 @@ peek_serial (select_record *s, int) | |||
|   HANDLE h; | ||||
|   set_handle_or_return_if_not_open (h, s); | ||||
|   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); | ||||
| 
 | ||||
|   if (!fh->overlapped_armed) | ||||
|  | @ -843,6 +863,7 @@ peek_serial (select_record *s, int) | |||
|       goto err; | ||||
|     } | ||||
| 
 | ||||
| out: | ||||
|   return ready; | ||||
| 
 | ||||
| err: | ||||
|  | @ -1078,11 +1099,11 @@ peek_socket (select_record *me, int) | |||
|       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; | ||||
|   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; | ||||
|   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; | ||||
|   return gotone; | ||||
| } | ||||
|  | @ -1308,6 +1329,10 @@ peek_windows (select_record *me, int) | |||
|   MSG m; | ||||
|   HANDLE h; | ||||
|   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)) | ||||
|     { | ||||
|       me->read_ready = TRUE; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue