[Scummvm-cvs-logs] CVS: residual/lua/src lvm.c,1.3,1.4
Joost Peters
joostp at users.sourceforge.net
Sat Mar 27 11:32:09 CET 2004
Update of /cvsroot/scummvm/residual/lua/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25578/lua/src
Modified Files:
lvm.c
Log Message:
Use SDL endian macros for lua until we have our own build system
Index: lvm.c
===================================================================
RCS file: /cvsroot/scummvm/residual/lua/src/lvm.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- lvm.c 21 Mar 2004 15:16:57 -0000 1.3
+++ lvm.c 27 Mar 2004 19:20:46 -0000 1.4
@@ -8,6 +8,8 @@
#include <stdio.h>
#include <string.h>
+#include <SDL_byteorder.h>
+
#include "lauxlib.h"
#include "ldo.h"
#include "lfunc.h"
@@ -21,7 +23,6 @@
#include "luadebug.h"
#include "lvm.h"
-
#ifdef OLD_ANSI
#define strcoll(a,b) strcmp(a,b)
#endif
@@ -29,11 +30,11 @@
#define skip_word(pc) (pc+=2)
-/* Little Endian */
+#if (SDL_BYTEORDER == SDL_LIL_ENDIAN)
#define get_word(pc) (*((unsigned short*)(pc)))
-
-/* Big Endian */
-/*#define get_word(pc) ((*((pc)+1)<<8)|(*(pc))) */
+#else
+#define get_word(pc) ((*((pc)+1)<<8)|(*(pc)))
+#endif
#define next_word(pc) (pc+=2, get_word(pc-2))
More information about the Scummvm-git-logs
mailing list