xboard.git
6 years agoFix Seirawan gating at Rook square in PGN castling moves v4.9.x
H.G.Muller [Wed, 8 Nov 2017 10:30:05 +0000]
Fix Seirawan gating at Rook square in PGN castling moves

The 'reverse gatings' were written as RxK also in PGN, which was ugly.
Now a file disambiguator behind the ID of the gated piece is used for
all castling gatings (also those at the King square). On input omission
of the disambiguator defaults to King square.

6 years agoFix RxK castling from engine in variant seirawan
H.G.Muller [Tue, 7 Nov 2017 20:53:01 +0000]
Fix RxK castling from engine in variant seirawan

The RxK notation for castling with gating at the Rook square was mistaken
for a non-compliant castling notation in games without Fischer castling,
and corrected to the compliant notation by adjusting the to-square, assumed
to be the Rook. But this backfired for RxK, where it is the King. Now
castlings with the to-square on the central file are exempted from this
correction.

6 years agoAdd option -defaultInstallProtocol
H.G.Muller [Thu, 2 Nov 2017 11:43:23 +0000]
Add option -defaultInstallProtocol

A persistent option is added to determine the initial setting of the
protocol-selector combobox in the Load Engine dialog. It must be given
a value 0-4 corresponding to the choice order. This is mainly intended
for configuring Shogi or Xiangqi packages, to select USI or USI (for which
auto-detection does not work).

6 years agoAdd option -defaultEngineInstallDir (XB)
H.G.Muller [Thu, 2 Nov 2017 11:25:10 +0000]
Add option -defaultEngineInstallDir (XB)

A new option is added to configure what appears in the Directory text
entry of the Load Engine dialog when you pop that up. It is volatile,
and intended for use in the masted config file, to set what is convenient
for Linux or OS X.

6 years agoPay attention to dont-add-to-list checkbox again
H.G.Muller [Thu, 2 Nov 2017 11:14:13 +0000]
Pay attention to dont-add-to-list checkbox again

Although it is questionable whether this checkbox will remain in the log
run, as long as it is there we better obey it.

6 years agoFix installing chosen protocols
H.G.Muller [Mon, 30 Oct 2017 22:00:42 +0000]
Fix installing chosen protocols

6 years agoRedesign XBoard Load Engine dialog
H.G.Muller [Mon, 30 Oct 2017 21:56:15 +0000]
Redesign XBoard Load Engine dialog

The XBoard Load Engine dialog now also uses a combobox for protocol
selection, and the order of the controls is changes, with some extra
explanatory text.

6 years agoFix installing with chosen protocol
H.G.Muller [Mon, 30 Oct 2017 21:54:12 +0000]
Fix installing with chosen protocol

The tryNr variable should be set by the Load Engine dialog even when
there is no auto-detection, to make the engine be added to the list.

6 years agoFix chosen WB v1 install
H.G.Muller [Mon, 30 Oct 2017 21:24:30 +0000]
Fix chosen WB v1 install

The autodetect patch had made it impossible to force an engine to be
installed as WB v1, because the v1 flag set by the dialog was overwritten.

6 years agoRedesign WinBoard Load Engine dialog
H.G.Muller [Mon, 30 Oct 2017 17:11:24 +0000]
Redesign WinBoard Load Engine dialog

The checkboxes for protocol choice are replaced by a combobox, which
also contains an autodetect option. This is encoded through the kludge
of setting isUCI = 3.
 The fields that do not usually have to be specified are now put in
group boxes, which make it more clear the user can ignore them.
For this a ew control type GroupBox had to be defined, and supported
in the GenericPopup.

6 years agoAlso update engine list when saving engine settings
H.G.Muller [Sun, 29 Oct 2017 21:20:48 +0000]
Also update engine list when saving engine settings

The 'Make Persistent' button in the Engine Settings dialog will now
also cause the -engineList file to be read before being processed,
and be written back after it, to keep the list up to date for all
open XBoard instances. There still is a problem here, that when another
instance has changed settings of the currently loaded engine, this engine
is no longerrecognized as being in the list. But at least the user will
be warned in such a case that makig the settings change persistent has
failed.

6 years agoImplement separate engine list for WinBoard
H.G.Muller [Sun, 29 Oct 2017 19:54:37 +0000]
Implement separate engine list for WinBoard

Reading the engine list before popping up Edit Engine List and Load Engine
is now also done in WinBoard.

6 years agoLocate engine list in separate file
H.G.Muller [Sun, 29 Oct 2017 19:34:37 +0000]
Locate engine list in separate file

The option -firstChessProgramNames, which contains the list of registered
engines, can now be kept in a dedicated settings file. This file will
be read at startup after the normal settings file and command-line
arguments. It will also be read and saved when dialogs altering the
engine list are used (Load Engine and Edit Engine List). This will
effectively cause changes in the engine list made by any XBoard instance
to be instantly broadcasted to all other instances. The name of this
engine-list file can be specified by the new persistent option -engineList.
If this is set to an empty string (the default), this new feature will
not be used, and the list in the normal settings file will be used
as always. This list is currently still written in the user settings file,
together with the other settings.

