Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Dec 2013 16:11:08 +0000 (UTC)
From:      Rusmir Dusko <nemysis@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r337878 - in head/games/maelstrom: . files
Message-ID:  <201312281611.rBSGB8fT050209@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nemysis
Date: Sat Dec 28 16:11:08 2013
New Revision: 337878
URL: http://svnweb.freebsd.org/changeset/ports/337878

Log:
  - Change master sites
  - Add DOCS Option
  - Support STAGEDIR, change DESTDIR
  - Change Desktop entry file
  - Disable all warnings with -w
  - Recreate patches with make makepatch
  
  Approved by:	pawel / wg (mentors, implicit)

Added:
  head/games/maelstrom/files/patch-maclib__Mac_FontServ.h   (contents, props changed)
  head/games/maelstrom/files/patch-maclib__Mac_Resource.h   (contents, props changed)
  head/games/maelstrom/files/patch-maclib__Mac_Sound.h   (contents, props changed)
  head/games/maelstrom/files/patch-maclib__Mac_Wave.h   (contents, props changed)
  head/games/maelstrom/files/patch-maclib__macres.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-maclib__snd2wav.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-netlogic__game.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-netlogic__netplay.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-screenlib__SDL_FrameBuf.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-screenlib__SDL_FrameBuf.h   (contents, props changed)
Deleted:
  head/games/maelstrom/files/patch-maclib-Mac_FontServ.h
  head/games/maelstrom/files/patch-maclib-Mac_Resource.h
  head/games/maelstrom/files/patch-maclib-Mac_Sound.h
  head/games/maelstrom/files/patch-maclib-Mac_Wave.h
  head/games/maelstrom/files/patch-maclib-macres.cpp
  head/games/maelstrom/files/patch-maclib-snd2wav.cpp
  head/games/maelstrom/files/patch-netlogic-game.cpp
  head/games/maelstrom/files/patch-netlogic-netplay.cpp
  head/games/maelstrom/files/patch-screenlib-SDL_FrameBuf.cpp
  head/games/maelstrom/files/patch-screenlib-SDL_FrameBuf.h
Modified:
  head/games/maelstrom/Makefile
  head/games/maelstrom/files/patch-buttonlist.h
  head/games/maelstrom/files/patch-configure
  head/games/maelstrom/files/patch-controls.cpp
  head/games/maelstrom/files/patch-dialog.h
  head/games/maelstrom/files/patch-load.cpp
  head/games/maelstrom/files/patch-main.cpp
  head/games/maelstrom/files/patch-myerror.cpp
  head/games/maelstrom/files/patch-netscore.cpp

Modified: head/games/maelstrom/Makefile
==============================================================================
--- head/games/maelstrom/Makefile	Sat Dec 28 16:01:37 2013	(r337877)
+++ head/games/maelstrom/Makefile	Sat Dec 28 16:11:08 2013	(r337878)
@@ -6,7 +6,7 @@ PORTVERSION=	3.0.6
 PORTREVISION=	9
 CATEGORIES=	games
 MASTER_SITES=	http://slouken.libsdl.org/projects/Maelstrom/src/ \
-		SF/nemysisfreebsdp/:icons
+		SF/nemysisfreebsdp/${CATEGORIES}/:icons
 DISTNAME=	Maelstrom-${PORTVERSION}
 DISTFILES=	Maelstrom-${DISTVERSION}${EXTRACT_SUFX} \
 		${PORTNAME}.png:icons
@@ -24,23 +24,39 @@ GNU_CONFIGURE=	yes
 
 DATADIR=	${PREFIX}/share/Maelstrom
 DOCSDIR=	${PREFIX}/share/doc/Maelstrom
+
 PORTDOCS=	*
 
