/*
* 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
- * 1992-2001,2002,2003,2004,2005,2006,2007,2008,2009 Free Software
- * Foundation, Inc.
+ * Massachusetts.
+ *
+ * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,
+ * 2007, 2008, 2009 Free Software Foundation, Inc.
*
* The following terms apply to Digital Equipment Corporation's copyright
* interest in XBoard:
{ "localLineEditing", "localLineEditing", XtRBoolean,
sizeof(Boolean), XtOffset(AppDataPtr, localLineEditing),
XtRImmediate, (XtPointer) True }, /* not implemented, must be True */
-#ifdef ZIPPY
+#if ZIPPY
{ "zippyTalk", "zippyTalk", XtRBoolean,
sizeof(Boolean), XtOffset(AppDataPtr, zippyTalk),
XtRImmediate, (XtPointer) ZIPPY_TALK },
{ "adjudicateLossThreshold", "adjudicateLossThreshold", XtRInt,
sizeof(int), XtOffset(AppDataPtr, adjudicateLossThreshold),
XtRImmediate, (XtPointer) 0},
+ { "adjudicateDrawMoves", "adjudicateDrawMoves", XtRInt,
+ sizeof(int), XtOffset(AppDataPtr, adjudicateDrawMoves),
+ XtRImmediate, (XtPointer) 0},
{ "pgnEventHeader", "pgnEventHeader", XtRString,
sizeof(String), XtOffset(AppDataPtr, pgnEventHeader),
XtRImmediate, (XtPointer) "Computer Chess Game" },
{ "-pgnExtendedInfo", "pgnExtendedInfo", XrmoptionSepArg, NULL },
{ "-hideThinkingFromHuman", "hideThinkingFromHuman", XrmoptionSepArg, NULL },
{ "-adjudicateLossThreshold", "adjudicateLossThreshold", XrmoptionSepArg, NULL },
+ { "-adjudicateDrawMoves", "adjudicateDrawMoves", XrmoptionSepArg, NULL },
{ "-pgnEventHeader", "pgnEventHeader", XrmoptionSepArg, NULL },
{ "-firstIsUCI", "firstIsUCI", XrmoptionSepArg, NULL },
{ "-secondIsUCI", "secondIsUCI", XrmoptionSepArg, NULL },
#ifdef ENABLE_NLS
XtSetLanguageProc(NULL, NULL, NULL);
- bindtextdomain(PRODUCT, LOCALEDIR);
- textdomain(PRODUCT);
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
#endif
shellWidget =
x >= 0 && y >= 0) {
ChessSquare fromP;
ChessSquare toP;
+ int frc;
/* Check if clicking again on the same color piece */
fromP = boards[currentMove][fromY][fromX];
toP = boards[currentMove][y][x];
- if ((WhitePawn <= fromP && fromP < WhiteKing && // [HGM] this test should go, as UserMoveTest now does it.
- WhitePawn <= toP && toP <= WhiteKing) || // For now I made it less critical by exempting King
- (BlackPawn <= fromP && fromP < BlackKing && // moves, to not interfere with FRC castlings.
- BlackPawn <= toP && toP <= BlackKing)) {
+ frc = gameInfo.variant == VariantFischeRandom || gameInfo.variant == VariantCapaRandom;
+ if ((WhitePawn <= fromP && fromP <= WhiteKing && // [HGM] this test should go, as UserMoveTest now does it.
+ WhitePawn <= toP && toP <= WhiteKing &&
+ !(fromP == WhiteKing && toP == WhiteRook && frc)) ||
+ (BlackPawn <= fromP && fromP <= BlackKing &&
+ BlackPawn <= toP && toP <= BlackKing &&
+ !(fromP == BlackKing && toP == BlackRook && frc))) {
/* Clicked again on same color piece -- changed his mind */
second = (x == fromX && y == fromY);
if (appData.highlightDragging) {
"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);
}