summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2013-03-25 01:59:03 +0000
committerdholland <dholland@pkgsrc.org>2013-03-25 01:59:03 +0000
commit57d21f71283a2006cb906851d8d74027355870a2 (patch)
tree18b543e67fe1c58f04c338ec98c20d0ae180a00b /games
parent8ddfbaf49daae612add61c514de4b30e30d30cb8 (diff)
downloadpkgsrc-57d21f71283a2006cb906851d8d74027355870a2.tar.gz
Clean up some gcc warnings. This probably doesn't accomplish anything
particularly important, except that one of the warnings was reporting a bug that probably causes crashes. PKGREVISION -> 4
Diffstat (limited to 'games')
-rw-r--r--games/netmaze/Makefile4
-rw-r--r--games/netmaze/distinfo11
-rw-r--r--games/netmaze/patches/patch-ad29
-rw-r--r--games/netmaze/patches/patch-ae31
-rw-r--r--games/netmaze/patches/patch-better.c50
-rw-r--r--games/netmaze/patches/patch-draw_3d.c12
-rw-r--r--games/netmaze/patches/patch-follower.c14
-rw-r--r--games/netmaze/patches/patch-x11gfx.c12
8 files changed, 142 insertions, 21 deletions
diff --git a/games/netmaze/Makefile b/games/netmaze/Makefile
index 6a1cddf9912..f661ef2bc90 100644
--- a/games/netmaze/Makefile
+++ b/games/netmaze/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2012/10/23 10:24:04 wiz Exp $
+# $NetBSD: Makefile,v 1.15 2013/03/25 01:59:03 dholland Exp $
DISTNAME= netmaze0.81
PKGNAME= netmaze-0.81
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_XCONTRIB:=games/multiplayer/}
diff --git a/games/netmaze/distinfo b/games/netmaze/distinfo
index 95479f43b36..0306451925d 100644
--- a/games/netmaze/distinfo
+++ b/games/netmaze/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2013/02/26 11:25:12 joerg Exp $
+$NetBSD: distinfo,v 1.8 2013/03/25 01:59:03 dholland Exp $
SHA1 (netmaze0.81.tar.gz) = 61c3e1dc00372b18a622cd330c322817e73a6cf4
RMD160 (netmaze0.81.tar.gz) = fe30487c441d0789a1526e4ec2f4cd2cf57a416a
@@ -6,8 +6,8 @@ Size (netmaze0.81.tar.gz) = 281463 bytes
SHA1 (patch-aa) = 9bf19e360d54fe8130f93252e82f7c22773884a4
SHA1 (patch-ab) = 1624eade859ee18e2f568fde98187514ae750e95
SHA1 (patch-ac) = 54f3c411a252dcfc0f7fac92f7f047f00b6fb5e0
-SHA1 (patch-ad) = 9fd31fa10618f76eb705fe1f77895889019e07b8
-SHA1 (patch-ae) = 28437adbcab2c57a81581e5fd2cf98447fb60447
+SHA1 (patch-ad) = 532248ccd72f3b8b35b40e2c1a1b79cbce631458
+SHA1 (patch-ae) = d9b122b0346a0f1fff00d06b73e1a5371484a7e4
SHA1 (patch-af) = 356d3ebbf8a8ddbd3cf5056670d274c0b0310545
SHA1 (patch-ag) = 8370210cfbeca003e942e60afa02c7df47fc8a4a
SHA1 (patch-ah) = e291a07a14372eb440e4dc2ed955404fda409452
@@ -18,4 +18,7 @@ SHA1 (patch-al) = 17c66e5dda796258b935ebee974df8a092f38c4f
SHA1 (patch-am) = af29aa8ed0955cf314fa27117457daf57078ddfb
SHA1 (patch-an) = 28a25e4d493f6c24d6fb9499a939f659a51c436c
SHA1 (patch-ao) = 37ede535ccda7ffb267ea1927a197590f1088b37
-SHA1 (patch-better.c) = d0b08ff9dcb43d4e5acc806b1cb961505d9f0778
+SHA1 (patch-better.c) = c06be9fe774be2d8437abd3836091ce963ff524c
+SHA1 (patch-draw_3d.c) = 20af028b362dc330ba9243a89748d3e193ac1fdb
+SHA1 (patch-follower.c) = aa985ec2f2811942a1ef955777b7d7f11f33bcad
+SHA1 (patch-x11gfx.c) = 392d1e42073d6415dfc06d44fd4f49a9d2506863
diff --git a/games/netmaze/patches/patch-ad b/games/netmaze/patches/patch-ad
index a239d5e8639..857584b23ce 100644
--- a/games/netmaze/patches/patch-ad
+++ b/games/netmaze/patches/patch-ad
@@ -1,6 +1,10 @@
-$NetBSD: patch-ad,v 1.2 2004/05/07 02:16:05 danw Exp $
+$NetBSD: patch-ad,v 1.3 2013/03/25 01:59:03 dholland Exp $
---- netmaze.c.orig Fri Apr 15 16:34:04 1994
+- use standard headers
+- fix void main
+- change around handling of signal masks (XXX: it is still wrong)
+
+--- netmaze.c.orig 1994-04-15 20:34:04.000000000 +0000
+++ netmaze.c
@@ -23,16 +23,12 @@
*
@@ -20,7 +24,24 @@ $NetBSD: patch-ad,v 1.2 2004/05/07 02:16:05 danw Exp $
#include <sys/time.h>
#include <sys/ioctl.h>
#include <sys/types.h>
-@@ -383,7 +379,7 @@ static void start_signal(void)
+@@ -96,7 +92,7 @@ struct sigaction vec,ovec,vecio,ovecio;
+ extern struct timeval notimeout;
+ extern struct fd_mask readmask;
+
+-void main(int argc,char **argv)
++int main(int argc,char **argv)
+ {
+ int i,nowait=FALSE;
+
+@@ -293,6 +289,7 @@ void main(int argc,char **argv)
+ }
+
+ XCloseDisplay(sm->grafix.display);
++ return 0;
+ }
+
+ /***************************/
+@@ -383,7 +380,7 @@ static void start_signal(void)
#ifdef RS6000 /* ibm rs/6000 */
sigemptyset(&vec.sa_mask);
#else
@@ -29,7 +50,7 @@ $NetBSD: patch-ad,v 1.2 2004/05/07 02:16:05 danw Exp $
#endif
vec.sa_flags = 0;
if ( sigaction(SIGALRM, &vec, &ovec) == -1) perror("SIGALRM\n");
-@@ -412,7 +408,7 @@ static void setup_sigchild(void)
+@@ -412,7 +409,7 @@ static void setup_sigchild(void)
#ifdef RS6000 /* ibm rs/6000 */
sigemptyset(&vec.sa_mask);
#else
diff --git a/games/netmaze/patches/patch-ae b/games/netmaze/patches/patch-ae
index b288514d955..ae07fa6cbdb 100644
--- a/games/netmaze/patches/patch-ae
+++ b/games/netmaze/patches/patch-ae
@@ -1,7 +1,13 @@
-$NetBSD: patch-ae,v 1.2 2005/05/01 10:34:49 jdc Exp $
---- netserv.c.dist 1994-04-10 11:07:23.000000000 +0100
-+++ netserv.c 2005-04-05 15:25:17.000000000 +0100
-@@ -106,7 +106,11 @@
+$NetBSD: patch-ae,v 1.3 2013/03/25 01:59:03 dholland Exp $
+
+- fd_set is not (necessarily) a struct
+- change around handling of signal masks (XXX: it is still wrong)
+- don't crash on remote machines that aren't in DNS
+- use socklen_t witih accept()
+
+--- netserv.c.orig 1994-04-10 10:07:23.000000000 +0000
++++ netserv.c
+@@ -106,7 +106,11 @@ struct pqueue *find_player(char*);
#ifdef HAVE_FDSET
@@ -13,7 +19,7 @@ $NetBSD: patch-ae,v 1.2 2005/05/01 10:34:49 jdc Exp $
#else
struct fd_mask readmask;
#endif
-@@ -629,7 +633,7 @@
+@@ -629,7 +633,7 @@ void start_signal(void)
#ifdef RS6000 /* ibm rs/6000 */
sigemptyset(&vec1.sa_mask);
#else
@@ -22,7 +28,7 @@ $NetBSD: patch-ae,v 1.2 2005/05/01 10:34:49 jdc Exp $
#endif
vec1.sa_flags = 0;
if ( sigaction(SIGALRM, &vec1, (struct sigaction *) 0) == -1) perror("SIGALRM\n");
-@@ -652,7 +656,7 @@
+@@ -652,7 +656,7 @@ void setup_sigchild(void) /* for externa
#ifdef RS6000 /* ibm rs/6000 */
sigemptyset(&svec1.sa_mask);
#else
@@ -31,7 +37,7 @@ $NetBSD: patch-ae,v 1.2 2005/05/01 10:34:49 jdc Exp $
#endif
svec1.sa_flags = 0;
if(sigaction(SIGCHLD,&svec1,(struct sigaction *)0) == -1) perror("SIGCHLD\n");
-@@ -779,7 +783,11 @@
+@@ -779,7 +783,11 @@ void do_timer(int nowaitgroup)
void io_cntl(void)
{
#ifdef HAVE_FDSET
@@ -43,7 +49,16 @@ $NetBSD: patch-ae,v 1.2 2005/05/01 10:34:49 jdc Exp $
#else
struct fd_mask readmask1;
#endif
-@@ -914,7 +922,7 @@
+@@ -881,7 +889,7 @@ void io_cntl(void)
+
+ void accept_socket(void)
+ {
+- int addrlen = sizeof(struct sockaddr);
++ socklen_t addrlen = sizeof(struct sockaddr);
+ struct cqueue *q;
+
+ q = calloc(1,sizeof(struct cqueue)); /* alloc a new node */
+@@ -914,7 +922,7 @@ char *get_hostname(struct cqueue *q,char
char *saddr = (char *) &(((struct sockaddr_in *) &(q->remoteaddr))->sin_addr.s_addr);
hp = gethostbyaddr(saddr,4,AF_INET);
diff --git a/games/netmaze/patches/patch-better.c b/games/netmaze/patches/patch-better.c
index a2425a9471e..3b13c821c12 100644
--- a/games/netmaze/patches/patch-better.c
+++ b/games/netmaze/patches/patch-better.c
@@ -1,14 +1,20 @@
-$NetBSD: patch-better.c,v 1.1 2013/02/26 11:25:12 joerg Exp $
+$NetBSD: patch-better.c,v 1.2 2013/03/25 01:59:03 dholland Exp $
---- better.c.orig 2013-02-25 20:36:11.000000000 +0000
+- use standard headers
+- define BIGGEST to something
+- silence some warnings
+- don't use -1 to access an array of player info
+
+--- better.c.orig 1994-04-16 16:18:30.000000000 +0000
+++ better.c
-@@ -12,11 +12,13 @@
+@@ -12,11 +12,14 @@
*/
#include <math.h>
+#include <limits.h>
#include <stdio.h>
+#include <stdlib.h>
++#include <string.h>
#include "netmaze.h"
#include "better.h"
@@ -17,3 +23,41 @@ $NetBSD: patch-better.c,v 1.1 2013/02/26 11:25:12 joerg Exp $
#define NERVOUS 50000000 /* ab hier sucht BB sein Opfer */
#define TODESRADIUS1 7000000
#define TODESRADIUS 15000000
+@@ -102,7 +105,7 @@ geht so einigermassen... */
+ int k_sichtbar(long x1,long y1,long x2,long y2)
+ {
+ int x1q,y1q,x2q,y2q,xqdiff,yqdiff;
+- int x_count,y_count,vstep,hstep,hstep1,vstep1;
++ int x_count,y_count,vstep,hstep;
+ long xdiff,ydiff,xl_count,yl_count,xl_step,yl_step;
+ float xy,yx;
+
+@@ -308,7 +311,6 @@ static long target_angle(PLAYER* them){
+ int mx,my;
+ int tx,ty;
+ int dx,dy;
+- int angle, diff;
+ PLAYER* me= &(sm->playfeld[ownnumber]);
+
+ /* mx = (int) ((me->x) >> 24);
+@@ -356,9 +358,8 @@ void angl(int opfer){
+ /* wird bei jedem 'tick' aufgerufen. das herz von BB. bb - Falsch BB hat kein Herz . JK*/
+
+ int own_action(void){
+- static touchie=0;
+- int opfer, winkel, owinkel, hwinkel, lwinkel, alt_opfer;
+- long x_dist,y_dist,nx_dist,ny_dist,lx_dist,ly_dist,hx_dist,hy_dist;
++ static int touchie=0;
++ int opfer;
+ long i;
+
+ if (!(sm->playfeld[ownnumber].alive)){ /* I'm dead , wooouueeehhhh */
+@@ -368,7 +369,7 @@ int own_action(void){
+ if (sm->playfeld[ownnumber].ownkiller==robodat.freund){ /* ts, ts */
+ robodat.exfreund=robodat.freund;
+ robodat.freund=-1;
+- fprintf(stderr,"No more Mister Nice Guy, %s!",sm->playfeld[robodat.freund].name);
++ fprintf(stderr,"No more Mister Nice Guy, %s!",sm->playfeld[robodat.exfreund].name);
+ sprintf(sm->owncomment,"%s, you fucking traitor pig : die scum!",robodat.freundname);
+ send_owncomment();
+ };
diff --git a/games/netmaze/patches/patch-draw_3d.c b/games/netmaze/patches/patch-draw_3d.c
new file mode 100644
index 00000000000..3e216d92427
--- /dev/null
+++ b/games/netmaze/patches/patch-draw_3d.c
@@ -0,0 +1,12 @@
+$NetBSD: patch-draw_3d.c,v 1.1 2013/03/25 01:59:03 dholland Exp $
+
+--- draw_3d.c~ 1994-04-15 10:57:35.000000000 +0000
++++ draw_3d.c
+@@ -9,6 +9,7 @@
+ #include <stdio.h>
+ #include <math.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include "trigtab.h"
+ #include "netmaze.h"
+
diff --git a/games/netmaze/patches/patch-follower.c b/games/netmaze/patches/patch-follower.c
new file mode 100644
index 00000000000..2042d6a0e2b
--- /dev/null
+++ b/games/netmaze/patches/patch-follower.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-follower.c,v 1.1 2013/03/25 01:59:03 dholland Exp $
+
+--- follower.c~ 1994-04-09 14:54:48.000000000 +0000
++++ follower.c
+@@ -5,6 +5,9 @@
+
+ #include "netmaze.h"
+ #include <math.h>
++#include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
+
+ #define PI 3.141592
+
diff --git a/games/netmaze/patches/patch-x11gfx.c b/games/netmaze/patches/patch-x11gfx.c
new file mode 100644
index 00000000000..82ce9318a4f
--- /dev/null
+++ b/games/netmaze/patches/patch-x11gfx.c
@@ -0,0 +1,12 @@
+$NetBSD: patch-x11gfx.c,v 1.1 2013/03/25 01:59:03 dholland Exp $
+
+--- x11gfx.c~ 1994-04-15 21:19:58.000000000 +0000
++++ x11gfx.c
+@@ -9,6 +9,7 @@
+ #include <math.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <X11/X.h>
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>