6 years agoDecrease feature timeout to 1 sec
H.G.Muller [Sun, 29 Oct 2017 15:02:35 +0000]
Decrease feature timeout to 1 sec

The feature timeout used to be 10 sec, which seems ridiculously long
at present-day computer speeds. It is reduced to 1 sec, but actually
twice this will be used because of the "uci" probe that will follow the
"protover 2" probe, and will use the same timeout.

6 years agoImplement (unconditional) protocol auto-detection
H.G.Muller [Sun, 29 Oct 2017 14:56:10 +0000]
Implement (unconditional) protocol auto-detection

By sending "uci" to the engine after the feature timeout expires,
and redoing the engine replacement with UCI ticked when "uciok" is
received, UCI engines will install properly even when they are first
assumed to be CECP engines. An extra timeout period is taken to wait
for the possible "uciok" response. If this expires too, the engine is
assumed to be WB v1.
  Adding the engine to the engine list had to be deferred until the
protocol is known. This means the "-protocolVersion 1" option can now
also automatically added to the engine line for v1 engines.

7 years agoDo not accept engine 50-move claims in Makruk
H.G.Muller [Wed, 22 Feb 2017 19:53:32 +0000]
Do not accept engine 50-move claims in Makruk

Normally draw claims are always accepted after 100 reversible ply, even
when -ruleMoves is set different from 50. In Makruk this would allow
engines to cheat, as there is in general no 50-move limitation there.
Now the claims are considered false (but adjudication can still be
configured).

7 years agoImplement Makruk counting rules
H.G.Muller [Wed, 22 Feb 2017 19:34:36 +0000]
Implement Makruk counting rules

Adjudication is now performed based on the Makruk counting rules, assuming
the players count in the way most favorable for them. This means that when
the maximum count is N, the game is adjudicated draw immediately after the
Nth move since the counting could have started when the opponent is bared,
but only on the next move when not, to give him the opportunity to checkmate
when he was not counting. This adjudication is switched off if -ruleMoves
is set to a negative value, (normally this would be 0 in Makruk), and is
also dependent on legality testing being on.

7 years agoRemove castling rights from Suicide start position
H.G.Muller [Wed, 1 Feb 2017 12:15:25 +0000]
Remove castling rights from Suicide start position

Suicide was initialized with castling rights, while the move generator
in fact would suppress any castling. The fake rights would appear in FENs,
and break probing of the GUI book.

7 years agoFix e.p. capture in ICS play
H.G.Muller [Tue, 17 Jan 2017 17:53:27 +0000]
Fix e.p. capture in ICS play

The new e.p. rights were not set when the position was obtained
by parsing an ICS board, rather than from applying a move to a previous
position.

7 years agoLet repeated right-clicking upgrade placed piece in Edit Position mode
H.G.Muller [Fri, 13 Jan 2017 13:51:33 +0000]
Let repeated right-clicking upgrade placed piece in Edit Position mode

Right-clicking a square multiple timesin Edit Position mode will now make
it cycle through all pieces defined in the pieceToCharTable.
  When -monoMouse is set a click on an occupied square is interpreted as
a left-click. But an exception is now made for the piece that was just
placed: this will be treated as a right-click, so that this feature is
also accessible in monoMouse mode.

7 years agoFix usage of memory after free in -replace option
H.G.Muller [Fri, 13 Jan 2017 12:26:44 +0000]
Fix usage of memory after free in -replace option

The code for implementing the -replace option was using a string after
its memory was freed, which might not work in all allocation systems.

7 years agoAllow Make Persistent on engine loaded from recent-engine menu
H.G.Muller [Fri, 13 Jan 2017 12:22:27 +0000]
Allow Make Persistent on engine loaded from recent-engine menu

This method of loading an engine from the list was not yet recorded
in the currentEngine[] array.

7 years agoUse feature timeout when starting second engine for analysis
H.G.Muller [Thu, 5 Jan 2017 21:30:41 +0000]
Use feature timeout when starting second engine for analysis

When the second engine gets ivolved in the analysis, but has not been
used before, so that its features are unknown, we now wait for these
features (or time out in case of v1 engines) before initializing the
engine. Without this 'edit' could be used on engines that need 'setboard',
or false 'unsupported variant' errors could arise.

7 years agoFix awareness of settings changed by -firstOption
H.G.Muller [Thu, 5 Jan 2017 16:05:22 +0000]
Fix awareness of settings changed by -firstOption

Options of the type -file and -path that were set through -firstOptions
would not get their 'current value' updated, so that XBoard would not
set them properly on a reload because of reuse=0. In addition the default
value for all option types would be remembered as the value specified
by -firstOptions, rather than the engine default, possibly preventing
their saving on Make Persistent.

7 years agoFix ICS Crazyhouse play
H.G.Muller [Wed, 4 Jan 2017 19:40:08 +0000]
Fix ICS Crazyhouse play

The new way to associate promoted partners to pieces had woken up a latent
bug in the code that determined whether pieces in the ICS board are promoted
Pawns. This led to Pawns appearing out of nowhere on squares evacuated by
white Pawns.

