Make some Bonanza commands available as CECP option
[bonanza.git] / io.c
diff --git a/io.c b/io.c
index c0595f1..2a633e6 100644 (file)
--- 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;
       }