xboard.git
13 years agosecurity fix: replaced sprintf with snprintf
Arun Persaud [Mon, 13 Sep 2010 03:04:03 +0000]
security fix: replaced sprintf with snprintf

replaced most sprintf with snprintf. There are still some left where for example a pointer is used and is allocated in the line before, which should be fine... and some others.

13 years agosecurity fix: replaced strcpy with safeStrCpy from backend.c
Arun Persaud [Sat, 11 Sep 2010 06:36:23 +0000]
security fix: replaced strcpy with safeStrCpy from backend.c

see comment in backend.c on how to use safeStrCpy. This was already added by AS, but only used in 3 places.

13 years agoEnhance multi-session TC clock handling
H.G. Muller [Mon, 4 Oct 2010 09:50:38 +0000]
Enhance multi-session TC clock handling

Some new TC types are introduced: Bronstein and free sessions. The
former is implemented by letting an exclamation point '!' in front of an
increment (in the -tc string) indicate that the increment is limited to
the time actually used on the previous move. The latter is an interval
of given duraton in which you can do any number of moves (even zero),
before the next session starts. This is needed for implementing Shogi
byoyomi-type TC, as a first session, followed by a session of fixed-time
per move. The latter can now be specified with the -tc argument as a
degenerate case of Bronstein, where the time on the clock is <= the
increment (so that it is never possible to think longer than the
increment). A TC of 5 min + 10 sec byoyomi can then be indicated as
300:10+!10.

The sessions are now separated by ':' in stead of '+', and all times in
the TC string are converted to seconds first (in ParseTimeControl), so
the fullTCstring can now be directly used in a PGN tag.

Note that this patch only addresses clock handling; the engine will not
be informed yet if the TC type or parameters change at the start of new
session!

13 years agoRemove promotion-piece encoding from ChessMove type
H.G. Muller [Mon, 4 Oct 2010 07:32:18 +0000]
Remove promotion-piece encoding from ChessMove type

The shizophrenic way to indcate promotion pieces in the XBoard code
(sometimes using a promoChar, at other times relying on moveType) was
cured by combining all promotion move types (such as WhitePromotionRook)
into a single one (WhitePromotion), and relying on promoChar to specify
the piece. This solves the problem of promoting to new piece types in
variants, which formerly also required addition of new move types.

In Shogi the '+' character is now consistently used to indicate
promotions (and recognized in ApplyMove), rather than 'q' or
PieeToChar(BlackQueen), as the latter did not work in minivariants where
the Queen (representng the Lance) did not partcipate.

13 years agoPass promoChar to SendMoveToICS
H.G. Muller [Sun, 3 Oct 2010 18:50:01 +0000]
Pass promoChar to SendMoveToICS

SendMoveToICS was the only place where the promotion piece was derived
from moveType, rather than an explicity passed promoChar.

13 years agoSuppress spurious use of SAN castling in mini variants
H.G. Muller [Mon, 4 Oct 2010 07:41:11 +0000]
Suppress spurious use of SAN castling in mini variants

King moves from a central file to the king-side-castled position (1
square away from the right corner) were intercepted and printed as O-O
in CoordsToAlgebraic. But on a 5x5 board (mini-Shogi!) this caught the
normal King move Kc1-d1 as well. The castling notation is now reserved
for King moves larger than one step.

13 years agoMake Shogi promotion zone board-size dependent
H.G. Muller [Mon, 4 Oct 2010 06:21:19 +0000]
Make Shogi promotion zone board-size dependent

In stead of using a fixed size of 3 ranks, we use BOARD_HEIGHT/3, which
would translate to 1 rank for mini-Shogi (5x5) and 2 ranks for Judgkin's
Shogi (6x6), which are indeed what these variants need.

13 years agoMake board-size overrule options volatile
H.G. Muller [Sun, 3 Oct 2010 17:58:00 +0000]
Make board-size overrule options volatile

The options -boardWidth, -boardHeight and -holdingSize were legacies
from the day choosing a variant would not automatically set a board
size. As a result they are seldomly used anymore. The first real
application is mini-Shogi (on 5x5 board), and it turned out very
annoying if the 5x5 settings persisted to the next session, where you
almost certainly want to play another variant.

13 years agoStrip DOS line endings from parser.l
H.G. Muller [Mon, 4 Oct 2010 07:16:47 +0000]
Strip DOS line endings from parser.l

13 years agoExtend mate test to drop games
H.G. Muller [Thu, 16 Sep 2010 16:58:37 +0000]
Extend mate test to drop games