7 years agoMake holdings scrollable
H.G.Muller [Sun, 25 Dec 2016 16:20:30 +0000]
Make holdings scrollable

When the hand size exceeds the number of board ranks R, the holdings will
either display either the first R-1 or last R-1 piece types. The remaining
square will then act as a toggle button between the two states. If there
is indeed material that is not displayed, the toggle square will display
a Prince of the opposite color. (The idea is that themes for games needing
this feature would define this piece as a vertical arrow glyph.)

7 years agoCorrect promotion zone for blacked-out ranks
H.G.Muller [Thu, 22 Dec 2016 20:22:28 +0000]
Correct promotion zone for blacked-out ranks

When the window height has to be larger than the board height, to accomodate
the holdings (as in Wa Shogi), this is done by defining the board height as
large as the holdings size, and blacking out the extra ranks. But when the
depth is calculated as 1/3 of the board height, it should use the real
board height, not the artificially enlarged one.

7 years agoDecouple board height from hand size
H.G.Muller [Thu, 22 Dec 2016 19:28:47 +0000]
Decouple board height from hand size

To make it possible to have holdings larger than the height of the board
window, (of which a selectable subset ca then be displayed), the holdings
size is now referred to a separate variable.

7 years agoGeneralize FEN e.p. field to handle diagonal and triple pushes
H.G.Muller [Tue, 6 Dec 2016 16:19:00 +0000]
Generalize FEN e.p. field to handle diagonal and triple pushes

In Berolina Chess a single square canot unambiguously indicate which
e.p. capture ispossible, as two initial double-pushes could cross over
the same square (and a 4th-rank Pawn could have come from two 2nd-rank
locations). So both the skipped square and the location of the corresponding
e.p.victim have to be mentioned in the e.p. field of a FEN. This is now
supported (in variant Berolina) on both reading and writing.
  In addition, the test for when an e.p. field has to be added is improved.
It was still using hard-coded rank numbers, only acting on 2->4 and 7->5
Pawn moves that stayed on the same file. Now it works on any advance of
more than one rank. For pushes of more than one rank the e.p. square is
biased towards the from-square. This makes it possible to distinguish
between a triple and a double-push that end on the same rank.

7 years agoFix recognition of variant seirawan in examined ICS games
H.G.Muller [Tue, 6 Dec 2016 11:46:07 +0000]
Fix recognition of variant seirawan in examined ICS games

The heuristic for guessing the variant when receiving an ICS holdings
command assumed Crazyhouse when the board width was 8, which prevented
correct interpretation of the holdings content. Now presence of H or E
in the holdings alter the guess to Seirawan Chess.

7 years agoImplement check-count field in FENs
H.G.Muller [Mon, 5 Dec 2016 12:22:40 +0000]
Implement check-count field in FENs

A field of the form N+M between e.p. field and ply counter is now associated
with the CHECK_COUNT game state on reading and writing. It is only written
when non-zero (which again should only happen in 3check). In addition a field
of the form +N+M after the full-move number is recognized on reading as the
SCIDB check counter, which indicates checks given.

7 years agoKeep track of number of remaining checks
H.G.Muller [Mon, 5 Dec 2016 11:01:17 +0000]
Keep track of number of remaining checks

Another off-board square is now allocated forkeeping track of the number
of remaining checks each side can suffer before losing. When this double
counter is 0, counting is disabled. Otherwise each check will decrease
the count of the checked side, and when it reaches 0 the check will be
treated as a checkmate. In variant 3check the counters will be initialized
to 3, otherwise to 0.

7 years agoRemeber last-moved piece in only one Board square
H.G.Muller [Mon, 5 Dec 2016 10:15:48 +0000]
Remeber last-moved piece in only one Board square

The amount of game-state data (castling rights, e.p. state...) carried
along in the extra rank above the real board is getting a bit out of hand.
Rather than storing rank and file of the last-moved piece in two separate
off-board squares in that rank, we now combine them into a single number
(which would still allow boards of upto 64 files).

7 years agoFix legality testing with mandatory capture
H.G.Muller [Mon, 5 Dec 2016 08:54:30 +0000]
Fix legality testing with mandatory capture

When a capture was possible in suicide/giveaway/losers, only the board
markers of all non-captures were cleared, but not the legality of the
corresponding destination squares in the array legal[][]. The patch that
forced destinations to be legal when the engine had highlighted them had
therefore broken rejection of illegal non-captures in this case.

7 years agoAdd msimg32 library to makefile.gcc for WinBoard build
H.G.Muller [Fri, 2 Dec 2016 10:16:52 +0000]
Add msimg32 library to makefile.gcc for WinBoard build

The AlphaBlend function would be an undefined reference without this library.

7 years agoFix Game List highlighting (WB)
H.G.Muller [Fri, 2 Dec 2016 08:25:13 +0000]
Fix Game List highlighting (WB)

The binary search for finding the current game amongst the listed ones
in the Game List was not looking in the first 32 displayed entries.

7 years agoAlso allow Make Persist on engines loaded through -fe / -se
H.G.Muller [Fri, 2 Dec 2016 08:09:18 +0000]
Also allow Make Persist on engines loaded through -fe / -se

