X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=6c5666e04f37be49c1948da65c6ccf01bcb974f1;hb=f00b56b34a1d43c6cc3e7489fdde4f284d776420;hp=7ddd4a8fcf8d4cdcff616ae686376bdee02450db;hpb=d80f24c825e4f0102d77cdf092197304949d46ca;p=xboard.git diff --git a/xboard.c b/xboard.c index 7ddd4a8..6c5666e 100644 --- a/xboard.c +++ b/xboard.c @@ -1,6 +1,5 @@ /* * xboard.c -- X front end for XBoard - * $Id: xboard.c,v 2.2 2003/11/06 07:22:14 mann Exp $ * * Copyright 1991 by Digital Equipment Corporation, Maynard, * Massachusetts. Enhancements Copyright @@ -2387,8 +2386,8 @@ main(argc, argv) #ifdef ENABLE_NLS XtSetLanguageProc(NULL, NULL, NULL); - bindtextdomain(PRODUCT, LOCALEDIR); - textdomain(PRODUCT); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); #endif shellWidget = @@ -3161,7 +3160,8 @@ XBoard square size (hint): %d\n\ signal(SIGUSR1, CmailSigHandler); } } - InitPosition(TRUE); + gameInfo.boardWidth = 0; // [HGM] pieces: kludge to ensure InitPosition() calls InitDrawingSizes() + InitPosition(TRUE); XtAppMainLoop(appContext); if (appData.debugMode) fclose(debugFP); // [DM] debug @@ -7542,7 +7542,7 @@ void AboutProc(w, event, prms, nprms) "Copyright 1991 Digital Equipment Corporation", "Enhancements Copyright 1992-2009 Free Software Foundation", "Enhancements Copyright 2005 Alessandro Scotti", - PRODUCT, " is free software and carries NO WARRANTY;", + PACKAGE, " is free software and carries NO WARRANTY;", "see the file COPYING for more information."); ErrorPopUp(_("About XBoard"), buf, FALSE); } @@ -8225,12 +8225,12 @@ DisplayTimerLabel(w, color, timer, highlight) char buf[MSG_SIZ]; Arg args[16]; + /* check for low time warning */ Pixel foregroundOrWarningColor = timerForegroundPixel; - if (timer > 0 - && appData.lowTimeWarning - && (timer / 1000) < appData.icsAlarmTime) - + if (timer > 0 && + appData.lowTimeWarning && + (timer / 1000) < appData.icsAlarmTime) foregroundOrWarningColor = lowTimeWarningColor; if (appData.clockMode) { @@ -9257,6 +9257,10 @@ AnimateMove(board, fromX, fromY, toX, toY) if (!appData.animate || appData.blindfold) return; + if(board[toY][toX] == WhiteRook && board[fromY][fromX] == WhiteKing || + board[toY][toX] == BlackRook && board[fromY][fromX] == BlackKing) + return; // [HGM] FRC: no animtion of FRC castlings, as to-square is not true to-square + if (fromY < 0 || fromX < 0 || toX < 0 || toY < 0) return; piece = board[fromY][fromX]; if (piece >= EmptySquare) return;