X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=moves.c;h=59700b7cc3a11c050d8df47dd0fc7892c6d9e639;hb=ca87afb87619efbaa94fe045670bc916e9ffe3ec;hp=b5b9c2fdb4f3964777c3a3f2f92d2784430feddd;hpb=bb1c4f8ed2489e4891fe044532a35107d33174d2;p=xboard.git diff --git a/moves.c b/moves.c index b5b9c2f..59700b7 100644 --- a/moves.c +++ b/moves.c @@ -69,7 +69,7 @@ int BlackPiece P((ChessSquare)); int SameColor P((ChessSquare, ChessSquare)); int PosFlags(int index); -extern char initialRights[BOARD_SIZE]; /* [HGM] all rights enabled, set in InitPosition */ +extern signed char initialRights[BOARD_SIZE]; /* [HGM] all rights enabled, set in InitPosition */ int WhitePiece(piece) @@ -1252,24 +1252,10 @@ void Disambiguate(board, flags, epfile, closure) /* [HGM] Shogi promotions. '=' means defer */ if(closure->rfIn != DROP_RANK && closure->kind == NormalMove) { ChessSquare piece = closure->piece; -#if 0 - if (appData.debugMode) { - fprintf(debugFP, "Disambiguate A: %d(%d,%d)-(%d,%d) = %d (%c)\n", - closure->pieceIn,closure->ffIn,closure->rfIn,closure->ftIn,closure->rtIn, - closure->promoCharIn,closure->promoCharIn); - } -#endif if(c != NULLCHAR && c != 'x' && c != '+' && c != '=' && ToUpper(PieceToChar(PROMOTED piece)) != ToUpper(c) ) closure->kind = IllegalMove; else if(flags & F_WHITE_ON_MOVE) { -#if 0 - if (appData.debugMode) { - fprintf(debugFP, "Disambiguate B: %d(%d,%d)-(%d,%d) = %d (%c)\n", - closure->pieceIn,closure->ffIn,closure->rfIn,closure->ftIn,closure->rtIn, - closure->promoCharIn,closure->promoCharIn); - } -#endif if( (int) piece < (int) WhiteWazir && (closure->rf > BOARD_HEIGHT-4 || closure->rt > BOARD_HEIGHT-4) ) { if( (piece == WhitePawn || piece == WhiteQueen) && closure->rt > BOARD_HEIGHT-2 || @@ -1303,13 +1289,6 @@ void Disambiguate(board, flags, epfile, closure) closure->kind = IllegalMove; } } -#if 0 - if (appData.debugMode) { - fprintf(debugFP, "Disambiguate C: %d(%d,%d)-(%d,%d) = %d (%c)\n", - closure->pieceIn,closure->ffIn,closure->rfIn,closure->ftIn,closure->rtIn, - closure->promoCharIn,closure->promoCharIn); - } -#endif /* [HGM] returns 'q' for optional promotion, 'n' for mandatory */ if(closure->promoCharIn != '=') closure->promoChar = ToLower(closure->promoCharIn);