The options -fe and -se are another way to select engines from the list,
and MakePersistent should also work in this case. So the engine lines
retrieved for the given nicks are now also remembered.

7 years agoReport error when saving of engine settings fails
H.G.Muller [Fri, 2 Dec 2016 08:00:19 +0000]
Report error when saving of engine settings fails

When the current engine was not chosen from the Engine List, or is no
loger in there, we now print a complaint in the message field.

7 years agoRemember engine lines selected in Startup Dialog (WB)
H.G.Muller [Fri, 2 Dec 2016 07:48:20 +0000]
Remember engine lines selected in Startup Dialog (WB)

The comboboxes in the Startup Dialog do contain complete engine lines
from the Engine List, so selecting an engine from there should also allow
use of the Make Persistent button in the Engine Settings dialogs. To this
end the selected lines are now remembered incurrentEngine[].

7 years agoAllow WinBoard to use bitmaps with alpha channel
H.G.Muller [Wed, 30 Nov 2016 21:27:35 +0000]
Allow WinBoard to use bitmaps with alpha channel

When the primary image of a piece (*o.bmp or *s.bmp) has a format with
32 bit/pixel, it is assumed to be in ARGB format, with transparent
background. It is then drawn over the board accordingly by new code
(using the Win API AlphaBlend routine). This code ignores the allWhite
and flipBlack options for the moment.
  The cascade for loading bitmaps has been changed as well: WinBoard
now first tries to load an image with name like piece0_49o.bmp from the
pieceImageDirectory if the traditional name (like p49o.bmp) is not found,
before falling back on built-in images.

7 years agoMake it possible to save XBoard piece images as Windows bitmaps
H.G.Muller [Wed, 30 Nov 2016 16:16:50 +0000]
Make it possible to save XBoard piece images as Windows bitmaps

A new option -bmpSave N would make XBoard save the images of the first
N pieces of each color, plus the King, as a Windows .bmp file with alpha
channel (32 bits/pixel). This happens in a sub-directory 'bmaps'. After the
black King is saved, XBoard will exit.

7 years agoImplement less kludgy way for conditional string options
H.G.Muller [Wed, 30 Nov 2016 13:46:07 +0000]
Implement less kludgy way for conditional string options

A new option -replace can now define a string, and when the existing value
of the next encountered string option does not exactly match that, the
latter is ignored. The @@@@@ kludge for conditionally replacing empty
strings is removed, as this can now be achieved through -replace "".
The value of -replace is reset to NULL (not ""!) as soon as it has been
used for comparison, irrespective of the result. This makes -replace a
'hyper-volatile' option.
 The conditional setting of UCI2WB as -uxiAdapter in xboard.conf is now
changed to use this mechanism.

7 years agoAdd Tower, Sword and Gnu piece images (WB)
H.G.Muller [Sat, 26 Nov 2016 10:39:24 +0000]
Add Tower, Sword and Gnu piece images (WB)

Bitmaps for the Tower and Sword piece types are added to WinBoard for
size bulky (72x72) and middling (49x49), so the first 26 contiguous pieces
all have built-in images in these sizes. Gnu images are also added.

7 years agoOnly consider kingless positions as in-check in Atomic
H.G.Muller [Sun, 27 Nov 2016 22:35:24 +0000]
Only consider kingless positions as in-check in Atomic

The check test returned 1000 (as special version of TRUE) when there
was no King that could be exposed to capture, under the assumption that
this would mean it had been exploded by the preceding move. But this was
counter-productive in variants without King (such as Horde). So now it
is only done in Atomic Chess, and all other variants return FALSE if there
is nothing on the board that could be checked.

7 years agoImplement understanding of Xiangqi UBB format
H.G.Muller [Sun, 27 Nov 2016 22:19:14 +0000]
Implement understanding of Xiangqi UBB format

Xiangqi games are often distributed in HTMLpages in a compressed format
iterpreted by a viewer script. XBoard's game parser now understands this
format.

7 years agoConfigure XBoard to use UCI2WB as adapter for UCI dialects
H.G.Muller [Sun, 27 Nov 2016 20:57:50 +0000]
Configure XBoard to use UCI2WB as adapter for UCI dialects

The -uxiAdapter option is conditionally set for using UCI2WB in the
master settings file, in a way that would overrule the user settings
only if the latter still has it as an empty string.

7 years agoIntroduce contitional string options
H.G.Muller [Sun, 27 Nov 2016 17:03:51 +0000]
Introduce contitional string options

A string option that specifies a value starting with "@@@@@" (five at signs)
will be treated in a special way: if the current value of this option is
not the empty string, it will not be changed. If it is, it will be set
to the given value after the @@@@@ prefix has been stripped off the latter.
 This is introduced to make it possible to set hitherto unused persistent
options from the master settings file, by includig them in the latter after
the user settigs file was read. Options in this location will overrule
whatever was in the saved settings, effectively making the option volatile
with a new default. But by using the @@@@@ prefix for the value, users
that already have assigned a value to the option will not be affected,
and only for users that were not yet using the option a new value will
be defined for it.

