[Scummvm-cvs-logs] SF.net SVN: scummvm: [29430] tools/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Nov 6 11:24:46 CET 2007


Revision: 29430
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29430&view=rev
Author:   fingolfin
Date:     2007-11-06 02:24:46 -0800 (Tue, 06 Nov 2007)

Log Message:
-----------
Added utils/pack-start.h and utils/pack-end.h from ScummVM source

Modified Paths:
--------------
    tools/trunk/extract_mm_nes.c
    tools/trunk/util.h
    tools/trunk/utils/voc.h

Added Paths:
-----------
    tools/trunk/utils/pack-end.h
    tools/trunk/utils/pack-start.h

Modified: tools/trunk/extract_mm_nes.c
===================================================================
--- tools/trunk/extract_mm_nes.c	2007-11-06 10:19:31 UTC (rev 29429)
+++ tools/trunk/extract_mm_nes.c	2007-11-06 10:24:46 UTC (rev 29430)
@@ -1035,16 +1035,9 @@
 	{ -1, NULL }
 };
 
-#if defined(__GNUC__)
-#define GCC_PACK __attribute__((packed))
-#else
-#define GCC_PACK
-#endif
-#if defined(_MSC_VER)
-#pragma	pack(push,1)
-#endif
-struct	_lfl_index
-{
+#include "utils/pack-start.h"	/* START STRUCT PACKING */
+
+struct	_lfl_index {
 	uint8	room_lfl[55];
 	uint16	room_addr[55];
 	uint8	costume_lfl[80];
@@ -1054,9 +1047,9 @@
 	uint8	sound_lfl[100];
 	uint16	sound_addr[100];
 } GCC_PACK lfl_index;
-#if defined(_MSC_VER)
-#pragma	pack(pop)
-#endif
+
+#include "utils/pack-end.h"	/* END STRUCT PACKING */
+
 #else	/* !MAKE_LFLS */
 void	dump_resource (FILE *input, char *fn_template, int num, p_resource res) {
 	char fname[256];

Modified: tools/trunk/util.h
===================================================================
--- tools/trunk/util.h	2007-11-06 10:19:31 UTC (rev 29429)
+++ tools/trunk/util.h	2007-11-06 10:24:46 UTC (rev 29430)
@@ -76,10 +76,6 @@
 	#define snprintf _snprintf
 
 	#define SCUMM_LITTLE_ENDIAN
-
-	#define START_PACK_STRUCTS pack(push, 1)
-	#define END_PACK_STRUCTS   pack(pop)
-
 	
 #elif defined(__MINGW32__)
 
@@ -88,9 +84,6 @@
 
 	#define SCUMM_LITTLE_ENDIAN
 
-	#define START_PACK_STRUCTS pack(push, 1)
-	#define END_PACK_STRUCTS   pack(pop)
-
 #elif defined(UNIX)
 
 	#define scumm_stricmp strcasecmp
@@ -101,11 +94,6 @@
 	#define SCUMM_NEED_ALIGNMENT
 	#endif
 
-	#if !defined(__GNUC__)
-	#define START_PACK_STRUCTS pack (1)
-	#define END_PACK_STRUCTS   pack ()
-	#endif
-
 #else
 
 	#error No system type defined

Added: tools/trunk/utils/pack-end.h
===================================================================
--- tools/trunk/utils/pack-end.h	                        (rev 0)
+++ tools/trunk/utils/pack-end.h	2007-11-06 10:24:46 UTC (rev 29430)
@@ -0,0 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ */
+
+#if defined(SCUMMVM_USE_PRAGMA_PACK)
+  #pragma pack()
+#endif


Property changes on: tools/trunk/utils/pack-end.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Date Rev Author URL Id
Name: svn:eol-style
   + native

Added: tools/trunk/utils/pack-start.h
===================================================================
--- tools/trunk/utils/pack-start.h	                        (rev 0)
+++ tools/trunk/utils/pack-start.h	2007-11-06 10:24:46 UTC (rev 29430)
@@ -0,0 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ */
+
+#if defined(SCUMMVM_USE_PRAGMA_PACK)
+  #pragma pack(1)
+#endif


Property changes on: tools/trunk/utils/pack-start.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Date Rev Author URL Id
Name: svn:eol-style
   + native

Modified: tools/trunk/utils/voc.h
===================================================================
--- tools/trunk/utils/voc.h	2007-11-06 10:19:31 UTC (rev 29429)
+++ tools/trunk/utils/voc.h	2007-11-06 10:24:46 UTC (rev 29430)
@@ -31,11 +31,8 @@
 
 class AudioStream;
 
+#include "pack-start.h"	/* START STRUCT PACKING */
 
-#if !defined(__GNUC__)
-#pragma START_PACK_STRUCTS
-#endif
-
 struct VocFileHeader {
 	uint8 desc[20];
 	uint16 datablock_offset;
@@ -50,9 +47,7 @@
 	uint8 pack;
 } GCC_PACK;
 
-#if !defined(__GNUC__)
-#pragma END_PACK_STRUCTS
-#endif
+#include "pack-end.h"	/* END STRUCT PACKING */
 
 /**
  * Take a sample rate parameter as it occurs in a VOC sound header, and


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list