fix swapint, swapshort macros, get rid of functions

This commit is contained in:
Bradley Bell 2001-11-02 02:01:52 +00:00
parent 815464c973
commit 3d0c07b707
2 changed files with 8 additions and 3 deletions

View file

@ -18,13 +18,15 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include "pstypes.h"
#if 0
extern ushort swapshort(ushort s);
extern uint swapint(uint i);
#endif
#define SWAPSHORT(x) (((ubyte)x << 8) | (((ushort)x) >> 8))
#define SWAPINT(x) ((x<<24) | (((ulong)x) >> 24) | ((x &0x0000ff00) << 8) | ((x & 0x00ff00000) >> 8))
#ifndef MACINTOSH
#ifndef BIGENDIAN //MACINTOSH
#define INTEL_INT(x) x
#define INTEL_SHORT(x) x
#else
@ -32,4 +34,7 @@ extern uint swapint(uint i);
#define INTEL_SHORT(x) SWAPSHORT(x)
#endif
#define swapint(x) INTEL_INT(x)
#define swapshort(x) INTEL_SHORT(x)
#endif

View file

@ -3,7 +3,7 @@ INCLUDES = -I $(top_srcdir)/includes
libmisc_a_SOURCES = \
args.c d_delay.c error.c strio.c \
byteswap.c d_io.c hash.c strutil.c
d_io.c hash.c strutil.c
# checker.c
@ -12,4 +12,4 @@ byteswap.c d_io.c hash.c strutil.c
EXTRA_DIST = \
byteswap.h dos_disk.h fileutil.h parsarg.h \
d_glob.c errtest.c fileutil.c parsarg.c parstest.c
byteswap.c d_glob.c errtest.c fileutil.c parsarg.c parstest.c