7 years agoFix saving engine settings after registering new engine
H.G.Muller [Sun, 27 Nov 2016 16:30:25 +0000]
Fix saving engine settings after registering new engine

The remebered currentEgine after a new registration through the Load Engine
dialog would be terminated by a linefeed, unlike after loading an engine
that already was in the list. This caused the -firstOptions to be added
on the next line. Now both cases omit the linefeed.

7 years agoImplement saving of (modified) engine settings
H.G.Muller [Sun, 27 Nov 2016 13:47:03 +0000]
Implement saving of (modified) engine settings

The Engine #N Settings dialogs will now have an extra button at the top,
labelled "Make Persistent". Pressing it will 'OK' the dialog, and in
addition will add all non-default settings of the options to the engine
line in the Engine List (-firstChessProgramNames), as a -firstOptions
XBoard option. If such an option is already in the engine line, its value
will be altered to the newly specified settings. The function ResendOptions
was modified to also allow returning the options as a string, rather
than sending them as 'option' commands to the engine.
 Currently this will only work for engines that were loaded through the
Load Engine dialogs, not for those specified with -fcp/scp at startup.
Because the latter need not be in the engine list. The Load Engine
dialogs will make XBoard remember the entire engine line of the engine
that was last loaded, and pressing the button will search a line exactly
like it in the engine list, to add/change its -firstOptions option.
It would fail silently if no such line is found.

7 years agoOnly resend changed options on xreuse restart
H.G.Muller [Sat, 26 Nov 2016 12:56:16 +0000]
Only resend changed options on xreuse restart

For engines that specify reuse=1, a new engine process is started for
every game. This new process is made aware of the option settings as
they were specified by the user during the live of its predecessors.
Now this resending is limited to the options that have different value
from their original default. To achieve that, the default values are
now remembered (in the last 104 bytes of the Option.name buffer, which
was allocated way too large): 4 bytes for integet value, 99 char text.

7 years agoFix storage of values of engine string options
H.G.Muller [Sat, 26 Nov 2016 11:33:54 +0000]
Fix storage of values of engine string options

Originally all option definitions given in option features were stored
in a static array of generous size (MSG_SIZ). But this was changed to
allocated memory for not wasting space on unused option slots. The allocated
memory wasonly large enough to hold the default value of the option,
which could very well be an empty string. Changing the option setting
to a longer strig would then produce memory corruption through buffer overrun.
Now the memory allocated for option features is again at least MSG_SIZ.

7 years agoFix bug in storing time of first move
H.G.Muller [Fri, 25 Nov 2016 21:59:35 +0000]
Fix bug in storing time of first move

TwoMachinesEvent() reset the clocks for re-calculating time odds (as the
first engine would play white, while any previous Reset() would have
assumed it played black). But it did not save the start time in the
tmeReamaining array. Actually TwoMachinesEvent() was not supposed to
unconditionally reset the clocks, and this bug was introduced when the
ResetClocks was moved out of the conditional, separating it from saving
the start times. It is nowput back inside the conditional, but the
condition is now also incorporating the case TwoMachineEvent() was called
at the start of a game (i.e. no moves done). When used to resume a game
in progress it keeps the existing clocks (except for engines that do not
support time/otim).

7 years agoImprove identification of e.p. victim
H.G.Muller [Thu, 24 Nov 2016 18:47:46 +0000]
Improve identification of e.p. victim

The move generator now generates e.p. moves of default Pawns based on
the file of the skipped square of the previous multi-push, rather than
the e.p. rights (which were set only if ApplyMove suspects an e.p. capture
is actually possible, which might not be the case when opponent Pawns do
not capture as expected). A standard Pawn capturing to an empty square
will now always capture the previously multi-pushed Pawn. Only if there
is none it will guess where the victim should be based on FIDE rules,
and would not capture any non-Pawns in that location.
  This heuristic should work for default Pawns against any other kind
of Pawn. The existence of e.p. rights might not be recognized when
comparing positions, however, so that rep draws could be declared after
a two-fold repetition.

7 years agoTreat Betza-defined e.p. capture
H.G.Muller [Wed, 23 Nov 2016 16:46:20 +0000]
Treat Betza-defined e.p. capture

Pieces with redefined moves that include an e.p. capture will now
not be subject to the heuristic that deletes a suspected e.p. victim
during board update (which was only applied to Pawns and Lances).
When they move to the e.p. square (still set by Pawn or Lance multi-
pushes in the old hard-coded way), this will remove the last-moved piece
(which created those e.p. rights).

7 years agoDetect breaking of input pipe from engines (GTK)
H.G.Muller [Wed, 23 Nov 2016 14:17:03 +0000]
Detect breaking of input pipe from engines (GTK)

In the GTK version the input events were not set up to trigger when
the pipe broke, which led to delayed detection of crashing engines.

7 years agoObey -firstFeatures option at startup
H.G.Muller [Wed, 23 Nov 2016 14:13:40 +0000]
Obey -firstFeatures option at startup

The -firstFeatures, which are supposed to overrule features of the first
engine, were ignored when this engine was loaded at startup.

