gnushogi.git
10 years agoFix typeMask mini
H.G.Muller [Wed, 5 Mar 2014 09:53:46 +0000]
Fix typeMask

10 years agoFix bug NonPromotionPossible for mini-Shogi
H.G.Muller [Wed, 5 Mar 2014 09:49:01 +0000]
Fix bug NonPromotionPossible for mini-Shogi

For Pawns the check for last-rank was not adapted to 5x5 board.

10 years agoMake piece-type testable by bitmask
H.G.Muller [Wed, 5 Mar 2014 09:45:19 +0000]
Make piece-type testable by bitmask

This allows faster testing if a given piece belongs to a group of types.

10 years agoFix entry of deferrals
H.G.Muller [Tue, 4 Mar 2014 21:04:04 +0000]
Fix entry of deferrals

XBoard suffixes deferred promotions with an = sign, but GNU Shogi's
internal move generator to which the input move is compared doesn't.
Now we strip off the promochar if it is an =.

10 years agoMake some non-standard commands engine-defined options
H.G.Muller [Tue, 4 Mar 2014 15:25:34 +0000]
Make some non-standard commands engine-defined options

The commands 'tsume', 'contempt' and 'hashdepth' are made into XBoard
engine-defined options (the latter into two), so they can be set
interactively through the Engine Settings dialog of the GUI.

10 years agoImplement XBoard setboard command
H.G.Muller [Tue, 4 Mar 2014 13:48:23 +0000]
Implement XBoard setboard command

10 years agoImplement XBoard memory command
H.G.Muller [Tue, 4 Mar 2014 09:40:50 +0000]
Implement XBoard memory command

The hash-table allocation in Initialize_data was moved to a separate
routine AllocateTT, which is now also called in response to the XBoard
memory command.

10 years agoImplement periodic updates
H.G.Muller [Tue, 4 Mar 2014 07:46:44 +0000]
Implement periodic updates

The . command now causes printing of a stat01 command, without aborting
the analysis in progress. To achieve this, InputCommand is called during
search when polling reveals there is input. In this case it (currently)
only processes the . command, returning a value that informs the caller
the search should not be aborted. Other commands are backlogged, and
will cause the usual search abort. When InputCommand is then again called
from main it picks up the backlogged command in stead of reading one from
input.

10 years agoAllow passing command to InputCommand
H.G.Muller [Mon, 3 Mar 2014 13:44:00 +0000]
Allow passing command to InputCommand

InputCommand was only called with argument command=NULL, but written such
that it would execute the passed command rather than read one from stdin
in other cases. (E.g. to execute a back-logged command.) But in such a case
it should not ponder or analyze before processing the command, as these
should only be done while waiting for true input.

10 years agoImplement analysis mode
H.G.Muller [Mon, 3 Mar 2014 13:37:46 +0000]
Implement analysis mode

The XBoard commands 'analyze' and 'exit' are recognized, to set and
clear a new analysis flag (and set force mode). While the flag is set
the input loop will order a background search on the current position
while waiting for input. (Note that the 'exit' command outside XBoard
mode is synonymous for 'quit'!)
BEWARE: automatic updates interrupt the analysis.

10 years agoXBoard: split printing of the features line for clarity. master
Yann Dirson [Sat, 22 Feb 2014 15:14:19 +0000]
XBoard: split printing of the features line for clarity.

10 years agoTeach minishogi to issue "setup" command on variant selection.
H.G. Muller [Sat, 22 Feb 2014 09:49:23 +0000]
Teach minishogi to issue "setup" command on variant selection.

This make gnuminishogi automatically switch XBoard to mini-Shogi, so
that the config file 'mini' is no longer needed, but a simple "xboard
-fcp gnuminishogi" is sufficient. (OK, that is not shorter than
"xboard @mini", but it is more logical, and don't requires people know
that a config file 'mini' exists.)

To play with oriental theme "xboard @shogi -fcp gnuminishogi" should
suffice.

