[chocolate-doom] 06/29: Remove external statistics driver support (-statcopy): nonfunctional on modern systems and never used. Fix for systems where sizeof(int) != sizeof(void *)

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:06:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.0.4
in repository chocolate-doom.

commit b30d12e14b364fb009869201788f2f21ae63bad6
Author: Simon Howard <fraggle at gmail.com>
Date:   Thu Sep 22 13:13:47 2005 +0000

    Remove external statistics driver support (-statcopy):
    nonfunctional on modern systems and never used.
    Fix for systems where sizeof(int) != sizeof(void *)
    
    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 120
---
 src/d_main.c   | 20 +++++++-------------
 src/d_net.c    | 13 ++++++++++---
 src/g_game.c   | 14 +++++++-------
 src/i_system.c | 13 +++++++++----
 src/r_data.c   | 15 +++++++++------
 src/r_draw.c   | 12 ++++++++----
 6 files changed, 50 insertions(+), 37 deletions(-)

diff --git a/src/d_main.c b/src/d_main.c
index b6b17cf..5e5d93b 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: d_main.c 98 2005-09-11 20:25:56Z fraggle $
+// $Id: d_main.c 120 2005-09-22 13:13:47Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,11 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.15  2005/09/22 13:13:47  fraggle
+// Remove external statistics driver support (-statcopy):
+// nonfunctional on modern systems and never used.
+// Fix for systems where sizeof(int) != sizeof(void *)
+//
 // Revision 1.14  2005/09/11 20:25:56  fraggle
 // Second configuration file to allow chocolate doom-specific settings.
 // Adjust some existing command line logic (for graphics settings and
@@ -82,7 +87,7 @@
 //-----------------------------------------------------------------------------
 
 
-static const char rcsid[] = "$Id: d_main.c 98 2005-09-11 20:25:56Z fraggle $";
+static const char rcsid[] = "$Id: d_main.c 120 2005-09-22 13:13:47Z fraggle $";
 
 #define	BGCOLOR		7
 #define	FGCOLOR		8
@@ -1156,17 +1161,6 @@ void D_DoomMain (void)
     printf ("ST_Init: Init status bar.\n");
     ST_Init ();
 
-    // check for a driver that wants intermission stats
-    p = M_CheckParm ("-statcopy");
-    if (p && p<myargc-1)
-    {
-	// for statistics driver
-	extern  void*	statcopy;                            
-
-	statcopy = (void*)atoi(myargv[p+1]);
-	printf ("External statistics registered.\n");
-    }
-    
     // start the apropriate game based on parms
     p = M_CheckParm ("-record");
 
diff --git a/src/d_net.c b/src/d_net.c
index b70768f..37c2cc0 100644
--- a/src/d_net.c
+++ b/src/d_net.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: d_net.c 95 2005-09-08 22:10:40Z fraggle $
+// $Id: d_net.c 120 2005-09-22 13:13:47Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,11 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.8  2005/09/22 13:13:47  fraggle
+// Remove external statistics driver support (-statcopy):
+// nonfunctional on modern systems and never used.
+// Fix for systems where sizeof(int) != sizeof(void *)
+//
 // Revision 1.7  2005/09/08 22:10:40  fraggle
 // Delay calls so we don't use the entire CPU
 //
@@ -53,7 +58,7 @@
 //-----------------------------------------------------------------------------
 
 
-static const char rcsid[] = "$Id: d_net.c 95 2005-09-08 22:10:40Z fraggle $";
+static const char rcsid[] = "$Id: d_net.c 120 2005-09-22 13:13:47Z fraggle $";
 
 
 #include "m_menu.h"
@@ -119,7 +124,9 @@ doomdata_t	reboundstore;
 //
 int NetbufferSize (void)
 {
-    return (int)&(((doomdata_t *)0)->cmds[netbuffer->numtics]); 
+    doomdata_t *dummy = NULL;
+
+    return ((byte *) &dummy->cmds[netbuffer->numtics]) - ((byte *) dummy);
 }
 
 //
diff --git a/src/g_game.c b/src/g_game.c
index 81ae6de..6dccdfc 100644
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: g_game.c 110 2005-09-17 20:25:56Z fraggle $
+// $Id: g_game.c 120 2005-09-22 13:13:47Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,11 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.11  2005/09/22 13:13:47  fraggle
+// Remove external statistics driver support (-statcopy):
+// nonfunctional on modern systems and never used.
+// Fix for systems where sizeof(int) != sizeof(void *)
+//
 // Revision 1.10  2005/09/17 20:25:56  fraggle
 // Set the default values for variables in their initialisers.  Remove the
 // "defaultvalue" parameter and associated code from the configuration
@@ -66,7 +71,7 @@
 
 
 static const char
-rcsid[] = "$Id: g_game.c 110 2005-09-17 20:25:56Z fraggle $";
+rcsid[] = "$Id: g_game.c 120 2005-09-22 13:13:47Z fraggle $";
 
 #include <string.h>
 #include <stdlib.h>
