Changeset 4502 for trunk/src/kernel32/conin.cpp
- Timestamp:
- Oct 20, 2000, 1:46:48 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/conin.cpp
r4407 r4502 1 /* $Id: conin.cpp,v 1.1 2 2000-10-03 17:28:28sandervl Exp $ */1 /* $Id: conin.cpp,v 1.13 2000-10-20 11:46:45 sandervl Exp $ */ 2 2 3 3 /* … … 32 32 #define INCL_VIO 33 33 #define INCL_AVIO 34 #include <os2wrap.h> 34 #include <os2wrap.h> //Odin32 OS/2 api wrappers 35 35 36 36 #include <win32api.h> … … 45 45 #include <heapstring.h> 46 46 47 #define DBG_LOCALLOG 47 #define DBG_LOCALLOG DBG_conin 48 48 #include "dbglocal.h" 49 49 … … 128 128 for (;fLoop;) /* until we got some characters */ 129 129 { 130 if (iConsoleInputQueryEvents() == 0) /* if queue is currently empty */ 131 { 132 rc = DosWaitEventSem(pConsoleInput->hevInputQueue, /* wait for input */ 133 SEM_INDEFINITE_WAIT); 134 DosResetEventSem(pConsoleInput->hevInputQueue, /* reset semaphore */ 135 &ulPostCounter); /* post counter - ignored */ 136 } 130 iConsoleInputQueryEvents(pConsoleInput, QUERY_EVENT_WAIT); /* if queue is currently empty */ 137 131 138 132 do … … 158 152 // @@@PH 2000/08/10 changed behaviour to return ALL input events 159 153 // recorded in the console. 160 fLoop = (iConsoleInputQueryEvents( ) != 0);154 fLoop = (iConsoleInputQueryEvents(pConsoleInput, QUERY_EVENT_PEEK) != 0); 161 155 162 156 // record key stroke … … 170 164 // key events, etc. 171 165 break; 172 166 173 167 case 0x03: // ctrl-c is filtered! 174 168 // @@@PH we're supposed to call a ctrl-c break handler here! 175 169 break; 176 170 177 171 case 0x0d: // CR 178 172 // CR is automatically expanded to CRLF if in line input mode! … … 188 182 ulCounter++; 189 183 } 190 184 191 185 if (pConsoleInput->dwConsoleMode & ENABLE_ECHO_INPUT) 192 186 HMWriteFile(pConsoleGlobals->hConsoleBuffer, … … 195 189 &ulPostCounter, /* dummy result */ 196 190 NULL); 197 191 198 192 } 199 193 200 194 break; 201 195 … … 443 437 #endif 444 438 439 //get all pending events 440 iConsoleInputQueryEvents(pConsoleInput, QUERY_EVENT_PEEK); 441 445 442 pConsoleInput->ulIndexFree = 0; 446 443 pConsoleInput->ulIndexEvent = 0; … … 507 504 #endif 508 505 509 *lpNumberOfEvents = pConsoleInput->ulEvents; /* return number of events */ 506 //get all pending events and return number of events 507 *lpNumberOfEvents = iConsoleInputQueryEvents(pConsoleInput, QUERY_EVENT_PEEK); 510 508 511 509 return (TRUE); … … 548 546 #endif 549 547 550 if (iConsoleInputQueryEvents( ) == 0) /* if queue is currently empty */548 if (iConsoleInputQueryEvents(pConsoleInput, QUERY_EVENT_PEEK) == 0) /* if queue is currently empty */ 551 549 { 552 550 *lpcRead = 0; /* no events read from queue */ … … 620 618 #endif 621 619 622 if (iConsoleInputQueryEvents( ) == 0) /* if queue is currently empty */620 if (iConsoleInputQueryEvents(pConsoleInput, QUERY_EVENT_PEEK) == 0) /* if queue is currently empty */ 623 621 { 624 622 *lpcRead = 0; /* no events read from queue */ … … 786 784 #endif 787 785 788 if (iConsoleInputQueryEvents() == 0) /* if queue is currently empty */ 789 { 790 rc = DosWaitEventSem(pConsoleInput->hevInputQueue, /* wait for input */ 791 SEM_INDEFINITE_WAIT); 792 DosResetEventSem(pConsoleInput->hevInputQueue, /* reset semaphore */ 793 &ulPostCounter); /* post counter - ignored */ 794 } 795 786 iConsoleInputQueryEvents(pConsoleInput, QUERY_EVENT_WAIT); 796 787 797 788 /* now read events into target buffer */ … … 842 833 #endif 843 834 844 if (iConsoleInputQueryEvents() == 0) /* if queue is currently empty */ 845 { 846 rc = DosWaitEventSem(pConsoleInput->hevInputQueue, /* wait for input */ 847 SEM_INDEFINITE_WAIT); 848 DosResetEventSem(pConsoleInput->hevInputQueue, /* reset semaphore */ 849 &ulPostCounter); /* post counter - ignored */ 850 } 851 835 iConsoleInputQueryEvents(pConsoleInput, QUERY_EVENT_WAIT); 852 836 853 837 /* now read events into target buffer */
Note:
See TracChangeset
for help on using the changeset viewer.