YD: use "minishogi" instead of just "mini".

10 years agoInputCommand: format alternatives consistently.
Yann Dirson [Fri, 21 Feb 2014 22:11:30 +0000]
InputCommand: format alternatives consistently.

10 years agoBook: always use Write* API to write into binbook.
Yann Dirson [Fri, 21 Feb 2014 21:37:55 +0000]
Book: always use Write* API to write into binbook.

Makes it easier to factorise error handling.

10 years agoBook: get rid of currentoffset as a global var, be explicit instead.
Yann Dirson [Fri, 21 Feb 2014 21:30:45 +0000]
Book: get rid of currentoffset as a global var, be explicit instead.

10 years agoBook: simplify WriteData.
Yann Dirson [Fri, 21 Feb 2014 21:20:35 +0000]
Book: simplify WriteData.

10 years agoBook: replace Write* macros with functions.
Yann Dirson [Fri, 21 Feb 2014 21:19:43 +0000]
Book: replace Write* macros with functions.

10 years agoBook: replace *Offset macros with functions.
Yann Dirson [Fri, 21 Feb 2014 21:19:25 +0000]
Book: replace *Offset macros with functions.

10 years agoIssue a note when "bsave" is aborted because of missing filename.
Yann Dirson [Fri, 21 Feb 2014 22:10:46 +0000]
Issue a note when "bsave" is aborted because of missing filename.

10 years agoWarnings: format string issue.
Yann Dirson [Wed, 19 Feb 2014 21:40:45 +0000]
Warnings: format string issue.

10 years agoWarnings: correctly use #ifdef for declarations.
Yann Dirson [Wed, 19 Feb 2014 21:40:27 +0000]
Warnings: correctly use #ifdef for declarations.

10 years agoWarnings: be explicit about values we are using.
Yann Dirson [Wed, 19 Feb 2014 21:38:50 +0000]
Warnings: be explicit about values we are using.

10 years agoMake ShowMessage stdarg-enabled.
Yann Dirson [Fri, 21 Feb 2014 20:54:01 +0000]
Make ShowMessage stdarg-enabled.

10 years agoUse SEEK_SET instead of literal 0 in lseek calls.
Yann Dirson [Wed, 19 Feb 2014 22:10:05 +0000]
Use SEEK_SET instead of literal 0 in lseek calls.

10 years agoBook: mark more functions static.
Yann Dirson [Wed, 19 Feb 2014 22:34:35 +0000]
Book: mark more functions static.

10 years agoUse AM_MAINTAINER_MODE.
Yann Dirson [Wed, 19 Feb 2014 20:53:33 +0000]
Use AM_MAINTAINER_MODE.

10 years agoDo not install PORTING file.
Yann Dirson [Wed, 19 Feb 2014 20:48:49 +0000]
Do not install PORTING file.

10 years agoFix detection of "otim".
Yann Dirson [Fri, 21 Feb 2014 22:09:51 +0000]
Fix detection of "otim".

Wrong use of parentheses caused condition to be meaningless (my bad).

10 years agoAdvertise XBoard as official replacement for XShogi.
Yann Dirson [Mon, 10 Feb 2014 20:37:05 +0000]
Advertise XBoard as official replacement for XShogi.

10 years agoXBoard: switch "black" and "white" in commands and names, activate "xboard" command.
H.G. Muller [Tue, 21 Jan 2014 19:57:28 +0000]
XBoard: switch "black" and "white" in commands and names, activate "xboard" command.

YD: split original patch into a series

10 years agoXBoard: teach about xboard move notation.
Yann Dirson [Sat, 25 Jan 2014 18:20:57 +0000]
XBoard: teach about xboard move notation.

Slight unfortunate side-effect: pat2inc requires a declaration of the xboard
flag, although it should really be constant there.

10 years agoXBoard: use xboard v2-compatible move output ("move" command, no milliseconds)
H.G. Muller [Tue, 21 Jan 2014 19:56:29 +0000]
XBoard: use xboard v2-compatible move output ("move" command, no milliseconds)

