pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/games/xevil Make this compile when using gcc 3. Patch...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f2b372cb3662
branches: trunk
changeset: 471311:f2b372cb3662
user: kristerw <kristerw%pkgsrc.org@localhost>
date: Fri Mar 26 01:34:08 2004 +0000
description:
Make this compile when using gcc 3. Patches provided by
Chris Tribo in PR pkg/24886.
diffstat:
games/xevil/distinfo | 9 ++++++---
games/xevil/patches/patch-ab | 30 ++++++++++++++++++++++++++----
games/xevil/patches/patch-ac | 37 +++++++++++++++++++++++++++++++------
games/xevil/patches/patch-ad | 21 +++++++++++++++++++++
games/xevil/patches/patch-ae | 29 +++++++++++++++++++++++++++++
games/xevil/patches/patch-af | 22 ++++++++++++++++++++++
6 files changed, 135 insertions(+), 13 deletions(-)
diffs (194 lines):
diff -r df874b5eb39c -r f2b372cb3662 games/xevil/distinfo
--- a/games/xevil/distinfo Fri Mar 26 00:39:25 2004 +0000
+++ b/games/xevil/distinfo Fri Mar 26 01:34:08 2004 +0000
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.2 2001/04/21 02:08:39 wiz Exp $
+$NetBSD: distinfo,v 1.3 2004/03/26 01:34:08 kristerw Exp $
SHA1 (xevil1.5.1e.tar.Z) = a4b1fc0264ddd9c73e60d28442f5328c1a1bc060
Size (xevil1.5.1e.tar.Z) = 475173 bytes
SHA1 (patch-aa) = 310dbab8e8921d4cef9e336052e8bbd0a32f704a
-SHA1 (patch-ab) = 1a733a118dee1aebc56b441df929315df328de20
-SHA1 (patch-ac) = 3562033cb5827af191e8c6fa2d42b380610651b6
+SHA1 (patch-ab) = e366f13447a1756c3328afaa56ae8ae383a904e7
+SHA1 (patch-ac) = 3287d782b176e4500f4499da8f0487a4ebefe560
+SHA1 (patch-ad) = 1c227ab65c6318a170020fb9f3aa4e8e50119532
+SHA1 (patch-ae) = 561ecff4dbdba9fa579558ea29eb2e3e58c2f2f1
+SHA1 (patch-af) = fc095d1b89d340a1325e5142d48dae5041925754
diff -r df874b5eb39c -r f2b372cb3662 games/xevil/patches/patch-ab
--- a/games/xevil/patches/patch-ab Fri Mar 26 00:39:25 2004 +0000
+++ b/games/xevil/patches/patch-ab Fri Mar 26 01:34:08 2004 +0000
@@ -1,9 +1,31 @@
-$NetBSD: patch-ab,v 1.2 1998/08/07 10:40:44 agc Exp $
+$NetBSD: patch-ab,v 1.3 2004/03/26 01:34:08 kristerw Exp $
---- actual.C.orig Thu Jul 30 05:18:48 1998
-+++ actual.C Thu Jul 30 05:19:19 1998
-@@ -687,3 +687,3 @@
+--- actual.C.orig Tue Sep 24 00:18:08 1996
++++ actual.C Fri Mar 26 02:17:46 2004
+@@ -23,6 +23,7 @@
+ hardts%alum.mit.edu@localhost
+ http://graphics.lcs.mit.edu/~hardts/xevil.html
+ */
++using namespace std;
+
+ #ifndef NO_PRAGMAS
+ #pragma implementation "actual.h"
+@@ -30,7 +31,8 @@
+
+
+ // Include Files
+-#include <strstream.h>
++#include <strstream>
++using std::ostrstream;
+
+ #include "utils.h"
+ #include "coord.h"
+@@ -685,7 +687,7 @@
+ // More general and easy to extend.
+ PhysicalP Transmogifier::new_physical(const Pos &middle)
{
- PhysicalContext *list[A_CLASSES_NUM];
+ const PhysicalContext *list[A_CLASSES_NUM];
int size;
+ LocatorP l = get_locator();
+ WorldP w = get_world();
diff -r df874b5eb39c -r f2b372cb3662 games/xevil/patches/patch-ac
--- a/games/xevil/patches/patch-ac Fri Mar 26 00:39:25 2004 +0000
+++ b/games/xevil/patches/patch-ac Fri Mar 26 01:34:08 2004 +0000
@@ -1,19 +1,44 @@
-$NetBSD: patch-ac,v 1.2 1998/08/07 10:40:44 agc Exp $
+$NetBSD: patch-ac,v 1.3 2004/03/26 01:34:08 kristerw Exp $
---- game.C.orig Thu Jul 30 05:20:22 1998
-+++ game.C Thu Jul 30 05:21:16 1998
-@@ -388,3 +388,3 @@
+--- game.C.orig Tue Sep 24 02:27:18 1996
++++ game.C Fri Mar 26 02:19:24 2004
+@@ -22,6 +22,7 @@
+ hardts%alum.mit.edu@localhost
+ http://graphics.lcs.mit.edu/~hardts/xevil.html
+ */
++using namespace std;
+
+ #ifndef NO_PRAGMAS
+ #pragma implementation "game.h"
+@@ -34,7 +35,7 @@
+ #include <stdio.h>
+ }
+
+-#include <strstream.h>
++#include <strstream>
+ #include <iomanip.h>
+
+ #include "utils.h"
+@@ -386,11 +387,11 @@
+
+ // Get arrays of potential weapons and potential otherItems.
int weaponsNum;
- PhysicalContext *weapons[A_CLASSES_NUM];
+ const PhysicalContext *weapons[A_CLASSES_NUM];
weaponsNum = locator->filter_contexts(weapons,NULL,
-@@ -392,3 +392,3 @@
+ potential_weapon_filter);
int oItemsNum;
- PhysicalContext *oItems[A_CLASSES_NUM];
+ const PhysicalContext *oItems[A_CLASSES_NUM];
oItemsNum = locator->filter_contexts(oItems,NULL,
-@@ -1383,3 +1383,3 @@
+ potential_other_item_filter);
+
+@@ -1381,7 +1382,7 @@
+ // Choose class randomly.
+
// Get list of all classes that are potential Human classes.
- PhysicalContext *list[A_CLASSES_NUM];
+ const PhysicalContext *list[A_CLASSES_NUM];
int size = locator.filter_contexts(list,NULL,potential_human_filter);
+ assert(size);
+ theContext = list[Utils::choose(size)];
diff -r df874b5eb39c -r f2b372cb3662 games/xevil/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xevil/patches/patch-ad Fri Mar 26 01:34:08 2004 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-ad,v 1.1 2004/03/26 01:34:08 kristerw Exp $
+
+--- locator.C.orig Fri Mar 26 02:20:24 2004
++++ locator.C Fri Mar 26 02:21:09 2004
+@@ -22,6 +22,7 @@
+ hardts%alum.mit.edu@localhost
+ http://graphics.lcs.mit.edu/~hardts/xevil.html
+ */
++using namespace std;
+
+ #ifndef NO_PRAGMAS
+ #pragma implementation "locator.h"
+@@ -210,7 +211,7 @@
+ void Locator::get_nearby(PhysicalP nearby[OL_NEARBY_MAX],int &nitems,
+ PhysicalP p,int radius)
+ {
+- int glocRadius = (int)ceil(radius / OL_GRID_SIZE_MAX);
++ int glocRadius = (int)ceil((float)(radius / OL_GRID_SIZE_MAX));
+ int radius_2 = radius * radius;
+ nitems = 0;
+
diff -r df874b5eb39c -r f2b372cb3662 games/xevil/patches/patch-ae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xevil/patches/patch-ae Fri Mar 26 01:34:08 2004 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-ae,v 1.1 2004/03/26 01:34:08 kristerw Exp $
+
+--- physical.C.orig Fri Mar 26 02:15:18 2004
++++ physical.C Fri Mar 26 02:16:06 2004
+@@ -22,6 +22,7 @@
+ hardts%alum.mit.edu@localhost
+ http://graphics.lcs.mit.edu/~hardts/xevil.html
+ */
++using namespace std;
+
+ #ifndef NO_PRAGMAS
+ #pragma implementation "physical.h"
+@@ -29,13 +30,14 @@
+
+
+ // Include Files
+-#include <iostream.h>
++#include <iostream>
+
+ extern "C" {
+ #include <string.h>
+ }
+
+-#include <strstream.h>
++#include <strstream>
++using std::ostrstream;
+
+ #include "utils.h"
+ #include "coord.h"
diff -r df874b5eb39c -r f2b372cb3662 games/xevil/patches/patch-af
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xevil/patches/patch-af Fri Mar 26 01:34:08 2004 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-af,v 1.1 2004/03/26 01:34:08 kristerw Exp $
+
+--- ui.C.orig Fri Mar 26 02:21:44 2004
++++ ui.C Fri Mar 26 02:22:21 2004
+@@ -23,6 +23,7 @@
+ hardts%alum.mit.edu@localhost
+ http://graphics.lcs.mit.edu/~hardts/xevil.html
+ */
++using namespace std;
+
+ #ifndef NO_PRAGMAS
+ #pragma implementation "ui.h"
+@@ -42,7 +43,8 @@
+ }
+
+ #include <iostream.h>
+-#include <strstream.h>
++#include <strstream>
++using std::ostrstream;
+
+ #include "coord.h"
+ #include "ui.h"
Home |
Main Index |
Thread Index |
Old Index