summaryrefslogtreecommitdiff
path: root/games/dipmap
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2011-12-06 19:55:43 +0000
committerjoerg <joerg@pkgsrc.org>2011-12-06 19:55:43 +0000
commita3bf2c630d7de43a4dce54fd904bd0e6778d970a (patch)
tree8e6f8d9ed96c6ef45ee8b24f6be3e98ddb796415 /games/dipmap
parent11efe6351282c9d2ac42ec4f6a98ce2a11b7aa11 (diff)
downloadpkgsrc-a3bf2c630d7de43a4dce54fd904bd0e6778d970a.tar.gz
Fix build with newer GCC
Diffstat (limited to 'games/dipmap')
-rw-r--r--games/dipmap/distinfo5
-rw-r--r--games/dipmap/patches/patch-ac89
-rw-r--r--games/dipmap/patches/patch-strrstr.c9
3 files changed, 96 insertions, 7 deletions
diff --git a/games/dipmap/distinfo b/games/dipmap/distinfo
index f836234e2e4..5c3c326bf18 100644
--- a/games/dipmap/distinfo
+++ b/games/dipmap/distinfo
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.3 2005/02/23 23:11:56 agc Exp $
+$NetBSD: distinfo,v 1.4 2011/12/06 19:55:43 joerg Exp $
SHA1 (mapit.v1-16.tar.Z) = 0715439353072e8ea08e8271c911f73939868842
RMD160 (mapit.v1-16.tar.Z) = 928462c07dfe5fa6cf874bb8c50e36009c43f214
Size (mapit.v1-16.tar.Z) = 579397 bytes
SHA1 (patch-aa) = 7be14124ac761dd838815baedad662f62c74d3a8
SHA1 (patch-ab) = 4e01fb1ab78040917b2c7716cc890ebba9c8d180
-SHA1 (patch-ac) = ffb3d97021608ef10c6a6e8eaf2667b790f6e201
+SHA1 (patch-ac) = df860cf822227b33d02df1574243a9f6a1a3ed32
+SHA1 (patch-strrstr.c) = d44e717c41e012a958d36c29c568d54d49329c52
diff --git a/games/dipmap/patches/patch-ac b/games/dipmap/patches/patch-ac
index 0f6b9b1ea94..2b0535cf905 100644
--- a/games/dipmap/patches/patch-ac
+++ b/games/dipmap/patches/patch-ac
@@ -1,8 +1,18 @@
-$NetBSD: patch-ac,v 1.1.1.1 2001/10/02 13:15:56 wiz Exp $
+$NetBSD: patch-ac,v 1.2 2011/12/06 19:55:43 joerg Exp $
---- mapit.c.orig Fri Mar 13 20:38:03 1998
+--- mapit.c.orig 1998-03-13 19:38:03.000000000 +0000
+++ mapit.c
-@@ -229,6 +229,7 @@
+@@ -148,8 +148,8 @@
+
+ fix parse_status to handle retreat with mutilple alternate destinations
+ */
+-#ifdef MACINTOSH
+ #include <stdlib.h>
++#ifdef MACINTOSH
+ #include <console.h>
+ #include <Files.h>
+ #endif
+@@ -229,6 +229,7 @@ main(argc,argv)
char *p0,*p1; /* and character pointers */
int started; /* is a map already started? */
int report; /* type of report */
@@ -10,7 +20,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2001/10/02 13:15:56 wiz Exp $
extern char *optarg; /* used by getopt() */
extern int optind;
-@@ -318,8 +319,8 @@
+@@ -318,8 +319,8 @@ main(argc,argv)
}
if (new_borders) { /* We'll need a temporary file */
@@ -21,7 +31,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2001/10/02 13:15:56 wiz Exp $
fprintf(stderr, "Unable to open file..\n");
}
-@@ -511,7 +512,7 @@
+@@ -511,7 +512,7 @@ main(argc,argv)
else
ownerlist[i+1] = ownerlist[i];
@@ -30,3 +40,72 @@ $NetBSD: patch-ac,v 1.1.1.1 2001/10/02 13:15:56 wiz Exp $
fprintf(stderr,"Unable to reopen file.\n");
else {
while(fgets(line, BUFSIZ, nstdout))
+@@ -592,8 +593,7 @@ parse_movement()
+ int error; /* true if a syntax (or malloc) error */
+
+ for (i=0; i<unitcount; ++i) {
+- if (free(units[i].country) == 0)
+- ;
++ free(units[i].country);
+ }
+ unitcount = 0;
+
+@@ -824,8 +824,7 @@ parse_movement()
+ p0 = NULL; /* couldn't find unit type */
+ p1 = p2; /* assume no nationality either */
+ } else {
+- if (free(p2) == 0)
+- ;
++ free(p2);
+ }
+ }
+
+@@ -948,16 +947,14 @@ parse_movement()
+ fprintf(nstdout,"OrderReport\n");
+ for (i = 0; i<ordernum; i++) {
+ fprintf(nstdout,"(%s) WriteOrder\n",orders[i]);
+- if (free(orders[i]) == 0)
+- ;
++ free(orders[i]);
+ }
+ }
+
+ if (graphicnum>0) {
+ for (i = 0; i<graphicnum; i++) {
+ fprintf(nstdout,"%s\n",graphics[i]);
+- if (free(graphics[i]) == 0)
+- ;
++ free(graphics[i]);
+ }
+ }
+ }
+@@ -1461,8 +1458,7 @@ parse_start(report)
+ int error; /* true if a syntax (or malloc) error */
+
+ for (i=0; i<unitcount; ++i) {
+- if (free(units[i].country) == 0)
+- ;
++ free(units[i].country);
+ }
+ unitcount = 0;
+
+@@ -1600,8 +1596,7 @@ parse_start(report)
+ fprintf(nstdout,"OrderReport\n");
+ for (i = 0; i<ordernum; i++) {
+ fprintf(nstdout,"(%s) WriteOrder\n",orders[i]);
+- if (free(orders[i]) == 0)
+- ;
++ free(orders[i]);
+ }
+ }
+ }
+@@ -1703,8 +1698,7 @@ drawnew()
+ if (units[i].loc>0)
+ fprintf(nstdout,"( %c %s) WriteOrder\n",
+ units[i].type,map[units[i].loc].nick);
+- if (free(units[i].country) == 0)
+- ;
++ free(units[i].country);
+ }
+ unitcount= 0;
+ }
diff --git a/games/dipmap/patches/patch-strrstr.c b/games/dipmap/patches/patch-strrstr.c
new file mode 100644
index 00000000000..086620e71c4
--- /dev/null
+++ b/games/dipmap/patches/patch-strrstr.c
@@ -0,0 +1,9 @@
+$NetBSD: patch-strrstr.c,v 1.1 2011/12/06 19:55:43 joerg Exp $
+
+--- strrstr.c.orig 2011-12-06 15:46:38.000000000 +0000
++++ strrstr.c
+@@ -1,3 +1,4 @@
++#include <string.h>
+ /* Strrstr.c, included for those computers that do not have it. */
+ /* Written by Kent Irwin, irwin@leland.stanford.edu. I am
+ responsible for bugs */