Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 18 commits
  • 19 files changed
  • 0 commit comments
  • 3 contributors
Commits on Apr 14, 2012
H.G. Muller Suppress testing for availability in bughouse drops
Give up on testing legality of bughouse drop moves; this only causes problems,
because the move list sent by the ICS is not accompanied by holdings updates.
So XBoard parses it thinking the holdings are empty, making every drop move
an ImpossibleMove. Bughouse can only be played on ICS, and we might as well
trust the ICS that it will only pass us legal moves. A user should not be
able to enter illegal drops; unavailable pieces cannot be grabbed from the
holdings, and typing is diverted to the ICS directly (which would reject the
illegal drop without XBoard even knowing about it).
  Also improve switching to bh/zh, based on drop move in initial board.
a1d5879
H.G. Muller Fix crash due to empty PV
Reception of a stat01 command before the first PV could cause a crash,
as apparently the parser cannot handle this.
2e017a2
H.G. Muller Fix Eval Graph scale in drop games daf738e
@arunpersaud added m4 directory to search path for aclocal. As suggested by Michel…
… Van den Bergh
97be569
@arunpersaud removed unused variables (-Wunused-variable) 52a3553
Commits on Apr 15, 2012
@git-da git-da Translate "NPS" also in engine output window ea9b194
@arunpersaud new version number for release of 4.6.1 13b879d
@arunpersaud updated Changelog, NEWS, etc. 86e0dde
Commits on Apr 17, 2012
H.G. Muller Fix second-engine variant test
The test whether the second engine supports the selected variant took place
before the second engine was loaded, thus always coming to the conclusion
that the variant was not supported, and aborting the TwoMachines command.
The test is now moved to after second-engine loading (but before its
initialization, where non-supporting would become a fatal error).
be6b5dc
H.G. Muller Add two new strings to WinBoard language file 780ed69
H.G. Muller Define TOPLEVEL in winboard.c f807f52
H.G. Muller Fix faking of castling rights after editing position with holdings
The queen-side rook was always imagined at X=0, which is in the holdings
when these exist, so that Q-side castling in such games was never allowed
after EditPosition.
a0e5aba
H.G. Muller Suppress clear-board message after pasting FEN
The message field is now always cleared when you leave EditPosition mode.
7f6f85c
Commits on Apr 18, 2012
@arunpersaud new version number for release of 4.6.2 3a13854
@arunpersaud updated Changelog, NEWS, etc. 0bf2595
Commits on Jul 04, 2012
H.G. Muller Add boolean -autoBox option
This option controls the automatic popup of the ICS Input Box on typing
a printable character, which was annoying to some. The option can be
set from the ICS Options dialog.
b112707
Commits on Sep 20, 2012
H.G. Muller Debugs 29ce6c0
Commits on Sep 25, 2012
H.G. Muller Implement --help option
The list of options is printed before exiting. Some attempt is made
to do it in a nice way.
4bc2bbe
View
102 ChangeLog
@@ -2,6 +2,108 @@ ChangeLog for XBoard/WinBoard
-----------------------------
(latest entries created by git log --no-merges --pretty="%ai %an <%ae>:%n%s%n%n%b" vlast.. )
+2012-04-17 19:27:49 -0700 Arun Persaud <arun@nubati.net>:
+new version number for release of 4.6.2
+
+2012-04-17 19:49:24 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Suppress clear-board message after pasting FEN
+
+The message field is now always cleared when you leave EditPosition mode.
+
+2012-04-17 19:45:33 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Fix faking of castling rights after editing position with holdings
+
+The queen-side rook was always imagined at X=0, which is in the holdings
+when these exist, so that Q-side castling in such games was never allowed
+after EditPosition.
+
+2012-04-17 11:02:39 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Define TOPLEVEL in winboard.c
+
+2012-04-17 10:59:33 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Add two new strings to WinBoard language file
+
+2012-04-17 10:51:02 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Fix second-engine variant test
+
+The test whether the second engine supports the selected variant took place
+before the second engine was loaded, thus always coming to the conclusion
+that the variant was not supported, and aborting the TwoMachines command.
+The test is now moved to after second-engine loading (but before its
+initialization, where non-supporting would become a fatal error).
+
+2012-04-15 13:48:51 -0700 Arun Persaud <arun@nubati.net>:
+updated Changelog, NEWS, etc.
+
+2012-04-15 13:43:49 -0700 Arun Persaud <arun@nubati.net>:
+new version number for release of 4.6.1
+
+2012-04-14 22:43:03 +0200 Byrial Jensen <byrial@vip.cybercity.dk>:
+Translate "NPS" also in engine output window
+
+2012-04-14 15:51:07 -0700 Arun Persaud <arun@nubati.net>:
+removed unused variables (-Wunused-variable)
+
+2012-04-14 15:37:05 -0700 Arun Persaud <arun@nubati.net>:
+added m4 directory to search path for aclocal. As suggested by Michel Van den Bergh
+
+
+2012-04-14 23:21:56 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Fix Eval Graph scale in drop games
+
+
+2012-04-14 15:43:30 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Fix crash due to empty PV
+
+Reception of a stat01 command before the first PV could cause a crash,
+as apparently the parser cannot handle this.
+
+2012-04-14 13:27:48 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Suppress testing for availability in bughouse drops
+
+Give up on testing legality of bughouse drop moves; this only causes problems,
+because the move list sent by the ICS is not accompanied by holdings updates.
+So XBoard parses it thinking the holdings are empty, making every drop move
+an ImpossibleMove. Bughouse can only be played on ICS, and we might as well
+trust the ICS that it will only pass us legal moves. A user should not be
+able to enter illegal drops; unavailable pieces cannot be grabbed from the
+holdings, and typing is diverted to the ICS directly (which would reject the
+illegal drop without XBoard even knowing about it).
+ Also improve switching to bh/zh, based on drop move in initial board.
+
+2012-04-13 16:39:42 +0200 Byrial Jensen <byrial@vip.cybercity.dk>:
+New Danish translation (fixes a minor error in one string)
+
+
+2012-04-13 00:33:28 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Fix click-click sweep promotions to empty square
+
+These did not work, because DragPieceBegin would fail on an EmptySquare.
+
+2012-04-11 09:54:51 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Detect engine exit during startup
+
+The case where engine startup failure does not result in a fatal protocol
+message, like "No such file", but where it simply exits, is now also covered.
+
+2012-04-10 22:55:07 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Suppress popup for fatal error after tellusererror
+
+For cooperating better with Polyglot, and allowing more to-the-point
+error messaging, the (awful) default message will be suppressed if the
+dying engine already provided an explanation for its demise to the user.
+
+2012-04-10 21:05:42 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Updated Danish and Ukranian translations
+
+
+2012-04-10 18:39:25 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
+Don't strip path from engine name if directory given
+
+
+2012-04-05 21:17:04 -0700 Arun Persaud <arun@nubati.net>:
+updated Changelog, etc. for developer release
+
2012-04-05 13:25:50 +0200 H.G. Muller <h.g.muller@hccnet.nl>:
updated po/pot files
View
58 DIFFSTAT
@@ -1,35 +1,53 @@
+** Version 4.6.2 **
+
+(git diff -b --stat --summary -M v4.6.1 HEAD)
+
+ backend.c | 16 +++++++++-------
+ configure.ac | 2 +-
+ winboard/config.h | 6 +++---
+ winboard/language.txt | 2 ++
+ winboard/language/nederlands.lng | 2 ++
+ winboard/winboard.c | 1 +
+ 6 files changed, 18 insertions(+), 11 deletions(-)
+
** Version 4.6.1 **
(git diff -b --stat --summary -M v4.6.0 HEAD)
+ ChangeLog | 228 +++++++++++
+ DIFFSTAT | 38 ++
+ NEWS | 28 ++
+ SHORTLOG | 45 +++
args.h | 5 +-
- backend.c | 64 +++-
+ autogen.sh | 2 +-
+ backend.c | 89 ++++-
common.h | 1 +
configure.ac | 2 +-
- engineoutput.c | 15 +-
- po/da.po | 980 ++++++++++++++++++++++++-------------------------
- po/de.po | 980 ++++++++++++++++++++++++-------------------------
- po/es.po | 980 ++++++++++++++++++++++++-------------------------
- po/it.po | 980 ++++++++++++++++++++++++-------------------------
- po/ru.po | 980 ++++++++++++++++++++++++-------------------------
- po/tr.po | 980 ++++++++++++++++++++++++-------------------------
- po/uk.po | 984 +++++++++++++++++++++++++-------------------------
- po/vi.po | 980 ++++++++++++++++++++++++-------------------------
- po/xboard.pot | 981 ++++++++++++++++++++++++-------------------------
- po/zh_CN.po | 980 ++++++++++++++++++++++++-------------------------
- po/zh_HK.po | 980 ++++++++++++++++++++++++-------------------------
- po/zh_TW.po | 980 ++++++++++++++++++++++++-------------------------
- winboard/config.h | 4 +-
+ engineoutput.c | 19 +-
+ evalgraph.c | 4 +-
+ moves.c | 3 +-
+ po/da.po | 987 +++++++++++++++++++++++------------------------
+ po/de.po | 980 +++++++++++++++++++++++------------------------
+ po/es.po | 980 +++++++++++++++++++++++------------------------
+ po/it.po | 980 +++++++++++++++++++++++------------------------
+ po/ru.po | 980 +++++++++++++++++++++++------------------------
+ po/tr.po | 980 +++++++++++++++++++++++------------------------
+ po/uk.po | 1032 +++++++++++++++++++++++++-------------------------
+ po/vi.po | 980 +++++++++++++++++++++++------------------------
+ po/xboard.pot | 981 +++++++++++++++++++++++------------------------
+ po/zh_CN.po | 980 +++++++++++++++++++++++------------------------
+ po/zh_HK.po | 980 +++++++++++++++++++++++------------------------
+ po/zh_TW.po | 980 +++++++++++++++++++++++------------------------
+ winboard/config.h | 6 +-
winboard/wsettings.c | 13 +-
- xboard.c | 13 +-
+ xboard.c | 25 +-
xboard.h | 8 +-
xboard.texi | 107 ++----
xengineoutput.c | 6 +-
xevalgraph.c | 6 +-
- xgamelist.c | 97 +++--
- xoptions.c | 11 +-
- 26 files changed, 6101 insertions(+), 6016 deletions(-)
-
+ xgamelist.c | 103 +++--
+ xoptions.c | 19 +-
+ 33 files changed, 6499 insertions(+), 6078 deletions(-)
** Version 4.6.0 **
View
35 NEWS
@@ -1,3 +1,38 @@
+** Version 4.6.2 **
+ (for a more detailed list with screenshots see http://www.gnu.org/software/xboard/whats_new/4.6.2/ )
+ bugfix relase for 4.6.1
+ * Suppress clear-board message after pasting FEN
+ * Fix faking of castling rights after editing position with holdings
+ * Fix second-engine variant test
+
+** Version 4.6.1 **
+ (for a more detailed list with screenshots see http://www.gnu.org/software/xboard/whats_new/4.6.1/ )
+
+ bugfix release for 4.6.0
+
+ * Fix memory corruption bug on second-engine loading (through menu or in tournament),
+ which could destroy -firstInitString
+ * Fix bug loading a new engine through the menu (not loading it with the full game,
+ but just upto the current move)
+ * Prefix engine command with "./" when a pathname is split up during install, so the engine actually runs (XB)
+ * Fix fall-back to -ncp mode when engine does not start (cutting short the feature timeout)
+ * Fix bug in position search for FRC castlings (where a King could 'fall off' the board)
+ * Add a message to inform the user how to clear the board, in sweep-select edit-position mode
+ * Fix a bug that could stop the clock when the board window was dragged (XB)
+ * Fix switching off highlighting during game (so last highlights do not remain for the rest of the game)
+ * Allow user to enter the name of a non-existing file when browsing for a save file (WB)
+ * Make sure rarely used engine-related options (such as -firstNPS) are also correctly loaded during session
+ * Correctly handle parsing of Crazyhouse promotions with legality-testing off
+ * Fix click-click detour under-promotions, which were not working for non-captures
+ * Don't strip path from engine command if directory is explicitly given in Load Engine dialog
+ * Consistently make auxiliary windows top level-shells or not, with new -topLevel option (XB)
+ * No longer fatal if second engine does not support current variant (just refuse Two Machines mode)
+ * Scroll XBoard game list to keep selected item in view (XB)
+ * Suppress spurious error popup when starting observing of bughouse games
+ * Fix vertical axis ticks in eval graph with drop games
+ * Put title on same line as menu bar only for -size 72 and larger (with -titleInWindow, XB)
+ * Properly open and close debug file when switching debug mode through key binding Ctrl-D (XB)
+
** Version 4.6.0 **
(for a more detailed list with screenshots see http://www.gnu.org/software/xboard/whats_new/4.6.0/ )
View
36 SHORTLOG
@@ -1,8 +1,33 @@
+** Version 4.6.2 **
+
+(git shortlog --no-merges v4.6.1..HEAD)
+
+Arun Persaud (1):
+ new version number for release of 4.6.2
+
+H.G. Muller (5):
+ Fix second-engine variant test
+ Add two new strings to WinBoard language file
+ Define TOPLEVEL in winboard.c
+ Fix faking of castling rights after editing position with holdings
+ Suppress clear-board message after pasting FEN
+
** Version 4.6.1 **
(git shortlog --no-merges v4.6.0..HEAD)
-H.G. Muller (22):
+Arun Persaud (5):
+ updated Changelog, etc. for developer release
+ added m4 directory to search path for aclocal. As suggested by Michel Van den Bergh
+ removed unused variables (-Wunused-variable)
+ new version number for release of 4.6.1
+ updated Changelog, NEWS, etc.
+
+Byrial Jensen (2):
+ New Danish translation (fixes a minor error in one string)
+ Translate "NPS" also in engine output window
+
+H.G. Muller (30):
Fix fall-back on -ncp mode
Install engines as ./exefile in XBoard
Inform user in EditPosition mode how to clear board
@@ -25,6 +50,15 @@ H.G. Muller (22):
Swap all engine-related options during engine loading
new version number for developer release
updated po/pot files
+ Don't strip path from engine name if directory given
+ Updated Danish and Ukranian translations
+ Suppress popup for fatal error after tellusererror
+ Detect engine exit during startup
+ Fix click-click sweep promotions to empty square
+ Suppress testing for availability in bughouse drops
+ Fix crash due to empty PV
+ Fix Eval Graph scale in drop games
+
** Version 4.6.0 **
View
11 args.h
@@ -194,6 +194,7 @@ ArgDescriptor argDescriptors[] = {
{ "internetChessServerInputBox", ArgBoolean, (void *) &appData.icsInputBox, XBOARD, (ArgIniType) FALSE },
{ "icsinput", ArgTrue, (void *) &appData.icsInputBox, FALSE, INVALID },
{ "xicsinput", ArgFalse, (void *) &appData.icsInputBox, FALSE, INVALID },
+ { "autoBox", ArgBoolean, (void *) &appData.autoBox, XBOARD, (ArgIniType) TRUE },
{ "cmail", ArgString, (void *) &appData.cmailGameName, FALSE, (ArgIniType) "" },
{ "soundProgram", ArgFilename, (void *) &appData.soundProgram, XBOARD, (ArgIniType) "play" },
{ "fontSizeTolerance", ArgInt, (void *) &appData.fontSizeTolerance, XBOARD, (ArgIniType) 4 },
@@ -541,12 +542,12 @@ ArgDescriptor argDescriptors[] = {
{ "fUCI", ArgTrue, (void *) &appData.firstIsUCI, FALSE, INVALID },
{ "firstUCI", ArgTrue, (void *) &appData.firstIsUCI, FALSE, INVALID },
{ "secondIsUCI", ArgBoolean, (void *) &appData.secondIsUCI, FALSE, (ArgIniType) FALSE },
+ { "secondUCI", ArgTrue, (void *) &appData.secondIsUCI, FALSE, INVALID },
{ "sUCI", ArgTrue, (void *) &appData.secondIsUCI, FALSE, INVALID },
{ "fUCCI", ArgTwo, (void *) &appData.firstIsUCI, FALSE, INVALID },
{ "sUCCI", ArgTwo, (void *) &appData.secondIsUCI, FALSE, INVALID },
{ "fUSI", ArgTwo, (void *) &appData.firstIsUCI, FALSE, INVALID },
{ "sUSI", ArgTwo, (void *) &appData.secondIsUCI, FALSE, INVALID },
- { "secondUCI", ArgTrue, (void *) &appData.secondIsUCI, FALSE, INVALID },
{ "firstHasOwnBookUCI", ArgBoolean, (void *) &appData.firstHasOwnBookUCI, FALSE, (ArgIniType) TRUE },
{ "fNoOwnBookUCI", ArgFalse, (void *) &appData.firstHasOwnBookUCI, FALSE, INVALID },
{ "firstXBook", ArgFalse, (void *) &appData.firstHasOwnBookUCI, FALSE, INVALID },
@@ -727,10 +728,10 @@ ArgDescriptor argDescriptors[] = {
{ "icsY", ArgY, (void *) &wpConsole.y, TRUE, (ArgIniType) CW_USEDEFAULT },
{ "icsW", ArgInt, (void *) &wpConsole.width, TRUE, (ArgIniType) CW_USEDEFAULT },
{ "icsH", ArgInt, (void *) &wpConsole.height, TRUE, (ArgIniType) CW_USEDEFAULT },
- { "analysisX", ArgX, (void *) &junk, FALSE, INVALID }, // [HGM] placement: analysis window no longer exists
- { "analysisY", ArgY, (void *) &junk, FALSE, INVALID }, // provided for compatibility with old ini files
- { "analysisW", ArgInt, (void *) &junk, FALSE, INVALID },
- { "analysisH", ArgInt, (void *) &junk, FALSE, INVALID },
+// { "analysisX", ArgX, (void *) &junk, FALSE, INVALID }, // [HGM] placement: analysis window no longer exists
+// { "analysisY", ArgY, (void *) &junk, FALSE, INVALID }, // provided for compatibility with old ini files/
+// { "analysisW", ArgInt, (void *) &junk, FALSE, INVALID },
+// { "analysisH", ArgInt, (void *) &junk, FALSE, INVALID },
{ "commentX", ArgX, (void *) &wpComment.x, TRUE, (ArgIniType) CW_USEDEFAULT },
{ "commentY", ArgY, (void *) &wpComment.y, TRUE, (ArgIniType) CW_USEDEFAULT },
{ "commentW", ArgInt, (void *) &wpComment.width, TRUE, (ArgIniType) CW_USEDEFAULT },
View
2  autogen.sh
@@ -19,7 +19,7 @@
#
# See the file ChangeLog for a revision history.
-aclocal \
+aclocal -I m4 \
&& autoheader \
&& automake --add-missing \
&& autoconf
View
35 backend.c
@@ -1695,11 +1695,16 @@ HistorySet (char movelist[][2*MOVE_LEN], int first, int last, int current)
{
DisplayBook(current+1);
+if(appData.debugMode) fprintf(debugFP, "History");
MoveHistorySet( movelist, first, last, current, pvInfoList );
+if(appData.debugMode) fprintf(debugFP, "EvalGraph");
EvalGraphSet( first, last, current, pvInfoList );
+if(appData.debugMode) fprintf(debugFP, "EngineOut");
MakeEngineOutputTitle();
+
+if(appData.debugMode) fprintf(debugFP, "done");
}
/*
@@ -2441,6 +2446,7 @@ VariantSwitch (Board board, VariantClass newVariant)
board[i][j+newHoldingsWidth-gameInfo.holdingsWidth] =
board[i][j];
}
+ board[HOLDINGS_SET] = 0;
gameInfo.boardWidth = newWidth;
gameInfo.boardHeight = newHeight;
gameInfo.holdingsWidth = newHoldingsWidth;
@@ -2706,6 +2712,7 @@ read_from_ics (InputSourceRef isr, VOIDSTAR closure, char *data, int count, int
char talker[MSG_SIZ]; // [HGM] chat
int channel;
+if(appData.debugMode) fprintf(debugFP, "read from ICS\n");
connectionAlive = TRUE; // [HGM] alive: I think, therefore I am...
if (appData.debugMode) {
@@ -2806,6 +2813,7 @@ read_from_ics (InputSourceRef isr, VOIDSTAR closure, char *data, int count, int
and we are talking to port 23, which might be a real
telnet server that will try to keep WILL ECHO on permanently.
*/
+if(appData.debugMode) fprintf(debugFP, "next loop %d\n", i);
if (buf_len - i >= 3 && (unsigned char) buf[i] == TN_IAC) {
static int remoteEchoOption = FALSE; /* telnet ECHO option */
unsigned char option;
@@ -3974,6 +3982,7 @@ read_from_ics (InputSourceRef isr, VOIDSTAR closure, char *data, int count, int
started = STARTED_NONE;
parse[parse_pos] = NULLCHAR;
ParseBoard12(parse);
+if(appData.debugMode) fprintf(debugFP, "returned\n");
ics_user_moved = 0;
/* Send premove here */
@@ -4004,6 +4013,7 @@ read_from_ics (InputSourceRef isr, VOIDSTAR closure, char *data, int count, int
}
}
+if(appData.debugMode) fprintf(debugFP, "prompt suppress\n");
/* Usually suppress following prompt */
if (!(forwardMostMove == 0 && gameMode == IcsExamining)) {
while(looking_at(buf, &i, "\n")); // [HGM] skip empty lines
@@ -4013,6 +4023,7 @@ read_from_ics (InputSourceRef isr, VOIDSTAR closure, char *data, int count, int
}
}
next_out = i;
+if(appData.debugMode) fprintf(debugFP, "prompt killed\n");
} else if (started == STARTED_HOLDINGS) {
int gamenum;
char new_piece[MSG_SIZ];
@@ -4102,6 +4113,7 @@ read_from_ics (InputSourceRef isr, VOIDSTAR closure, char *data, int count, int
i++; /* skip unparsed character and loop back */
}
+if(appData.debugMode) fprintf(debugFP, "exit loop: next_out=%d i=%d started=%d leftover=%d\n",next_out,i,started,leftover_start);
if (started != STARTED_MOVES && started != STARTED_BOARD && !suppressKibitz && // [HGM] kibitz
// started != STARTED_HOLDINGS && i > next_out) { // [HGM] should we compare to leftover_start in stead of i?
// SendToPlayer(&buf[next_out], i - next_out);
@@ -4120,6 +4132,7 @@ read_from_ics (InputSourceRef isr, VOIDSTAR closure, char *data, int count, int
} else {
DisplayFatalError(_("Error reading from ICS"), error, 1);
}
+if(appData.debugMode) fprintf(debugFP, "return\n");
}
@@ -4302,6 +4315,7 @@ ParseBoard12 (char *string)
}
if (gameInfo.boardHeight != ranks || gameInfo.boardWidth != files ||
+ move_str[1] == '@' && !gameInfo.holdingsWidth ||
weird && (int)gameInfo.variant < (int)VariantShogi) {
/* [HGM] We seem to have switched variant unexpectedly
* Try to guess new variant from board size
@@ -4311,7 +4325,8 @@ ParseBoard12 (char *string)
if(ranks == 10 && files == 9) newVariant = VariantXiangqi; else
if(ranks == 8 && files == 12) newVariant = VariantCourier; else
if(ranks == 9 && files == 9) newVariant = VariantShogi; else
- if(!weird) newVariant = VariantNormal;
+ if(ranks == 10 && files == 10) newVariant = VariantGrand; else
+ if(!weird) newVariant = move_str[1] == '@' ? VariantCrazyhouse : VariantNormal;
VariantSwitch(boards[currentMove], newVariant); /* temp guess */
/* Get a move list just to see the header, which
will tell us whether this is really bug or zh */
@@ -4838,7 +4853,9 @@ ParseBoard12 (char *string)
}
}
+if(appData.debugMode) fprintf(debugFP, "Set\n");
HistorySet(parseList, backwardMostMove, forwardMostMove, currentMove-1);
+if(appData.debugMode) fprintf(debugFP, "Set done\n");
#if ZIPPY
if(bookHit) { // [HGM] book: simulate book reply
static char bookMove[MSG_SIZ]; // a bit generous?
@@ -13429,11 +13446,6 @@ TwoMachinesEvent P((void))
if (appData.noChessProgram) return;
- if(second.protocolVersion >= 2 && !strstr(second.variants, VariantName(gameInfo.variant))) {
- DisplayError("second engine does not play this", 0);
- return;
- }
-
switch (gameMode) {
case TwoMachinesPlay:
return;
@@ -13472,6 +13484,12 @@ TwoMachinesEvent P((void))
ScheduleDelayedEvent(TwoMachinesEventIfReady, 10);
return;
}
+
+ if(second.protocolVersion >= 2 && !strstr(second.variants, VariantName(gameInfo.variant))) {
+ DisplayError("second engine does not play this", 0);
+ return;
+ }
+
if(!stalling) {
InitChessProgram(&second, FALSE); // unbalances ping of second engine
SendToProgram("force\n", &second);
@@ -13759,11 +13777,11 @@ EditPositionDone (Boolean fakeRights)
boards[0][EP_STATUS] = EP_NONE;
boards[0][CASTLING][2] = boards[0][CASTLING][5] = BOARD_WIDTH>>1;
if(boards[0][0][BOARD_WIDTH>>1] == king) {
- boards[0][CASTLING][1] = boards[0][0][BOARD_LEFT] == WhiteRook ? 0 : NoRights;
+ boards[0][CASTLING][1] = boards[0][0][BOARD_LEFT] == WhiteRook ? BOARD_LEFT : NoRights;
boards[0][CASTLING][0] = boards[0][0][BOARD_RGHT-1] == WhiteRook ? BOARD_RGHT-1 : NoRights;
} else boards[0][CASTLING][2] = NoRights;
if(boards[0][BOARD_HEIGHT-1][BOARD_WIDTH>>1] == WHITE_TO_BLACK king) {
- boards[0][CASTLING][4] = boards[0][BOARD_HEIGHT-1][BOARD_LEFT] == BlackRook ? 0 : NoRights;
+ boards[0][CASTLING][4] = boards[0][BOARD_HEIGHT-1][BOARD_LEFT] == BlackRook ? BOARD_LEFT : NoRights;
boards[0][CASTLING][3] = boards[0][BOARD_HEIGHT-1][BOARD_RGHT-1] == BlackRook ? BOARD_RGHT-1 : NoRights;
} else boards[0][CASTLING][5] = NoRights;
}
@@ -13781,6 +13799,7 @@ EditPositionDone (Boolean fakeRights)
fprintf(debugFP, "EditPosDone\n");
}
DisplayTitle("");
+ DisplayMessage("", "");
timeRemaining[0][forwardMostMove] = whiteTimeRemaining;
timeRemaining[1][forwardMostMove] = blackTimeRemaining;
gameMode = EditGame;
View
1  common.h
@@ -410,6 +410,7 @@ typedef struct {
float timeDelay;
char *timeControl;
Boolean icsActive;
+ Boolean autoBox;
char *icsHost;
char *icsPort;
char *icsCommPort; /* if set, use serial port instead of tcp host/port */
View
2  configure.ac
@@ -28,7 +28,7 @@ dnl| to regenerate configure. Then submit your changes to be folded into
dnl| the standard version of xboard.
dnl| define second argument as VERSION.PATCHLEVEL. e.g. 4.4.0j
-AC_INIT([xboard],[4.6.0-20120405],[bug-xboard@gnu.org])
+AC_INIT([xboard],[4.6.2],[bug-xboard@gnu.org])
dnl| need this to be able to compile some files in a subdir (filebrowser)
AM_INIT_AUTOMAKE([subdir-objects])
View
6 engineoutput.c
@@ -235,7 +235,7 @@ SetProgramStats (FrontEndProgramStats * stats) // now directly called by back-en
}
}
- if(ParseOneMove(ed.pv, currentMove, &moveType, &ff, &rf, &ft, &rt, &pc))
+ if(ed.pv && ed.pv[0] && ParseOneMove(ed.pv, currentMove, &moveType, &ff, &rf, &ft, &rt, &pc))
ed.moveKey = (ff<<24 | rf << 16 | ft << 8 | rt) ^ pc*87161;
else ed.moveKey = ed.nodes; // kludge to get unique key unlikely to match any move
@@ -500,10 +500,10 @@ UpdateControls (EngineOutputData *ed)
unsigned long nps_100 = ed->nodes / ed->time;
if( nps_100 < 100000 ) {
- snprintf( s_label, sizeof(s_label)/sizeof(s_label[0]), "NPS: %lu", nps_100 * 100 );
+ snprintf( s_label, sizeof(s_label)/sizeof(s_label[0]), "%s: %lu", _("NPS"), nps_100 * 100 );
}
else {
- snprintf( s_label, sizeof(s_label)/sizeof(s_label[0]), "NPS: %.1fk", nps_100 / 10.0 );
+ snprintf( s_label, sizeof(s_label)/sizeof(s_label[0]), "%s: %.1fk", _("NPS"), nps_100 / 10.0 );
}
}
View
4 evalgraph.c
@@ -120,8 +120,8 @@ GetValueY (int value)
{
if( value < -range*700 ) value = -range*700;
if( value > +range*700 ) value = +range*700;
- if(value > 100*range) value += appData.zoom * 100 - 100*range; else
- if(value < -100*range) value -= appData.zoom * 100 - 100*range; else
+ if(value > 100*range) value += (appData.zoom - 1)*100*range; else
+ if(value < -100*range) value -= (appData.zoom - 1)*100*range; else
value *= appData.zoom;
return (nHeightPB / 2) - (int)(value * (nHeightPB - 2*MarginH) / ((1200. + 200.*appData.zoom)*range));
}
View
3  moves.c
@@ -1053,7 +1053,8 @@ LegalDrop (Board board, int flags, ChessSquare piece, int rt, int ft)
if(appData.debugMode) fprintf(debugFP, "LegalDrop: %d @ %d,%d)\n", piece, ft, rt);
if(board[rt][ft] != EmptySquare) return ImpossibleMove; // must drop to empty square
n = PieceToNumber(piece);
- if(gameInfo.holdingsWidth == 0 || (flags & F_WHITE_ON_MOVE ? board[n][BOARD_WIDTH-1] : board[BOARD_HEIGHT-1-n][0]) != piece)
+ if((gameInfo.holdingsWidth == 0 || (flags & F_WHITE_ON_MOVE ? board[n][BOARD_WIDTH-1] : board[BOARD_HEIGHT-1-n][0]) != piece)
+ && gameInfo.variant != VariantBughouse) // in bughouse we don't check for availability, because ICS doesn't always tell us
return ImpossibleMove; // piece not available
if(gameInfo.variant == VariantShogi) { // in Shogi lots of drops are forbidden!
if((piece == WhitePawn || piece == WhiteQueen) && rt == BOARD_HEIGHT-1 ||
View
6 winboard/config.h
@@ -46,16 +46,16 @@
#define PACKAGE_NAME "WinBoard"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "WinBoard 4.6.1.20120405"
+#define PACKAGE_STRING "WinBoard 4.6.2"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "winboard"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "4.6.1.20120405"
+#define PACKAGE_VERSION "4.6.2"
/* Define the Windows-specific FILE version info. this *MUST* be four comma separated 16-bit integers */
-#define PACKAGE_FILEVERSION 4,6,0,6
+#define PACKAGE_FILEVERSION 4,6,2,0
#define PTY_ITERATION
View
2  winboard/language.txt
@@ -961,6 +961,8 @@ backend.c
"vs." === ""
"%s (%d reversible plies)" === ""
"Reading game file (%d)" === ""
+"Click clock to clear board" === ""
+"Pull pawn backwards to under-promote" === ""
END-OF-GAME MESSAGES (should they be translated?)
## I think that only for visualization and not for PGN, as PGN files are shared all around the world
View
2  winboard/language/nederlands.lng
@@ -920,6 +920,8 @@ backend.c
"No response from ICS" === "Geen respons van Internet Schaakdienst"
"You cannot do this while you are playing or observing" === "Dit kan niet als u aan het spelen of toeschouwen bent"
"Click in holdings to choose piece" === "Klik in de voorraad om een stuk te kiezen"
+"Click clock to clear board" === "Klik op klok voor leeg bord"
+"Pull pawn backwards to under-promote" === "Trek pion terug voor minor promotie"
END-OF-GAME MESSAGES (should they be translated?)
## I think that only for visualization and not for PGN, as PGN files are shared all around the world
View
1  winboard/winboard.c
@@ -1194,6 +1194,7 @@ InitMenuChecks()
#define OPTCHAR "/"
#define SEPCHAR "="
+#define TOPLEVEL 0
#include "args.h"
View
93 xboard.c
@@ -1570,23 +1570,20 @@ int frameX, frameY;
void
GetActualPlacement (Widget wg, WindowPlacement *wp)
{
- Arg args[16];
- Dimension w, h;
- Position x, y;
XWindowAttributes winAt;
Window win, dummy;
- int i, rx, ry;
+ int rx, ry;
if(!wg) return;
- win = XtWindow(wg);
- XGetWindowAttributes(xDisplay, win, &winAt); // this works, where XtGetValues on XtNx, XtNy does not!
- XTranslateCoordinates (xDisplay, win, winAt.root, -winAt.border_width, -winAt.border_width, &rx, &ry, &dummy);
- wp->x = rx - winAt.x;
- wp->y = ry - winAt.y;
- wp->height = winAt.height;
- wp->width = winAt.width;
- frameX = winAt.x; frameY = winAt.y; // remember to decide if windows touch
+ win = XtWindow(wg);
+ XGetWindowAttributes(xDisplay, win, &winAt); // this works, where XtGetValues on XtNx, XtNy does not!
+ XTranslateCoordinates (xDisplay, win, winAt.root, -winAt.border_width, -winAt.border_width, &rx, &ry, &dummy);
+ wp->x = rx - winAt.x;
+ wp->y = ry - winAt.y;
+ wp->height = winAt.height;
+ wp->width = winAt.width;
+ frameX = winAt.x; frameY = winAt.y; // remember to decide if windows touch
}
void
@@ -1965,6 +1962,61 @@ CreateAnyPieces ()
#endif
}
+char *
+PrintArg (ArgType t)
+{
+ char *p="";
+ switch(t) {
+ case ArgZ:
+ case ArgInt: p = " N"; break;
+ case ArgString: p = " STR"; break;
+ case ArgBoolean: p = " TF"; break;
+ case ArgSettingsFilename:
+ case ArgFilename: p = " FILE"; break;
+ case ArgX: p = " Nx"; break;
+ case ArgY: p = " Ny"; break;
+ case ArgAttribs: p = " TEXTCOL"; break;
+ case ArgColor: p = " COL"; break;
+ case ArgFont: p = " FONT"; break;
+ case ArgBoardSize: p = " SIZE"; break;
+// case Arg: p = ""; break;
+ case ArgTrue:
+ case ArgFalse:
+ case ArgTwo:
+ break;
+ }
+ return p;
+}
+
+void
+PrintOptions ()
+{
+ char buf[MSG_SIZ], *c;
+ int len=0;
+ ArgDescriptor *q, *p = argDescriptors+2;
+ printf("\nXBoard accepts the following options:\n"
+ "(N = integer, TF = true or false, STR = text string, FILE = filename,\n"
+ " Nx, Ny = relative coordinates, COL = color, FONT = X-font spec,\n"
+ " SIZE = board-size spec(s)\n"
+ " Within parentheses are short forms, or options to set to true or false.\n"
+ " Persistent options (saved in the settings file) are marked with *)\n\n");
+ while(p->argName) {
+ if(p->argType == ArgCommSettings) { p++; continue; } // XBoard has no comm port
+ snprintf(buf+len, MSG_SIZ, "-%s%s", p->argName, PrintArg(p->argType));
+ if(p->save) strcat(buf+len, "*");
+ for(q=p+1; q->argLoc == p->argLoc; q++) {
+ if(q->argName[0] == '-') continue;
+ strcat(buf+len, q == p+1 ? " (" : " ");
+ sprintf(buf+strlen(buf), "-%s%s", q->argName, PrintArg(q->argType));
+ }
+ if(q != p+1) strcat(buf+len, ")");
+ len = strlen(buf);
+ if(len > 39) len = 0, printf("%s\n", buf); else while(len < 39) buf[len++] = ' ';
+ p = q;
+ }
+ if(len) buf[len] = NULLCHAR, printf("%s\n", buf);
+}
+
int
main (int argc, char **argv)
{
@@ -1989,6 +2041,11 @@ main (int argc, char **argv)
exit(0);
}
+ if(argc > 1 && !strcmp(argv[1], "--help" )) {
+ PrintOptions();
+ exit(0);
+ }
+
programName = strrchr(argv[0], '/');
if (programName == NULL)
programName = argv[0];
@@ -3922,7 +3979,6 @@ AppendEnginesToMenu (Widget menu, char *list)
{
int i=0, j;
Widget entry;
- MenuItem *mi;
Arg args[16];
char *p;
@@ -4984,7 +5040,9 @@ XDrawPosition (Widget w, int repaint, Board board)
void
DrawPositionProc (Widget w, XEvent *event, String *prms, Cardinal *nprms)
{
+if(appData.debugMode) fprintf(debugFP, "drawpositionproc\n");
XDrawPosition(w, True, NULL);
+if(appData.debugMode) fprintf(debugFP, "drawn\n");
}
@@ -5119,7 +5177,7 @@ FileNamePopUp (char *label, char *def, char *filter, FileProc proc, char *openMo
fileProc = proc; /* I can't see a way not */
fileOpenMode = openMode; /* to use globals here */
{ // [HGM] use file-selector dialog stolen from Ghostview
- int index; // this is not supported yet
+ // int index; // this is not supported yet
if(openFP = XsraSelFile(shellWidget, label, NULL, NULL, _("could not open: "),
(def[0] ? def : NULL), filter, openMode, NULL, &openName))
// [HGM] delay to give expose event opportunity to redraw board after browser-dialog popdown before lengthy load starts
@@ -6254,10 +6312,10 @@ FlipViewProc (Widget w, XEvent *event, String *prms, Cardinal *nprms)
void
PonderNextMoveProc (Widget w, XEvent *event, String *prms, Cardinal *nprms)
{
- Arg args[16];
-
PonderNextMoveEvent(!appData.ponderNextMove);
#ifndef OPTIONSDIALOG
+ Arg args[16];
+
if (appData.ponderNextMove) {
XtSetArg(args[0], XtNleftBitmap, xMarkPixmap);
} else {
@@ -7723,6 +7781,7 @@ DoInputCallback (caddr_t closure, int *source, XtInputId *xid)
int error;
char *p, *q;
+if(appData.debugMode) fprintf(debugFP, "input callback\n");
if (is->lineByLine) {
count = read(is->fd, is->unused,
INPUT_SOURCE_BUF_SIZE - (is->unused - is->buf));
@@ -7744,6 +7803,7 @@ DoInputCallback (caddr_t closure, int *source, XtInputId *xid)
*q++ = *p++;
}
is->unused = q;
+if(appData.debugMode) fprintf(debugFP, "line done\n");
} else {
count = read(is->fd, is->buf, INPUT_SOURCE_BUF_SIZE);
if (count == -1)
@@ -7751,6 +7811,7 @@ DoInputCallback (caddr_t closure, int *source, XtInputId *xid)
else
error = 0;
(is->func)(is, is->closure, is->buf, count, error);
+if(appData.debugMode) fprintf(debugFP, "block done\n");
}
}
View
6 xgamelist.c
@@ -428,7 +428,7 @@ GameListReplace (int page)
// filter: put in separate routine, to make callable from call-back
Widget listwidg;
Arg arg;
- char buf[MSG_SIZ], *p, **st=list;
+ char buf[MSG_SIZ], **st=list;
int i;
if(page) *st++ = _("previous page"); else if(listLength > 1000) *st++ = "";
@@ -442,7 +442,8 @@ GameListReplace (int page)
XawListChange(listwidg, list, 0, 0, True);
XtSetValues(listwidg, &arg, 1);
HighlightWithScroll(listwidg, 0, listLength);
- snprintf(buf, MSG_SIZ, _("%s - %d/%d games (%d-%d-%d)"), glc->filename, listLength, ((ListGame *) gameList.tailPred)->number, wins, losses, draws);
+ snprintf(buf, MSG_SIZ, _("%s - %d/%d games (%d-%d-%d)"), glc->filename, listLength,
+ ((ListGame *) gameList.tailPred)->number, wins, losses, draws);
XtSetArg(arg, XtNtitle, buf);
XtSetValues(glc->shell, &arg, 1);
}
@@ -520,7 +521,6 @@ GameListPopUp (FILE *fp, char *filename)
{
Arg args[16];
int j;
- char **st;
if (glc == NULL) {
glc = (GameListClosure *) calloc(1, sizeof(GameListClosure));
View
76 xoptions.c
@@ -587,6 +587,7 @@ Option icsOptions[] = {
{ 0, 0, 0, NULL, (void*) &appData.quietPlay, "", NULL, CheckBox, N_("Quiet Play") },
{ 0, 0, 0, NULL, (void*) &appData.seekGraph, "", NULL, CheckBox, N_("Seek Graph") },
{ 0, 0, 0, NULL, (void*) &appData.autoRefresh, "", NULL, CheckBox, N_("Auto-Refresh Seek Graph") },
+{ 0, 0, 0, NULL, (void*) &appData.autoBox, "", NULL, CheckBox, N_("Auto-InputBox PopUp") },
{ 0, 0, 0, NULL, (void*) &appData.premove, "", NULL, CheckBox, N_("Premove") },
{ 0, 0, 0, NULL, (void*) &appData.premoveWhite, "", NULL, CheckBox, N_("Premove for White") },
{ 0, 0, 0, NULL, (void*) &appData.premoveWhiteText, "", NULL, TextBox, N_("First White Move:") },
@@ -858,43 +859,45 @@ GenericUpdate (int selected)
{
int i, j;
char buf[MSG_SIZ];
- float x;
- for(i=0; ; i++) {
- if(selected >= 0) { if(i < selected) continue; else if(i > selected) break; }
- switch(currentOption[i].type) {
- case TextBox:
- case FileName:
- case PathName:
- SetWidgetText(&currentOption[i], *(char**) currentOption[i].target, -1);
- break;
- case Spin:
- sprintf(buf, "%d", *(int*) currentOption[i].target);
- SetWidgetText(&currentOption[i], buf, -1);
- break;
- case Fractional:
- sprintf(buf, "%4.2f", *(float*) currentOption[i].target);
- SetWidgetText(&currentOption[i], buf, -1);
- break;
- case CheckBox:
- SetWidgetState(&currentOption[i], *(Boolean*) currentOption[i].target);
- break;
- case ComboBox:
- for(j=0; currentOption[i].choice[j]; j++)
- if(*(char**)currentOption[i].target && !strcmp(*(char**)currentOption[i].target, currentOption[i].choice[j])) break;
- values[i] = currentOption[i].value = j + (currentOption[i].choice[j] == NULL);
- // TODO: actually display this
- break;
- case EndMark:
- return;
- default:
- printf("GenericUpdate: unexpected case in switch.\n");
- case Button:
- case SaveButton:
- case Label:
- case Break:
- break;
- }
+
+ for(i=0; ; i++)
+ {
+ if(selected >= 0) { if(i < selected) continue; else if(i > selected) break; }
+ switch(currentOption[i].type)
+ {
+ case TextBox:
+ case FileName:
+ case PathName:
+ SetWidgetText(&currentOption[i], *(char**) currentOption[i].target, -1);
+ break;
+ case Spin:
+ sprintf(buf, "%d", *(int*) currentOption[i].target);
+ SetWidgetText(&currentOption[i], buf, -1);
+ break;
+ case Fractional:
+ sprintf(buf, "%4.2f", *(float*) currentOption[i].target);
+ SetWidgetText(&currentOption[i], buf, -1);
+ break;
+ case CheckBox:
+ SetWidgetState(&currentOption[i], *(Boolean*) currentOption[i].target);
+ break;
+ case ComboBox:
+ for(j=0; currentOption[i].choice[j]; j++)
+ if(*(char**)currentOption[i].target && !strcmp(*(char**)currentOption[i].target, currentOption[i].choice[j])) break;
+ values[i] = currentOption[i].value = j + (currentOption[i].choice[j] == NULL);
+ // TODO: actually display this
+ break;
+ case EndMark:
+ return;
+ default:
+ printf("GenericUpdate: unexpected case in switch.\n");
+ case Button:
+ case SaveButton:
+ case Label:
+ case Break:
+ break;
}
+ }
}
int
@@ -1701,6 +1704,7 @@ MoveTypeInProc (Widget widget, caddr_t unused, XEvent *event)
)
{
if(appData.icsActive) { // text typed to board in ICS mode: divert to ICS input box
+ if(!appData.autoBox) return;
if(shells[4]) { // box already exists: append to current contents
char *p, newText[MSG_SIZ];
GetWidgetText(&boxOptions[0], &p);

No commit comments for this range

Something went wrong with that request. Please try again.