(svn r182) -Fix: [1024380] strgen diff (Warning fix + MorphOS fix). Removes the longest standing warning on compilation of strgen (tokai)
authordarkvater
Wed, 08 Sep 2004 15:01:12 +0000
changeset 181 0b95567f2d0f
parent 180 47ee14fe2b35
child 182 1641047f1d9f
(svn r182) -Fix: [1024380] strgen diff (Warning fix + MorphOS fix). Removes the longest standing warning on compilation of strgen (tokai)
strgen/strgen.c
--- a/strgen/strgen.c	Wed Sep 08 09:07:18 2004 +0000
+++ b/strgen/strgen.c	Wed Sep 08 15:01:12 2004 +0000
@@ -12,6 +12,13 @@
 extern char _openttd_revision[];
 #endif
 
+#ifdef __MORPHOS__
+#ifdef stderr
+#undef stderr
+#endif
+#define stderr stdout
+#endif // __MORPHOS__
+
 /* Compiles a list of strings into a compiled string list */
 
 #define lengthof(x) (sizeof(x)/sizeof(x[0]))
@@ -645,7 +652,7 @@
 
 	fprintf(out, 
 		"\nenum {\n"
-		"\tLANGUAGE_PACK_IDENT = 'GNAL',\n"
+		"\tLANGUAGE_PACK_IDENT = 0x474E414C, // Big Endian value for 'LANG' (LE is 0x 4C 41 4E 47)\n"
 		"\tLANGUAGE_PACK_VERSION = 0x%X,\n"
 		"};\n", (unsigned int)_hash);
 
@@ -683,8 +690,8 @@
 		hdr.offsets[i] = TO_LE16(n);
 	}
 
-	
-	hdr.ident = TO_LE32('GNAL');
+	// see line 655: fprintf(..."\tLANGUAGE_PACK_IDENT = 0x474E414C,...) 
+	hdr.ident = TO_LE32(0x474E414C); // Big Endian value for 'LANG'
 	hdr.version = TO_LE32(_hash);
 	strcpy(hdr.name, _lang_name);
 	strcpy(hdr.own_name, _lang_ownname);