gnushogi.git
10 years agoDrop useless defines for pat2inc build.
Yann Dirson [Tue, 17 Dec 2013 20:11:59 +0000]
Drop useless defines for pat2inc build.

10 years agoUse .texi suffix, preferred to .texinfo.
Yann Dirson [Tue, 17 Dec 2013 22:39:10 +0000]
Use .texi suffix, preferred to .texinfo.

10 years agoFix ordering of include dirs.
Yann Dirson [Mon, 16 Dec 2013 21:52:53 +0000]
Fix ordering of include dirs.

Local headers first, then build dir, then src dir.

10 years agoMinor makefile improvements
Yann Dirson [Mon, 16 Dec 2013 21:53:23 +0000]
Minor makefile improvements

10 years agoMove into opts.h the "mostly for hacking" remark from INSTALL file.
Yann Dirson [Sun, 15 Dec 2013 11:45:02 +0000]
Move into opts.h the "mostly for hacking" remark from INSTALL file.

10 years agoMerge branch 'maint' into master
Yann Dirson [Thu, 5 Dec 2013 22:31:07 +0000]
Merge branch 'maint' into master

10 years agoUpdate .gitignore for doc/ dir.
Yann Dirson [Thu, 5 Dec 2013 22:23:19 +0000]
Update .gitignore for doc/ dir.

10 years ago#define _POSIX_C_SOURCE to get proper access to snprintf and vsnprintf.
Yann Dirson [Thu, 5 Dec 2013 22:18:31 +0000]
#define _POSIX_C_SOURCE to get proper access to snprintf and vsnprintf.

10 years agoUse POSIX setvbuf in preference to BSD setlinebuf.
Yann Dirson [Thu, 5 Dec 2013 22:13:44 +0000]
Use POSIX setvbuf in preference to BSD setlinebuf.

This avoids implicit declaration of setlinebuf with GNU libc, which would
have required to define _BSD_SOURCE just to get rid of, and is not an
innocuous setting.

Drop call to no-op AC_FUNC_SETVBUF_REVERSED at the same time.

10 years agoFully quote autoconf macro arguments, as they should.
Yann Dirson [Thu, 5 Dec 2013 22:10:37 +0000]
Fully quote autoconf macro arguments, as they should.

10 years agoBump version to "1.4.1-rc0+".
Yann Dirson [Thu, 5 Dec 2013 22:03:01 +0000]
Bump version to "1.4.1-rc0+".

10 years agoGenerate HTML doc using makeinfo, instead of obsolecent texi2html
Yann Dirson [Thu, 5 Dec 2013 20:19:06 +0000]
Generate HTML doc using makeinfo, instead of obsolecent texi2html

10 years agoMinor cleanups.
Yann Dirson [Sat, 9 Nov 2013 22:44:21 +0000]
Minor cleanups.

10 years agoProvide "sd <n>" as (primary) alias of "depth <n>" for xboard conformance.
Yann Dirson [Sat, 9 Nov 2013 22:43:42 +0000]
Provide "sd <n>" as (primary) alias of "depth <n>" for xboard conformance.

10 years agoAllow "depth <n>" syntax.
Yann Dirson [Sat, 9 Nov 2013 22:41:44 +0000]
Allow "depth <n>" syntax.

10 years agoMention all supported commands in Raw_help.
Yann Dirson [Sat, 9 Nov 2013 22:32:11 +0000]
Mention all supported commands in Raw_help.

Still have to figure out what some of them do :)

10 years agoRemove support for -DNOPOST, and duplicate code it would introduce.
Yann Dirson [Sat, 9 Nov 2013 22:07:51 +0000]
Remove support for -DNOPOST, and duplicate code it would introduce.

This define would probably not have worked today anyway...

10 years agoReintroduce printf in Raw_help.
Yann Dirson [Sat, 9 Nov 2013 22:02:33 +0000]
Reintroduce printf in Raw_help.

There is no problem anymore with using printf here now that we don't use
CP[] anymore.  Well, that was not such a big problem anyway even then :]

10 years agoRestore interactive "level" mode in xshogi proto, by dropping trailing newline in...
Yann Dirson [Sat, 9 Nov 2013 21:54:37 +0000]
Restore interactive "level" mode in xshogi proto, by dropping trailing newline in GetString.