-DESKTOP_ENTRIES="Maelstrom" "${COMMENT}" ${PORTNAME} \
-		"Maelstrom" "Game;ArcadeGame;" false
+OPTIONS_DEFINE=	DOCS
+
+DESKTOP_ENTRIES="Maelstrom" "" ${PORTNAME} \
+		"Maelstrom" "Game;ArcadeGame;" ""
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
+post-patch:
+	@${REINPLACE_CMD} \
+		-e 's|prefix = @prefix@|prefix = $${DESTDIR}@prefix@| ; \
+		s|$$(DESTDIR)$$(bindir)|$$(bindir)|' \
+		${WRKSRC}/Makefile.in
+
+	@(cd ${WRKSRC} ; ${REINPLACE_CMD} \
+		-e 's|@CFLAGS@|@CFLAGS@ -w| ; \
+		s|$$(CXXFLAGS)|$$(CXXFLAGS) -w|' \
+		Makefile.in maclib/Makefile.in \
+		netlogic/Makefile.in screenlib/Makefile.in)
+
 .if ${PORT_OPTIONS:MDOCS}
 INSTALL_TARGET=	install install_gamedocs
 .endif
 
 post-install:
-	${CHOWN} root:games ${PREFIX}/bin/Maelstrom
-	${CHMOD} 2755 ${PREFIX}/bin/Maelstrom
-	${CHMOD} 664 ${PREFIX}/share/Maelstrom/Maelstrom-Scores
-	${CHOWN} root:games ${PREFIX}/share/Maelstrom/Maelstrom-Scores
-	${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png ${PREFIX}/share/pixmaps/
+	${CHOWN} root:games ${STAGEDIR}${PREFIX}/bin/Maelstrom
+	${CHMOD} 2755 ${STAGEDIR}${PREFIX}/bin/Maelstrom
+	${CHMOD} 664 ${STAGEDIR}${PREFIX}/share/Maelstrom/Maelstrom-Scores
+	${CHOWN} root:games \
+		${STAGEDIR}${PREFIX}/share/Maelstrom/Maelstrom-Scores
+	${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png \
+		${STAGEDIR}${PREFIX}/share/pixmaps/
 
 .include <bsd.port.mk>

Modified: head/games/maelstrom/files/patch-buttonlist.h
==============================================================================
--- head/games/maelstrom/files/patch-buttonlist.h	Sat Dec 28 16:01:37 2013	(r337877)
+++ head/games/maelstrom/files/patch-buttonlist.h	Sat Dec 28 16:11:08 2013	(r337878)
@@ -1,5 +1,5 @@
---- buttonlist.h.orig	2000-01-25 17:41:32.000000000 +0100
-+++ buttonlist.h	2013-03-16 11:40:09.000000000 +0100
+--- ./buttonlist.h.orig	2000-01-25 17:41:32.000000000 +0100
++++ ./buttonlist.h	2013-12-28 11:39:15.000000000 +0100
 @@ -16,7 +16,7 @@
  
  	void Add_Button(Uint16 x, Uint16 y, Uint16 width, Uint16 height, 

Modified: head/games/maelstrom/files/patch-configure
==============================================================================
--- head/games/maelstrom/files/patch-configure	Sat Dec 28 16:01:37 2013	(r337877)
+++ head/games/maelstrom/files/patch-configure	Sat Dec 28 16:11:08 2013	(r337878)
@@ -1,5 +1,5 @@
---- configure.orig	2002-10-20 05:43:07.000000000 +0200
-+++ configure	2013-03-16 13:28:11.000000000 +0100
+--- ./configure.orig	2002-10-20 05:43:07.000000000 +0200
++++ ./configure	2013-12-28 11:39:15.000000000 +0100
 @@ -3231,6 +3231,9 @@
          ac_default_prefix=/boot/beos
          GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE"

Modified: head/games/maelstrom/files/patch-controls.cpp
==============================================================================
--- head/games/maelstrom/files/patch-controls.cpp	Sat Dec 28 16:01:37 2013	(r337877)
+++ head/games/maelstrom/files/patch-controls.cpp	Sat Dec 28 16:11:08 2013	(r337878)
@@ -1,5 +1,5 @@
---- controls.cpp.orig	2001-03-24 19:04:28.000000000 +0100
-+++ controls.cpp	2013-03-16 13:30:14.000000000 +0100
+--- ./controls.cpp.orig	2001-03-24 19:04:28.000000000 +0100
++++ ./controls.cpp	2013-12-28 11:39:15.000000000 +0100
 @@ -83,7 +83,7 @@
  	if ( fname ) {
  		*fname = datafile;

Modified: head/games/maelstrom/files/patch-dialog.h
==============================================================================
--- head/games/maelstrom/files/patch-dialog.h	Sat Dec 28 16:01:37 2013	(r337877)
+++ head/games/maelstrom/files/patch-dialog.h	Sat Dec 28 16:11:08 2013	(r337878)
@@ -1,5 +1,5 @@
---- dialog.h.orig	2001-07-20 17:08:10.000000000 +0200
-+++ dialog.h	2013-03-16 10:15:10.000000000 +0100
+--- ./dialog.h.orig	2001-07-20 17:08:10.000000000 +0200
++++ ./dialog.h	2013-12-28 11:39:16.000000000 +0100
 @@ -92,7 +92,7 @@
  		va_list ap;
  

Modified: head/games/maelstrom/files/patch-load.cpp
==============================================================================
--- head/games/maelstrom/files/patch-load.cpp	Sat Dec 28 16:01:37 2013	(r337877)
+++ head/games/maelstrom/files/patch-load.cpp	Sat Dec 28 16:11:08 2013	(r337878)
@@ -1,5 +1,5 @@
---- load.cpp.orig	2000-02-15 03:47:39.000000000 +0100
-+++ load.cpp	2013-03-16 10:17:30.000000000 +0100
+--- ./load.cpp.orig	2000-02-15 03:47:39.000000000 +0100
++++ ./load.cpp	2013-12-28 11:39:16.000000000 +0100
 @@ -81,7 +81,7 @@
  	SDL_Surface *bmp, *title;
  	

Added: head/games/maelstrom/files/patch-maclib__Mac_FontServ.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-maclib__Mac_FontServ.h	Sat Dec 28 16:11:08 2013	(r337878)
@@ -0,0 +1,11 @@
+--- ./maclib/Mac_FontServ.h.orig	1999-12-02 18:15:33.000000000 +0100
++++ ./maclib/Mac_FontServ.h	2013-12-28 11:39:16.000000000 +0100
+@@ -135,7 +135,7 @@
+ 		va_list ap;
+ 
+ 		va_start(ap, fmt);
+-		vsprintf(errbuf, fmt, ap);
++		vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ 		va_end(ap);
+ 		errstr = errbuf;
+ 	}

Added: head/games/maelstrom/files/patch-maclib__Mac_Resource.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-maclib__Mac_Resource.h	Sat Dec 28 16:11:08 2013	(r337878)
@@ -0,0 +1,11 @@
+--- ./maclib/Mac_Resource.h.orig	1999-12-03 19:01:47.000000000 +0100
++++ ./maclib/Mac_Resource.h	2013-12-28 11:39:16.000000000 +0100
+@@ -96,7 +96,7 @@
+ 		va_list ap;
+ 
+ 		va_start(ap, fmt);
+-		vsprintf(errbuf, fmt, ap);
++		vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ 		va_end(ap);
+ 		errstr = errbuf;
+ 	}

Added: head/games/maelstrom/files/patch-maclib__Mac_Sound.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-maclib__Mac_Sound.h	Sat Dec 28 16:11:08 2013	(r337878)
@@ -0,0 +1,11 @@
+--- ./maclib/Mac_Sound.h.orig	2002-10-20 04:53:34.000000000 +0200
++++ ./maclib/Mac_Sound.h	2013-12-28 11:39:16.000000000 +0100
+@@ -199,7 +199,7 @@
+ 		va_list ap;
+ 
+ 		va_start(ap, fmt);
+-		vsprintf(errbuf, fmt, ap);
++		vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ 		va_end(ap);
+ 		errstr = errbuf;
+ 	}

Added: head/games/maelstrom/files/patch-maclib__Mac_Wave.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-maclib__Mac_Wave.h	Sat Dec 28 16:11:08 2013	(r337878)
@@ -0,0 +1,11 @@
+--- ./maclib/Mac_Wave.h.orig	2000-01-25 17:44:10.000000000 +0100
++++ ./maclib/Mac_Wave.h	2013-12-28 11:39:16.000000000 +0100
+@@ -108,7 +108,7 @@
+ 		va_list ap;
+ 
+ 		va_start(ap, fmt);
+-		vsprintf(errbuf, fmt, ap);
++		vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ 		va_end(ap);
+ 		errstr = errbuf;
+ 	}

