+=========1.4.38b================\r
+- MSVC++ portability fixes (E.M.)\r
=========1.4.37b================\r
- Two new options: BookDepth and BookTreshold. BookDepth limits the number of moves the book is used and BookTreshold sets the minimum weight a book move should have.\r
=========1.4.36b================\r
\r
// constants\r
\r
-static const int COUNT_MAX = 16384;\r
-static const int StringSize = 4096;\r
+#define COUNT_MAX ((int)16384)\r
+#define StringSize ((int)4096)\r
\r
static const int NIL = -1;\r
\r
static int gen_book_moves(list_t * list, const board_t * board){\r
int first_pos, pos, index;\r
entry_t entry[1];\r
- list_clear(list);\r
bool found;\r
+ list_clear(list);\r
found=FALSE;\r
for (index = board->key & (uint64) Book->mask; (first_pos=Book->hash[index]) != NIL; index = (index+1) & Book->mask) {\r
ASSERT(first_pos>=0&&first_pos<Book->size);\r
#define PACKAGE_NAME "polyglot"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "polyglot 1.4.37b"
+#define PACKAGE_STRING "polyglot 1.4.38b"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "polyglot"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.4.37b"
+#define PACKAGE_VERSION "1.4.38b"
/* Define to 1 if the C compiler supports function prototypes. */
#define PROTOTYPES 1
#define TIME_WITH_SYS_TIME 1
/* Version number of package */
-#define VERSION "1.4.37b"
+#define VERSION "1.4.38b"
/* Define like PROTOTYPES; this can be used by system headers. */
#define __PROTOTYPES 1
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for polyglot 1.4.37b.
+# Generated by GNU Autoconf 2.61 for polyglot 1.4.38b.
#
# Report bugs to <michel.vandenbergh@uhasselt.be>.
#
# Identity of this package.
PACKAGE_NAME='polyglot'
PACKAGE_TARNAME='polyglot'
-PACKAGE_VERSION='1.4.37b'
-PACKAGE_STRING='polyglot 1.4.37b'
+PACKAGE_VERSION='1.4.38b'
+PACKAGE_STRING='polyglot 1.4.38b'
PACKAGE_BUGREPORT='michel.vandenbergh@uhasselt.be'
ac_unique_file="mainloop.c"
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures polyglot 1.4.37b to adapt to many kinds of systems.
+\`configure' configures polyglot 1.4.38b to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of polyglot 1.4.37b:";;
+ short | recursive ) echo "Configuration of polyglot 1.4.38b:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-polyglot configure 1.4.37b
+polyglot configure 1.4.38b
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by polyglot $as_me 1.4.37b, which was
+It was created by polyglot $as_me 1.4.38b, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='polyglot'
- VERSION='1.4.37b'
+ VERSION='1.4.38b'
cat >>confdefs.h <<_ACEOF
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by polyglot $as_me 1.4.37b, which was
+This file was extended by polyglot $as_me 1.4.38b, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-polyglot config.status 1.4.37b
+polyglot config.status 1.4.38b
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([polyglot], [1.4.37b], [michel.vandenbergh@uhasselt.be])
+AC_INIT([polyglot], [1.4.38b], [michel.vandenbergh@uhasselt.be])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([mainloop.c])
AC_CONFIG_HEADER([config.h])
// variables\r
\r
engine_t Engine[1];\r
-static const int StringSize=4096;\r
+#define StringSize ((int)4096)\r
\r
// functions\r
\r
static const bool Strict = FALSE; // FALSE\r
static const bool UseDebug = FALSE; // FALSE\r
\r
-static const int StringSize = 1024;\r
+#define StringSize ((int)1024)\r
\r
// functions\r
\r
// constants\r
\r
\r
-static const char * const Version = "1.4.37b";\r
+static const char * const Version = "1.4.38b";\r
static const char * const HelpMessage = "\\r
SYNTAX\n\\r
* polyglot [configfile]\n\\r
\r
// constants\r
\r
-static const int StringSize = 4096;\r
+#define StringSize ((int)4096)\r
\r
// includes\r
\r
OBJS = attack.obj board.obj book.obj book_make.obj book_merge.obj colour.obj\
engine.obj epd.obj fen.obj game.obj gui.obj hash.obj io.obj line.obj list.obj\
main.obj mainloop.obj move.obj move_do.obj move_gen.obj move_legal.obj\
- option.obj parse.obj pgn.obj piece.obj pipe.obj posix.obj random.obj san.obj\
- search.obj square.obj uci.obj uci2uci.obj util.obj xboard2uci.obj
+ option.obj parse.obj pgn.obj piece.obj pipex_win32.obj pipex_posix.obj\
+ random.obj san.obj search.obj square.obj uci.obj uci2uci.obj util.obj\
+ xboard2uci.obj
LIBS = oldnames.lib
$(EXE): $(OBJS)
$(LINK) $(LFLAGS) $(OBJS) $(LIBS) -out:$(EXE)
-.cpp.obj:
+.c.obj:
$(CC) $(CFLAGS) -c $<
// option_insert()\r
\r
void option_insert(option_list_t *option, option_t *new_option){\r
+ int i;\r
+ option_t *opt;\r
ASSERT(option!=NULL);\r
ASSERT(new_option!=NULL);\r
ASSERT(new_option->name!=NULL);\r
- option_t *opt;\r
opt=option_find(option,new_option->name);\r
if(!opt){\r
opt=&option->options[option->option_nb];\r
option->option_nb++;\r
}\r
- int i;\r
if(option->option_nb>=OptionNb){\r
my_fatal("option_insert(): option list overflow\n");\r
}\r
\r
// constants\r
\r
-static const int StringSize = 256;\r
+#define StringSize ((int)256)\r
\r
// variables\r
\r
si.hStdInput = hStdinRead;
si.hStdOutput = hStdoutWrite;
si.hStdError = hStdoutWrite;
- if((szCurrentDir = _getcwd( NULL, 0 )) == NULL )
+ if((szCurrentDir = (char*)_getcwd( NULL, 0 )) == NULL )
my_fatal("pipex_open(): no current directory: %s\n",
strerror(errno));
if(_chdir(szWorkingDir)){
// pipex_exit()
void pipex_exit(pipex_t *pipex) {
+ DWORD lpexit;
CloseHandle(pipex->hInput);
CloseHandle(pipex->hOutput);
- DWORD lpexit;
if(GetExitCodeProcess(pipex->hProcess,&lpexit)){
if(lpexit==STILL_ACTIVE)
// pipex_set_affinit()
+typedef void (WINAPI *SPAM)(HANDLE, int);
void pipex_set_affinity(pipex_t *pipex, int value){
+ SPAM pSPAM;
+
if(pipex->hProcess) return;
if(value==-1) return;
- typedef void (WINAPI *SPAM)(HANDLE, int);
- SPAM pSPAM;
pSPAM = (SPAM) GetProcAddress(
GetModuleHandle(TEXT("kernel32.dll")),
"SetProcessAffinityMask");
Summary: A Winboard protocol to UCI protocol adapter
Name: polyglot
-Version: 1.4.37b
+Version: 1.4.38b
Release: 1
License: GPL
Group: Amusement/Games
\r
// constants\r
\r
-static const int StringSize = 4096;\r
+#define StringSize ((int)4096)\r
\r
// variables\r
\r
\r
static const bool UseDebug = FALSE;\r
\r
-static const int StringSize = 4096;\r
+#define StringSize ((int)4096)\r
\r
// variables\r
\r
// uci_set_threads()\r
\r
void uci_set_threads(uci_t * uci, int n) {\r
- ASSERT(n>=1);\r
const char *thread_option=uci_thread_option(uci);\r
+ ASSERT(n>=1);\r
if(thread_option){\r
uci_send_option(uci,thread_option,"%d",n);\r
}\r
#include <stdlib.h>\r
#include <string.h>\r
#include <time.h>\r
+#ifndef _MSC_VER\r
#include <sys/time.h>\r
+#endif\r
\r
#include "main.h"\r
#include "util.h"\r
\r
#define FormatBufferSize 4096\r
\r
+#ifdef _MSC_VER\r
+#define vsnprintf _vsnprintf\r
+#endif\r
+\r
#define CONSTRUCT_ARG_STRING(format,buf) \\r
{ \\r
va_list arg_list; \\r