Not very interesting in itself, except that bug was causing some code to
be dead in Raw_SelectLevel, and several similar functions should be made
similar to that one to implement xboard protocol correctly.

10 years agoMove "offset to command args" to InputCommand.
Yann Dirson [Sat, 9 Nov 2013 17:03:32 +0000]
Move "offset to command args" to InputCommand.

10 years agoStatify more functions.
Yann Dirson [Sat, 9 Nov 2013 17:02:48 +0000]
Statify more functions.

10 years agoRefactor InputCommand, removing last need for NOT_CURSES macro.
Yann Dirson [Sat, 9 Nov 2013 16:56:06 +0000]
Refactor InputCommand, removing last need for NOT_CURSES macro.

10 years agoRefactor needlessly-complicated Raw_SelectLevel.
Yann Dirson [Sat, 9 Nov 2013 16:54:11 +0000]
Refactor needlessly-complicated Raw_SelectLevel.

10 years agoDeal with simple compiler warnings: dead code, unused parameters, etc.
Yann Dirson [Wed, 6 Nov 2013 23:06:47 +0000]
Deal with simple compiler warnings: dead code, unused parameters, etc.

10 years agoWhitespace and parenthesis cleanup.
Yann Dirson [Wed, 6 Nov 2013 21:18:36 +0000]
Whitespace and parenthesis cleanup.

10 years agoSwitch display-selection framework from dspwrappers to "struct display".
Yann Dirson [Wed, 6 Nov 2013 21:33:03 +0000]
Switch display-selection framework from dspwrappers to "struct display".

Much easier to write, will allow to correctly separate raw from xshogi,
to add proper xboard support, etc.

10 years agoDrop -pedantic from default gcc flags and restore use of explicit initializer fields.
Yann Dirson [Wed, 6 Nov 2013 21:22:51 +0000]
Drop -pedantic from default gcc flags and restore use of explicit initializer fields.

This flag includes warnings for the explicit initializer construct,
but it is much too useful.

10 years agoPrepare v1.4.1rc0.
Yann Dirson [Thu, 7 Nov 2013 21:24:01 +0000]
Prepare v1.4.1rc0.

10 years agoUpdate manual for maintainer, project communication, and plans.
Yann Dirson [Thu, 7 Nov 2013 21:23:27 +0000]
Update manual for maintainer, project communication, and plans.

10 years agoUpdate TODO: there are plans for v1.5, and things have been done.
Yann Dirson [Thu, 7 Nov 2013 21:08:14 +0000]
Update TODO: there are plans for v1.5, and things have been done.

10 years agoFix "make dist" not to include a recursive copy of the dist.
Yann Dirson [Tue, 5 Nov 2013 22:10:24 +0000]
Fix "make dist" not to include a recursive copy of the dist.

10 years agoFix formatting of boards in texinfo doc.
Yann Dirson [Tue, 5 Nov 2013 21:56:47 +0000]
Fix formatting of boards in texinfo doc.

10 years agoUpdate NEWS file for upcoming 1.4.1.
Yann Dirson [Tue, 5 Nov 2013 21:09:58 +0000]
Update NEWS file for upcoming 1.4.1.

10 years agoRemove version number from manpage.
Yann Dirson [Tue, 5 Nov 2013 21:03:08 +0000]
Remove version number from manpage.

It was not very useful there, and has been out of sync with the software
version anyway.

10 years agoRemove unused obsolete version numbers from Makefiles.
Yann Dirson [Tue, 5 Nov 2013 21:02:17 +0000]
Remove unused obsolete version numbers from Makefiles.

10 years agoTake note of more cleanups to do.
Yann Dirson [Sun, 20 Oct 2013 18:52:39 +0000]
Take note of more cleanups to do.

10 years agoMove hashfile definition from configure.ac into Makefile.in
Yann Dirson [Sun, 20 Oct 2013 19:41:47 +0000]
Move hashfile definition from configure.ac into Makefile.in

Like other similar defs...

10 years agoUse configure --enable-minishogi to select build of gnuminishogi.
Yann Dirson [Sun, 20 Oct 2013 19:29:45 +0000]
Use configure --enable-minishogi to select build of gnuminishogi.

At the same time, provide an empty gnuminishogi.tbk so things work more
as they should.