Added: head/games/maelstrom/files/patch-maclib__macres.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-maclib__macres.cpp	Sat Dec 28 16:11:08 2013	(r337878)
@@ -0,0 +1,13 @@
+--- ./maclib/macres.cpp.orig	2000-01-25 17:44:20.000000000 +0100
++++ ./maclib/macres.cpp	2013-12-28 11:39:16.000000000 +0100
+@@ -58,8 +58,8 @@
+ 				ids[j], res->ResourceName(types[i], ids[j]));
+ 			if ( argv[2] ) {
+ 				char path[23];
+-				sprintf(path,"%s/%s:%hu", argv[2],
+-							types[i], ids[j]);
++				snprintf(path, sizeof(path), "%s/%s:%hu",
++					argv[2], types[i], ids[j]);
+ 				FILE *output;
+ 				Mac_ResData *D;
+             			if ( (output=fopen(path, "w")) != NULL ) {

Added: head/games/maelstrom/files/patch-maclib__snd2wav.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-maclib__snd2wav.cpp	Sat Dec 28 16:11:08 2013	(r337878)
@@ -0,0 +1,11 @@
+--- ./maclib/snd2wav.cpp.orig	2001-03-28 05:54:50.000000000 +0200
++++ ./maclib/snd2wav.cpp	2013-12-28 11:39:16.000000000 +0100
+@@ -82,7 +82,7 @@
+ 			continue;
+ 		}
+ 		wave.Load(snd, rate);
+-		sprintf(wavname, "snd_%d.wav", ids[i]);
++		snprintf(wavname, sizeof(wavname), "snd_%d.wav", ids[i]);
+ 		wave.Save(wavname);
+ 	}
+ 	delete macx;

