diff options
Diffstat (limited to 'misc/pascal/include')
-rw-r--r-- | misc/pascal/include/paslib.h | 23 | ||||
-rw-r--r-- | misc/pascal/include/poff.h | 2 |
2 files changed, 23 insertions, 2 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 ***************************************************************************/ diff --git a/misc/pascal/include/poff.h b/misc/pascal/include/poff.h index 5f8e360cf..244384873 100644 --- a/misc/pascal/include/poff.h +++ b/misc/pascal/include/poff.h @@ -423,7 +423,7 @@ typedef struct poffDebugFuncInfo_s poffDebugFuncInfo_t; struct poffDebugArgInfo_s { - /* This is the size, in bytes, of one input paramters */ + /* This is the size, in bytes, of one input paramter */ uint32 da_size; }; |