aboutsummaryrefslogtreecommitdiff
path: root/games/CaribbeanStud
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2003-09-28 11:49:27 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2003-09-28 11:49:27 +0000
commitbaf470f2da3ae5b63170169ad8efbd61b6fc65f2 (patch)
treed2103145302b029921e547af83e0e9bc9df696d1 /games/CaribbeanStud
parent44c28c4e1c9b05f57c9368f86a8e749847c8f64b (diff)
downloadports-baf470f2da3ae5b63170169ad8efbd61b6fc65f2.tar.gz
ports-baf470f2da3ae5b63170169ad8efbd61b6fc65f2.zip
Notes
Diffstat (limited to 'games/CaribbeanStud')
-rw-r--r--games/CaribbeanStud/Makefile2
-rw-r--r--games/CaribbeanStud/files/patch-Card.h20
-rw-r--r--games/CaribbeanStud/files/patch-Dealer.cpp12
-rw-r--r--games/CaribbeanStud/files/patch-Dealer.h23
-rw-r--r--games/CaribbeanStud/files/patch-Deck.cpp38
-rw-r--r--games/CaribbeanStud/files/patch-Hands.cpp86
-rw-r--r--games/CaribbeanStud/files/patch-Player.h11
-rw-r--r--games/CaribbeanStud/files/patch-Seat.cpp (renamed from games/CaribbeanStud/files/patch-ac)14
-rw-r--r--games/CaribbeanStud/files/patch-Seat.h11
-rw-r--r--games/CaribbeanStud/files/patch-Table.cpp101
-rw-r--r--games/CaribbeanStud/files/patch-Xmakefile (renamed from games/CaribbeanStud/files/patch-aa)4
-rw-r--r--games/CaribbeanStud/files/patch-ab11
12 files changed, 317 insertions, 16 deletions
diff --git a/games/CaribbeanStud/Makefile b/games/CaribbeanStud/Makefile
index e6ad35ab7e24..6be58856435d 100644
--- a/games/CaribbeanStud/Makefile
+++ b/games/CaribbeanStud/Makefile
@@ -18,7 +18,7 @@ COMMENT= Caribbean Stud gambling game for X Window System
MAKEFILE= Xmakefile
USE_MOTIF= yes
USE_X_PREFIX= yes
-CFLAGS= -pedantic
+CFLAGS+= -Wno-deprecated
do-install:
@ ${INSTALL_PROGRAM} ${WRKSRC}/CaribbeanStud ${PREFIX}/bin
diff --git a/games/CaribbeanStud/files/patch-Card.h b/games/CaribbeanStud/files/patch-Card.h
new file mode 100644
index 000000000000..664aaa2c8e75
--- /dev/null
+++ b/games/CaribbeanStud/files/patch-Card.h
@@ -0,0 +1,20 @@
+--- Card.h.orig Tue Aug 19 11:57:32 2003
++++ Card.h Tue Aug 19 11:58:21 2003
+@@ -59,7 +59,7 @@
+
+ // Class Card
+
+-inline Card::operator==(const Card &right) const
++inline int Card::operator==(const Card &right) const
+ {
+ return ( _suit == right._suit &&
+ (_rank == right._rank ||
+@@ -69,7 +69,7 @@
+ );
+ }
+
+-inline Card::operator!=(const Card &right) const
++inline int Card::operator!=(const Card &right) const
+ {
+ return !( operator == (right) );
+ }
diff --git a/games/CaribbeanStud/files/patch-Dealer.cpp b/games/CaribbeanStud/files/patch-Dealer.cpp
new file mode 100644
index 000000000000..336810a407e6
--- /dev/null
+++ b/games/CaribbeanStud/files/patch-Dealer.cpp
@@ -0,0 +1,12 @@
+--- Dealer.cpp.orig Tue Aug 19 12:01:24 2003
++++ Dealer.cpp Tue Aug 19 12:02:07 2003
+@@ -141,7 +141,8 @@
+
+ void Dealer::NewGame()
+ {
+- for(int i=0; _players[i]; i++)
++ int i;
++ for(i=0; _players[i]; i++)
+ _players[i]->NewGame();
+
+ Hands::NewGame();
diff --git a/games/CaribbeanStud/files/patch-Dealer.h b/games/CaribbeanStud/files/patch-Dealer.h
new file mode 100644
index 000000000000..e9ed49b0242d
--- /dev/null
+++ b/games/CaribbeanStud/files/patch-Dealer.h
@@ -0,0 +1,23 @@
+--- Dealer.h.orig Tue Aug 19 11:59:05 2003
++++ Dealer.h Tue Aug 19 12:00:14 2003
+@@ -92,7 +92,8 @@
+
+ inline void Dealer::Add (Player* newPlayer)
+ {
+- for(int i=0; i < 10; i++)
++ int i;
++ for(i=0; i < 10; i++)
+ if( !_players[i] ){
+ _players[i] = newPlayer;
+ break;
+@@ -102,8 +103,8 @@
+
+ inline void Dealer::Remove (Player* aplayer)
+ {
+- int pos = 20;
+- for(int i=0; _players[i]; i++)
++ int pos = 20, i;
++ for(i=0; _players[i]; i++)
+ if(aplayer == _players[i])
+ {
+ pos = i; break;
diff --git a/games/CaribbeanStud/files/patch-Deck.cpp b/games/CaribbeanStud/files/patch-Deck.cpp
new file mode 100644
index 000000000000..21a640edf064
--- /dev/null
+++ b/games/CaribbeanStud/files/patch-Deck.cpp
@@ -0,0 +1,38 @@
+--- Deck.cpp.orig Tue Aug 19 12:02:29 2003
++++ Deck.cpp Tue Aug 19 12:05:01 2003
+@@ -38,7 +38,8 @@
+ _globalCards[j] = Card(j);
+ _globalInit = 1;
+ }
+- for(int i =0 ; i < _numOfCards; i++)
++ int i;
++ for(i =0 ; i < _numOfCards; i++)
+ _cards[i] = & _globalCards[i];
+ for(i=_numOfCards; i < 54; i++)
+ _cards[i] = (Card *) 0;
+@@ -55,7 +56,7 @@
+ {
+ for (int i = 0; i < _numOfCards/2; i++)
+ to[i*2] = from[_numOfCards/2+i];
+- for ( i = 0; i < _numOfCards/2; i++)
++ for (int i = 0; i < _numOfCards/2; i++)
+ to[i*2+1] = from[i];
+ Card **tmp = from;
+ from = to;
+@@ -82,13 +83,13 @@
+
+ for(int i=_numOfCards-cut; i< _numOfCards; i++)
+ tmp[i] = _cards[i];
+- for( i = _numOfCards-1; i >= cut; i--)
++ for(int i = _numOfCards-1; i >= cut; i--)
+ _cards[i] = _cards[i-cut];
+- for( i = 0; i < cut; i++)
++ for(int i = 0; i < cut; i++)
+ _cards[ i ] = tmp[i + _numOfCards-cut];
+ #ifdef DEBUG
+ cout << "Cutting at " << _numOfCards-cut <<endl;
+- for ( i = 0; i < _numOfCards; i++ ){
++ for (int i = 0; i < _numOfCards; i++ ){
+ if( i%10 == 0 ) cout << endl;
+ cout << _cards[i]->Suit() << (int)_cards[i]->Rank() << " ";
+ }
diff --git a/games/CaribbeanStud/files/patch-Hands.cpp b/games/CaribbeanStud/files/patch-Hands.cpp
new file mode 100644
index 000000000000..e4f4eebc2cec
--- /dev/null
+++ b/games/CaribbeanStud/files/patch-Hands.cpp
@@ -0,0 +1,86 @@
+--- Hands.cpp.orig Fri Jan 31 23:47:58 1997
++++ Hands.cpp Tue Aug 19 12:11:29 2003
+@@ -46,7 +46,7 @@
+ _next = 0;
+ }
+
+-Hand Hands::HandValue() const
++enum Hands::Hand Hands::HandValue() const
+ {
+ return _hand;
+ }
+@@ -93,7 +93,7 @@
+
+ Card** Hands::Cards() const
+ {
+- return _cards;
++ return (Card**)_cards;
+ }
+
+ void Hands::SortCards() const
+@@ -106,7 +106,7 @@
+ ranks[i] = _cards[i]->Rank();
+
+ for(int j=0; j < 4; j++) // sorting based on rank
+- for( i=0; i < 4-j; i++)
++ for(int i=0; i < 4-j; i++)
+ {
+ if( ranks[i] < ranks[i+1] )
+ {
+@@ -121,10 +121,10 @@
+
+ char r = ranks[0];
+ char board[4];
+- for( i =0; i<4; i++) board[i] = '\0';
++ for(int i =0; i<4; i++) board[i] = '\0';
+
+ int s=1;
+- for ( i=1; i< 6; i++)
++ for (int i=1; i< 6; i++)
+ {
+ if( r == ranks[i] ) s++;
+ else{
+@@ -162,7 +162,8 @@
+ }
+ else{
+ if(ranks[0] == (char) '\14') ranks[5] = '\1';
+- for( i =0; i < 4; i++)
++ int i;
++ for(i =0; i < 4; i++)
+ if(_cards[i]->Suit() != _cards[i+1]->Suit())
+ {
+ i = 8;
+@@ -199,9 +200,9 @@
+ // rearrange cards order
+
+ Card* tmpcards[5];
+- for(i = 0; i < 5; i++) tmpcards[i] = _cards[i];
+- for(i = 0; i < 5; i++)
+- for(j=0; j<5; j++)
++ for(int i = 0; i < 5; i++) tmpcards[i] = _cards[i];
++ for(int i = 0; i < 5; i++)
++ for(int j=0; j<5; j++)
+ if(tmpcards[j] && ranks[i]==tmpcards[j]->Rank())
+ {
+ ((Hands*)this) ->_cards[i] = tmpcards[j];
+@@ -210,7 +211,7 @@
+ }
+
+ #ifdef DEBUG
+- for(i = 0; i < 5; i++)
++ for(int i = 0; i < 5; i++)
+ cout << _cards[i]->Suit() << (int) _cards[i]->Rank() << " ";
+ cout << endl;
+ #endif
+@@ -219,9 +220,9 @@
+
+ void Hands::ReArrange(char* ranks , int nel,char* board, Hand score)
+ {
+- int j=0 , k = 0;
++ int i, j=0 , k = 0;
+ char tmprank[10];
+- for( int i = 0; i < nel; i++) // copy all the cards to the tmprank
++ for( i = 0; i < nel; i++) // copy all the cards to the tmprank
+ tmprank[i] = *(ranks+i);
+ tmprank[nel] = '\0';
+
diff --git a/games/CaribbeanStud/files/patch-Player.h b/games/CaribbeanStud/files/patch-Player.h
new file mode 100644
index 000000000000..0de812e73330
--- /dev/null
+++ b/games/CaribbeanStud/files/patch-Player.h
@@ -0,0 +1,11 @@
+--- Player.h.orig Tue Aug 19 12:00:36 2003
++++ Player.h Tue Aug 19 12:01:09 2003
+@@ -72,7 +72,7 @@
+ int _lastWinLost;
+ };
+
+-inline Player::WinLost( ) const
++inline int Player::WinLost( ) const
+ {
+ return _lastWinLost;
+ }
diff --git a/games/CaribbeanStud/files/patch-ac b/games/CaribbeanStud/files/patch-Seat.cpp
index 3f9db57ca58a..f8aeb85740fd 100644
--- a/games/CaribbeanStud/files/patch-ac
+++ b/games/CaribbeanStud/files/patch-Seat.cpp
@@ -1,5 +1,5 @@
---- Seat.cpp Fri Jan 31 22:47:58 1997
-+++ /home/andy/tmp/wrk/Seat.cpp Sat Jul 4 19:48:21 1998
+--- Seat.cpp.orig Fri Jan 31 23:47:58 1997
++++ Seat.cpp Tue Aug 19 12:13:30 2003
@@ -151,10 +151,10 @@
gcv.font = XLoadFont(_dpy, "10x20");
gcflags = GCForeground | GCBackground | GCGraphicsExposures;
@@ -13,3 +13,13 @@
i = 0;
XtSetArg(args[i], XmNbackground, color.pixel); i++;
XtSetArg(args[i], XmNforeground, whitepixel); i++;
+@@ -342,7 +342,8 @@
+ Card ** cards = hands->Cards();
+ if( hands->NumOfCards() )
+ {
+- for(int i=0; i< hands->NumOfCards() -1; i++)
++ int i;
++ for(i=0; i< hands->NumOfCards() -1; i++)
+ DrawCardBack(GetWindow(), cards[i], PositionCardX(cards[i],i),
+ PositionCardY(cards[i],i));
+ DrawCard(GetWindow(), cards[i], PositionCardX(cards[i],i),
diff --git a/games/CaribbeanStud/files/patch-Seat.h b/games/CaribbeanStud/files/patch-Seat.h
new file mode 100644
index 000000000000..7c18c19d48d7
--- /dev/null
+++ b/games/CaribbeanStud/files/patch-Seat.h
@@ -0,0 +1,11 @@
+--- Seat.h.orig Tue Aug 19 12:12:00 2003
++++ Seat.h Tue Aug 19 12:12:40 2003
+@@ -148,7 +148,7 @@
+ };
+
+ // Class Seat
+-inline Seat::Available() const
++inline int Seat::Available() const
+ {
+ return _isAvailable;
+ }
diff --git a/games/CaribbeanStud/files/patch-Table.cpp b/games/CaribbeanStud/files/patch-Table.cpp
new file mode 100644
index 000000000000..3956e0d54404
--- /dev/null
+++ b/games/CaribbeanStud/files/patch-Table.cpp
@@ -0,0 +1,101 @@
+--- Table.cpp.orig Tue Aug 19 12:13:59 2003
++++ Table.cpp Tue Aug 19 12:20:07 2003
+@@ -306,7 +306,7 @@
+ XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
+ XtSetArg(al[ac], XmNbottomPosition, 30); ac++;
+ XtSetArg(al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++;
+- for(j=0; j < rv.players; j++)
++ for(int j=0; j < rv.players; j++)
+ {
+ XtSetArg(al[ac], XmNtopWidget, YouHaveLabel[j]);
+ XtSetArg(al[ac+1], XmNleftPosition, j*100/rv.players);
+@@ -324,7 +324,7 @@
+ XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
+ XtSetArg(al[ac], XmNbottomPosition, 40); ac++;
+ XtSetArg(al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++;
+- for(j=0; j < rv.players; j++)
++ for(int j=0; j < rv.players; j++)
+ {
+ XtSetArg(al[ac], XmNtopWidget, YouHaveLabelValue[j]);
+ XtSetArg(al[ac+1], XmNleftPosition, j*100/rv.players);
+@@ -465,7 +465,7 @@
+ XtManageChild(HelpRulesScrolledText);
+
+
+- for(j=0; j< rv.players; j++)
++ for(int j=0; j< rv.players; j++)
+ {
+ ac = 0;
+ children[ac++] = YouHaveLabel[j];
+@@ -534,7 +534,7 @@
+ Arg args[5];
+
+ i = 0;
+- s = XmStringCreate(str, XmSTRING_DEFAULT_CHARSET);
++ s = XmStringCreate((char*)str, XmSTRING_DEFAULT_CHARSET);
+ XtSetArg(args[i], XmNmessageString, s); i++;
+ XtSetValues(ExceptionDialog, args, i);
+ XmStringFree(s);
+@@ -586,7 +586,7 @@
+ try{
+ #ifdef DEBUG
+ cout << "Calling DealerDrawingAreaCB" << endl;
+-#endif DEBUG
++#endif // DEBUG
+ if (call_data->window) {
+ XEvent event;
+ Table * table = (Table*) client_data;
+@@ -615,7 +615,7 @@
+ try{
+ #ifdef DEBUG
+ cout << "Calling PlayerDrawingAreaCB" << endl;
+-#endif DEBUG
++#endif // DEBUG
+
+ if (call_data->window) {
+ XEvent event;
+@@ -648,7 +648,7 @@
+ {
+ #ifdef DEBUG
+ cout << "Calling AnteScrollCB" << endl;
+-#endif DEBUG
++#endif // DEBUG
+ int i;
+ char str[80];
+ Arg args[5];
+@@ -686,7 +686,7 @@
+ {
+ #ifdef DEBUG
+ cout << "Calling DealCB" << endl;
+-#endif DEBUG
++#endif // DEBUG
+ Arg args[5];
+ char str[80];
+ XmScaleCallbackStruct data;
+@@ -763,7 +763,7 @@
+ try{
+ #ifdef DEBUG
+ cout << "Calling BetCB" << endl;
+-#endif DEBUG
++#endif // DEBUG
+ char str[80];
+ Arg args[5];
+
+@@ -792,7 +792,7 @@
+ try{
+ #ifdef DEBUG
+ cout << "Calling FoldCB" << endl;
+-#endif DEBUG
++#endif // DEBUG
+
+ char str[80];
+ Arg args[5];
+@@ -823,7 +823,7 @@
+ try{
+ #ifdef DEBUG
+ cout << "Calling Table::PayTime" << endl;
+-#endif DEBUG
++#endif // DEBUG
+
+ char str[80];
+ Arg args[5];
diff --git a/games/CaribbeanStud/files/patch-aa b/games/CaribbeanStud/files/patch-Xmakefile
index 0682f380a285..617ce934fdbf 100644
--- a/games/CaribbeanStud/files/patch-aa
+++ b/games/CaribbeanStud/files/patch-Xmakefile
@@ -1,5 +1,5 @@
---- Xmakefile.orig Fri Jan 31 14:47:59 1997
-+++ Xmakefile Sun May 2 00:40:04 1999
+--- Xmakefile.orig Fri Jan 31 23:47:59 1997
++++ Xmakefile Tue Aug 19 11:56:52 2003
@@ -77,17 +77,27 @@
#UILFLAGS=-I/usr/include/uil -I/usr/include/Motif1.2/uil
###
diff --git a/games/CaribbeanStud/files/patch-ab b/games/CaribbeanStud/files/patch-ab
deleted file mode 100644
index 2a4caf05266e..000000000000
--- a/games/CaribbeanStud/files/patch-ab
+++ /dev/null
@@ -1,11 +0,0 @@
---- Hands.cpp Fri Jan 31 22:47:58 1997
-+++ /home/andy/tmp/wrk/Hands.cpp Sat Jul 4 18:54:30 1998
-@@ -46,7 +46,7 @@
- _next = 0;
- }
-
--Hand Hands::HandValue() const
-+enum Hands::Hand Hands::HandValue() const
- {
- return _hand;
- }