X-Git-Url: http://winboard.nl/cgi-bin?p=bonanza.git;a=blobdiff_plain;f=io.c;fp=io.c;h=2a633e64dca9b4ed2ad4c10de7d533dcdbae5a41;hp=75f12bbc4f1d93a4da91d75c7beca483f3de4671;hb=337ac0a0658376f8a9b2aa740acde95f021e53ec;hpb=464c88061b108405e7f9032900fc194e81aa0989 diff --git a/io.c b/io.c index 75f12bb..2a633e6 100644 --- a/io.c +++ b/io.c @@ -540,7 +540,7 @@ out_beep( void ) int stdout_normal( void ) { -# if defined(_WIN32) +# if defined(_MSC_VER) HANDLE hStdout; WORD wAttributes; @@ -568,7 +568,7 @@ stdout_normal( void ) int stdout_stress( int is_promote, int ifrom ) { -# if defined(_WIN32) +# if defined(_MSC_VER) HANDLE hStdout; WORD wAttributes; @@ -734,6 +734,11 @@ check_input_buffer( void ) &dwTotalBytesAvail, &dwBytesLeftThisMessage ); if ( ! bSuccess ) { + if( GetLastError() == 6) + { + return _kbhit(); + } + Out("peek error %d\n", GetLastError()); str_error = "PeekNamedPipe() faild."; return -1; }