YD: split original patch into a series
YD: simplified slightly

10 years agoXBoard: select an xboard-compatible implementation of "level" command
H.G. Muller [Tue, 21 Jan 2014 19:54:22 +0000]
XBoard: select an xboard-compatible implementation of "level" command

YD: split original patch into a series
YD: rebased onto recent refactorings

10 years agoXBoard: declare feature sigint=0 to avoid getting killed by the GUI.
Yann Dirson [Sun, 9 Feb 2014 21:16:14 +0000]
XBoard: declare feature sigint=0 to avoid getting killed by the GUI.

10 years agoXBoard: handle xboard-specific commands
H.G. Muller [Tue, 21 Jan 2014 19:49:47 +0000]
XBoard: handle xboard-specific commands

YD: split original patch into a series
YD: parenthesized to avoid warning

10 years agoXBoard: deal with semantic differences in "post" between xboard and xshogi protocols
H.G. Muller [Tue, 21 Jan 2014 19:47:12 +0000]
XBoard: deal with semantic differences in "post" between xboard and xshogi protocols

YD: split original patch into a series

10 years agoXBoard: make messages compatible with xboard protocol.
H.G. Muller [Tue, 15 Oct 2013 19:44:39 +0000]
XBoard: make messages compatible with xboard protocol.

Introduces the "xboard" global var, but only yhe last commit will set
it, when support is complete.

Some non-compliant utterances had to be disarmed by commenting them
out with a leading '#'.

YD: split original patch into a series

10 years agoFix typo $EXEEXT handling in configure.ac
Yann Dirson [Mon, 17 Feb 2014 20:26:39 +0000]
Fix typo $EXEEXT handling in configure.ac

10 years agoMerge branch 'maint' into HEAD
Yann Dirson [Mon, 17 Feb 2014 22:01:48 +0000]
Merge branch 'maint' into HEAD

Conflicts:
NEWS
configure.ac
gnushogi/cursesdsp.c

10 years agoList savannah news in announcements to be made on release.
Yann Dirson [Mon, 17 Feb 2014 21:54:20 +0000]
List savannah news in announcements to be made on release.

10 years agoBump version to "1.4.2+"
Yann Dirson [Sun, 16 Feb 2014 18:13:16 +0000]
Bump version to "1.4.2+"

10 years agoREADME.maint: list announcements to be done on release.
Yann Dirson [Sun, 16 Feb 2014 17:35:39 +0000]
README.maint: list announcements to be done on release.

10 years agoPrepare v1.4.2.
Yann Dirson [Sun, 16 Feb 2014 17:09:08 +0000]
Prepare v1.4.2.

10 years agoNote remaining known bugs
Yann Dirson [Sun, 16 Feb 2014 17:03:46 +0000]
Note remaining known bugs

10 years agoEnsure the player names are refreshed after a switch (impacts Curses mode).
Yann Dirson [Sun, 16 Feb 2014 16:27:00 +0000]
Ensure the player names are refreshed after a switch (impacts Curses mode).

10 years agoEditBoard: use printf for conciseness
Yann Dirson [Sun, 16 Feb 2014 11:55:57 +0000]
EditBoard: use printf for conciseness

10 years agoCurses: parametrize hardcoded values for captures pieces, fixing minishogi display.
Yann Dirson [Sun, 16 Feb 2014 16:12:43 +0000]
Curses: parametrize hardcoded values for captures pieces, fixing minishogi display.

10 years agoCurses: shift board one char to the right to leave enough space for captures.
Yann Dirson [Sun, 16 Feb 2014 15:06:15 +0000]
Curses: shift board one char to the right to leave enough space for captures.

There was not really enough space to display top player's captures
correctly.

10 years agoEditBoard: display message on wrong input.
Yann Dirson [Sun, 16 Feb 2014 15:03:39 +0000]
EditBoard: display message on wrong input.

