/* Copyright (c) 1992, 1995 John E. Davis
* All rights reserved.
- *
+ *
* You may distribute under the terms of either the GNU General Public
* License or the Perl Artistic License.
*/
{
SMALL_RECT windowRect;
COORD newPosition;
- long flags;
+ DWORD flags;
#ifndef SLANG_SAVES_CONSOLE
/* first off, create a new console so the old one can be restored on exit */
if (flags & ENABLE_PROCESSED_INPUT) {
return -1;
}
- }
+ }
- (void) SetConsoleCursorPosition(hStdout, newPosition);
+ (void) SetConsoleCursorPosition(hStdout, newPosition);
/* success */
return 0;
{
INPUT_RECORD record;
long one = 1;
- long bytesRead;
+ DWORD bytesRead;
while (1)
{
- if (PeekConsoleInput(hStdin, &record, 1, &bytesRead))
+ if (PeekConsoleInput(hStdin, &record, 1, &bytesRead))
{
- if (bytesRead == 1)
+ if (bytesRead == 1)
{
if ((record.EventType == KEY_EVENT)
- && record.Event.KeyEvent.bKeyDown)
+ && record.Event.KeyEvent.bKeyDown)
{
/* ok, there is a keypress here */
return 1;
- }
- else
+ }
+ else
{
/* something else is here, so read it and try again */
(void) ReadConsoleInput(hStdin, &record, 1, &bytesRead);
if (keyWaiting()) return 1;
while (count > 0)
{
- delay (20); 20 ms or 1/50 sec
+ delay (20); 20 ms or 1/50 sec
if (keyWaiting()) break;
count--;
}
unsigned int SLsys_getkey (void)
{
unsigned int scan, ch, shift;
- long key, bytesRead;
+ long key;
+ DWORD bytesRead;
INPUT_RECORD record;
while (1) {