summaryrefslogtreecommitdiff
path: root/games/exchess
diff options
context:
space:
mode:
authorjoerg <joerg>2011-11-25 21:52:33 +0000
committerjoerg <joerg>2011-11-25 21:52:33 +0000
commit52920cf8c23d76b1fb6e3fa647ebc35d03e54dc1 (patch)
treee0895ee4547a60fe4a5e9d8816709cb3271f956a /games/exchess
parentb2b438373e2ed650c795d474816fa5508ff4709e (diff)
downloadpkgsrc-52920cf8c23d76b1fb6e3fa647ebc35d03e54dc1.tar.gz
Fix build with modern GCC
Diffstat (limited to 'games/exchess')
-rw-r--r--games/exchess/distinfo12
-rw-r--r--games/exchess/patches/patch-aa26
-rw-r--r--games/exchess/patches/patch-ad33
-rw-r--r--games/exchess/patches/patch-ai39
-rw-r--r--games/exchess/patches/patch-aj35
-rw-r--r--games/exchess/patches/patch-parse.cpp13
-rw-r--r--games/exchess/patches/patch-setup.cpp24
7 files changed, 144 insertions, 38 deletions
diff --git a/games/exchess/distinfo b/games/exchess/distinfo
index 27c6138a58d..72561ee4d34 100644
--- a/games/exchess/distinfo
+++ b/games/exchess/distinfo
@@ -1,16 +1,18 @@
-$NetBSD: distinfo,v 1.6 2005/04/17 05:48:34 minskim Exp $
+$NetBSD: distinfo,v 1.7 2011/11/25 21:52:33 joerg Exp $
SHA1 (EXCH314S.zip) = 7d8ffbd94dc86a97512826e611048a691c8c646d
RMD160 (EXCH314S.zip) = 0503200c210aaf7ddc69e1372392e8ea690505ea
Size (EXCH314S.zip) = 110676 bytes
-SHA1 (patch-aa) = 40e90ccef0f2f1cd56ab8545ab73f93ccdb04017
+SHA1 (patch-aa) = 43731240e32aaab2c7c32aac343ef31f5a220b5a
SHA1 (patch-ab) = a9385051ed9d482e02bbeff40b5d9552ebc56c9f
SHA1 (patch-ac) = cfc1beff8ae3b2e4c9620e8d49852ce80d848ad6
-SHA1 (patch-ad) = ea2c66248a07d21db498bb093be284327838ccaa
+SHA1 (patch-ad) = e3d5a89d78346ebc35818783af1f1d7e506ab78b
SHA1 (patch-ae) = 9d374b888a6f431604f41c4421baa23d8ca775a1
SHA1 (patch-af) = 7eb0c780dea41b5d17a532f82a76b984eeefda2d
SHA1 (patch-ag) = 00bb9750c823aecd7fa44aacc1cf539e062055a9
SHA1 (patch-ah) = 872b0b7c62f95075f0ce7360464fa51215619ee3
-SHA1 (patch-ai) = 5aaa3e15304c8f19282770d126623d71bf747dbe
-SHA1 (patch-aj) = 83f69a5deb3198877a7c8309f34ed9f1189b355a
+SHA1 (patch-ai) = 0f8a0182460982181a8bd9d802759f6f24067a79
+SHA1 (patch-aj) = b769f2f063794a323136ff75d6219d6f6f98600e
SHA1 (patch-ak) = 659f1cf07efefe524be4d025446fea55eb5f3e9a
+SHA1 (patch-parse.cpp) = b3eab9785fb3be104ba8258259bcf2254c695194
+SHA1 (patch-setup.cpp) = 16914d19bb6bc48341409dfa15d9f451e4f46733
diff --git a/games/exchess/patches/patch-aa b/games/exchess/patches/patch-aa
index 54aee032b5f..78321e9102d 100644
--- a/games/exchess/patches/patch-aa
+++ b/games/exchess/patches/patch-aa
@@ -1,8 +1,26 @@
-$NetBSD: patch-aa,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
+$NetBSD: patch-aa,v 1.2 2011/11/25 21:52:33 joerg Exp $
---- book.cpp.orig Sun Apr 30 09:56:26 2000
+--- book.cpp.orig 2000-04-30 09:56:26.000000000 +0000
+++ book.cpp
-@@ -52,7 +52,7 @@
+@@ -12,12 +12,14 @@
+ #include "const.h"
+ #include <stdio.h>
+ #include <string.h>
+-#include <iostream.h>
+-#include <iomanip.h>
+-#include <fstream.h>
++#include <iostream>
++#include <iomanip>
++#include <fstream>
+ #include <math.h>
+ #include <time.h>
+
++using namespace std;
++
+ /* variables for book learning */
+ book_rec learn_book[100]; // book learning array
+ int learn_count = 0; // number of book moves played
+@@ -52,7 +54,7 @@ void build_book(position ipos)
char outbook[100];
position temp_pos; // temporary position
move bmove; // book move under consideration
@@ -11,7 +29,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
int i = -1, j = 0, k = 0, p; // loop variables
int count = 0, thresh, LINE_DEPTH; // control variables
-@@ -245,7 +245,7 @@
+@@ -245,7 +247,7 @@ int find_record(position p, move m, int
{
file_pos = 0;
int jump = int(file_size/2);
diff --git a/games/exchess/patches/patch-ad b/games/exchess/patches/patch-ad
index a2c086cfbe5..5b7aa76c4d0 100644
--- a/games/exchess/patches/patch-ad
+++ b/games/exchess/patches/patch-ad
@@ -1,8 +1,27 @@
-$NetBSD: patch-ad,v 1.2 2004/02/14 04:31:56 kristerw Exp $
+$NetBSD: patch-ad,v 1.3 2011/11/25 21:52:33 joerg Exp $
---- main.cpp.orig 2000-04-01 07:46:20.000000000 +0200
-+++ main.cpp 2004-02-14 04:58:19.000000000 +0100
-@@ -17,6 +17,7 @@
+--- main.cpp.orig 2000-04-01 07:46:20.000000000 +0000
++++ main.cpp
+@@ -3,20 +3,23 @@
+
+ /* Main functions controlling program */
+
+-#include <iostream.h>
+-#include <iomanip.h>
++#include <iostream>
++#include <iomanip>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+ #include <stdio.h>
+ #include <signal.h>
+-#include <fstream.h>
++#include <fstream>
+
+ #include "define.h"
+
++using namespace std;
++
#if UNIX
#include <sys/types.h>
#include <sys/time.h>
@@ -10,7 +29,7 @@ $NetBSD: patch-ad,v 1.2 2004/02/14 04:31:56 kristerw Exp $
#else
#include <windows.h>
#include <time.h>
-@@ -56,7 +57,7 @@
+@@ -56,7 +59,7 @@ position reset_pos;
extern int ponder, last_ponder, learn_count, learned;
extern unsigned long TAB_SIZE, PAWN_SIZE;
@@ -19,7 +38,7 @@ $NetBSD: patch-ad,v 1.2 2004/02/14 04:31:56 kristerw Exp $
char exec_path[100];
// performance function
-@@ -93,16 +94,7 @@
+@@ -93,16 +96,7 @@ int main(int argc, char *argv[])
learn_count = 0; learned = 0; learn_bk = 1; shout_book = 0;
@@ -37,7 +56,7 @@ $NetBSD: patch-ad,v 1.2 2004/02/14 04:31:56 kristerw Exp $
/* initializing hash tables, check tables, scoring parameters,
and the random number seed and tablebases */
-@@ -117,7 +109,7 @@
+@@ -117,7 +111,7 @@ int main(int argc, char *argv[])
if(li < 10) sprintf(lfile, "run_log.00%i", li);
else if(li < 100) sprintf(lfile, "run_log.0%i", li);
else sprintf(lfile, "run_log.%i", li);
diff --git a/games/exchess/patches/patch-ai b/games/exchess/patches/patch-ai
index 30aec137df7..bffa3fc9440 100644
--- a/games/exchess/patches/patch-ai
+++ b/games/exchess/patches/patch-ai
@@ -1,8 +1,17 @@
-$NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
+$NetBSD: patch-ai,v 1.2 2011/11/25 21:52:33 joerg Exp $
---- exmove.cpp.orig Sat Feb 14 04:16:56 2004
-+++ exmove.cpp Sat Feb 14 04:19:15 2004
-@@ -52,8 +52,8 @@
+--- exmove.cpp.orig 2000-04-01 07:46:42.000000000 +0000
++++ exmove.cpp
+@@ -8,7 +8,7 @@
+ #include "const.h"
+ #include "funct.h"
+ #include "hash.h"
+-#include "iostream.h"
++#include <iostream>
+
+ /* Hash code variables */
+ extern hash_rec *hash_table; // pointer to hash_table
+@@ -52,8 +52,8 @@ int exec_move(position *p, move emove, i
{ return 0; }
p->sq[5] = p->sq[7];
p->sq[7] = empty;
@@ -13,7 +22,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
p->has_castled[1] = 1;
/* update piece list */
for(pi=1;pi<=p->plist[p->wtm][ROOK][0];pi++)
-@@ -69,8 +69,8 @@
+@@ -69,8 +69,8 @@ int exec_move(position *p, move emove, i
{ return 0; }
p->sq[3] = p->sq[0];
p->sq[0] = empty;
@@ -24,7 +33,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
p->has_castled[1] = 1;
/* update piece list */
for(pi=1;pi<=p->plist[p->wtm][ROOK][0];pi++)
-@@ -86,8 +86,8 @@
+@@ -86,8 +86,8 @@ int exec_move(position *p, move emove, i
{ return 0; }
p->sq[61] = p->sq[63];
p->sq[63] = empty;
@@ -35,7 +44,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
p->has_castled[0] = 1;
/* update piece list */
for(pi=1;pi<=p->plist[p->wtm][ROOK][0];pi++)
-@@ -103,8 +103,8 @@
+@@ -103,8 +103,8 @@ int exec_move(position *p, move emove, i
{ return 0; }
p->sq[59] = p->sq[56];
p->sq[56] = empty;
@@ -46,7 +55,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
p->has_castled[0] = 1;
/* update piece list */
for(pi=1;pi<=p->plist[p->wtm][ROOK][0];pi++)
-@@ -125,7 +125,7 @@
+@@ -125,7 +125,7 @@ int exec_move(position *p, move emove, i
if(p->sq[emove.b.to].type) {
// Remove hashcode for the target square
@@ -55,7 +64,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
// Remove piece from piece list
for(pi=1;pi<=p->plist[p->wtm^1][p->sq[emove.b.to].type][0];pi++)
if(p->plist[p->wtm^1][p->sq[emove.b.to].type][pi] == emove.b.to) {
-@@ -143,8 +143,8 @@
+@@ -143,8 +143,8 @@ int exec_move(position *p, move emove, i
// Move the new piece to the target square
p->sq[emove.b.to] = p->sq[emove.b.from];
// Update the hash code to reflect the move
@@ -66,7 +75,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
// Original square is now empty
p->sq[emove.b.from] = empty;
-@@ -152,7 +152,7 @@
+@@ -152,7 +152,7 @@ int exec_move(position *p, move emove, i
if(emove.b.type&EP) {
if(p->wtm) {
p->sq[emove.b.to-8] = empty;
@@ -75,7 +84,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
// Update piece lists
for(pi=1;pi<=p->plist[p->wtm^1][PAWN][0];pi++)
if(p->plist[BLACK][PAWN][pi] == emove.b.to-8) {
-@@ -163,7 +163,7 @@
+@@ -163,7 +163,7 @@ int exec_move(position *p, move emove, i
}
} else {
p->sq[emove.b.to+8] = empty;
@@ -84,7 +93,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
// Update piece lists
for(pi=1;pi<=p->plist[p->wtm^1][PAWN][0];pi++)
if(p->plist[WHITE][PAWN][pi] == emove.b.to+8) {
-@@ -189,7 +189,7 @@
+@@ -189,7 +189,7 @@ int exec_move(position *p, move emove, i
// if the move is a promotion, promote it
if(emove.b.type&PROMOTE) {
// Remove the pawn from the hash code
@@ -93,7 +102,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
// Change the piece type to the promoted piece
p->sq[emove.b.to].type = emove.b.promote;
// Add the new piece to the piece lists
-@@ -206,7 +206,7 @@
+@@ -206,7 +206,7 @@ int exec_move(position *p, move emove, i
// adjust material score
p->material += value[emove.b.promote] - value[PAWN];
// add piece to hash code
@@ -102,7 +111,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
// adjust total piece count
p->pieces[p->wtm]++;
}
-@@ -214,11 +214,11 @@
+@@ -214,11 +214,11 @@ int exec_move(position *p, move emove, i
// update position characteristics
p->wtm = p->wtm^1;
p->material = -p->material;
@@ -117,7 +126,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
// if move is a pawn push 2 spaces, set en passant flag
if((emove.b.type&PAWN_PUSH2) &&
-@@ -235,8 +235,8 @@
+@@ -235,8 +235,8 @@ int exec_move(position *p, move emove, i
p->last = emove;
// update hash code for en-passant and castling status
diff --git a/games/exchess/patches/patch-aj b/games/exchess/patches/patch-aj
index 19296e7918f..1090aaee21b 100644
--- a/games/exchess/patches/patch-aj
+++ b/games/exchess/patches/patch-aj
@@ -1,8 +1,29 @@
-$NetBSD: patch-aj,v 1.1 2004/02/14 04:31:56 kristerw Exp $
+$NetBSD: patch-aj,v 1.2 2011/11/25 21:52:33 joerg Exp $
---- search.cpp.orig Sat Feb 14 04:30:46 2004
-+++ search.cpp Sat Feb 14 04:32:41 2004
-@@ -181,7 +181,7 @@
+--- search.cpp.orig 2000-04-30 09:56:56.000000000 +0000
++++ search.cpp
+@@ -4,7 +4,7 @@
+ /* Search Functions */
+ #define TIME_FLAG 123456
+
+-#include <iostream.h>
++#include <iostream>
+ #include <stdio.h>
+
+ #if DEBUG
+@@ -12,7 +12,10 @@
+ #include <stdlib.h>
+ #endif
+
+-#include <fstream.h>
++#include <fstream>
++
++using namespace std;
++
+ #include "define.h"
+ #include "chess.h"
+ #include "const.h"
+@@ -181,7 +184,7 @@ move search(position p, int time_limit,
last_depth = 1;
// adjusting hash code for game stage
@@ -11,7 +32,7 @@ $NetBSD: patch-aj,v 1.1 2004/02/14 04:31:56 kristerw Exp $
// initialize history table
for(int i = 0; i < 64; i++)
-@@ -261,7 +261,7 @@
+@@ -261,7 +264,7 @@ move search(position p, int time_limit,
}
// adjusting hash code for game stage
@@ -20,7 +41,7 @@ $NetBSD: patch-aj,v 1.1 2004/02/14 04:31:56 kristerw Exp $
if(!xboard && !ALLEG && post) {
cout << "\nnode_count = " << node_count
-@@ -423,7 +423,7 @@
+@@ -423,7 +426,7 @@ outfile << space_string << "->Ply: " <<
if(ply) {
// add hash code for this position to position list
p_list[turn+ply-1] = sp[ply].hcode;
@@ -29,7 +50,7 @@ $NetBSD: patch-aj,v 1.1 2004/02/14 04:31:56 kristerw Exp $
// fifty move rule
if(sp[ply].fifty >= 100) return(0);
-@@ -470,8 +470,8 @@
+@@ -470,8 +473,8 @@ outfile << space_string << "->Ply: " <<
{
node_count++;
sp[ply+1] = sp[ply]; sp[ply+1].wtm ^= 1;
diff --git a/games/exchess/patches/patch-parse.cpp b/games/exchess/patches/patch-parse.cpp
new file mode 100644
index 00000000000..9e36c02afb5
--- /dev/null
+++ b/games/exchess/patches/patch-parse.cpp
@@ -0,0 +1,13 @@
+$NetBSD: patch-parse.cpp,v 1.1 2011/11/25 21:52:33 joerg Exp $
+
+--- parse.cpp.orig 2011-11-25 17:25:09.000000000 +0000
++++ parse.cpp
+@@ -7,7 +7,7 @@
+ #include "chess.h"
+ #include "funct.h"
+ #include "const.h"
+-#include <iostream.h>
++#include <iostream>
+ #include <stdio.h>
+ #include <string.h>
+
diff --git a/games/exchess/patches/patch-setup.cpp b/games/exchess/patches/patch-setup.cpp
new file mode 100644
index 00000000000..f6b2826aa23
--- /dev/null
+++ b/games/exchess/patches/patch-setup.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-setup.cpp,v 1.1 2011/11/25 21:52:33 joerg Exp $
+
+--- setup.cpp.orig 2011-11-25 17:25:49.000000000 +0000
++++ setup.cpp
+@@ -7,8 +7,8 @@
+ // routines are run when EXchess first starts up.
+ //
+
+-#include <iostream.h>
+-#include <fstream.h>
++#include <iostream>
++#include <fstream>
+ #include <stdlib.h>
+ #include <string.h>
+
+@@ -18,6 +18,8 @@
+ #include "funct.h"
+ #include "hash.h"
+
++using namespace std;
++
+ /* Simple tables for quick in_check? tests */
+ int check_table[64][64];
+ int rook_check_table[64][64];