10 years agoEditBoard: fix error handling in piece setting.
Yann Dirson [Sun, 16 Feb 2014 13:51:28 +0000]
EditBoard: fix error handling in piece setting.

On invalid piece name, the code was anyway destroying any piece in the
target location, and the whole logic was diluted.

10 years agoCurses: move things around in EditBoard to free the message line.
Yann Dirson [Sun, 16 Feb 2014 14:57:58 +0000]
Curses: move things around in EditBoard to free the message line.

10 years agoCurses: fix position of lower clock for minishogi.
Yann Dirson [Sun, 16 Feb 2014 14:57:01 +0000]
Curses: fix position of lower clock for minishogi.

The hunt for hardcoded values goes on...

10 years agoCurses: avoid getting out of 80 columns when editing board.
Yann Dirson [Sun, 16 Feb 2014 14:50:26 +0000]
Curses: avoid getting out of 80 columns when editing board.

Now print user-provided chars on line following the long prompt.

10 years agoCurses: fix inverted column numbers display for minishogi.
Yann Dirson [Sun, 16 Feb 2014 14:31:45 +0000]
Curses: fix inverted column numbers display for minishogi.

10 years agoCurses: use a macro for left margin of display
Yann Dirson [Sun, 16 Feb 2014 14:11:01 +0000]
Curses: use a macro for left margin of display

10 years agoEditBoard: simplify loop logic by ending iterations early.
Yann Dirson [Sat, 15 Feb 2014 22:28:41 +0000]
EditBoard: simplify loop logic by ending iterations early.

10 years agoEditBoard: restructure loop for consistency.
Yann Dirson [Sat, 15 Feb 2014 22:03:27 +0000]
EditBoard: restructure loop for consistency.

10 years agoEditBoard: resync Curses implementation with the Raw one.
Yann Dirson [Sun, 16 Feb 2014 12:06:36 +0000]
EditBoard: resync Curses implementation with the Raw one.

10 years agoFix use of (COL|ROW)_NAME macros to compute numbers from names.
Yann Dirson [Sat, 15 Feb 2014 21:28:09 +0000]
Fix use of (COL|ROW)_NAME macros to compute numbers from names.

The formula is reversible for the somewhat-standard default position
notation, but that does not mean we should write silly things.  As a
proof, if that was needed, the formula necessary to support the xboard
protocol is not reversible.

10 years agoManual: mention the results obtained in the Computer Shogi Championship in 1994.
Yann Dirson [Mon, 10 Feb 2014 21:30:06 +0000]
Manual: mention the results obtained in the Computer Shogi Championship in 1994.

10 years agoMerge branch 'maint'
Yann Dirson [Mon, 10 Feb 2014 19:56:58 +0000]
Merge branch 'maint'

10 years agoDrop hack supporting old cygwin toolchain for win32 build.
Yann Dirson [Thu, 6 Feb 2014 19:41:35 +0000]
Drop hack supporting old cygwin toolchain for win32 build.

Newer toolchains are now supported by automake cross-compilation
features, no need for this any more.

10 years agoActivate cross-compilation features in autoconf.
Yann Dirson [Tue, 4 Feb 2014 22:01:02 +0000]
Activate cross-compilation features in autoconf.

10 years agoOnly build pat2inc and declare it as dep for pattern.inc when not cross-compiling.
Yann Dirson [Sun, 9 Feb 2014 21:08:57 +0000]
Only build pat2inc and declare it as dep for pattern.inc when not cross-compiling.

This dependency would just cause a failed attempt to rebuild *.inc with
a foreign binary.

10 years agoTeach autogen.sh to generate *-pattern.inc, to allow easy crossbuild from git tree.
Yann Dirson [Sun, 9 Feb 2014 14:21:05 +0000]
Teach autogen.sh to generate *-pattern.inc, to allow easy crossbuild from git tree.

Since this requires to build pat2inc on the host, we do a quick configure
and make, and cleanup afterwards.