7 years agoupdates NEWS, Changelog, DIFFSTAT and SHORTLOG
Arun Persaud [Mon, 1 Aug 2016 03:53:21 +0000]
updates NEWS, Changelog, DIFFSTAT and SHORTLOG

7 years agoupdated po/pot files
Arun Persaud [Mon, 1 Aug 2016 03:46:54 +0000]
updated po/pot files

7 years agonew version number for release 4.9.1
Arun Persaud [Mon, 1 Aug 2016 03:45:22 +0000]
new version number for release 4.9.1

7 years agoFix crash when logging out from ICS
H.G.Muller [Thu, 28 Jul 2016 17:49:02 +0000]
Fix crash when logging out from ICS

The patch that sent "logout" to the ICS on a fatal error backfired when
the 'fatal error' was a disconnect, and caused a crash on Mac. We now
suppress sending of this "logout" command in the disconnect case,
communicated in a kludgy way (by requesting exit status 6666).

7 years agoDefer book faking input move until ping balance
H.G.Muller [Thu, 28 Jul 2016 12:24:27 +0000]
Defer book faking input move until ping balance

The use of ping after editing a position had broken the book handling:
'go' would be sent in the same batch of commands as this 'ping', so that
in case of a book hit the book move selected on behalf of the engine
would be fed back to XBoard before the engine had the opportunity to
restore the ping balanceby sending 'pong'. Now the book move is fed
through ScheduleDelayedEvent(DeferredBookMove) rather than instantly,
when a MachineWhite/BlackEvent sets the engine playing.

7 years agoFix setting up btm positions with 'edit'
H.G.Muller [Tue, 26 Jul 2016 20:04:14 +0000]
Fix setting up btm positions with 'edit'

The kludge to put black on move through a2a3 only works when there is
a (normally moving) Pawn on a2. Otherwise the 'black' command has to be
used. But this did take the engine out of force mode. So now we send
another 'force' command after this 'black'.

7 years agoFix bare King adjudication
H.G.Muller [Fri, 22 Jul 2016 07:12:36 +0000]
Fix bare King adjudication

The increase of the number of piece types to 66 gave the BlackKing code
131, wich is > 127, so that using a signed char for it makes it < 0.
This cause the black King in the adjudication code to be seen as a white
piece. When black then checkmates with 2 pieces, only 1 piece is seen
(Q), and then assumed to be a bare King! Now the piece value is passed
through an (int) to prevent this.

7 years agoFix check testing in games without King
H.G.Muller [Sun, 17 Jul 2016 21:53:17 +0000]
Fix check testing in games without King

A position without King was always considered as in check (because of
Atomic), which is rather illogical and undesirable in games where no
King participates (as it makes every move illegal).

7 years agoFix disambiguating Pawn moves in Xiangqi
H.G.Muller [Sun, 17 Jul 2016 21:14:10 +0000]
Fix disambiguating Pawn moves in Xiangqi

When multiple Pawns can go to the same square a move written as to-square
only is interpreted as the forward push, rather than a sideway move.

7 years agoFix King leaving Palace in Xiangqi
H.G.Muller [Sun, 17 Jul 2016 21:06:19 +0000]
Fix King leaving Palace in Xiangqi

The rewrite of the move generator had overlooked this.

7 years agoFix compile error Xaw build
H.G.Muller [Mon, 16 May 2016 20:21:36 +0000]
Fix compile error Xaw build

The variable initialSquareSize was not defined in the Xaw build,
and now has been moved to dialogs.h (which is part of both builds).

7 years agoupdates NEWS, Changelog, DIFFSTAT and SHORTLOG
Arun Persaud [Sun, 15 May 2016 17:15:38 +0000]
updates NEWS, Changelog, DIFFSTAT and SHORTLOG

7 years agoupdated po/pot files
Arun Persaud [Sun, 15 May 2016 17:05:40 +0000]
updated po/pot files

7 years agonew version number for release 4.9.0
Arun Persaud [Sun, 15 May 2016 17:03:04 +0000]
new version number for release 4.9.0

7 years agoForgotten header for previous patch
H.G.Muller [Thu, 12 May 2016 13:49:26 +0000]
Forgotten header for previous patch

7 years agoAbbreviate DATADIR to ~~ while saving XB themes
H.G.Muller [Tue, 10 May 2016 19:52:56 +0000]
Abbreviate DATADIR to ~~ while saving XB themes

The path name of theme files is typically quite long in XBoard, where
installed data is very deep in the file-system tree. This path is now
recognized, and replacend by its abbreviation ~~ when storing a theme
in the -themeNames option.

7 years agoFix crash on too-long theme definitions
H.G.Muller [Tue, 10 May 2016 18:46:49 +0000]
Fix crash on too-long theme definitions

Long file names for texture and pieces could make theme definitions
so long as to overflow the buffers used to hold them. The buffer
size is now doubled.

7 years agoFix debris after click-click explosion near board edge
H.G.Muller [Tue, 10 May 2016 18:29:37 +0000]
Fix debris after click-click explosion near board edge

The redrawn grid was not exposed for board edges a knight's jump
away from an explosion square after a click-click capture in variant
atomic. This was due to the smartness in preventing overlapping
exposures of neighboring square, deferring the task to expose the grid
to squares that were beyond the edge. Now all squares in the explosion
range are exposed including grid.