MateTest() in case of no legal moves now also looks if there are legal
drops that can resolve the check. This provides reliable mate testing in
Crazyhouse and Shogi, so these are now made subject to adjudications too.

13 years agoExtend legality testing to drop moves
H.G. Muller [Thu, 16 Sep 2010 16:48:29 +0000]
Extend legality testing to drop moves

LegalityTest() can nowbe called with (internal-format) drop moves, and
delegates their testing to a new routine LegalDrop(). This routine
performs the 'no-pawn-on-back-rank' test that used to be in
UserMoveTest (which now calls LegalityTest also for drop moves).
The more complex Shogi case is also handled (except for Pawn mate
drops) in LegalDrop().

13 years agoRevert splitting of UserMoveEvent
H.G. Muller [Thu, 16 Sep 2010 16:25:21 +0000]
Revert splitting of UserMoveEvent

This splitting into UserMoveTest and FinishMove was no longer needed,
now that the new mouse driver no longer calls UserMoveTest to figure out
if a move is a promotion, and XBoard and WinBoard are unified in this
respect. It was counter-productive, because UserMoveTest was not able to
change the fromX, fromY (call-by-value) parameters for passing them to
FinishMove, so it had to defer the conversion of drop moves to internal
format to the latter, while it did not belong there. (Because
DropMenuEvent already delivers the moves in internal format.) This
whole kludgy construction was therefore abandoned, by going back
to the original 4.2.7 calling scheme, where UserMoveEvent completely
pre-processes the move, and when it is valid, calls FinishMove directly.

13 years agoFix silent bug in drop moves
H.G. Muller [Thu, 16 Sep 2010 16:02:40 +0000]
Fix silent bug in drop moves

In ApplyMove() the piece on the from square was accessed and used before
we tested for drop moves. As drop moves have off-board from-squares this
led to out-of-bound array access, which apparently was usually harmless.

13 years agoAllow parsing of upper-case machine moves
H.G. Muller [Thu, 16 Sep 2010 15:43:59 +0000]
Allow parsing of upper-case machine moves

Dubious patch, as it caters to non-compliancy. Some variant engines are
very non-compliant, though.

13 years agoPrevent transmission of spurious promo char to other engine
H.G. Muller [Thu, 16 Sep 2010 15:38:35 +0000]
Prevent transmission of spurious promo char to other engine

The parser now strps off spurious promotion characters.
New move types "White/BlackNonPromotion" had to be introduced for this,
to indicate NormalMoves that could have been a promotion, to make sure
the '=' suffix of Shogi deferred promotions survives.

13 years agofixed internationalization for winboard
Arun Persaud [Fri, 17 Sep 2010 03:44:37 +0000]
fixed internationalization for winboard

in the original commit some files were forgotten. This should fix it.

13 years agoFix JAWS bug saying side to move in ICS play
H.G. Muller [Sun, 29 Aug 2010 19:07:12 +0000]
Fix JAWS bug saying side to move in ICS play

This was done the wrong way around.

13 years agoMake WB run-time language switch possible from menu
H.G. Muller [Fri, 27 Aug 2010 12:08:39 +0000]
Make WB run-time language switch possible from menu

This is a rather involved patch that might not be worth it. It is
difficult, because translation of things that live forever is not easy
to invert (menus, the auxiliary windows). We hae to remember all
original, English texts there to be able to put them back,or
re-translate. Still does not fully work, although the menus and
temporary dialogs now are all OK.

13 years agoUpdate WB translation template
H.G. Muller [Fri, 27 Aug 2010 12:35:46 +0000]
Update WB translation template

The language.txt file now also contains all translatable strings from
the C source files, rather than jsut the resource.

13 years agoUpdate docs
H.G. Muller [Fri, 27 Aug 2010 12:14:51 +0000]
Update docs

Add descriptions for machine-match menu support and enhanced book
control, nick-name options and language.

13 years agoAdd some forgotten translation hooks
H.G. Muller [Fri, 27 Aug 2010 11:59:09 +0000]
Add some forgotten translation hooks

The general-options, file-browse dialogs and the about box did not call
Translate() yet. Also translate contents of combo boxes. Some small bug
fixes.

13 years agoDo not translate game-end messages in PGN
H.G. Muller [Fri, 27 Aug 2010 11:28:33 +0000]
Do not translate game-end messages in PGN

The messages themselves are not subjected to _(), but in stead their
displaying in DisplayMove is subjected to T_().

13 years agoInternationalization for WinBoard
H.G. Muller [Mon, 23 Aug 2010 11:23:22 +0000]
Internationalization for WinBoard