@@ -263,8 +268,6 @@ char		savedescription[32];
 mobj_t*		bodyque[BODYQUESIZE]; 
 int		bodyqueslot; 
  
-void*		statcopy;				// for statistics driver
- 
  
  
 int G_CmdChecksum (ticcmd_t* cmd) 
@@ -1203,9 +1206,6 @@ void G_DoCompleted (void)
     viewactive = false; 
     automapactive = false; 
  
-    if (statcopy)
-	memcpy (statcopy, &wminfo, sizeof(wminfo));
-	
     WI_Start (&wminfo); 
 } 
 
diff --git a/src/i_system.c b/src/i_system.c
index ea3b3b1..054ce8b 100644
--- a/src/i_system.c
+++ b/src/i_system.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: i_system.c 95 2005-09-08 22:10:40Z fraggle $
+// $Id: i_system.c 120 2005-09-22 13:13:47Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,11 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.10  2005/09/22 13:13:47  fraggle
+// Remove external statistics driver support (-statcopy):
+// nonfunctional on modern systems and never used.
+// Fix for systems where sizeof(int) != sizeof(void *)
+//
 // Revision 1.9  2005/09/08 22:10:40  fraggle
 // Delay calls so we don't use the entire CPU
 //
@@ -55,7 +60,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: i_system.c 95 2005-09-08 22:10:40Z fraggle $";
+rcsid[] = "$Id: i_system.c 120 2005-09-22 13:13:47Z fraggle $";
 
 
 #include <stdlib.h>
@@ -108,8 +113,8 @@ byte* I_ZoneBase (int*	size)
     byte *zonemem;
     *size = mb_used*1024*1024;
     zonemem = malloc (*size);
-    printf("zone memory: %x, %x allocated for zone\n", 
-	   (int) zonemem, *size);
+    printf("zone memory: %p, %x allocated for zone\n", 
+           zonemem, *size);
     return zonemem;
 }
 
diff --git a/src/r_data.c b/src/r_data.c
index 8558a1e..98d49aa 100644
--- a/src/r_data.c
+++ b/src/r_data.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: r_data.c 36 2005-08-04 18:40:22Z fraggle $
+// $Id: r_data.c 120 2005-09-22 13:13:47Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,11 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.7  2005/09/22 13:13:47  fraggle
+// Remove external statistics driver support (-statcopy):
+// nonfunctional on modern systems and never used.
+// Fix for systems where sizeof(int) != sizeof(void *)
+//
 // Revision 1.6  2005/08/04 18:40:22  fraggle
 // Use zone memory functions instead of alloca/malloc/free
 //
@@ -50,7 +55,7 @@
 
 
 static const char
-rcsid[] = "$Id: r_data.c 36 2005-08-04 18:40:22Z fraggle $";
+rcsid[] = "$Id: r_data.c 120 2005-09-22 13:13:47Z fraggle $";
 
 #include "i_system.h"
 #include "z_zone.h"
@@ -662,10 +667,8 @@ void R_InitColormaps (void)
     // Load in the light tables, 
     //  256 byte align tables.
     lump = W_GetNumForName("COLORMAP"); 
-    length = W_LumpLength (lump) + 255; 
-    colormaps = Z_Malloc (length, PU_STATIC, 0); 
-    colormaps = (byte *)( ((int)colormaps + 255)&~0xff); 
-    W_ReadLump (lump,colormaps); 
+    length = W_LumpLength (lump);
+    colormaps = W_CacheLumpNum(lump, PU_STATIC);
 }
 
 
diff --git a/src/r_draw.c b/src/r_draw.c
index afda7a8..b19597f 100644
--- a/src/r_draw.c
+++ b/src/r_draw.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: r_draw.c 45 2005-08-06 18:37:47Z fraggle $
+// $Id: r_draw.c 120 2005-09-22 13:13:47Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,11 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.4  2005/09/22 13:13:47  fraggle
+// Remove external statistics driver support (-statcopy):
+// nonfunctional on modern systems and never used.
+// Fix for systems where sizeof(int) != sizeof(void *)
+//
 // Revision 1.3  2005/08/06 18:37:47  fraggle
 // Fix low resolution mode
 //
@@ -41,7 +46,7 @@
 
 
 static const char
-rcsid[] = "$Id: r_draw.c 45 2005-08-06 18:37:47Z fraggle $";
+rcsid[] = "$Id: r_draw.c 120 2005-09-22 13:13:47Z fraggle $";
 
 
 #include "doomdef.h"
@@ -550,8 +555,7 @@ void R_InitTranslationTables (void)
 {
     int		i;
 	
-    translationtables = Z_Malloc (256*3+255, PU_STATIC, 0);
-    translationtables = (byte *)(( (int)translationtables + 255 )& ~255);
+    translationtables = Z_Malloc (256*3, PU_STATIC, 0);
     
     // translate just the 16 green colors
     for (i=0 ; i<256 ; i++)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list