diff options
author | joerg <joerg@pkgsrc.org> | 2012-12-20 22:02:13 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2012-12-20 22:02:13 +0000 |
commit | 08cfc7cace981f5061cdda87c024e4786d94ec9c (patch) | |
tree | 168c503db3d262d8d43e02657a431b00d1a1a271 | |
parent | 395b9ed57f68208dc8bfab872d5d62bb27a1a2d6 (diff) | |
download | pkgsrc-08cfc7cace981f5061cdda87c024e4786d94ec9c.tar.gz |
Fix C99 inline misuse.
-rw-r--r-- | games/gnuchess4/distinfo | 4 | ||||
-rw-r--r-- | games/gnuchess4/patches/patch-src_eval.c | 139 | ||||
-rw-r--r-- | games/gnuchess4/patches/patch-src_genmoves.c | 40 |
3 files changed, 182 insertions, 1 deletions
diff --git a/games/gnuchess4/distinfo b/games/gnuchess4/distinfo index 620bf48aa06..ec13219c919 100644 --- a/games/gnuchess4/distinfo +++ b/games/gnuchess4/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.7 2008/06/20 01:09:20 joerg Exp $ +$NetBSD: distinfo,v 1.8 2012/12/20 22:02:13 joerg Exp $ SHA1 (gnuchess-4.0.pl80.tar.gz) = 0c581be2e7b6b17524e288e105a468a7ca328c8b RMD160 (gnuchess-4.0.pl80.tar.gz) = 889510f73c3e5143fc312c010e8324e68c11dcdc @@ -9,3 +9,5 @@ SHA1 (patch-ac) = 2d2ad394545b4eb4285389642c84872d4e0d9a25 SHA1 (patch-ad) = 1fc8df5f7b34fd82fb43de71cdaf01ff5f72d51a SHA1 (patch-ae) = 5b112b5d9c3d26adef170e12e29734a9eecc6245 SHA1 (patch-af) = 220b368a8d2274419c9d173433a956ab5c0c96b4 +SHA1 (patch-src_eval.c) = 127b4e3e7e0249aacfb0ee01186027e727eab19d +SHA1 (patch-src_genmoves.c) = 5d538d49a8f495afc86d40f81ca72f424170c5be diff --git a/games/gnuchess4/patches/patch-src_eval.c b/games/gnuchess4/patches/patch-src_eval.c new file mode 100644 index 00000000000..7c41706af3e --- /dev/null +++ b/games/gnuchess4/patches/patch-src_eval.c @@ -0,0 +1,139 @@ +$NetBSD: patch-src_eval.c,v 1.1 2012/12/20 22:02:13 joerg Exp $ + +--- src/eval.c.orig 2012-12-20 19:23:42.000000000 +0000 ++++ src/eval.c +@@ -173,7 +173,7 @@ SHORT pscore[2]; + #ifdef CACHE + struct etable *etab[2]; + +-inline void ++static inline void + PutInEETable (SHORT side,int score) + + /* +@@ -199,7 +199,7 @@ PutInEETable (SHORT side,int score) + return; + } + +-inline int ++static inline int + CheckEETable (SHORT side) + + /* Check the static cache for an entry */ +@@ -213,7 +213,7 @@ CheckEETable (SHORT side) + return false; + } + +-inline int ++static inline int + ProbeEETable (SHORT side, SHORT *score) + + /* Get an evaluation from the static cache */ +@@ -265,7 +265,7 @@ ProbeEETable (SHORT side, SHORT *score) + * PieceCnt[side] - just what it says + */ + +-inline ++static inline + int + ScoreKPK (SHORT side, + SHORT winner, +@@ -310,7 +310,7 @@ ScoreKPK (SHORT side, + return (s); + } + +-inline ++static inline + SHORT + ScoreLoneKing (SHORT side) + /* +@@ -353,7 +353,7 @@ ScoreLoneKing (SHORT side) + return ((side == winner) ? s : -s); + } + +-inline ++static inline + int + ScoreKBNK (SHORT winner, SHORT king1, SHORT king2) + /* +@@ -389,7 +389,7 @@ SHORT dist_ (SHORT f1, SHORT r1, SHORT f + return distdata [ f1-9+8*r1 ][ f2-9+8*r2 ]; + } + +-inline ++static inline + int + ScoreK1PK (SHORT side, + SHORT winner, +@@ -714,7 +714,7 @@ evaluate (register SHORT side, + return (s); + } + +-inline ++static inline + int + BRscan (register SHORT sq, SHORT *mob) + +@@ -777,7 +777,7 @@ BRscan (register SHORT sq, SHORT *mob) + return s; + } + +-inline ++static inline + SHORT + KingScan (register SHORT sq) + +@@ -871,7 +871,7 @@ KingScan (register SHORT sq) + } + + +-inline ++static inline + int + trapped (register SHORT sq) + +@@ -1023,7 +1023,7 @@ PawnValue (register SHORT sq, SHORT side + return (s); + } + +-inline ++static inline + int + KnightValue (register SHORT sq, register SHORT side) + +@@ -1052,7 +1052,7 @@ KnightValue (register SHORT sq, register + return (s); + } + +-inline ++static inline + int + BishopValue (register SHORT sq, register SHORT side) + +@@ -1085,7 +1085,7 @@ BishopValue (register SHORT sq, register + return (s); + } + +-inline ++static inline + int + RookValue (register SHORT sq, register SHORT side) + +@@ -1127,7 +1127,7 @@ RookValue (register SHORT sq, register S + return (s); + } + +-inline ++static inline + int + QueenValue (register SHORT sq, register SHORT side) + +@@ -1158,7 +1158,7 @@ QueenValue (register SHORT sq, register + return (s); + } + +-inline ++static inline + int + KingValue (register SHORT sq, register SHORT side) + diff --git a/games/gnuchess4/patches/patch-src_genmoves.c b/games/gnuchess4/patches/patch-src_genmoves.c new file mode 100644 index 00000000000..8f810bbf5d7 --- /dev/null +++ b/games/gnuchess4/patches/patch-src_genmoves.c @@ -0,0 +1,40 @@ +$NetBSD: patch-src_genmoves.c,v 1.1 2012/12/20 22:02:13 joerg Exp $ + +--- src/genmoves.c.orig 2012-12-20 19:22:41.000000000 +0000 ++++ src/genmoves.c +@@ -36,7 +36,7 @@ SHORT *TrP, InCheck; + (*TrP)++;\ + } + +-inline int ++static inline int + CheckMove (SHORT f, SHORT t, SHORT flag) + { + SHORT side, incheck; +@@ -55,7 +55,7 @@ CheckMove (SHORT f, SHORT t, SHORT flag) + + + +-inline void ++static inline void + LinkMove (SHORT ply, SHORT f, + register SHORT t, + SHORT flag, +@@ -129,7 +129,7 @@ LinkMove (SHORT ply, SHORT f, + Link (f, t, flag, s - 20000); + } + +-inline ++static inline + void + GenMoves (register SHORT ply, register SHORT sq, SHORT side, SHORT xside) + +@@ -374,7 +374,7 @@ CaptureList (register SHORT side, SHORT + GenCnt += (TrPnt[ply + 1] - TrPnt[ply]); + } + +-inline ++static inline + void + VGenMoves (register SHORT ply, register SHORT sq, SHORT side, SHORT xside) + |