A function Translate() was added, which uses a list of item dialogs,
reads their value, and replaces it by a translation (if available). It
also reads the window title and sets a translation. Calls to this
routine are added in the initialization code of every dialog callback.
In addition all translatable strings in the WnBoard front end are marked
by the gettext macro _(). Because WB is not gettexted yet, a hard
re-definition of this macro is added in each file using it, to the
string-translation routine T_() supplied in winboard.c.
Code to read the translation file, and translate the menu texts is added
in winboard.c. In backend.c the meaning of the gettet macros is
redefined for the WIN32 case.

13 years agoMake the ID of all WB dialog items unique
H.G. Muller [Mon, 23 Aug 2010 11:07:40 +0000]
Make the ID of all WB dialog items unique

Mnany static dialog texts did share the ID -1 (IDC_STATIC). But to
replace tet at run-time for translation purposes, they need to be
addressed individually. So they were given new IDs, with symbols defined
for those.

13 years agoMark XBoard result messages for internationalization
H.G. Muller [Mon, 23 Aug 2010 10:48:07 +0000]
Mark XBoard result messages for internationalization

The GNU gettext macro _() is used with the game-end messages. This might
be controversial, as they will appear in the PGN as well. But only as a
comment. We can always decide not to supply a translation.

13 years agoDo not exit after match when match started from menu
H.G. Muller [Mon, 23 Aug 2010 10:43:27 +0000]
Do not exit after match when match started from menu

The codelooks weird, but matchMode == 2 in this case. We then use
DisplayNote() to report the match result.

13 years agoTrivial-draws recognition improved in Xiangqi
H.G. Muller [Mon, 23 Aug 2010 10:39:07 +0000]
Trivial-draws recognition improved in Xiangqi

Now based on a routine "SufficientDefence". If both have it, it is draw.

13 years agoUpdate .dev files
H.G. Muller [Fri, 20 Aug 2010 15:46:45 +0000]
Update .dev files

The relocation of parser.c and the addition of history.c was not yet
incorporated in the devcpp proect files.

13 years agoFix some MSVC compile errors
H.G. Muller [Thu, 19 Aug 2010 11:45:04 +0000]
Fix some MSVC compile errors

Some statements has moved up stream of declaratons, which is an error
that gcc is forgiving about, but where MSVC is strict.

13 years agoImproved patch for expansion of WB settings-file name
H.G. Muller [Sat, 14 Aug 2010 12:01:44 +0000]
Improved patch for expansion of WB settings-file name

The expansion of environment variables now allows multiple environment
variables in the path name. Tested on %HOMEDRIVE%%HOMEPATH%\winboard.ini
and %APPDATA%\winboard.ini.

13 years agoAdd -colorNickNames option
H.G. Muller [Sat, 7 Aug 2010 14:53:50 +0000]
Add -colorNickNames option

This option allows non-standard designation of side to move in FENs.
(Useful for Xiangqi, where white is indicated often as r(ed), and Shogi,
where white is s(ente) or b(lack), and black is g(ote) or w(hite).)
Can also be used for FENs in a local language. A match of theinput
character with the nick name translates it to the standard; this means
the standard will continue to be recognized, unless it was defined as a
nick name.

13 years agoTricked by the grossnes
H.G. Muller [Sat, 7 Aug 2010 14:39:16 +0000]
Tricked by the grossnes

Some WB menu items were referenced by a hard number. As items had been
added over the years, the wrong menu items were grayed. In particular
the Options -> Adjudication menu was grayed out, in -ncp mode, where
this was intended for the Sounds dialog. This accidentally proved
useful, until we started to apply adjudictions also to the Human moves.
Then it was suddenly undesirable, and a small mystery why it happened at
all, when I tried to change it. The numbers are now corrected to the new
locatons of the items in the menus.

13 years agoAllow match to be started from WB menu
H.G. Muller [Sat, 7 Aug 2010 14:35:23 +0000]
Allow match to be started from WB menu

A menu item Machine Match was added in the Mode menu to switch to
matchMode. A persistent option /defaultMatchGames determines the number
of games. A control was added to the Options -> Common Engine dialog to
set this option.

13 years agoAdd some book-control options
H.G. Muller [Sat, 7 Aug 2010 14:26:35 +0000]
Add some book-control options

Options /bookDepth and /bookVariation have been added to control the use
of the GUI book. In WinBoard the Optons -> Common Engine dialog now
contains fields to set them.

13 years agonew developer release
Arun Persaud [Sat, 7 Aug 2010 07:15:57 +0000]
new developer release

