diff options
author | rillig <rillig@pkgsrc.org> | 2020-03-21 14:41:45 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-03-21 14:41:45 +0000 |
commit | de113526d45caa6e187abfa014c4ea50ea2e553b (patch) | |
tree | e9b15a62f80227ae532bbc31a1717c0e06c655af /games | |
parent | 69c201cab026506f4643d2cc3ef32a0b54ecc33d (diff) | |
download | pkgsrc-de113526d45caa6e187abfa014c4ea50ea2e553b.tar.gz |
games/exchess: update to 7.97beta
Changes since 7.31beta are unknown since the upstream author didn't
document anything.
I just stumbled upon this package because it didn't build with
-Werror=char-subscripts. That bug seems to have been fixed.
Diffstat (limited to 'games')
-rw-r--r-- | games/exchess/Makefile | 22 | ||||
-rw-r--r-- | games/exchess/distinfo | 21 | ||||
-rw-r--r-- | games/exchess/files/patch-move | 399 | ||||
-rw-r--r-- | games/exchess/patches/patch-search.par.in | 15 | ||||
-rw-r--r-- | games/exchess/patches/patch-src_book.cpp | 48 | ||||
-rw-r--r-- | games/exchess/patches/patch-src_chess.h | 138 | ||||
-rw-r--r-- | games/exchess/patches/patch-src_exmove.cpp | 15 | ||||
-rw-r--r-- | games/exchess/patches/patch-src_funct.h | 24 | ||||
-rw-r--r-- | games/exchess/patches/patch-src_hash.cpp | 15 | ||||
-rw-r--r-- | games/exchess/patches/patch-src_hash.h | 24 | ||||
-rw-r--r-- | games/exchess/patches/patch-src_main.cpp | 15 | ||||
-rw-r--r-- | games/exchess/patches/patch-src_score.cpp | 15 | ||||
-rw-r--r-- | games/exchess/patches/patch-src_search.cpp | 33 | ||||
-rw-r--r-- | games/exchess/patches/patch-src_support.cpp | 29 |
14 files changed, 413 insertions, 400 deletions
diff --git a/games/exchess/Makefile b/games/exchess/Makefile index 54c575558a2..6ca5c997121 100644 --- a/games/exchess/Makefile +++ b/games/exchess/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.19 2020/01/26 17:31:14 rillig Exp $ +# $NetBSD: Makefile,v 1.20 2020/03/21 14:41:45 rillig Exp $ -DISTNAME= EXchess_v7.31beta -PKGNAME= exchess-7.31beta +DISTNAME= EXchess_v7.97beta +PKGNAME= exchess-7.97beta CATEGORIES= games -MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITES= -https://sites.google.com/site/experimentalchessprogram/home/${DISTNAME}${EXTRACT_SUFX}?attredirects=0&d=1 EXTRACT_SUFX= .zip MAINTAINER= pkgsrc-users@NetBSD.org @@ -12,29 +12,25 @@ COMMENT= Experimental chess engine LICENSE= gnu-gpl-v3 USE_LANGUAGES= c++ -NO_CONFIGURE= yes WRKSRC= ${WRKDIR}/${DISTNAME:C/beta//} LIBDIR= ${PREFIX}/lib/exchess DOCDIR= ${PREFIX}/share/doc/exchess +AUTO_MKDIRS= yes CFLAGS+= -DEXCHESS_DIR=${LIBDIR} LDFLAGS+= ${PTHREAD_LDFLAGS} LIBS+= ${PTHREAD_LIBS} -post-extract: - cd ${WRKSRC} && ${MV} search.par search.par.in +SUBST_CLASSES+= dirs +SUBST_STAGE.dirs= pre-configure +SUBST_FILES.dirs= search.par +SUBST_SED.dirs= -e 's,/Users/homand/EXchess/TB,${PREFIX}/share/egtb,' do-build: cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} \ ${CXX} ${CFLAGS} src/EXchess.cc -o exchess ${LDFLAGS} ${LIBS} -post-build: - ${SED} -e "s,@PREFIX@,${PREFIX},g" \ - < ${WRKSRC}/search.par.in > ${WRKSRC}/search.par - -INSTALLATION_DIRS+= bin lib/exchess ${DOCDIR} - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/exchess ${DESTDIR}${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/search.par ${DESTDIR}${PREFIX}/lib/exchess diff --git a/games/exchess/distinfo b/games/exchess/distinfo index 0bb220dbb29..58a5f53d3b5 100644 --- a/games/exchess/distinfo +++ b/games/exchess/distinfo @@ -1,17 +1,6 @@ -$NetBSD: distinfo,v 1.12 2015/11/03 20:56:48 agc Exp $ +$NetBSD: distinfo,v 1.13 2020/03/21 14:41:45 rillig Exp $ -SHA1 (EXchess_v7.31beta.zip) = 09fa6d133172e34c1908df148f56489c47ee8cc2 -RMD160 (EXchess_v7.31beta.zip) = 38a3a6b3a3a53ff62321642954ff4d29ebfe9705 -SHA512 (EXchess_v7.31beta.zip) = 0bac23f748238fc2f8fceeee29112911a7f3f03ce0ce930bf415ab69632bf673b23d466ca0299069daf5636ef91b9ff0d4633632e6f57a352bebbd9344dd60a6 -Size (EXchess_v7.31beta.zip) = 3421179 bytes -SHA1 (patch-search.par.in) = 664781d6f9a204f9a071825dc3ebee19da4e3f8b -SHA1 (patch-src_book.cpp) = ab12445c7ebd769a2a90166fba4ef256f293709d -SHA1 (patch-src_chess.h) = 569c3f79a51a6be9cec83e98ef6c38f7e8d30660 -SHA1 (patch-src_exmove.cpp) = e4cff58e89501f5b73d78984ab8bf76a50d12677 -SHA1 (patch-src_funct.h) = d3ecab4fad483ac41f76993ecfb6af38c243115a -SHA1 (patch-src_hash.cpp) = 3556b37f386d867d092075edcd1cc279bb4c0223 -SHA1 (patch-src_hash.h) = 5af2f9bad4484cc07ff8cb452b7b7759c3ab9d4e -SHA1 (patch-src_main.cpp) = e68ef0a3a9ef4aaaeab59c8da0e3badd198e49f1 -SHA1 (patch-src_score.cpp) = f74c09b8bed649bbf6d00d0e3401de4dc16dd353 -SHA1 (patch-src_search.cpp) = eae69d8e31ca42b27db64df19e58b02b030b0a6a -SHA1 (patch-src_support.cpp) = 4329f3863e2f4ebb18f2c427043cfbdff6879c4c +SHA1 (EXchess_v7.97beta.zip) = 1ea71ba8ce9ecbc52699ee39490f1d275c91dd82 +RMD160 (EXchess_v7.97beta.zip) = 7e317362040321b8dcecae867a6710036846d579 +SHA512 (EXchess_v7.97beta.zip) = 33e909bf2f39996e579c16ba2752f6d8d1c0d3c7e788c95be7fa8bc8b8ef67d3792693b28d3f73e52fb3f45bffbc5c9ccb0cf7a5fb27f70bb154de7e93f7df86 +Size (EXchess_v7.97beta.zip) = 1759660 bytes diff --git a/games/exchess/files/patch-move b/games/exchess/files/patch-move new file mode 100644 index 00000000000..cffc7105d7d --- /dev/null +++ b/games/exchess/files/patch-move @@ -0,0 +1,399 @@ +$NetBSD: patch-move,v 1.1 2020/03/21 14:41:45 rillig Exp $ + +Avoid conflict with std::move (joerg, 2013-04-30). + +The package builds fine on NetBSD 8 without this patch. Therefore it is +placed in files/ instead of patches/, until it is needed. Next time when +a build failure occurs, please mention the exact build environment. + +Can be removed after 2021Q1 if not needed. + +--- src/book.cpp.orig 2017-02-04 14:23:32.000000000 +0000 ++++ src/book.cpp +@@ -44,7 +44,7 @@ void build_book(position ipos) + char instring[100], line[100]; // strings from input files + char outbook[100], resp; + position temp_pos; // temporary position +- move bmove; // book move under consideration ++ my_move bmove; // book move under consideration + unsigned __int64 pcode; // hash code for position + int i = -1, j = 0, p,q; // loop variables + int r, s; +@@ -314,7 +314,7 @@ void build_book(position ipos) + //-------------------------------------------------------- + // Function to find a position in the book + //-------------------------------------------------------- +-int find_record(position p, move m, int file_size, book_rec *book_record, fstream *book_f, int file_pos) ++int find_record(position p, my_move m, int file_size, book_rec *book_record, fstream *book_f, int file_pos) + { + int jump = int(file_size/2); + unsigned __int64 pcode = ZERO; +@@ -384,12 +384,12 @@ int find_record(position p, move m, int + // becomes a candidate move. Information is stored to + // facilitate easy learning during the game. + //-------------------------------------------------------- +-move opening_book(h_code hash_code, position p, game_rec *gr) ++my_move opening_book(h_code hash_code, position p, game_rec *gr) + { + int file_size, mflag = 0, j; + int candidates = 0, total_score = 0; + move_list list; +- move nomove; nomove.t = 0; ++ my_move nomove; nomove.t = 0; + char book_file[100]; // file name for the book + book_rec book_record; // record of move considered + int file_pos = 0; // file position of record +@@ -680,7 +680,7 @@ int edit_book(h_code hash_code, position + if(outflag == 1) cout << "\n"; + + /* Edit mode for individual moves */ +- move edit_move; ++ my_move edit_move; + while(1) { + cout << "\nEnter a move to be edited/investigated (0 = quit): "; + cin >> mstring; if(mstring[0] == '0') break; + +--- src/chess.h.orig 2017-02-04 14:23:32.000000000 +0000 ++++ src/chess.h +@@ -31,7 +31,7 @@ struct move_t { + // union of move_t and an integer to make comparison of + // moves easier. (as suggested in Tom Kerrigans simple chess program) + +-union move { ++union my_move { + move_t b; + int32_t t; // assuming a 32 bit integer + }; +@@ -39,7 +39,7 @@ union move { + // Add a score for sorting purposes to the move record + + struct move_rec { +- move m; ++ my_move m; + int score; + }; + +@@ -91,17 +91,17 @@ struct position { + unsigned char threat_square; + unsigned char threat_check; + +- move hmove; // expected best move +- move rmove; // reply move +- move cmove; // combination move +- ++ my_move hmove; // expected best move ++ my_move rmove; // reply move ++ my_move cmove; // combination move ++ + int8_t gstage; // game stage, range 0-16 -- depends only + // upon pawn structure --> important for pawn hashing! + // NOTE: **must** be integer so it is subtracted properly + // -- should check this for all subtractions! unsigned ints + // may be converted incorrectly if they are negated. + int8_t plist[2][7][10]; // piece lists +- move last; // last move made ++ my_move last; // last move made + h_code hcode; // hash code + h_code pcode; // pawn hash code + +@@ -142,7 +142,7 @@ struct position { + + /* moves.cpp */ + void allmoves(move_list *list, ts_thread_data *tdata); +- int verify_move(move_list *list, ts_thread_data *tdata, move tmove); ++ int verify_move(move_list *list, ts_thread_data *tdata, my_move tmove); + void add_move(int fsq, int tsq, move_list *list, char type, ts_thread_data *tdata); + void pawn_moves(move_list *list, int sqr, ts_thread_data *tdata); + void king_moves(move_list *list, int sqr, ts_thread_data *tdata); +@@ -169,7 +169,7 @@ struct position { + void rook_cc(move_list *list, int sqr, int ds); + + /* exmove.cpp */ +- int exec_move(move emove, int ply); ++ int exec_move(my_move emove, int ply); + + /* attacks.cpp */ + int simple_check(int move_sq); +@@ -198,8 +198,8 @@ struct position { + + /* support.cpp */ + void write_fen(int trailing_cr); +- void print_move(move pmove, char mstring[10], ts_thread_data *temps); +- move parse_move(char mstring[10], ts_thread_data *temps); ++ void print_move(my_move pmove, char mstring[10], ts_thread_data *temps); ++ my_move parse_move(char mstring[10], ts_thread_data *temps); + + }; + +@@ -225,7 +225,7 @@ struct search_node { + h_code ckey; // variables for combination hash move + cmove_rec *cmove; + +- move smove; // current move we are searching ++ my_move smove; // current move we are searching + + int ply; + +@@ -290,7 +290,7 @@ struct ts_thread_data { + int quit_thread; // flag to tell thread to quit + + search_node n[MAXD+1]; // array of search positions +- move pc[MAXD+1][MAXD+1]; // triangular array for search ++ my_move pc[MAXD+1][MAXD+1]; // triangular array for search + // principle continuation + h_code plist[MAX_GAME_PLY]; // hash codes of positions visited + +@@ -337,7 +337,7 @@ struct ts_thread_data { + } + + /* search.cpp */ +- inline void pc_update(move pcmove, int ply); ++ inline void pc_update(my_move pcmove, int ply); + + }; + +@@ -389,16 +389,16 @@ struct tree_search { + int fail_high; // flag for failing high + int fail_low; // flag for failing low + +- move bookm; // move from opening book +- move ponder_move; // move we are pondering +- move last_displayed_move; // best move from previous search display ++ my_move bookm; // move from opening book ++ my_move ponder_move; // move we are pondering ++ my_move last_displayed_move; // best move from previous search display + + int tsuite, analysis_mode; // flags to determine whether we are in + // analysis mode or a test suite + + move_list root_moves; // movelist for the root position + +- move singular_response; // store a singular response ++ my_move singular_response; // store a singular response + + // threads for SMP + int thread_index; +@@ -415,7 +415,7 @@ struct tree_search { + + // variables to support testsuite mode + float soltime; +- unsigned int bmcount; move bmoves[256]; ++ unsigned int bmcount; my_move bmoves[256]; + int best_score; + char bmtype[3]; // "am" avoid move or "bm" best move string + +@@ -432,7 +432,7 @@ struct tree_search { + void history_stats(); + + /* search.cpp */ +- move search(position p, int time_limit, int T, game_rec *gr); ++ my_move search(position p, int time_limit, int T, game_rec *gr); + int search_threads(int alpha, int beta, int depth, int threads); + void sort_root_moves(); + +@@ -465,9 +465,9 @@ struct game_rec { + position reset; // reset position for takebacks + /* available moves */ + move_list movelist; // list of pseudo-legal moves for current pos +- move best; // best move for current position ++ my_move best; // best move for current position + /* game history info */ +- move game_history[MAX_GAME_PLY]; // list of move played ++ my_move game_history[MAX_GAME_PLY]; // list of move played + + /* game control flags and counters */ + int T; // turn number + +--- src/exmove.cpp.orig 2017-02-04 14:23:32.000000000 +0000 ++++ src/exmove.cpp +@@ -15,7 +15,7 @@ + // If the move is legal, the function returns a 1, otherwise 0. + // Note that the move is made, regardless - so proper precautions + // need to be taken, if the move might need to be undone +-int position::exec_move(move emove, int ply) ++int position::exec_move(my_move emove, int ply) + { + move_t mv = emove.b; + register int pi; + +--- src/funct.h.orig 2017-02-04 14:23:32.000000000 +0000 ++++ src/funct.h +@@ -22,7 +22,7 @@ void write_out(const char *); // write + void performance(); // performance test function + + /* search.cpp */ +-void pc_update(move pcmove, int ply); ++void pc_update(my_move pcmove, int ply); + + /* setup.cpp */ + void set_search_param(); +@@ -41,7 +41,7 @@ void QuickSortMove(move_rec *Lb, move_re + void build_book(position ipos); + void book_learn(int flag, game_rec *gr); + int edit_book(h_code hash_code, position *p); +-move opening_book(h_code hash_code, position p, game_rec *gr); ++my_move opening_book(h_code hash_code, position p, game_rec *gr); + + /* util.cpp */ + int GetTime(); + +--- src/game_rec.cpp.orig 2017-02-04 14:23:32.000000000 +0000 ++++ src/game_rec.cpp +@@ -695,7 +695,7 @@ void game_rec::build_fen_list() + /* variables */ + char file[100]; // file names + char instring[100], line[200]; // strings from input files +- move bmove; // book move under consideration ++ my_move bmove; // book move under consideration + unsigned __int64 pcode; // hash code for position + int i = -1, j = 0, p,q; // loop variables + int r, s; + +--- src/hash.cpp.orig 2017-02-04 14:23:32.000000000 +0000 ++++ src/hash.cpp +@@ -7,7 +7,7 @@ + // void close_hash() + // void put_hash(h_code (*h_key), int score, int alpha, int beta, + // int depth, int hmove_t, int mate_ext, int h_id) +-// int get_hash(h_code (*h_key), int *hflag, int *hdepth, int *mate_ext, move *gmove) ++// int get_hash(h_code (*h_key), int *hflag, int *hdepth, int *mate_ext, my_move *gmove) + // int get_move(h_code (*h_key)) + // int put_move(h_code (h_key), int putmove, int h_id) + // void position::gen_code() +@@ -218,7 +218,7 @@ void put_hash(h_code (*h_key), int score + //-------------------------------------------- + // function to find and return a hash entry + //-------------------------------------------- +-int get_hash(h_code (*h_key), int *hflag, int *hdepth, move *gmove, int ply, int *singular) ++int get_hash(h_code (*h_key), int *hflag, int *hdepth, my_move *gmove, int ply, int *singular) + { + hash_bucket *h; int best_depth_rec = -1; + +@@ -298,7 +298,7 @@ int get_move(h_code (*h_key)) + if (best_depth_rec < 0) return NOMOVE; + + // copy relevant data +- move hmove; ++ my_move hmove; + hmove.t = h->rec[best_depth_rec].hr_hmove.t; + + // unset any singular bit that might be set + +--- src/hash.h.orig 2017-02-04 14:23:32.000000000 +0000 ++++ src/hash.h +@@ -28,7 +28,7 @@ + struct hash_rec + { + h_code hr_key; +- move hr_hmove; ++ my_move hr_hmove; + int16_t hr_score; + char hr_depth; // note that stored depths cannot be larger than 127 + unsigned char hr_data; // first 5 bits = id, next 2 = flag, next 1 = mate_ext +@@ -131,7 +131,7 @@ void open_hash(); + void close_hash(); + void set_hash_size(unsigned int Mbytes); + void put_hash(h_code *h_key, int score, int alpha, int beta, int depth, int hmove, int h_id, int ply); +-int get_hash(h_code *h_key, int *hflag, int *hdepth, move *gmove, int ply, int *singular); ++int get_hash(h_code *h_key, int *hflag, int *hdepth, my_move *gmove, int ply, int *singular); + int get_move(h_code *h_key); + int put_move(h_code h_key, int putmove, int h_id); + + +--- src/main.cpp.orig 2017-02-04 14:23:32.000000000 +0000 ++++ src/main.cpp +@@ -104,7 +104,7 @@ char exec_path[FILENAME_MAX]; + int main(int argc, char *argv[]) + { + char mstring[10]; +- move hint; ++ my_move hint; + + #ifdef TEST_ASSERT + assert(0); // testing that asserts are off + +--- src/moves.cpp.orig 2017-02-04 14:23:32.000000000 +0000 ++++ src/moves.cpp +@@ -33,7 +33,7 @@ void position::allmoves(move_list *list, + + } + +-int position::verify_move(move_list *list, ts_thread_data *tdata, move tmove) ++int position::verify_move(move_list *list, ts_thread_data *tdata, my_move tmove) + { + list->count = 0; + + +--- src/search.cpp.orig 2017-02-04 14:23:32.000000000 +0000 ++++ src/search.cpp +@@ -3,7 +3,7 @@ + + /* Search Functions */ + //----------------------------------------------------------------------------- +-// move tree_search::search(position p, int time_limit, int T, game_rec *gr) ++// my_move tree_search::search(position p, int time_limit, int T, game_rec *gr) + // inline void tree_search::pc_update(move pcmove, int ply) + // inline void MSort(move_rec *Lb, move_rec *Ub) + // int search_node::root_pvs(int alpha, int beta, int depth) +@@ -39,7 +39,7 @@ unsigned __int64 attempts=0, successes=0 + /*----------------------- Search function ---------------------*/ + // Driver for the search process. 1st initialize important data + // structures, then do iterative deeping until time runs out. +-move tree_search::search(position p, int time_limit, int T, game_rec *gr) ++my_move tree_search::search(position p, int time_limit, int T, game_rec *gr) + { + char outstring[400], mstring[10]; + int g, done, pvi; +@@ -47,7 +47,7 @@ move tree_search::search(position p, int + int last_mate_score = 0, mate_iteration_count = 0; + int limit_search_depth = max_search_depth; + position pv_pos; +- move nomove; nomove.t = NOMOVE; ++ my_move nomove; nomove.t = NOMOVE; + + #if DEBUG_SEARCH + search_outfile.open("search_debug.log"); +@@ -583,7 +583,7 @@ move tree_search::search(position p, int + // It is updated by doing a mem-copy of the principle continuation + // found at deeper depths to this depth + the move at this depth + // is stuffed in first. +-inline void ts_thread_data::pc_update(move pcmove, int ply) ++inline void ts_thread_data::pc_update(my_move pcmove, int ply) + { + pc[ply][ply].t = pcmove.t; + for (int pci = ply+1; pci < MAXD; pci++) + +--- src/support.cpp.orig 2017-02-04 14:23:32.000000000 +0000 ++++ src/support.cpp +@@ -3,7 +3,7 @@ + + /* support.cpp - functions for position and tree search support */ + //-------------------------------------------------------------------------------- +-// move position::parse_move(char mstring[10], tree_search *temps) ++// my_move position::parse_move(char mstring[10], tree_search *temps) + // void position::print_move(move pmove, char mstring[10], tree_search *temps) + // void position::write_fen() + // void tree_search::log_search(int score) +@@ -24,11 +24,11 @@ + // Function to parse a move from the human player + // This move is checked then checked to see if it is legal + //---------------------------------------------------------- +-move position::parse_move(char mstring[10], ts_thread_data *temps) ++my_move position::parse_move(char mstring[10], ts_thread_data *temps) + { + int legal = 0, piece, to_sq = -1, from_sq = -1, promote = QUEEN; + int from_file = -1, from_row = -1, match_count = 0; +- move play, mplay[4], nomove; ++ my_move play, mplay[4], nomove; + play.t = 0; nomove.t = 0; + mplay[0].t = 0; mplay[1].t = 0; mplay[2].t = 0; mplay[3].t = 0; + position t_pos; +@@ -200,7 +200,7 @@ move position::parse_move(char mstring[1 + // long algebraic format. This function works by simply + // adding the appropriate characters to the move string + //---------------------------------------------------------- +-void position::print_move(move pmove, char mstring[10], ts_thread_data *temps) ++void position::print_move(my_move pmove, char mstring[10], ts_thread_data *temps) + { + char dummy[10]; // dummy character string + int ptype, pfrom, pto, ppiece; diff --git a/games/exchess/patches/patch-search.par.in b/games/exchess/patches/patch-search.par.in deleted file mode 100644 index 7465070a7b9..00000000000 --- a/games/exchess/patches/patch-search.par.in +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-search.par.in,v 1.1 2014/09/11 16:59:16 jperkin Exp $ - -Replace hardcoded path. - ---- search.par.in.orig 2014-08-17 11:03:10.000000000 +0000 -+++ search.par.in -@@ -40,7 +40,7 @@ LIMIT_THREADS 4 # Maximum num - - # Endgame Tablebases - if you have them installed - --EGTB_PATH /Users/homand/EXchess/TB -+EGTB_PATH @PREFIX@/share/egtb - EGTB_CACHE_SIZE 8.0 # Tablebase cache size in megabytes - - # Log File diff --git a/games/exchess/patches/patch-src_book.cpp b/games/exchess/patches/patch-src_book.cpp deleted file mode 100644 index beca4fe2da2..00000000000 --- a/games/exchess/patches/patch-src_book.cpp +++ /dev/null @@ -1,48 +0,0 @@ -$NetBSD: patch-src_book.cpp,v 1.1 2014/09/11 16:59:16 jperkin Exp $ - -Avoid 'move' conflict. - ---- src/book.cpp.orig 2014-08-17 11:03:08.000000000 +0000 -+++ src/book.cpp -@@ -44,7 +44,7 @@ void build_book(position ipos) - char instring[100], line[100]; // strings from input files - char outbook[100], resp; - position temp_pos; // temporary position -- move bmove; // book move under consideration -+ my_move bmove; // book move under consideration - unsigned __int64 pcode; // hash code for position - int i = -1, j = 0, p,q; // loop variables - int r, s; -@@ -314,7 +314,7 @@ void build_book(position ipos) - //-------------------------------------------------------- - // Function to find a position in the book - //-------------------------------------------------------- --int find_record(position p, move m, int file_size, book_rec *book_record, fstream *book_f, int file_pos) -+int find_record(position p, my_move m, int file_size, book_rec *book_record, fstream *book_f, int file_pos) - { - int jump = int(file_size/2); - unsigned __int64 pcode = ZERO; -@@ -384,12 +384,12 @@ int find_record(position p, move m, int - // becomes a candidate move. Information is stored to - // facilitate easy learning during the game. - //-------------------------------------------------------- --move opening_book(h_code hash_code, position p, game_rec *gr) -+my_move opening_book(h_code hash_code, position p, game_rec *gr) - { - int file_size, mflag = 0, j; - int candidates = 0, total_score = 0; - move_list list; -- move nomove; nomove.t = 0; -+ my_move nomove; nomove.t = 0; - char book_file[100]; // file name for the book - book_rec book_record; // record of move considered - int file_pos; // file position of record -@@ -680,7 +680,7 @@ int edit_book(h_code hash_code, position - if(outflag == 1) cout << "\n"; - - /* Edit mode for individual moves */ -- move edit_move; -+ my_move edit_move; - while(1) { - cout << "\nEnter a move to be edited/investigated (0 = quit): "; - cin >> mstring; if(mstring[0] == '0') break; diff --git a/games/exchess/patches/patch-src_chess.h b/games/exchess/patches/patch-src_chess.h deleted file mode 100644 index d24cebb44c2..00000000000 --- a/games/exchess/patches/patch-src_chess.h +++ /dev/null @@ -1,138 +0,0 @@ -$NetBSD: patch-src_chess.h,v 1.1 2014/09/11 16:59:16 jperkin Exp $ - -Avoid 'move' conflict. - ---- src/chess.h.orig 2014-08-17 11:03:08.000000000 +0000 -+++ src/chess.h -@@ -30,7 +30,7 @@ struct move_t { - // union of move_t and an integer to make comparison of - // moves easier. (as suggested in Tom Kerrigans simple chess program) - --union move { -+union my_move { - move_t b; - int32_t t; // assuming a 32 bit integer - }; -@@ -38,7 +38,7 @@ union move { - // Add a score for sorting purposes to the move record - - struct move_rec { -- move m; -+ my_move m; - int score; - }; - -@@ -82,10 +82,10 @@ struct position { - - unsigned char threat_square; - -- move hmove; // expected best move -- move rmove; // reply move -- move cmove; // combination move -- move pmove; // pawn hash move -+ my_move hmove; // expected best move -+ my_move rmove; // reply move -+ my_move cmove; // combination move -+ my_move pmove; // pawn hash move - - int8_t gstage; // game stage, range 0-16 -- depends only - // upon pawn structure --> important for pawn hashing! -@@ -93,7 +93,7 @@ struct position { - // -- should check this for all subtractions! unsigned ints - // may be converted incorrectly if they are negated. - int8_t plist[2][7][10]; // piece lists -- move last; // last move made -+ my_move last; // last move made - h_code hcode; // hash code - h_code pcode; // pawn hash code - -@@ -130,7 +130,7 @@ struct position { - void rook_cc(move_list *list, int sqr, int ds); - - /* exmove.cpp */ -- int exec_move(move emove, int ply); -+ int exec_move(my_move emove, int ply); - - /* attacks.cpp */ - int simple_check(int move_sq); -@@ -159,8 +159,8 @@ struct position { - - /* support.cpp */ - void write_fen(); -- void print_move(move pmove, char mstring[10], ts_thread_data *temps); -- move parse_move(char mstring[10], ts_thread_data *temps); -+ void print_move(my_move pmove, char mstring[10], ts_thread_data *temps); -+ my_move parse_move(char mstring[10], ts_thread_data *temps); - - }; - -@@ -187,7 +187,7 @@ struct search_node { - cmove_rec *cmove; - pawn_rec *phash; // for getting a pawn hash move - -- move smove; // current move we are searching -+ my_move smove; // current move we are searching - - int ply; - int mate_ext; // did a mate extension occur? -@@ -227,7 +227,7 @@ struct ts_thread_data { - int quit_thread; // flag to tell thread to quit - - search_node n[MAXD+1]; // array of search positions -- move pc[MAXD+1][MAXD+1]; // triangular array for search -+ my_move pc[MAXD+1][MAXD+1]; // triangular array for search - // principle continuation - h_code plist[MAX_GAME_PLY]; // hash codes of positions visited - -@@ -269,7 +269,7 @@ struct ts_thread_data { - } - - /* search.cpp */ -- inline void pc_update(move pcmove, int ply); -+ inline void pc_update(my_move pcmove, int ply); - - }; - -@@ -296,9 +296,9 @@ struct tree_search { - int max_search_depth; // search depth limit set by xboard - int max_search_time; // search time limit set by xboard - -- move bookm; // move from opening book -- move ponder_move; // move we are pondering -- move last_displayed_move; // best move from previous search display -+ my_move bookm; // move from opening book -+ my_move ponder_move; // move we are pondering -+ my_move last_displayed_move; // best move from previous search display - - int tsuite, analysis_mode; // flags to determine whether we are in - // analysis mode or a test suite -@@ -307,7 +307,7 @@ struct tree_search { - - // variables to support testsuite mode - float soltime; -- unsigned int bmcount; move bmoves[256]; -+ unsigned int bmcount; my_move bmoves[256]; - int best_score; - char bmtype[3]; // "am" avoid move or "bm" best move string - -@@ -315,7 +315,7 @@ struct tree_search { - int no_book; // counter for positions with no book moves - - /* search.cpp */ -- move search(position p, int time_limit, int T, game_rec *gr); -+ my_move search(position p, int time_limit, int T, game_rec *gr); - int search_threads(int alpha, int beta, int depth, int threads); - void sort_root_moves(); - -@@ -352,9 +352,9 @@ struct game_rec { - position reset; // reset position for takebacks - /* available moves */ - move_list movelist; // list of pseudo-legal moves for current pos -- move best; // best move for current position -+ my_move best; // best move for current position - /* game history info */ -- move game_history[MAX_GAME_PLY]; // list of move played -+ my_move game_history[MAX_GAME_PLY]; // list of move played - - /* game control flags and counters */ - int T; // turn number diff --git a/games/exchess/patches/patch-src_exmove.cpp b/games/exchess/patches/patch-src_exmove.cpp deleted file mode 100644 index 9b966f560d5..00000000000 --- a/games/exchess/patches/patch-src_exmove.cpp +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-src_exmove.cpp,v 1.1 2014/09/11 16:59:16 jperkin Exp $ - -Avoid 'move' conflict. - ---- src/exmove.cpp.orig 2014-08-17 11:03:08.000000000 +0000 -+++ src/exmove.cpp -@@ -15,7 +15,7 @@ - // If the move is legal, the function returns a 1, otherwise 0. - // Note that the move is made, regardless - so proper precautions - // need to be taken, if the move might need to be undone --int position::exec_move(move emove, int ply) -+int position::exec_move(my_move emove, int ply) - { - move_t mv = emove.b; - register int pi; diff --git a/games/exchess/patches/patch-src_funct.h b/games/exchess/patches/patch-src_funct.h deleted file mode 100644 index 8ff03ce73d0..00000000000 --- a/games/exchess/patches/patch-src_funct.h +++ /dev/null @@ -1,24 +0,0 @@ -$NetBSD: patch-src_funct.h,v 1.1 2014/09/11 16:59:16 jperkin Exp $ - -Avoid 'move' conflict. - ---- src/funct.h.orig 2014-08-17 11:03:08.000000000 +0000 -+++ src/funct.h -@@ -22,7 +22,7 @@ void write_out(const char *); // write - void performance(); // performance test function - - /* search.cpp */ --void pc_update(move pcmove, int ply); -+void pc_update(my_move pcmove, int ply); - - /* setup.cpp */ - void set_search_param(); -@@ -37,7 +37,7 @@ void QuickSortMove(move_rec *Lb, move_re - void build_book(position ipos); - void book_learn(int flag, game_rec *gr); - int edit_book(h_code hash_code, position *p); --move opening_book(h_code hash_code, position p, game_rec *gr); -+my_move opening_book(h_code hash_code, position p, game_rec *gr); - - /* util.cpp */ - int GetTime(); diff --git a/games/exchess/patches/patch-src_hash.cpp b/games/exchess/patches/patch-src_hash.cpp deleted file mode 100644 index 08ed213f9f1..00000000000 --- a/games/exchess/patches/patch-src_hash.cpp +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-src_hash.cpp,v 1.1 2014/09/11 16:59:16 jperkin Exp $ - -Avoid 'move' conflict. - ---- src/hash.cpp.orig 2014-08-17 11:03:08.000000000 +0000 -+++ src/hash.cpp -@@ -211,7 +211,7 @@ void put_hash(h_code (*h_key), int score - //-------------------------------------------- - // function to find and return a hash entry - //-------------------------------------------- --int get_hash(h_code (*h_key), int *hflag, int *hdepth, int *mate_ext, move *gmove, int ply) -+int get_hash(h_code (*h_key), int *hflag, int *hdepth, int *mate_ext, my_move *gmove, int ply) - { - hash_bucket *h; int best_depth_rec = -1; - diff --git a/games/exchess/patches/patch-src_hash.h b/games/exchess/patches/patch-src_hash.h deleted file mode 100644 index 185d3926a10..00000000000 --- a/games/exchess/patches/patch-src_hash.h +++ /dev/null @@ -1,24 +0,0 @@ -$NetBSD: patch-src_hash.h,v 1.1 2014/09/11 16:59:16 jperkin Exp $ - -Avoid 'move' conflict. - ---- src/hash.h.orig 2014-08-17 11:03:08.000000000 +0000 -+++ src/hash.h -@@ -26,7 +26,7 @@ - struct hash_rec - { - h_code hr_key; -- move hr_hmove; -+ my_move hr_hmove; - int16_t hr_score; - char hr_depth; // note that stored depths cannot be larger than 127 - unsigned char hr_data; // first 5 bits = id, next 2 = flag, next 1 = mate_ext -@@ -132,7 +132,7 @@ void open_hash(); - void close_hash(); - void set_hash_size(unsigned int Mbytes); - void put_hash(h_code *h_key, int score, int alpha, int beta, int depth, int hmove, int mate_ext, int h_id, int ply); --int get_hash(h_code *h_key, int *hflag, int *hdepth, int *mate_ext, move *gmove, int ply); -+int get_hash(h_code *h_key, int *hflag, int *hdepth, int *mate_ext, my_move *gmove, int ply); - int get_move(h_code *h_key); - int put_move(h_code h_key, int putmove, int h_id); - diff --git a/games/exchess/patches/patch-src_main.cpp b/games/exchess/patches/patch-src_main.cpp deleted file mode 100644 index ff7d5a1311b..00000000000 --- a/games/exchess/patches/patch-src_main.cpp +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-src_main.cpp,v 1.1 2014/09/11 16:59:16 jperkin Exp $ - -Avoid 'move' conflict. - ---- src/main.cpp.orig 2014-08-17 11:03:08.000000000 +0000 -+++ src/main.cpp -@@ -104,7 +104,7 @@ char exec_path[FILENAME_MAX]; - int main(int argc, char *argv[]) - { - char mstring[10]; -- move hint; -+ my_move hint; - - #ifdef TEST_ASSERT - assert(0); // testing that asserts are off diff --git a/games/exchess/patches/patch-src_score.cpp b/games/exchess/patches/patch-src_score.cpp deleted file mode 100644 index 3c62a6aa84c..00000000000 --- a/games/exchess/patches/patch-src_score.cpp +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-src_score.cpp,v 1.1 2014/09/11 16:59:16 jperkin Exp $ - -Avoid overloaded function ambiguity. - ---- src/score.cpp.orig 2014-08-17 11:03:08.000000000 +0000 -+++ src/score.cpp -@@ -67,7 +67,7 @@ int position::score_pos(game_rec *gr, ts - int TRADES = AVERAGE_SCORE(TRADES_EARLY, TRADES_LATE); - // bonus scales current material score by the ratio of the pawn count - // to the total piece count -- score += (TRADES*score*(pawn_count-piece_count))/(500*sqrt(pawn_count+piece_count)); -+ score += (TRADES*score*(pawn_count-piece_count))/(500*sqrt((float)pawn_count+piece_count)); - } - - /*+++++++++++++++++++++++++++++++ diff --git a/games/exchess/patches/patch-src_search.cpp b/games/exchess/patches/patch-src_search.cpp deleted file mode 100644 index 1c790a12e1b..00000000000 --- a/games/exchess/patches/patch-src_search.cpp +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-src_search.cpp,v 1.1 2014/09/11 16:59:16 jperkin Exp $ - -Avoid 'move' conflict. - ---- src/search.cpp.orig 2014-08-17 11:03:08.000000000 +0000 -+++ src/search.cpp -@@ -39,7 +39,7 @@ unsigned __int64 attempts=0, successes=0 - /*----------------------- Search function ---------------------*/ - // Driver for the search process. 1st initialize important data - // structures, then do iterative deeping until time runs out. --move tree_search::search(position p, int time_limit, int T, game_rec *gr) -+my_move tree_search::search(position p, int time_limit, int T, game_rec *gr) - { - char outstring[400], mstring[10]; - int g, done, pvi; -@@ -47,7 +47,7 @@ move tree_search::search(position p, int - int last_mate_score = 0, mate_iteration_count = 0; - int limit_search_depth = max_search_depth; - position pv_pos; -- move nomove; nomove.t = NOMOVE; -+ my_move nomove; nomove.t = NOMOVE; - - #if DEBUG_SEARCH - search_outfile.open("search_debug.log"); -@@ -527,7 +527,7 @@ move tree_search::search(position p, int - // It is updated by doing a mem-copy of the principle continuation - // found at deeper depths to this depth + the move at this depth - // is stuffed in first. --inline void ts_thread_data::pc_update(move pcmove, int ply) -+inline void ts_thread_data::pc_update(my_move pcmove, int ply) - { - int pci; - pc[ply][ply].t = pcmove.t; diff --git a/games/exchess/patches/patch-src_support.cpp b/games/exchess/patches/patch-src_support.cpp deleted file mode 100644 index bfbe11d1633..00000000000 --- a/games/exchess/patches/patch-src_support.cpp +++ /dev/null @@ -1,29 +0,0 @@ -$NetBSD: patch-src_support.cpp,v 1.1 2014/09/11 16:59:16 jperkin Exp $ - -Avoid 'move' conflict. - ---- src/support.cpp.orig 2014-08-17 11:03:08.000000000 +0000 -+++ src/support.cpp -@@ -24,11 +24,11 @@ - // Function to parse a move from the human player - // This move is checked then checked to see if it is legal - //---------------------------------------------------------- --move position::parse_move(char mstring[10], ts_thread_data *temps) -+my_move position::parse_move(char mstring[10], ts_thread_data *temps) - { - int legal = 0, piece, to_sq = -1, from_sq = -1, promote = QUEEN; - int from_file = -1, from_row = -1, match_count = 0; -- move play, mplay[4], nomove; -+ my_move play, mplay[4], nomove; - play.t = 0; nomove.t = 0; - mplay[0].t = 0; mplay[1].t = 0; mplay[2].t = 0; mplay[3].t = 0; - position t_pos; -@@ -200,7 +200,7 @@ move position::parse_move(char mstring[1 - // long algebraic format. This function works by simply - // adding the appropriate characters to the move string - //---------------------------------------------------------- --void position::print_move(move pmove, char mstring[10], ts_thread_data *temps) -+void position::print_move(my_move pmove, char mstring[10], ts_thread_data *temps) - { - char dummy[10]; // dummy character string - int ptype, pfrom, pto, ppiece; |