Modified: head/games/maelstrom/files/patch-main.cpp
==============================================================================
--- head/games/maelstrom/files/patch-main.cpp	Sat Dec 28 16:01:37 2013	(r337877)
+++ head/games/maelstrom/files/patch-main.cpp	Sat Dec 28 16:11:08 2013	(r337878)
@@ -1,5 +1,5 @@
---- main.cpp.orig	2002-10-20 04:53:32.000000000 +0200
-+++ main.cpp	2013-03-16 11:03:28.000000000 +0100
+--- ./main.cpp.orig	2002-10-20 04:53:32.000000000 +0200
++++ ./main.cpp	2013-12-28 11:39:16.000000000 +0100
 @@ -445,7 +445,7 @@
  		DrawText(xOff+309-7, yOff+240-6, text, geneva, STYLE_BOLD,
  							0x00, 0x00, 0x00);

Modified: head/games/maelstrom/files/patch-myerror.cpp
==============================================================================
--- head/games/maelstrom/files/patch-myerror.cpp	Sat Dec 28 16:01:37 2013	(r337877)
+++ head/games/maelstrom/files/patch-myerror.cpp	Sat Dec 28 16:11:08 2013	(r337878)
@@ -1,5 +1,5 @@
---- myerror.cpp.orig	1998-07-14 03:50:17.000000000 +0200
-+++ myerror.cpp	2013-03-16 12:24:50.000000000 +0100
+--- ./myerror.cpp.orig	1998-07-14 03:50:17.000000000 +0200
++++ ./myerror.cpp	2013-12-28 11:39:16.000000000 +0100
 @@ -16,7 +16,7 @@
  	va_list ap;
  

