From fcfbafff31869ed808bff0639532db1828660e92 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Thu, 29 Dec 2022 12:32:55 +0000 Subject: dump lots more code --- includes/compiler/CompilerTools.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'includes/compiler/CompilerTools.h') diff --git a/includes/compiler/CompilerTools.h b/includes/compiler/CompilerTools.h index dbaf7d9..d44d766 100644 --- a/includes/compiler/CompilerTools.h +++ b/includes/compiler/CompilerTools.h @@ -40,12 +40,12 @@ typedef struct _HeapInfo { SInt32 largest_free_block; } HeapInfo; -typedef struct GList { +struct GList { char **data; SInt32 size; SInt32 hndlsize; SInt32 growsize; -} GList; +}; extern long hash_name_id; extern HashNameNode **name_hash_nodes; @@ -119,12 +119,17 @@ extern void memclr(void *ptr, SInt32 size); extern void memclrw(void *ptr, SInt32 size); extern void CToLowercase(char *a, char *b); extern short getbit(SInt32 l); -extern inline SInt32 CTool_EndianReadWord32(void *value) { - return *((SInt32 *) value); -} -extern inline UInt32 CTool_EndianConvertWord32(UInt32 value) { - return value; -} +#ifdef ENDIAN_CONVERSION +extern UInt16 CTool_EndianConvertWord16(UInt16 theword); +extern UInt32 CTool_EndianConvertWord32(UInt32 theword); +extern void CTool_EndianConvertMem(UInt8 *data, short len); +extern UInt32 CTool_EndianReadWord32(void *ptr); +#else +#define CTool_EndianConvertWord32(value) value +#define CTool_EndianConvertWord16(value) value +#define CTool_EndianConvertMem(data, len) ((void)0) +#define CTool_EndianReadWord32(ptr) (*((UInt32 *) (ptr))) +#endif extern void CTool_EndianConvertWord64(CInt64 ci, char *result); extern UInt16 CTool_EndianConvertInPlaceWord16Ptr(UInt16 *x); extern UInt32 CTool_EndianConvertInPlaceWord32Ptr(UInt32 *x); -- cgit v1.2.3