Proper support from automake for native tools in a cross setup would be the
correct way do to things, but we don't have it yet.

10 years agoShip *-pattern.inc in the distributed tarball, to simplify cross-compilation.
Yann Dirson [Tue, 4 Feb 2014 21:08:24 +0000]
Ship *-pattern.inc in the distributed tarball, to simplify cross-compilation.

10 years agoAvoid AC_FUNC_MALLOC.
Yann Dirson [Sun, 9 Feb 2014 14:06:08 +0000]
Avoid AC_FUNC_MALLOC.

Its only use would be if we had a chance to call malloc(0), which we do
not.  No need to bother with LIBOBJ for something we don't care about :)

10 years agoInstall text version of opening book instead of binary version.
Yann Dirson [Thu, 6 Feb 2014 22:34:57 +0000]
Install text version of opening book instead of binary version.

Difference in load time is minor, and building a binary book by default
impairs cross-compilation.  A binbook is still saved if possible.

10 years agoRemove texinfo.tex from revision control.
Yann Dirson [Wed, 5 Feb 2014 21:44:16 +0000]
Remove texinfo.tex from revision control.

This one too is fetched by autoreconf when missing.  Let's allow tools to
ensure it is always uptodate, and help code-measuring tool understand that
GNU Shogi is not made of 30% TeX code :)

10 years agoRemove XShogi doc from the manual, and add information about available GUIs.
Yann Dirson [Wed, 5 Feb 2014 21:27:47 +0000]
Remove XShogi doc from the manual, and add information about available GUIs.

10 years agoMerge branch 'maint'
Yann Dirson [Tue, 4 Feb 2014 23:51:09 +0000]
Merge branch 'maint'

Conflicts:
Makefile.in
NEWS
configure.ac
xshogi/parser.y
xshogi/scanner.l

10 years agoRemove XShogi from the source tree
Yann Dirson [Tue, 4 Feb 2014 23:42:20 +0000]
Remove XShogi from the source tree

10 years agoFix dependencies on built executables to include $(EXEEXT) for win32 support.
Yann Dirson [Tue, 4 Feb 2014 22:00:26 +0000]
Fix dependencies on built executables to include $(EXEEXT) for win32 support.

10 years agoDrop -ansi from gcc extra flags.
Yann Dirson [Tue, 4 Feb 2014 21:25:49 +0000]
Drop -ansi from gcc extra flags.

We don't care that much about it, and for some reason it causes the mingw
compiler to not define any WIN32 macro.

10 years agoGet rid of cxx/rxx in favor of COL/ROW_NAME.
Yann Dirson [Sat, 25 Jan 2014 20:58:52 +0000]
Get rid of cxx/rxx in favor of COL/ROW_NAME.

There is nothing to gain with the string-based move conversion, which
adds move dependency on the game variant.  And nothing to gain either from
using 2 mechanisms for the same thing :)

10 years agoDo not hardcode squares for camp limits and spare an #ifdef MINISHOGI.
Yann Dirson [Sat, 25 Jan 2014 20:34:34 +0000]
Do not hardcode squares for camp limits and spare an #ifdef MINISHOGI.

10 years agoImprove readability of algbr().
Yann Dirson [Mon, 20 Jan 2014 22:52:49 +0000]
Improve readability of algbr().

10 years agoUpdate TODO list
Yann Dirson [Mon, 20 Jan 2014 21:57:10 +0000]
Update TODO list

10 years agoMark more functions and vars static.
Yann Dirson [Mon, 20 Jan 2014 21:18:18 +0000]
Mark more functions and vars static.

10 years agoRemove more duplicate variable declarations.
Yann Dirson [Mon, 20 Jan 2014 21:12:01 +0000]
Remove more duplicate variable declarations.

10 years agoMove SetTimeControl into tctrl.c.
Yann Dirson [Mon, 20 Jan 2014 21:02:01 +0000]
Move SetTimeControl into tctrl.c.

