X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=io.c;h=2a633e64dca9b4ed2ad4c10de7d533dcdbae5a41;hb=refs%2Fheads%2Ftest;hp=c0595f1603b40065a129e011c833c379caaacd00;hpb=31daebfc1031441aa180e3af2e547a8cd2b92c32;p=bonanza.git diff --git a/io.c b/io.c index c0595f1..2a633e6 100644 --- a/io.c +++ b/io.c @@ -233,7 +233,12 @@ show_prompt( void ) else { Out( "Black Suspend> " ); } } else if ( root_turn ) { Out( "White %d> ", record_game.moves+1 ); } - else { Out( "Black %d> ", record_game.moves+1 ); } +#ifdef XBOARD +# define SIGN "#" +#else +# define SIGN +#endif + else { Out( SIGN "Black %d> ", record_game.moves+1 ); } } @@ -535,7 +540,7 @@ out_beep( void ) int stdout_normal( void ) { -# if defined(_WIN32) +# if defined(_MSC_VER) HANDLE hStdout; WORD wAttributes; @@ -563,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; @@ -729,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; }