aboutsummaryrefslogtreecommitdiff
path: root/games/seahaven
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2007-01-14 22:18:52 +0000
committerWarner Losh <imp@FreeBSD.org>2007-01-14 22:18:52 +0000
commit771c23e307f4fed227e1b56ea7d4e0093c00dc8a (patch)
tree5618e102eb72e4afd098fac316ada38d73b0b83c /games/seahaven
parentcd3b00cde6bcb3e5441403fa1c6806cee06b443f (diff)
downloadports-771c23e307f4fed227e1b56ea7d4e0093c00dc8a.tar.gz
ports-771c23e307f4fed227e1b56ea7d4e0093c00dc8a.zip
Notes
Diffstat (limited to 'games/seahaven')
-rw-r--r--games/seahaven/Makefile2
-rw-r--r--games/seahaven/distinfo6
-rw-r--r--games/seahaven/files/patch-auto.C85
3 files changed, 23 insertions, 70 deletions
diff --git a/games/seahaven/Makefile b/games/seahaven/Makefile
index 5cfab0876d7b..2b5f5e6e5a46 100644
--- a/games/seahaven/Makefile
+++ b/games/seahaven/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= seahaven
-PORTVERSION= 1.43
+PORTVERSION= 1.44
CATEGORIES= games
MASTER_SITES= http://seahaven.sourceforge.net/ \
${MASTER_SITE_SOURCEFORGE}
diff --git a/games/seahaven/distinfo b/games/seahaven/distinfo
index 072d778c35e3..7151594fb5e3 100644
--- a/games/seahaven/distinfo
+++ b/games/seahaven/distinfo
@@ -1,3 +1,3 @@
-MD5 (seahaven-1.43.tgz) = f045e201b7ec1bc958be4ab1f62900e5
-SHA256 (seahaven-1.43.tgz) = af4c2becab10b0e95cb1385b64270604a36d1f26edd06f55a7db7227a913c898
-SIZE (seahaven-1.43.tgz) = 54711
+MD5 (seahaven-1.44.tgz) = fa82c0892155aca1f09eeb4c72788610
+SHA256 (seahaven-1.44.tgz) = cdd505aed61075f2244025151a92fb6c5f18cb6760a5402dc0710d47cbbc550d
+SIZE (seahaven-1.44.tgz) = 54666
diff --git a/games/seahaven/files/patch-auto.C b/games/seahaven/files/patch-auto.C
index 29c942b515e0..a6e4bbdd3c8b 100644
--- a/games/seahaven/files/patch-auto.C
+++ b/games/seahaven/files/patch-auto.C
@@ -1,26 +1,13 @@
---- auto.C Sun Apr 22 09:37:27 2001
-+++ auto.C Tue Aug 6 11:46:09 2002
-@@ -1,7 +1,9 @@
--#include <stream.h>
-+#include <iostream>
-+using namespace std;
-
+--- auto.C.orig Sat Dec 6 11:12:47 2003
++++ auto.C Sun Jan 14 15:16:37 2007
+@@ -1,5 +1,6 @@
#include <string.h>
#include <stdlib.h>
+#include <err.h>
#include <sys/types.h>
#include <sys/time.h>
-@@ -9,7 +11,7 @@
- #include <fcntl.h>
- //#include <osfcn.h>
-
--//#include <stdlib.h> // for getenv()
-+#include <stdlib.h> // for getenv()
-
-
- #include "auto.h"
-@@ -51,11 +53,6 @@
+@@ -48,11 +49,6 @@
const int NumRanks = RankLast+1;
@@ -32,16 +19,7 @@
class Tableaux;
inline unsigned short Fold(long l) {
-@@ -76,7 +73,7 @@
- unsigned short Short() const { return Fold(l1)^Fold(l2)^Fold(l3); }
- bool EmptyP() const { return (l1 == 0) && (l2 == 0) && (l3 == 0); }
- bool BadP() const { return (l3 < 0); }
-- void Print(ostream &os) const {os<<hex(l1, 8) << hex(l2, 8) << hex(l3,8); }
-+ void Print(ostream &os) const {os<<hex<<l1<<hex<<l2<<hex<<l3; }
- };
-
- ostream& operator<< (ostream &os, Hash& h) { h.Print(os); return os; }
-@@ -149,7 +146,7 @@
+@@ -146,7 +142,7 @@
}
int HashList::Add(const Hash& h) {
@@ -50,16 +28,7 @@
if (HashVal().EmptyP()) hash = h;
else next = new HashList(h, next);
return depth++;
-@@ -184,7 +181,7 @@
- HashList* hll = &ht[size];
- for (HashList* hlt = ht; hlt != hll; hlt++)
- if (! hlt->EmptyP())
-- os << "\n" << dec(hlt-ht,5) << ": " << *hlt;
-+ os << "\n" << dec << hlt-ht << ": " << *hlt;
- }
-
- static HashTable hashTable(65536);
-@@ -201,8 +198,8 @@
+@@ -198,8 +194,8 @@
void MoveTo(CardRange&);
};
@@ -70,39 +39,32 @@
typedef void (Dest::* MoveCardToMemberFunction)(Card&);
typedef void (Dest::* MoveCardRangeToMemberFunction)(CardRange&);
-@@ -214,9 +211,9 @@
+@@ -211,9 +207,9 @@
public:
Card(Suit suit, Rank rank) {
if ((suit < SuitFirst) || (suit > SuitLast))
-- Error("Bad suit ", dec((int)suit), " in Card constructor.");
+- Error("Bad suit in Card constructor.");
+ errx(1, "Bad suit %d in Card constructor.", (int)suit);
if ((rank < RankFirst) || (rank > RankLast))
-- Error("Bad rank ", dec((int)rank), " in Card constructor.");
+- Error("Bad rank in Card constructor.");
+ errx(1, "Bad rank %d in Card constructor.", (int)rank);
thisSuit = suit; thisRank = rank; empty = 0;
}
Card(char *st);
-@@ -248,16 +245,16 @@
-
- void Card::Print(ostream &os) const {
- if (EmptyP()) os << "--";
-- else os << chr(rankName[rank()]) << chr(suitName[suit()]);
-+ else os << rankName[rank()] << suitName[suit()];
- }
-
+@@ -251,10 +247,10 @@
Card::Card(char* st) {
char *c;
c = strchr(suitName, st[1]);
-- if (! c) Error("Bad suit ", chr(st[1]), " in Card string constructor.");
+- if (! c) Error("Bad suit ", st, " in Card string constructor.");
+ if (! c) errx(1, "Bad suit %c in Card string constructor.", st[1]);
thisSuit = Suit(c-suitName);
c = strchr(rankName, st[0]);
-- if (! c) Error("Bad rank ", chr(st[0]), " in Card string constructor.");
+- if (! c) Error("Bad rank ", st, " in Card string constructor.");
+ if (! c) errx(1, "Bad rank %c in Card string constructor.", st[0]);
thisRank = Rank(c - rankName);
empty = 0;
}
-@@ -275,7 +272,7 @@
+@@ -272,7 +268,7 @@
void Init(Card c, CountType count) { thisCard = c; thisCount = count; }
public:
CardRange(Suit s, Rank rank1, Rank rank2) {
@@ -111,7 +73,7 @@
Init(Card(s, rank1), rank2-rank1+1);
}
CardRange(Suit s, Rank rank, CountType count = 1) {
-@@ -290,7 +287,7 @@
+@@ -287,7 +283,7 @@
Card next() const { return thisCard.next(thisCount); }
CountType Count() const { return thisCount; }
void Prepend(const CardRange& cr) {
@@ -120,7 +82,7 @@
thisCount += cr.Count();
thisCard = cr.First();
}
-@@ -416,7 +413,7 @@
+@@ -413,7 +409,7 @@
};
void Spaces::MoveTo(CardRange& from) { MoveToSpace(from); }
@@ -129,7 +91,7 @@
const int NumPiles = 10;
-@@ -484,7 +481,7 @@
+@@ -481,7 +477,7 @@
Dest& dest;
public:
Move(Dest& d) : dest(d) { }
@@ -138,7 +100,7 @@
};
class MoveCard : public Move {
-@@ -569,7 +566,7 @@
+@@ -566,7 +562,7 @@
}
if ((l1==0)&&(l2==0)&&(l3==0))
@@ -147,7 +109,7 @@
}
bool Tableaux::WonP() {
-@@ -853,8 +850,9 @@
+@@ -850,8 +846,9 @@
for (Suit s = SuitFirst; s <= SuitLast; s = Suit(s+1))
for (Rank r = RankFirst; r <= RankLast; r = Rank(r+1))
if (deck[s][r] != 1) {
@@ -159,16 +121,7 @@
}
CanonicalForm();
-@@ -915,7 +913,7 @@
- #ifdef AUTO
-
- #include <stdio.h>
--#include <fstream.h>
-+#include <fstream>
-
- int AutoPlay() {
-
-@@ -924,7 +922,7 @@
+@@ -918,7 +915,7 @@
sprintf(savefile, "%s/.seahavensave", getenv("HOME"));
ifstream in(savefile, ios::in);