Nothing display/interface-specific here.

10 years agoDrop more dead code and unused decls.
Yann Dirson [Mon, 20 Jan 2014 21:00:21 +0000]
Drop more dead code and unused decls.

10 years agoGet rid of redundant "barebones" flag, essentially used as synonym for "XSHOGI".
Yann Dirson [Sun, 19 Jan 2014 21:23:03 +0000]
Get rid of redundant "barebones" flag, essentially used as synonym for "XSHOGI".

10 years agoTrivial if/printf's simplifications.
Yann Dirson [Sun, 19 Jan 2014 21:22:14 +0000]
Trivial if/printf's simplifications.

10 years agoMake posting of ponder output default
H.G. Muller [Fri, 27 Sep 2013 08:06:01 +0000]
Make posting of ponder output default

10 years agoUpdate TODO list
Yann Dirson [Sat, 18 Jan 2014 17:33:48 +0000]
Update TODO list

10 years agoStart NEWS entry for 1.5.0
Yann Dirson [Sat, 18 Jan 2014 17:28:13 +0000]
Start NEWS entry for 1.5.0

10 years agoNuke files missed when switching to automake
Yann Dirson [Thu, 16 Jan 2014 22:19:15 +0000]
Nuke files missed when switching to automake

10 years agoMerge branch 'maint'
Yann Dirson [Thu, 16 Jan 2014 21:43:06 +0000]
Merge branch 'maint'

Conflicts:
configure.ac
gnushogi/cursesdsp.h
gnushogi/dspwrappers.c
gnushogi/dspwrappers.h
gnushogi/pattern.c
gnushogi/rawdsp.h

10 years agoBump version to "1.4.1+".
Yann Dirson [Thu, 16 Jan 2014 21:37:30 +0000]
Bump version to "1.4.1+".

10 years agoPrepare v1.4.1
Yann Dirson [Tue, 14 Jan 2014 21:50:32 +0000]
Prepare v1.4.1

10 years agoUpdate maintainership info in AUTHORS.
Yann Dirson [Tue, 14 Jan 2014 21:27:57 +0000]
Update maintainership info in AUTHORS.

10 years agoUpdate copyright info for 2008 (minishogi patches) and recent developments.
Yann Dirson [Tue, 14 Jan 2014 21:27:42 +0000]
Update copyright info for 2008 (minishogi patches) and recent developments.

10 years agoAdd missing copyright info to *-common.c, added by the minishogi patches.
Yann Dirson [Tue, 14 Jan 2014 21:16:52 +0000]
Add missing copyright info to *-common.c, added by the minishogi patches.

10 years agoAdjust comment to prevent licensecheck from considering pattern.c as generated
Yann Dirson [Tue, 14 Jan 2014 21:07:32 +0000]
Adjust comment to prevent licensecheck from considering pattern.c as generated

10 years agoDoc: mention 1.4.1
Yann Dirson [Tue, 14 Jan 2014 21:04:34 +0000]
Doc: mention 1.4.1

10 years agoDoc: more on shogi variants in general, and Mini Shogi in particular.
Yann Dirson [Tue, 14 Jan 2014 21:01:33 +0000]
Doc: more on shogi variants in general, and Mini Shogi in particular.

10 years agoSwitch build to automake, building gnuminishogi officially.
Yann Dirson [Tue, 17 Dec 2013 22:34:53 +0000]
Switch build to automake, building gnuminishogi officially.

10 years agoStop hardcoding filenames inside pat2inc, use commandline parameters.
Yann Dirson [Tue, 17 Dec 2013 20:47:28 +0000]
Stop hardcoding filenames inside pat2inc, use commandline parameters.

10 years agoPrevent pat2inc from silently reading gnushogi.pat when requested file is not found.
Yann Dirson [Tue, 17 Dec 2013 20:37:19 +0000]
Prevent pat2inc from silently reading gnushogi.pat when requested file is not found.