7 years agoFix highlights clearing when highlight last move off
H.G.Muller [Tue, 10 May 2016 18:26:56 +0000]
Fix highlights clearing when highlight last move off

When moves are not highlighted, the selected piece still is. But
this highlight should be erased after the move.

7 years agoFix redrawing of pieces dragged off board (bug #47888)
H.G.Muller [Tue, 10 May 2016 17:42:09 +0000]
Fix redrawing of pieces dragged off board (bug #47888)

The board was not redrawn after a piece was dragged off board,
leaving the piece 'invisibly' in its original position, and also
leaving the target squares marked.

7 years agoDescribe new Edit menu items in texi file
H.G.Muller [Mon, 9 May 2016 05:36:39 +0000]
Describe new Edit menu items in texi file

7 years agoAdd Mute all Sounds menu XB
H.G.Muller [Mon, 9 May 2016 05:08:18 +0000]
Add Mute all Sounds menu XB

XBoard now also has a menu item to mute all sounds (except the Play
button in the Sounds dialog) at the topof the Options menu, like WinBoard.

7 years agoDescribe use of blue highlights in protocol specs
H.G.Muller [Sun, 8 May 2016 18:04:36 +0000]
Describe use of blue highlights in protocol specs

The function of 'blue' markers, and the role of the 'choice' command
in this is explained in the CECP specs.

7 years agoFix forgetting 'choice' command after promotion
H.G.Muller [Sun, 8 May 2016 17:35:10 +0000]
Fix forgetting 'choice' command after promotion

The promotion restriction specified by a 'choice' command is now reset
at the start of every new move, so that future promotion moves won't
use it too. In addition,the 'choice' command is ignored when legality
testing is on.

7 years agoFix description of Tournament Options in texi file
H.G.Muller [Sun, 8 May 2016 12:39:18 +0000]
Fix description of Tournament Options in texi file

Some headers were not exactly equal to the dialog texts because of typos,
frustrating the help clicks. And matchPause was not described at all.

7 years agoFix multi-leg promotions
H.G.Muller [Sat, 7 May 2016 21:33:35 +0000]
Fix multi-leg promotions

Two-leg promotions were sent as gibberish to the engine (and thus
rejected). It was also pretty annoying that XBoard's own idea of
what should be promotions was still applied even when highlighting
denied promotions (because the zone was different than assumed, or
a promotion-on-entry rule applies). Now the legality markers from
the GUI move generator are different from the red and yellow markers
from an engine highlight command, and the latter are taken as a denial
of promotion, and will suppress it.

7 years agoErase markers before processing highlight FEN
H.G.Muller [Sat, 7 May 2016 20:10:34 +0000]
Erase markers before processing highlight FEN

Markers from the Betza generator were only half-heartedly erased when
a color-FEN camein through a highlight command, because FENs tend to
skip empty squares in stretches. This was already fixed for the legal[][]
array, but now it is fixed for the markers itself as well.

7 years agoFix saving of piece colors as part of theme
H.G.Muller [Sat, 7 May 2016 10:13:09 +0000]
Fix saving of piece colors as part of theme

The wrong condition was used for deciding of whether the piece-color
settings were relevant for a theme definition.

7 years agoAllow engine to force user to make non-standard promotion
H.G.Muller [Sat, 7 May 2016 10:06:51 +0000]
Allow engine to force user to make non-standard promotion

The engine can now force an unexpected promotion on moves entered
by the user, by marking the to-square of such a move in blue.
Releasing a piece on such a blue square will then defer further
processing of the move (after having send the 'put' command to the
engine) until reception of a 'choice' command to specify what the
piece should promote to. This solves problems in Maka Dai Dai Shogi,
where a piece capturing a contageous piece would only be allowed to
promote to its normal promoted form if the to-square was marked in
purple (offering a P / +P toggle).

7 years agoFix saving theme
H.G.Muller [Fri, 6 May 2016 05:42:55 +0000]
Fix saving theme

The option -trueColors is now saved with the theme settings when a
pieceImageDirectory was given in XBoard, and the piece colors are
saved when this option is off even with a piece directory. The square
colors are now also saved when useBooardTextures is on, but the textures
are transparent. For this the transparency also had to be made visible in
the WinBoard front end, (by moving the flags for it to backend.c), but
always stay at the default 0 there.

7 years agoFix deferral on sweep promotions
H.G.Muller [Wed, 4 May 2016 13:18:34 +0000]
Fix deferral on sweep promotions

When a sweep in the to-square due to a highlight-induced promotion
had left the original piece as choice, the piece would be considered
to promote to itself (i.e. the move would get the promoChar for its
piece type), rather than to not promote at all. Some engines choked
on this (HaChu). Now such a move is not considered a promotion.

7 years agoImplement -showMoveTime option
H.G.Muller [Sun, 1 May 2016 19:41:40 +0000]
Implement -showMoveTime option

A persistent option -showMoveTime can cause the time thought so far
on the current move to be displayed in the clock field, behind the
time left on the clock, in parentheses.

7 years agoPrevent crash on help-click for engine without manual
H.G.Muller [Fri, 29 Apr 2016 14:16:52 +0000]
Prevent crash on help-click for engine without manual

The error message of "man w xxx" when no man entry for xxx exists
appears on stderr, which is not caught by popen(). As a result the
path to the man file gets set to an empty string, and saveStrCpy
is not so save that it can copy an empty string, but quits XBoard
through an ASSERT in that case.

7 years agoAllow engine to specify holdings larger than board height
H.G.Muller [Thu, 28 Apr 2016 12:36:54 +0000]
Allow engine to specify holdings larger than board height

On reception of a 'setup' command we now automatically increase the
number of board ranks to the holdings size if the latter is larger,
but remember the number of added 'dead ranks'. When parsing a FEN these
ranks are blacked out, and on generating a FEN they are ignored. This
makes FENs behave like the board was not enlarged.

7 years agoImplement two-kanji -inscriptions
H.G.Muller [Thu, 28 Apr 2016 11:24:19 +0000]
Implement two-kanji -inscriptions

When the -inscriptions option specifies a UTF8 string that starts with
the character '2', it will assume the symbols that follow have to be
drawn on the pieces in (vertically stacked) pairs of somewhat smaller
size than it would use for single-character inscriptions. An optional
'1' at the start of the string could be used as an escape to be used
when the first character we want to inscribe would be a '2'.

7 years agoPrevent sending empty line to engine after multi-leg move
H.G.Muller [Wed, 27 Apr 2016 20:22:35 +0000]
Prevent sending empty line to engine after multi-leg move

As the pmoves are stored internally with a linefeed suffixed to them,
this linefeed was mistaken for a promotion character in the multi-leg
printing formats, and led to an extra empty line being sent to the
engine on non-promotion multi-leg moves. Now a linefeed is replaced
by a null character before sending the move.

7 years agoFix piece commands for promoted pieces
H.G.Muller [Wed, 27 Apr 2016 18:34:45 +0000]
Fix piece commands for promoted pieces

The flexible partner assignment had broken the code for 'piece'
commands defining the moves for these pieces, as the promotion
partner was still calculated the old way.

7 years agoFix dragged piece during promotion popup
H.G.Muller [Mon, 25 Apr 2016 16:31:22 +0000]
Fix dragged piece during promotion popup

When dragging to a promotion square, the piece would keep 'hanging'
in the release position while the promotion popup was shown.
(This usually covered it, but not always.) As after a choice is made
the move will be animated, it was more logical to put it back on the
from-square.

7 years agoAdd option -pgnTimeLeft to print clocks in extended PGN info
H.G.Muller [Sun, 24 Apr 2016 20:34:06 +0000]
Add option -pgnTimeLeft to print clocks in extended PGN info

When set a persistent option -pgnTimeLeft makes XBoard save the time
left after the move in the score/depth comments, rather than the time
thought about the move. A leading sign will allow the reader to
distinguish the two. The time is always printed in integer seconds.

7 years agoFix EOF detection in PGN parser
H.G.Muller [Sun, 24 Apr 2016 19:10:06 +0000]
Fix EOF detection in PGN parser

The result of fgetc was stored in a (char) before comparing it with EOF,
which fails badly if the char is not signed.

7 years agoAlter piece images in Spartan Chess
H.G.Muller [Sun, 24 Apr 2016 18:53:47 +0000]
Alter piece images in Spartan Chess

The Captain of Spartain Chess is now represented by the new Tower piece,
so that the Crowned Rook pictogram can be (and is) used for the General,
for better uniformity with other variants.

7 years agoRegularize Chu-Shogi piece assignment
H.G.Muller [Sun, 24 Apr 2016 18:30:38 +0000]
Regularize Chu-Shogi piece assignment

The pieces in Chu Shogi have been reassigned to other internal codes,
so that juggling of images in variant cu is no longer needed. This
became possible by the flexible assignment of promotion partners.
It makes it easier to use Chu Shogi as parent variant without having
to worry about a non-stadard meaning of the -pieceToCharTable.
The built-in move generator had to be changed to work for the new
assignment.

7 years agoAllow group specification in ArgInstall options
H.G.Muller [Sun, 24 Apr 2016 12:00:50 +0000]
Allow group specification in ArgInstall options

The option that add a line to the existing multi-line options
(e.g. -installTheme which adds to -themeNames) now can specify the
line should be added within a group, by prefixing the line with
"# GROUPNAME\n" (where \ and n separate characters). If a group of
that name already exists, the line to add  is insert immediately after
the group header line. If not, the group is created, by adding both the
group header line and the line to add, as well as an "# end" line to
terminate the group.

7 years agoSave programStartTime in settings file rather than save time
H.G.Muller [Sun, 24 Apr 2016 10:30:14 +0000]
Save programStartTime in settings file rather than save time

The -saveDate time stamp is used to decide whether XBoard has seen
options added to the master settings file before. But it looks only
to the master settings file at stratup. So when we save settings we
now put XBoards startup time as -saveDte in it, so that installs
when XBoard was already running would still find their way into the
user settings file.