Added: head/games/maelstrom/files/patch-netlogic__game.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-netlogic__game.cpp	Sat Dec 28 16:11:08 2013	(r337878)
@@ -0,0 +1,127 @@
+--- ./netlogic/game.cpp.orig	2001-07-23 04:24:03.000000000 +0200
++++ ./netlogic/game.cpp	2013-12-28 11:39:16.000000000 +0100
+@@ -232,7 +232,7 @@
+ 
+ 			lastDisplayed = gDisplayed;
+ 			screen->FillRect(0, 0, SCREEN_WIDTH, 12, ourBlack);
+-			sprintf(caption,
++			snprintf(caption, sizeof(caption),
+ 				"You are player %d --- displaying player %d",
+ 						gOurPlayer+1, gDisplayed+1);
+ 			DrawText(SPRITES_WIDTH, 11, caption, geneva,
+@@ -357,7 +357,7 @@
+ 				/* -- Erase old and draw new score */
+ 				screen->FillRect(45, gStatusLine+1,
+ 					score_width, text_height, ourBlack);
+-				sprintf(numbuf, "%d", Score);
++				snprintf(numbuf, sizeof(numbuf), "%d", Score);
+ 				score_width = DrawText(45, gStatusLine+11, 
+ 						numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+@@ -380,7 +380,7 @@
+ 		if (lastWave != gWave) {
+ 			screen->FillRect(255, gStatusLine+1,
+ 					wave_width, text_height, ourBlack);
+-			sprintf(numbuf, "%d", gWave);
++			snprintf(numbuf, sizeof(numbuf), "%d", gWave);
+ 			wave_width = DrawText(255, gStatusLine+11, 
+ 					numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+@@ -391,7 +391,7 @@
+ 		if (lastLives != Lives) {
+ 			screen->FillRect(319, gStatusLine+1,
+ 					lives_width, text_height, ourBlack);
+-			sprintf(numbuf, "%-3.1d", Lives);
++			snprintf(numbuf, sizeof(numbuf), "%-3.1d", Lives);
+ 			lives_width = DrawText(319, gStatusLine+11,
+ 					numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+@@ -402,7 +402,7 @@
+ 		if (lastBonus != Bonus) {
+ 			screen->FillRect(384, gStatusLine+1,
+ 					bonus_width, text_height, ourBlack);
+-			sprintf(numbuf, "%-7.1d", Bonus);
++			snprintf(numbuf, sizeof(numbuf), "%-7.1d", Bonus);
+ 			bonus_width = DrawText(384, gStatusLine+11,
+ 					numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+@@ -414,7 +414,7 @@
+ 			if (lastFrags != Frags) {
+ 				screen->FillRect(fragoff, gStatusLine+1,
+ 					frags_width, text_height, ourBlack);
+-				sprintf(numbuf, "%-3.1d", Frags);
++				snprintf(numbuf, sizeof(numbuf), "%-3.1d", Frags);
+ 				frags_width = DrawText(fragoff, gStatusLine+11,
+ 						numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+@@ -747,10 +747,11 @@
+ 		for ( i=0; i<gNumPlayers; ++i ) {
+ 			char buffer[BUFSIZ], num1[12], num2[12];
+ 
+-			sprintf(num1, "%7.1d", final[i].Score);
+-			sprintf(num2, "%3.1d", final[i].Frags);
+-			sprintf(buffer, "Player %d: %-.7s Points, %-.3s Frags",
+-						final[i].Player, num1, num2);
++			snprintf(num1, sizeof(num1), "%7.1d", final[i].Score);
++			snprintf(num2, sizeof(num2), "%3.1d", final[i].Frags);
++			snprintf(buffer, sizeof(buffer),
++				 "Player %d: %-.7s Points, %-.3s Frags",
++				 final[i].Player, num1, num2);
+ 			DrawText(160, 380+i*newyork_height, buffer,
+ 				newyork, STYLE_NORM, 30000>>8, 30000>>8, 0xFF);
+ 		}
+@@ -898,7 +899,7 @@
+ 	
+ 
+ 	/* -- Draw the wave completed message */
+-	sprintf(numbuf, "Wave %d completed.", gWave);
++	snprintf(numbuf, sizeof(numbuf), "Wave %d completed.", gWave);
+ 	sw = fontserv->TextWidth(numbuf, geneva, STYLE_BOLD);
+ 	x = (SCREEN_WIDTH - sw) / 2;
+ 	DrawText(x,  150, numbuf, geneva, STYLE_BOLD, 0xFF, 0xFF, 0x00);
+@@ -935,7 +936,7 @@
+ 		if (OurShip->GetBonusMult() != 1) {
+ 			SDL_Surface *sprite;
+ 
+-			sprintf(numbuf, "%-5.1d", OurShip->GetBonus());
++			snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetBonus());
+ 			DrawText(x, 200, numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+ 			x += 75;
+@@ -951,10 +952,10 @@
+ 	Delay(SOUND_DELAY);
+ 	sound->PlaySound(gFunk, 5);
+ 
+-	sprintf(numbuf, "%-5.1d", OurShip->GetBonus());
++	snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetBonus());
+ 	bonus_width = DrawText(x, 200, numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+-	sprintf(numbuf, "%-5.1d", OurShip->GetScore());
++	snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetScore());
+ 	score_width = DrawText(xt, 220, numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+ 	screen->Update();
+@@ -997,12 +998,12 @@
+ 	
+ 			screen->FillRect(x, 200-text_height+2,
+ 					bonus_width, text_height, ourBlack);
+-			sprintf(numbuf, "%-5.1d", OurShip->GetBonus());
++			snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetBonus());
+ 			bonus_width = DrawText(x, 200, numbuf,
+ 					geneva, STYLE_BOLD, 0xFF, 0xFF, 0xFF);
+ 			screen->FillRect(xt, 220-text_height+2,
+ 					score_width, text_height, ourBlack);
+-			sprintf(numbuf, "%-5.1d", OurShip->GetScore());
++			snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetScore());
+ 			score_width = DrawText(xt, 220, numbuf,
+ 					geneva, STYLE_BOLD, 0xFF, 0xFF, 0xFF);
+ 
+@@ -1015,7 +1016,7 @@
+ 	HandleEvents(10);
+ 
+ 	/* -- Draw the "next wave" message */
+-	sprintf(numbuf, "Prepare for Wave %d...", gWave+1);
++	snprintf(numbuf, sizeof(numbuf), "Prepare for Wave %d...", gWave+1);
+ 	sw = fontserv->TextWidth(numbuf, geneva, STYLE_BOLD);
+ 	x = (SCREEN_WIDTH - sw)/2;
+ 	DrawText(x, 259, numbuf, geneva, STYLE_BOLD, 0xFF, 0xFF, 0x00);

Added: head/games/maelstrom/files/patch-netlogic__netplay.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-netlogic__netplay.cpp	Sat Dec 28 16:11:08 2013	(r337878)
@@ -0,0 +1,22 @@
+--- ./netlogic/netplay.cpp.orig	2002-10-20 06:11:52.000000000 +0200
++++ ./netlogic/netplay.cpp	2013-12-28 11:39:16.000000000 +0100
+@@ -670,7 +670,9 @@
+ 		strcpy(message, "Waiting for players:");
+ 		for ( i=0; i<gNumPlayers; ++i ) {
+ 			if ( ! acked[i] )
+-				sprintf(&message[strlen(message)], " %d", i+1);
++				snprintf(&message[strlen(message)],
++					 sizeof(message)-strlen(message),
++					 " %d", i+1);
+ 		}
+ 		Message(message);
+ 
+@@ -725,7 +727,7 @@
+ 			/* Check the player... */
+ 			if ( (i != gOurPlayer) && (netbuf[1] == gOurPlayer) ) {
+ 				/* Print message, sleep 3 seconds absolutely */
+-				sprintf(message, 
++			  snprintf(message, sizeof(message),
+ 	"Error: Another player (%d) thinks they are player 1!\r\n", i+1);
+ 				ErrorMessage(message);
+ 				/* Suck up retransmission packets */

Modified: head/games/maelstrom/files/patch-netscore.cpp
==============================================================================
--- head/games/maelstrom/files/patch-netscore.cpp	Sat Dec 28 16:01:37 2013	(r337877)
+++ head/games/maelstrom/files/patch-netscore.cpp	Sat Dec 28 16:11:08 2013	(r337878)
@@ -1,5 +1,5 @@
---- netscore.cpp.orig	2001-07-23 05:25:17.000000000 +0200
-+++ netscore.cpp	2013-03-16 11:30:57.000000000 +0100
+--- ./netscore.cpp.orig	2001-07-23 05:25:17.000000000 +0200
++++ ./netscore.cpp	2013-12-28 11:39:16.000000000 +0100
 @@ -59,7 +59,7 @@
  
  	/* Send the scores */

Added: head/games/maelstrom/files/patch-screenlib__SDL_FrameBuf.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-screenlib__SDL_FrameBuf.cpp	Sat Dec 28 16:11:08 2013	(r337878)
@@ -0,0 +1,24 @@
+--- ./screenlib/SDL_FrameBuf.cpp.orig	2001-07-22 23:03:13.000000000 +0200
++++ ./screenlib/SDL_FrameBuf.cpp	2013-12-28 11:39:16.000000000 +0100
+@@ -628,7 +628,7 @@
+ 
+ 		found = 0;
+ 		for ( which=0; !found; ++which ) {
+-			sprintf(file, "%s%d.bmp", prefix, which);
++			snprintf(file, sizeof(file), "%s%d.bmp", prefix, which);
+ 			if ( ((fp=fopen(file, "r")) == NULL) &&
+ 			     ((fp=fopen(file, "w")) != NULL) ) {
+ 				found = 1;
+@@ -847,10 +847,8 @@
+ 			/* Update the dirty rectangle map with the new list */
+ 			for ( i=0; i<dirtymaplen; ++i ) {
+ 				if ( dirtymap[i] != NULL ) {
+-					dirtymap[i] = (SDL_Rect *)(
+-					((int)dirtymap[i]-(int)updatelist) +
+-								(int)newlist
+-					);
++					dirtymap[i] = newlist
++						+ (dirtymap[i]-updatelist);
+ 				}
+ 			}
+ 			delete[] updatelist;

Added: head/games/maelstrom/files/patch-screenlib__SDL_FrameBuf.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-screenlib__SDL_FrameBuf.h	Sat Dec 28 16:11:08 2013	(r337878)
@@ -0,0 +1,11 @@
+--- ./screenlib/SDL_FrameBuf.h.orig	2000-09-24 19:55:39.000000000 +0200
++++ ./screenlib/SDL_FrameBuf.h	2013-12-28 11:39:16.000000000 +0100
+@@ -165,7 +165,7 @@
+ 		va_list ap;
+ 
+ 		va_start(ap, fmt);
+-		vsprintf(errbuf, fmt, ap);
++		vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ 		va_end(ap);
+ 		errstr = errbuf;
+         }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312281611.rBSGB8fT050209>