diff options
Diffstat (limited to 'misc/pascal/include/paslib.h')
-rw-r--r-- | misc/pascal/include/paslib.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/misc/pascal/include/paslib.h b/misc/pascal/include/paslib.h index 6137cc68e..c99eca81e 100644 --- a/misc/pascal/include/paslib.h +++ b/misc/pascal/include/paslib.h @@ -1,5 +1,5 @@ /*************************************************************************** - * paslib.h + * include/paslib.h * External Declarations associated with paslib * * Copyright (C) 2008 Gregory Nutt. All rights reserved. @@ -49,6 +49,22 @@ * Global Function Prototypes ***************************************************************************/ +/* POFF file is always big-endian */ + +#ifdef CONFIG_BIG_ENDIAN +# undef CONFIG_POFF_SWAPNEEDED +# define poff16(val) (val) +# define poff32(val) (val) +#else +# define CONFIG_POFF_SWAPNEEDED 1 +# define poff16(val) poffSwap16(val) +# define poff32(val) poffSwap32(val) +#endif + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + /* File name extension helper */ extern boolean extension(const char *inName, const char *ext, char *outName, @@ -59,6 +75,11 @@ extern boolean extension(const char *inName, const char *ext, char *outName, extern sint32 signExtend16(uint16 arg16); extern sint32 signExtend25(uint32 arg25); +/* Endian-ness helpers */ + +extern uint16 poffSwap16(uint16 val); +extern uint32 poffSwap32(uint32 val); + /*************************************************************************** * Global Variables ***************************************************************************/ |