Only the patterns are still necessary to specify manually at this point.

10 years agoFix mini-Shogi out-of-bounds acces of board
H.G. Muller [Fri, 27 Sep 2013 07:37:45 +0000]
Fix mini-Shogi out-of-bounds acces of board

10 years agoAvoid looking at the game type to determine minishogi piece values.
Yann Dirson [Wed, 28 Sep 2011 22:12:07 +0000]
Avoid looking at the game type to determine minishogi piece values.

We don't know how to determine the game type anyway, and a previous
patch disables its computation, but no need to compile dead code in this
case.

Another problem to look at is that "in_opening_stage" is surely
badly tuned for MiniShogi, but the program seems to score better with
current code that by telling there is opening stage.

Flag FIXME's where applicable so some willing soul would know where to
find things to improve for MiniShogi.

10 years agoDisable GuessGameType() for MiniShogi.
Yann Dirson [Wed, 28 Sep 2011 21:27:03 +0000]
Disable GuessGameType() for MiniShogi.

Game types for MiniShogi are surely different from the ones in Shogi, so
this would require serious thought to get it right.  Just pretend we don't
know.

10 years agoFix ScorePosition() for MiniShogi.
Yann Dirson [Wed, 28 Sep 2011 21:25:24 +0000]
Fix ScorePosition() for MiniShogi.

Gcc's stack-smashing protection combined with glibc's -D_FORTIFY_SOURCE
detected with a segfault that we were using 9x9-board offsets on our 5x5
board.  This patch abstracts the relevant hardcoded constants and provides
correct values for MiniShogi.

10 years agoGenerate patterns.inc at build time.
Yann Dirson [Mon, 11 Feb 2008 00:47:01 +0000]
Generate patterns.inc at build time.

10 years agoInitial attempt at minishogi.
Yann Dirson [Mon, 11 Feb 2008 00:47:00 +0000]
Initial attempt at minishogi.

This preliminar minishogi takes the approach of conditional
compilation, so I can focus on differences between shogi and
minishogi.  Those ifdef's are expected to progressively disappear as
the support code is made generic enough to support the needs of both
variants.

10 years agoFix various regression for building out of tree.
Yann Dirson [Sun, 20 Oct 2013 20:07:19 +0000]
Fix various regression for building out of tree.

Most notably, doc was never buildable out of tree, but the recent build
enhancements did not take that into account.

10 years agoWindows port
H.G. Muller [Fri, 27 Sep 2013 07:39:28 +0000]
Windows port

This patch makes GNU Shogi compilable with gcc under Cygwin, using the
-mno-cygwin flag, so that it can run as a native Windows application,
independent of Cygwin1.dll.

The patch is fully conditional, based on defined(WIN32).

YD: rebased onto recent refactorings

10 years agoNormalize configure --help using AS_HELP_STRING.
Yann Dirson [Sun, 3 Nov 2013 14:00:20 +0000]
Normalize configure --help using AS_HELP_STRING.

10 years agoDon't bail out if configure (without --with-curses) does not find libcurses.
Yann Dirson [Sun, 3 Nov 2013 14:00:19 +0000]
Don't bail out if configure (without --with-curses) does not find libcurses.

Only fail when --with-curses was requested and libcurses cannot be found.

10 years agoFix funny search-and-replace copyright typo.
Yann Dirson [Sun, 3 Nov 2013 14:00:18 +0000]
Fix funny search-and-replace copyright typo.

10 years agoUse centralized version from configure.ac, drop use of separate patchlevel.
Yann Dirson [Sun, 3 Nov 2013 14:00:16 +0000]
Use centralized version from configure.ac, drop use of separate patchlevel.

10 years agoMove strings back into source code, from .lng support.
Yann Dirson [Sun, 3 Nov 2013 14:00:13 +0000]
Move strings back into source code, from .lng support.

* there is no point in translating the protocol
* if someone wants to translate the curses UI, this should be done with
  gettext

10 years agoMove ElapsedTime to tcontrl.c, now that there is a single implementation.
Yann Dirson [Wed, 23 Oct 2013 21:31:45 +0000]
Move ElapsedTime to tcontrl.c, now that there is a single implementation.

