+=========1.4w10UCIb22===========\r
+- Polyglot now completely poll free...\r
=========1.4w10UCIb21===========\r
- Crash bug in memory command fixed\r
- Small optimizations\r
#define PACKAGE_NAME "polyglot"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "polyglot 1.4w10UCIb21"
+#define PACKAGE_STRING "polyglot 1.4w10UCIb22"
/* 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.4w10UCIb21"
+#define PACKAGE_VERSION "1.4w10UCIb22"
/* 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.4w10UCIb21"
+#define VERSION "1.4w10UCIb22"
/* 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.4w10UCIb21.
+# Generated by GNU Autoconf 2.61 for polyglot 1.4w10UCIb22.
#
# Report bugs to <michel.vandenbergh@uhasselt.be>.
#
# Identity of this package.
PACKAGE_NAME='polyglot'
PACKAGE_TARNAME='polyglot'
-PACKAGE_VERSION='1.4w10UCIb21'
-PACKAGE_STRING='polyglot 1.4w10UCIb21'
+PACKAGE_VERSION='1.4w10UCIb22'
+PACKAGE_STRING='polyglot 1.4w10UCIb22'
PACKAGE_BUGREPORT='michel.vandenbergh@uhasselt.be'
ac_unique_file="mainloop.cpp"
# 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.4w10UCIb21 to adapt to many kinds of systems.
+\`configure' configures polyglot 1.4w10UCIb22 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.4w10UCIb21:";;
+ short | recursive ) echo "Configuration of polyglot 1.4w10UCIb22:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-polyglot configure 1.4w10UCIb21
+polyglot configure 1.4w10UCIb22
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.4w10UCIb21, which was
+It was created by polyglot $as_me 1.4w10UCIb22, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='polyglot'
- VERSION='1.4w10UCIb21'
+ VERSION='1.4w10UCIb22'
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.4w10UCIb21, which was
+This file was extended by polyglot $as_me 1.4w10UCIb22, 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.4w10UCIb21
+polyglot config.status 1.4w10UCIb22
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.4w10UCIb21], [michel.vandenbergh@uhasselt.be])
+AC_INIT([polyglot], [1.4w10UCIb22], [michel.vandenbergh@uhasselt.be])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([mainloop.cpp])
AC_CONFIG_HEADER([config.h])
// constants\r
\r
\r
-static const char * const Version = "1.4W10UCIb21";\r
+static const char * const Version = "1.4W10UCIb22";\r
static const char * const HelpMessage = "\\r
SYNTAX\n\\r
* polyglot [configfile]\n\\r
SECURITY_ATTRIBUTES sa;
STARTUPINFO si;
PROCESS_INFORMATION pi;
+ int fdInput;
state=0;
if (szProcFile == NULL) {
hInput = GetStdHandle(STD_INPUT_HANDLE);
dwMode & ~(ENABLE_MOUSE_INPUT | ENABLE_WINDOW_INPUT));
FlushConsoleInputBuffer(hInput);
}
+ fdInput=_open_osfhandle((intptr_t) hInput,_O_RDONLY);
+ if(fdInput==-1){
+ my_fatal("PipeStruct::Open(): %s",my_error());
+ }
+ fpInput=fdopen(fdInput,"r");
+ if(fpInput==NULL){
+ my_fatal("PipeStruct::Open(): %s",my_error());
+ }
nReadEnd = 0;
lpFeedEnd = NULL;
InitializeCriticalSection(&CriticalSection);
int PipeStruct::ReadData(void){
DWORD dwBytes;
- int ret;
+ char * ret;
- if(!bPipe){
- fgets(lpReadBuffer,LINE_INPUT_MAX_CHAR,stdin);
- dwBytes=strlen(lpReadBuffer);
- if(!dwBytes){
- set_EOF_();
- lpReadBuffer[0]='\0';
- return 0;
- }
- }else{
- // Unfortunately we need to use polling here.
- // Otherwise Windows returns single bytes if
- // the engine runs at low priority.
- // This kills performance.
- while(TRUE){
- ret=PeekNamedPipe(hInput,
- NULL, // don't read anything yet
- 0, // no buffer
- NULL, // no we don't read anything!
- &dwBytes,// now we're talking
- NULL); // nono we don't read anything
- if(!ret){
- set_EOF_();
- lpReadBuffer[0]='\0';
- return 0;
- }
- if(dwBytes>0){
- break;
- }else{
- Idle();
- }
-
- }
- ret=ReadFile(hInput,
- lpReadBuffer,
- LINE_INPUT_MAX_CHAR,
- &dwBytes,
- NULL);
- if(!ret){
- set_EOF_();
- lpReadBuffer[0]='\0';
- return 0;
- }
+ ret=fgets(lpReadBuffer,LINE_INPUT_MAX_CHAR,fpInput);
+ dwBytes=strlen(lpReadBuffer);
+ if(!ret){
+ set_EOF_();
+ lpReadBuffer[0]='\0';
+ return 0;
}
lpReadBuffer[dwBytes]='\0';
return dwBytes;
// includes
#include <windows.h>
+#include <io.h>
+#include <fcntl.h>
+#include <stdio.h>
// constants
struct PipeStruct {
HANDLE hInput, hOutput;
+ FILE *fpInput;
HANDLE hProcess;
HANDLE hThread;
HANDLE hEvent;
Summary: A Winboard protocol to UCI protocol adapter
Name: polyglot
-Version: 1.4w10UCIb21
+Version: 1.4w10UCIb22
Release: 1
License: GPL
Group: Amusement/Games