13 years agoRepair exit-popup deadlock patch
H.G. Muller [Fri, 6 Aug 2010 09:18:34 +0000]
Repair exit-popup deadlock patch

Relocating the exit popup call had made it lose access to the message it
should print, because it was declared only in an inner code block, by
the same name: buf[]. Deleting the inner declaration fixes it.

13 years agoFix erors when compiling with --disable-zippy
H.G. Muller [Wed, 4 Aug 2010 09:00:28 +0000]
Fix erors when compiling with --disable-zippy

The file args.h contained a codeblock in #ifdef ZIPPY, in stead of
fields.

13 years agoFix zippy handling of draw offers from ICS
H.G. Muller [Sun, 1 Aug 2010 11:27:23 +0000]
Fix zippy handling of draw offers from ICS

The patch by DM to fix the problem introduced by the coloration of
zippy-matched commands (namely that the coloration code beat the zippy
draw recognition to it, and ate the draw offer away) was only targeting
ICC. The new fix should work on any ICS (by using the same pattern in
zippy as in the colorization code).

13 years agoFix regression in colorization of zippy-matched commands
H.G. Muller [Sun, 1 Aug 2010 11:15:27 +0000]
Fix regression in colorization of zippy-matched commands

The patch by Daniel Mehrman from 4.2.pre8 was not properly merged, so
that in XBoard no coloration would take place of ICS commands that were
matched by zippy. (It was using &i as input pointer, rather than &backup.
The XBoard-specific code now has been deleted completely, to remove a
seemingly needless dependence on _WIN32_ of the back-end. Both WB and XB
now use the XBoard method, to only match zippy commands when logged in.

13 years agoSuggest default file name in browser dialog
H.G. Muller [Sat, 31 Jul 2010 20:48:45 +0000]
Suggest default file name in browser dialog

The argument 'def' to FileNamePopUp() was not passed through to the new
file-browser routine, which got NULL in stead, and thus started with an
empty input field.

13 years agoDefine /firstUCI and /secondUCI as synonyms for /fUCI, /sUCI
H.G. Muller [Fri, 30 Jul 2010 21:28:57 +0000]
Define /firstUCI and /secondUCI as synonyms for /fUCI, /sUCI

Because the %s expansion of WB options in the /fcp and /scp lines only
works for options that contain 'first' or 'second', and /fUCI thus did
not work, PSWBTM had to rely on the cumbersome /firstIsUCI=true to
install UCI engines. (The latter option should be deprecated really;
the UCI-ness of the engines is a volatile option, so it makes no sense
to supply a way to set them both to false or true. One only needs to be
able to set it to the non-default state.)

13 years agoAdd string option /pieceNickNames
H.G. Muller [Fri, 30 Jul 2010 21:21:50 +0000]
Add string option /pieceNickNames

This (volatile) option allows definition of alternate letters for the
pieces, which will be recognized next to the standard symbols as given
in the /pieceToCharTable on input. (Output always uses the standard.)
This can be useful for reading PGN from another language, or
non-compliant FENs (e.g. using B and N for E and H in Xiangqi).
  The format of the argument is the same as for /pieceToCharTable.
Because the nickNames are consulted before the standard table, it is
possible to redefine a standard name as a nick for another piece.

13 years agoFix deadlock in match-result display
H.G. Muller [Fri, 30 Jul 2010 21:10:42 +0000]
Fix deadlock in match-result display

At the end of a match, GameEnds() was recursively calling itself,
through DisplayFatalError() and ExitEvent(), and the latter was then
delaying until the calling GameEnds() terminated. (Which it would of
course never do before ExitEvent returned; fortunately there was a tim
limit to this delay, but in XBoard it was 10 sec in stead of 10 msec.)
 Now the calling of DisplayFatalError() (to show the result popup) is
delayed until after GameEnds completes (and resets the anti-recursion
flag 'endingGame'), so that it is simply executed a second time, unaware
of the earlier call. But this second time it does not do anything,
because the gameMode ws set to EndOfGame the first time, and the writing
of the PGN is blocked by the checksum being still the same.

13 years agoFix WinBoard game-list title
H.G. Muller [Mon, 12 Jul 2010 09:10:17 +0000]
Fix WinBoard game-list title

Number of displayed games and WDL stats were always appended to the
existing title, leading to an ever-growing title in the game-list
window. Now the old actual title is ignored, and the starts is appended
to the original title "Game List". (In the future we could use the
filename here?)

In addition, the title was not updated when re-opening the game-list
window, while the stats could change if filtering was active when the
window was closed. (In that case the filter is cleared on re-opening, so
the number of displayed games changes.) Now a title-update (after
recalculating the stats) is done every time the game-list window is
opened.

13 years agoRefactoring of material-draws adjudication code
H.G. Muller [Sun, 11 Jul 2010 09:06:27 +0000]
Refactoring of material-draws adjudication code

Insufficient mating material is now determined per side individually, by
testing for MatingPotential of each side. If both lack mating potential
the game is adjudicated as draw (if the -materialDraws option is set).

This way MatingPotential() can later also be used to correct losses by
forfeit to draws (which currently is only done when the opponent has a
bare King).

The accuracy of this type of adjudication in Xiangqi has been highly
improved.

13 years agoFix bug in sending cores command to engine
H.G. Muller [Sun, 11 Jul 2010 08:54:59 +0000]
Fix bug in sending cores command to engine

The cores command was alwas sent to the engine(s) when the user changed
it through the menu, even when the engine had sent feature smp=0 (which
is default anyway). NewSettingEvent() was patched to send the new
setting conditionally, based on the engine properties as recorded in
ChessProgramStates first, second; In this particular case it now
consults cps->maxCores. (Note the code for testing the second engine
contains some dirty pointer arithmetic.)

13 years agoFix oneClickMove bug
H.G. Muller [Sun, 11 Jul 2010 08:42:00 +0000]
Fix oneClickMove bug

When checking for unique captures, no attention was payed to the option
setting, so the capture was also made when the option was off.

13 years agoRemove duplicate testing for cores feature
H.G. Muller [Sun, 11 Jul 2010 08:39:28 +0000]
Remove duplicate testing for cores feature

The testing for this BooleanFeature occurred twice.

13 years agoRemove misspelled prototype
H.G. Muller [Sun, 11 Jul 2010 08:35:13 +0000]
Remove misspelled prototype

NewSettingEvent occurred, next to the correct one, in misspelled form.

13 years agoFix parsing of SAN shogi promotions
H.G. Muller [Mon, 5 Jul 2010 08:00:01 +0000]
Fix parsing of SAN shogi promotions

A missing promotion character defaults to promotion in the move type,
but the promotion character was not set when this happened in variant
shogi. And it is especially important there, as the promotion character
'+' will always be missing, as the parser will take it to be a 'check'
symbol, and strip it from the move.

13 years agoFix variant switch on PGN loading
H.G. Muller [Mon, 5 Jul 2010 07:55:14 +0000]
Fix variant switch on PGN loading

When the PGN specified an essentially different variant, the
piece bitmaps were not properly adapted, because the switch was done by
calling InitPosition(), rather than Reset(). (The latter would destroy
the PGN tags info.) We now added an explicit call to ResetFrontEnd(),
(which is normally done from Reset()).

13 years agoAdjudicate Xiangqi material draws with Advisor-less Cannons
H.G. Muller [Mon, 5 Jul 2010 07:51:53 +0000]
Adjudicate Xiangqi material draws with Advisor-less Cannons

Used the Queen counter for counting Cannons. Note that material draws
with stale Pawns (i.e. on the back rank) are not yet adjudicated.

13 years agoRemove font settings from master settings file
H.G. Muller [Mon, 5 Jul 2010 07:34:21 +0000]
Remove font settings from master settings file

xboard.conf should not contain general font settings (not specific to
one board size) with specified point size. In fact it should not even
specify sizable fonts, as the new system would make specification of a
general font overrule the size-specific settings in the .xboardrc file,
so the persistence of fonts would be completely broken.

13 years agoCut board squares out of texture bitmap more cleverly
H.G. Muller [Wed, 30 Jun 2010 08:52:27 +0000]
Cut board squares out of texture bitmap more cleverly

When the bitmap is larger than the entire board, the squares are now cut
out of the center of the virtual squares from subdividing the bitmap, so
that they stay centered on the grid of a Xiangqi board bitmap. If the
board size exceeds that of the bitmap, the old algorithm is still used,
as the centering would make the edge squares exceed the bitmap, and
cause a black rim around the board.

13 years agoAllow -flipBlack to work with font-based piece rendering
H.G. Muller [Wed, 30 Jun 2010 08:49:12 +0000]
Allow -flipBlack to work with font-based piece rendering

In addition the font-based pieces will also be flipped vertically in
flipView for variant shogi when -flipBlack is off.

13 years agoAllow font-based piece rendering in board sizes below petite
H.G. Muller [Wed, 30 Jun 2010 08:46:43 +0000]
Allow font-based piece rendering in board sizes below petite

At least for variants that use unorthodox pieces, so that switching back
to using bitmaps is not really an option anyway.

13 years agoIgnore checks in 50-move count for Xiangqi
H.G. Muller [Wed, 30 Jun 2010 08:41:25 +0000]
Ignore checks in 50-move count for Xiangqi

Both checks and evasions are discounted; this is only done after the
naive counting exceeds the maximum, so during most of the game it causes
no CPU load.

13 years agoremoved some garbage from configure.ac that got added a while ago
Arun Persaud [Sat, 5 Jun 2010 21:38:47 +0000]
removed some garbage from configure.ac that got added a while ago

13 years agoRemove unnecessary double equals from configure.ac.
Clint Adams [Wed, 26 May 2010 01:20:27 +0000]
Remove unnecessary double equals from configure.ac.

13 years agoFix e.p. bug in xiangqi with -serverMoves option
H.G. Muller [Fri, 28 May 2010 09:07:06 +0000]
Fix e.p. bug in xiangqi with -serverMoves option

Sideway Pawn moves were written as e.p. captures in the file with moves,
which led to disappearence of pieces in the viewer.

13 years agoRepair score printing with -serverMoves option
H.G. Muller [Fri, 28 May 2010 09:05:00 +0000]
Repair score printing with -serverMoves option

A previous patch had moved MakeMove to before the update of pvInfoList,
so that the score/depth info would not appear in the file with moves.

13 years agoRepair animate dragging
H.G. Muller [Fri, 28 May 2010 09:02:54 +0000]
Repair animate dragging

The previous patch had left a stray semicolon in the mouse handler.

14 years agoFix game end during dragging
H.G. Muller [Mon, 10 May 2010 08:32:19 +0000]
Fix game end during dragging

The stale-first-click fix interfered with proper handling of a piece
being dragged when a game suddenly ended (because of opponent resign,
or caling the flag), because up-clicks when the from-square was reset
were completely ignored. Now such an 'unmatched' upclick calls
DragPieceEnd() and redraws the board.

14 years agoPop down old tags on loadng new game in WinBoard
H.G. Muller [Mon, 10 May 2010 08:09:36 +0000]
Pop down old tags on loadng new game in WinBoard

ResetFrontEnd(), called from Reset(), did not do this in WinBoard
(unlike XBoard), so that the tags from the previous game were left on
display when -autoDisplayTags was off.

14 years agoReverse mousewheel action
H.G. Muller [Sun, 9 May 2010 20:15:27 +0000]
Reverse mousewheel action

Apparently WinBoard was stepping in the opposite direction through the
game in reaction to the mousewheel as every other GUI in existence.

14 years agoFix bug in sending "usermove" when forcing book moves
H.G. Muller [Sun, 9 May 2010 20:07:30 +0000]
Fix bug in sending "usermove" when forcing book moves

The keyword "usermove" was copied to the buffer, but not sent before it
was overwritten by the actual book move.

14 years agoFix engine stall on perpetual-check evasion
H.G. Muller [Thu, 6 May 2010 15:23:24 +0000]
Fix engine stall on perpetual-check evasion

The adjudication code had already put the engine in force mode after
postponing the actual adjudication to the next move. Now first determine
if we want to adjudicate now, and with which result, before stopping the
engine and ending the game.

14 years agoLet move parser return ImpossibleMove for off-board moves
H.G. Muller [Thu, 6 May 2010 14:37:04 +0000]
Let move parser return ImpossibleMove for off-board moves

It used to return 0, which interfered with buiding a game list. This
broke reading of multi-game PGN files containing games in a variant with
a board size larger than that of the currenty active variant.

14 years agoAlter XBoard key bindings to mimic WinBoard
H.G. Muller [Tue, 6 Apr 2010 13:05:10 +0000]
Alter XBoard key bindings to mimic WinBoard

A lot of new bindings were added, and four menuProcs had to be registered
to be able to add bindings to them. The use of the control key as
temporary take-back for the last move conflicted with the use of Ctrl
keystrokes, and this function was migrated to '.'. The iconify function
had no shortcut in WinBoard, but to get rid of letter bindings it was
migrated to '-'.

14 years agoUpdate README file
H.G. Muller [Mon, 5 Apr 2010 18:45:45 +0000]
Update README file

14 years agoFix typos in html help file
H.G. Muller [Sat, 3 Apr 2010 12:00:40 +0000]
Fix typos in html help file

14 years agoFix JAWS piece drop cursor, and streamline some sentences
H.G. Muller [Thu, 1 Apr 2010 13:22:41 +0000]
Fix JAWS piece drop cursor, and streamline some sentences

The cursor square was reset to a1 after every use of the piece menu,
which was very inconvenient. Some of the spoken sentences have been
improved; the square is read before the piece now, when using the arrow
keys on the board.

14 years agoAllow escape sequences in telluser(error) messages
H.G. Muller [Wed, 31 Mar 2010 20:31:44 +0000]
Allow escape sequences in telluser(error) messages

The routine EscapeExpand was moved to backend.c, and applied to the
message received from the engine.

14 years agoAllow lower-case promochar in moves of type h8=Q
H.G. Muller [Wed, 31 Mar 2010 19:29:39 +0000]
Allow lower-case promochar in moves of type h8=Q

Updated the parser rules. Other move formats already allowed this.

14 years agoFix Alt+M JAWS command in Two-Machines mode
H.G. Muller [Wed, 31 Mar 2010 19:36:14 +0000]
Fix Alt+M JAWS command in Two-Machines mode

The command refused to read the ast move because it contained thinking
output of the other engine. Let it pay attention to evenIfDuplicate.

14 years agoFix rep-draw recognition
H.G. Muller [Mon, 29 Mar 2010 07:57:48 +0000]
Fix rep-draw recognition

The refactoring had broken the rep-draw recognition, by adding and extra
condition in a conditional with side effects. The testing of this extra
condition is now moved to after the side effect.

14 years agoAllow any %ENVIRONMENTVAR% in WB settings file name rather than ~
H.G. Muller [Sun, 28 Mar 2010 10:32:07 +0000]
Allow any %ENVIRONMENTVAR% in WB settings file name rather than ~

Only a single variable at the beginning of the file name is recognized,
and the matching is not fool proof (it matches across backslashes).

14 years agoFix info lines being used as normal thinking output
H.G. Muller [Sun, 28 Mar 2010 09:24:44 +0000]
Fix info lines being used as normal thinking output

The new standard of using thinking output with time = nodes = score = 0
as info messages for printing in the Engine-Output window was not
understood everywhere, and led to such info lines being used for
autoKibitzing and PGN annotation. The programStats are now only updated
from thinking output received from an engine when it is not an info line.

14 years agonew developer release
Arun Persaud [Sat, 27 Mar 2010 18:54:41 +0000]
new developer release

14 years agoSuppress background observe for boards with own game number
H.G. Muller [Fri, 26 Mar 2010 20:16:52 +0000]
Suppress background observe for boards with own game number

This is really a work-around for an ICS bug. The Variant-ICS sent the
initial board of a game in a move list with relation = 0, which means
'observed'. So XBoard was thinking it was observing its own game, and
switched to dual board. It seems harmless to suppress such a switch for
all boards of your own game, however, which is now done.

14 years agoFix crash on switching to ICS xiangqi game
H.G. Muller [Fri, 26 Mar 2010 20:12:19 +0000]
Fix crash on switching to ICS xiangqi game

The oldBoard was a local variable, and only squares of the old board
were initialized. This led to a crash if the copied board was enlarged,
and then displayed. The variable is now declared static, so the
uninitialized squares contain harmless zeros.

14 years agoLet Chat Boxes pop up above console, rather than on top of it
H.G. Muller [Fri, 26 Mar 2010 17:32:36 +0000]
Let Chat Boxes pop up above console, rather than on top of it

Use EnsureOnScreen() to have them overlap if there was no room.

14 years agoFix disabling of Chat Box navigation buttons
H.G. Muller [Fri, 26 Mar 2010 17:26:04 +0000]
Fix disabling of Chat Box navigation buttons

The buttons for non-open boxes were enabed, rather than disabled.

14 years agoPrevent <Esc> closing chat box
H.G. Muller [Fri, 26 Mar 2010 17:17:44 +0000]
Prevent <Esc> closing chat box

Let it in stead switch focus back to the console window.

14 years agoLet WinBoard recognize ~ in settings file name as HOMEPATH
H.G. Muller [Fri, 26 Mar 2010 14:28:54 +0000]
Let WinBoard recognize ~ in settings file name as HOMEPATH

Fetch the appropriate environment variable to build the mathname in
MySearchPath() whenever the file name starts with "~\".

14 years agoChange name of Global Settings menu item to Common Engine Settings
H.G. Muller [Fri, 26 Mar 2010 12:59:28 +0000]
Change name of Global Settings menu item to Common Engine Settings

The old name confused ICS users, as this is an engine-only dialog.

14 years agoUpdate WinBoard RTF docs
H.G. Muller [Fri, 26 Mar 2010 12:58:46 +0000]
Update WinBoard RTF docs

14 years agoUpdate WinBoard html help
H.G. Muller [Fri, 26 Mar 2010 12:57:59 +0000]
Update WinBoard html help

14 years agoAllow adjustment of clocks in any mode with shift+click
H.G. Muller [Wed, 24 Mar 2010 17:00:08 +0000]
Allow adjustment of clocks in any mode with shift+click

In practice changing to edit-game mode during a game was very
cumbersome. In WinBoard shift+click is now offered as an alternative.
Make sure a right-click in the clock area is not also counted for other
purposes.

14 years agoAllow loading of PGN variations in XBoard
H.G. Muller [Wed, 24 Mar 2010 16:21:47 +0000]
Allow loading of PGN variations in XBoard

Right-clicking variation comments in the comment-window was implemented
through a translation. The right button is now bound to routines that
set both the end and start of the selection, as setting a new start does
not seem to work if the previous select-start was not completed by a
select-end or extend-end. Finally the main handler uses the selection
cursors to know what was clicked.

14 years agoUpdate XBoard docs
H.G. Muller [Wed, 24 Mar 2010 16:16:59 +0000]
Update XBoard docs

Added a descripton of the new ICS options (seek graph, back-ground
observe) and menus (Upload) to the texi file. Also added a description
of the variation (Annotate menu item and PGN variation comments) and PV
walking (clicking engine-output). Describe the -shuffleOpenings option.

14 years agoPaint highlights on dual board (WB)
H.G. Muller [Wed, 24 Mar 2010 12:30:59 +0000]
Paint highlights on dual board (WB)

The highlight info is hidden in the partner board to pass it to the
front-end.

14 years agoFix handling username change during game
H.G. Muller [Wed, 24 Mar 2010 12:14:54 +0000]
Fix handling username change during game

The title bar and gameInfo (going into the PGN) were not adapted when
the username was changed through the menu, so that the change became
only effective on the next game. Requires SetGameInfo to be called from
the front-end, and thus a prototype for it in backend.c.

14 years agoFix window-position upset on failing engine start in WinBoard
H.G. Muller [Wed, 24 Mar 2010 10:04:00 +0000]
Fix window-position upset on failing engine start in WinBoard

The main window was only positoned according to the settings-file data
after the engine was started up from InitBackend2(), so that if the
latter gave a fatal error, and Save Settings on Exit was on, a wrong
position for the main window would be saved. The call to InitBackend2()
is now moved until after setting the main-window position.

14 years agoDisplay PV from Engine-Output window (XBoard)
H.G. Muller [Tue, 23 Mar 2010 22:22:46 +0000]
Display PV from Engine-Output window (XBoard)

Translations are added to bind button 3 to the PV walk for the memo
widgets, and the corresponding handlers are ported from wengineoutput.c.

14 years agoSet keyboard focus at startup to board window
H.G. Muller [Wed, 10 Mar 2010 17:54:28 +0000]
Set keyboard focus at startup to board window

This makes XBoard sensitive to the keybindings also when the cursor is
outside the board window. This focus seems to persist indefinitely: each
time the board window gets selected, the key bindings become activem
wherever the mouse pointer is. Downside: the mouse pointer is no longer
an arrow outside the board window, but becomes a text-insert tool there.

14 years agoadded logo files for xboard
Arun Persaud [Sun, 28 Feb 2010 04:49:21 +0000]
added logo files for xboard

logos are installed in the hicolor theme [1] using $datadir as the basedir.
Added both png and svg logo.

[1] http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html

14 years agoRemake programVersion string after receiving engine features
H.G. Muller [Sat, 27 Feb 2010 16:36:10 +0000]
Remake programVersion string after receiving engine features

The engine could have sent a more accurate version of its own name
than the one derived from the exe filename in a myname feature, and we
better use that in the programVersion string, which will be sent as
interface name to the ICS.

14 years agoRevert "Repair settings-file name"
Arun Persaud [Fri, 26 Feb 2010 03:22:00 +0000]
Revert "Repair settings-file name"

This reverts commit a02042ef83ce1f3632f0cf3e0a2a4ce9a3ac5d85.

14 years agoAdd -autokibitz checkbox to UCI-options menu dialog
H.G. Muller [Thu, 25 Feb 2010 19:32:23 +0000]
Add -autokibitz checkbox to UCI-options menu dialog