10 years agoMake UpdateClocks and input-polling dspwrappers-based too.
Yann Dirson [Wed, 23 Oct 2013 21:27:46 +0000]
Make UpdateClocks and input-polling dspwrappers-based too.

Those things are the only thing called from ElapsedTime() to be different
between Curses and Raw/X, and were not abstracted yet.

The poll-based polling code was not called from within ElapsedTime(), which
made it less frequently called, but that did not seem to be a problem.  And
it was redundant in Curses mode with the FIONREAD call.

10 years agoFix regression with stdarg dspwrappers.
Yann Dirson [Mon, 21 Oct 2013 22:51:02 +0000]
Fix regression with stdarg dspwrappers.

1be442641b610fa1b6172a38d9acffe2d22797b6 and
3f589711eb3ecc7644378d6a0f2f29bc4b4c7db9 are both broken, passing the
va_list inside another va_list to poor unsuspecting backend implementations.

10 years agoFixed minor regression in makepatter.
Yann Dirson [Sat, 19 Oct 2013 20:22:02 +0000]
Fixed minor regression in makepatter.

In 6cdb4afe21c8d0eb740a6a22a02a0adf922fddfc, I messed up a conditional
causing an error message to be written even when we did find a pattern file.

10 years agoFix build of --with-curses mode.
Yann Dirson [Sat, 19 Oct 2013 20:02:52 +0000]
Fix build of --with-curses mode.

Broken by 6030715dffdadf4402dccf6a8bf9966cfab2be1d and not checked soon enough :(

10 years agoDrop non-curses support from Curses_ElapsedTime.
Yann Dirson [Sat, 19 Oct 2013 19:47:18 +0000]
Drop non-curses support from Curses_ElapsedTime.

Similar to 58e443e7ec0d834fe75a9eda53f4cfaf7f8b106c, was a remnant from
before 4a9acd2e4d21586f2af629ec44cd78c237dcd702.

10 years agoDrop NOT_CURSES occurences from makepattern.
Yann Dirson [Sat, 19 Oct 2013 19:44:25 +0000]
Drop NOT_CURSES occurences from makepattern.

Why on earth are we supposing that pat2inc would run in Curses mode one day ?

10 years agoConvert more stuff from #ifdef to dspwrappers: SetupBoard.
Yann Dirson [Sat, 19 Oct 2013 19:43:25 +0000]
Convert more stuff from #ifdef to dspwrappers: SetupBoard.

Not a very big problem since that function is not curses-only this time,
but raw-only.  But this is the natural continuation of the "nuke NOT_CURSES"
movement.

10 years agoStop exporting Curses-internal functions to everyone.
Yann Dirson [Sat, 19 Oct 2013 19:33:37 +0000]
Stop exporting Curses-internal functions to everyone.

Possible since cursesdsp is now self-contained.

10 years agoFinish the --without-curses support.
Yann Dirson [Sat, 19 Oct 2013 19:27:11 +0000]
Finish the --without-curses support.

Now that all the silly problems refering to Curses-specific functions from
unrelated places are all solved, we can spare linking cursesdsp when not
required.

10 years agoRemove dead Curses-specific code from Raw_ElapsedTime()
Yann Dirson [Sat, 19 Oct 2013 19:25:44 +0000]
Remove dead Curses-specific code from Raw_ElapsedTime()

10 years agoRemove useless explicit prototype for pow().
Yann Dirson [Sat, 19 Oct 2013 19:19:29 +0000]
Remove useless explicit prototype for pow().

10 years agoChange ElapsedTime to a normal display function.
Yann Dirson [Sat, 19 Oct 2013 17:07:12 +0000]
Change ElapsedTime to a normal display function.

The FIONREAD version is clearly tied to Curses, and the NOFIONREAD works
corectly with xshogi/xboard as well as Raw.  No reason for a separate
mechanism.

--without-curses now builds as expected.

10 years agoMake spacing consistent in *dsp.c, kill unused global hidden between funcs.
Yann Dirson [Sat, 19 Oct 2013 15:48:45 +0000]
Make spacing consistent in *dsp.c, kill unused global hidden between funcs.

10 years agoFactorize ElapsedTime implementations by restricting HAVE_GETTIMEOFDAY #ifdef's.
Yann Dirson [Sat, 19 Oct 2013 15:42:21 +0000]
Factorize ElapsedTime implementations by restricting HAVE_GETTIMEOFDAY #ifdef's.

(and take the best-looking one on cosmetic differences)

10 years agoFix ShowPrompt implementation across display drivers.
Yann Dirson [Sat, 19 Oct 2013 14:03:55 +0000]
Fix ShowPrompt implementation across display drivers.

10 years agoConvert more stuff from #ifdef to dspwrappers: GetString.
Yann Dirson [Thu, 17 Oct 2013 20:46:54 +0000]
Convert more stuff from #ifdef to dspwrappers: GetString.

Thin function is the first non-void one and shows the limits of the
current macro set.  Let's consider this stuff to be temporary.

At least it finally allows to drop #include <curses.h> from commondsp.

10 years agoConvert more stuff from #ifdef to dspwrappers: AlwaysShowMessage.
Yann Dirson [Tue, 15 Oct 2013 22:56:52 +0000]
Convert more stuff from #ifdef to dspwrappers: AlwaysShowMessage.

10 years agoProvide a Raw version of ShowNodeCnt to avoid more #ifdef's.
Yann Dirson [Tue, 15 Oct 2013 22:54:58 +0000]
Provide a Raw version of ShowNodeCnt to avoid more #ifdef's.

At the same time, nuking "#ifdef DYNAMIC_ZNODES" (dead code).

10 years agoWhen in check, complain with the requested move.
Yann Dirson [Tue, 15 Oct 2013 22:28:44 +0000]
When in check, complain with the requested move.

Looks like in xshogi mode we were complaining by explicitly using the
algebraic notation, but apparently noone forces us to do so.

10 years agoAdd safeguard against buffer overflow when calling scanf.
Yann Dirson [Tue, 15 Oct 2013 21:58:43 +0000]
Add safeguard against buffer overflow when calling scanf.

10 years agoConvert more stuff from #ifdef to dspwrappers.
Yann Dirson [Tue, 15 Oct 2013 20:41:09 +0000]
Convert more stuff from #ifdef to dspwrappers.

10 years agoConfigure: stop abusing AC_MSG_CHECKING, use correct idioms.
Yann Dirson [Sat, 19 Oct 2013 13:35:58 +0000]
Configure: stop abusing AC_MSG_CHECKING, use correct idioms.

10 years agoFinally get rid of that highly non-standard use of SIGINT.
Yann Dirson [Mon, 14 Oct 2013 19:46:46 +0000]
Finally get rid of that highly non-standard use of SIGINT.

People will at last be able to Ctrl-C gnushogi :)

