diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-06 15:24:18 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-06 15:24:18 +0000 |
commit | bb5ede8152f14cc757ff4ee6f44ff3128c3ff144 (patch) | |
tree | db2726eb2b79bde890812a8227dae075f8ca2a3b /misc/pascal/include | |
parent | a26dad80f4d004a4a0f6effedc803b3902389b39 (diff) | |
download | nuttx-bb5ede8152f14cc757ff4ee6f44ff3128c3ff144.tar.gz nuttx-bb5ede8152f14cc757ff4ee6f44ff3128c3ff144.tar.bz2 nuttx-bb5ede8152f14cc757ff4ee6f44ff3128c3ff144.zip |
Standardize to big-endian binary
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@637 42af7a65-404d-4744-a932-0658087f49c3
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; }; |