[chocolate-doom] 14/26: More endianness fixes

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:07:38 UTC 2017


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

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

commit 62d5cbf55cad182a1ca829b51e57ca9e712b7b5f
Author: Simon Howard <fraggle at gmail.com>
Date:   Tue Jan 24 01:47:30 2006 +0000

    More endianness fixes
    
    Subversion-branch: /branches/CHOCOLATE_DOOM_0_1/chocolate-doom
    Subversion-revision: 343
---
 src/m_swap.c | 12 +++++++-----
 src/m_swap.h |  9 ++++++---
 src/w_wad.c  |  9 ++++++---
 3 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/src/m_swap.c b/src/m_swap.c
index 0a3cab6..2013c81 100644
--- a/src/m_swap.c
+++ b/src/m_swap.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: m_swap.c 255 2006-01-05 02:48:03Z fraggle $
+// $Id: m_swap.c 343 2006-01-24 01:47:30Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.4.2.1  2006/01/24 01:47:30  fraggle
+// More endianness fixes
+//
 // Revision 1.4  2006/01/05 02:48:03  fraggle
 // Fixes for big endian machines (thanks locust)
 //
@@ -41,14 +44,13 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: m_swap.c 255 2006-01-05 02:48:03Z fraggle $";
+rcsid[] = "$Id: m_swap.c 343 2006-01-24 01:47:30Z fraggle $";
 
 
 #include "m_swap.h"
 
 
-// Not needed with big endian.
-#ifndef WORDS_BIGENDIAN
+#ifdef WORDS_BIGENDIAN
 
 // Swap 16bit, that is, MSB and LSB byte.
 unsigned short SwapSHORT(unsigned short x)
@@ -58,7 +60,7 @@ unsigned short SwapSHORT(unsigned short x)
 }
 
 // Swapping 32bit.
-unsigned long SwapLONG( unsigned long x)
+unsigned int SwapLONG( unsigned int x)
 {
     return
 	(x>>24)
diff --git a/src/m_swap.h b/src/m_swap.h
index 3cde9f2..c3d230d 100644
--- a/src/m_swap.h
+++ b/src/m_swap.h
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: m_swap.h 341 2006-01-23 21:56:19Z fraggle $
+// $Id: m_swap.h 343 2006-01-24 01:47:30Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -37,9 +37,9 @@
 // WAD files are stored little endian.
 #ifdef WORDS_BIGENDIAN
 short	SwapSHORT(short);
-long	SwapLONG(long);
+int	SwapLONG(int);
 #define SHORT(x)	((short)SwapSHORT((unsigned short) (x)))
-#define LONG(x)         ((long)SwapLONG((unsigned long) (x)))
+#define LONG(x)         ((int)SwapLONG((unsigned int) (x)))
 #else
 #define SHORT(x)	(x)
 #define LONG(x)         (x)
@@ -52,6 +52,9 @@ long	SwapLONG(long);
 //-----------------------------------------------------------------------------
 //
 // $Log$
+// Revision 1.5.2.2  2006/01/24 01:47:30  fraggle
+// More endianness fixes
+//
 // Revision 1.5.2.1  2006/01/23 21:56:19  fraggle
 // Include the config header so that endianness is dealt with correctly
 //
diff --git a/src/w_wad.c b/src/w_wad.c
index 69605fa..c5aef20 100644
--- a/src/w_wad.c
+++ b/src/w_wad.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: w_wad.c 280 2006-01-10 22:14:13Z fraggle $
+// $Id: w_wad.c 343 2006-01-24 01:47:30Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.9.2.1  2006/01/24 01:47:30  fraggle
+// More endianness fixes
+//
 // Revision 1.9  2006/01/10 22:14:13  fraggle
 // Shut up compiler warnings
 //
@@ -58,7 +61,7 @@
 
 
 static const char
-rcsid[] = "$Id: w_wad.c 280 2006-01-10 22:14:13Z fraggle $";
+rcsid[] = "$Id: w_wad.c 343 2006-01-24 01:47:30Z fraggle $";
 
 
 #include <ctype.h>
@@ -204,7 +207,7 @@ void W_AddFile (char *filename)
 	// single lump file
 	fileinfo = Z_Malloc(sizeof(filelump_t), PU_STATIC, 0);
 	fileinfo->filepos = 0;
-	fileinfo->size = LONG(filelength(handle));
+	fileinfo->size = filelength(handle);
 	ExtractFileBase (filename, fileinfo->name);
 	numlumps++;
     }

-- 
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