10 years agoRegularly check for user input when searching, to have a chance to catch EOF from...
Yann Dirson [Mon, 14 Oct 2013 19:38:24 +0000]
Regularly check for user input when searching, to have a chance to catch EOF from engine.

When an engine quits without terminating a searching gnushogi, it would
continue to search and never realize there was no reason to continue.

This is a poll-based implementation of what H.G.Muller wrote for WIN32 to
circumvent the lack of UNIX signals there.

10 years agoDetect EOF waiting for user input in xshogi and raw modes, and trigger exit.
Yann Dirson [Mon, 14 Oct 2013 19:34:04 +0000]
Detect EOF waiting for user input in xshogi and raw modes, and trigger exit.

No idea why the raw implementation of ExitShogi() did not call exit().
Even after detecting EOF, we were thrown into a tight loop...

10 years agoRestore SIGINT for stopping gnushogi when thinking.
Yann Dirson [Sun, 13 Oct 2013 21:25:42 +0000]
Restore SIGINT for stopping gnushogi when thinking.

SIGINT is unfortunately part of the protocol inherited from gnuchess4,
and is used by xboard as such.  So this was not a proper fix for the
original issue.

This reverts commit 00e10bc4a760150665436b17c50abf264f28d435,
"Don't intercept INT and QUIT signals, and use USR1 instead of QUIT for".

10 years agoRename configure --with-xshogi to --enable-xshogi for correctness.
Yann Dirson [Sun, 13 Oct 2013 22:42:58 +0000]
Rename configure --with-xshogi to --enable-xshogi for correctness.

10 years agoStart of a "make dist" target.
Yann Dirson [Tue, 8 Oct 2013 21:10:33 +0000]
Start of a "make dist" target.

The old one uses a script that was never published...

10 years agoRework doc-handing make rules and remove generated files from version control.
Yann Dirson [Tue, 8 Oct 2013 20:05:45 +0000]
Rework doc-handing make rules and remove generated files from version control.

Newer texinfo.tex was imported from texinfo 5.1.

10 years agoRemove hack previously used to insert diags into generated HTML.
Yann Dirson [Tue, 8 Oct 2013 21:15:50 +0000]
Remove hack previously used to insert diags into generated HTML.

Useless since db5c540ff7e9dd176f797b50031141e2c2059456.

10 years agoDon't cause autogen.sh to run configure.
Yann Dirson [Tue, 8 Oct 2013 18:45:16 +0000]
Don't cause autogen.sh to run configure.

10 years agoInitiate new ChangeLog using git2cl.
Yann Dirson [Tue, 8 Oct 2013 20:32:22 +0000]
Initiate new ChangeLog using git2cl.

10 years agoStart to fill NEWS, rotate pre-git logs to ChangeLog.old.
Yann Dirson [Tue, 8 Oct 2013 20:31:43 +0000]
Start to fill NEWS, rotate pre-git logs to ChangeLog.old.

10 years agoCritical texinfo doc formatting fixes.
Yann Dirson [Tue, 8 Oct 2013 20:12:02 +0000]
Critical texinfo doc formatting fixes.

* "@sp 1" everywhere look ugly today
* ASCII rendering of boards requires @verbatim

10 years agoUse @ifnotex and not @ifinfo, or HTML does not get its ToC.
Yann Dirson [Tue, 8 Oct 2013 20:10:40 +0000]
Use @ifnotex and not @ifinfo, or HTML does not get its ToC.

10 years agoRemove text of the GPL (v2) from texinfo doc, it did not format any more though TeX.
Yann Dirson [Tue, 8 Oct 2013 20:07:59 +0000]
Remove text of the GPL (v2) from texinfo doc, it did not format any more though TeX.

10 years agoHonor LDFLAGS at link-time.
Yann Dirson [Sun, 29 Sep 2013 22:36:07 +0000]
Honor LDFLAGS at link-time.

10 years agoAllow configure --without-curses.
Yann Dirson [Sun, 29 Sep 2013 21:16:30 +0000]
Allow configure --without-curses.

Not finding libcurses was surely causing problems, we now also proceed cleanly
in that case.

10 years agoRemove excessive boilerplate duplication from dspwrappers.
Yann Dirson [Sun, 29 Sep 2013 14:25:34 +0000]
Remove excessive boilerplate duplication from dspwrappers.

10 years agoAdd .gitignore file
Yann Dirson [Sun, 29 Sep 2013 14:29:54 +0000]
Add .gitignore file

10 years agoClarify configure options that only relate to xshogi
Yann Dirson [Sun, 29 Sep 2013 13:51:42 +0000]
Clarify configure options that only relate to xshogi

10 years agoRestore previous copyright information that got removed by error.
Yann Dirson [Thu, 3 Oct 2013 18:55:49 +0000]
Restore previous copyright information that got removed by error.

This reverts part of commit 82b026e6376b640a4d3409a461dd6bd83708e33e,
which changed too much of the copyright headers when changing license
to GPL3.

10 years agoFix another hardcored 9x9-board hardcoded value.
Yann Dirson [Wed, 28 Sep 2011 22:03:51 +0000]
Fix another hardcored 9x9-board hardcoded value.

10 years agoDocument internal APIs.
Yann Dirson [Mon, 11 Feb 2008 00:47:00 +0000]
Document internal APIs.

10 years agoParametrize more hardcoded contants.
Yann Dirson [Mon, 11 Feb 2008 00:47:00 +0000]
Parametrize more hardcoded contants.

10 years agoUse enums.
Yann Dirson [Mon, 11 Feb 2008 00:46:59 +0000]
Use enums.

10 years agoAdd support for building gnushogi and xshogi out of source tree.
Yann Dirson [Mon, 11 Feb 2008 00:46:59 +0000]
Add support for building gnushogi and xshogi out of source tree.

10 years agoDeal with warnings raised by -Wformat-security.
Yann Dirson [Tue, 27 Sep 2011 20:31:11 +0000]
Deal with warnings raised by -Wformat-security.