diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-12-18 14:56:25 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-12-18 14:56:25 +0000 |
commit | ccbfdaa527136fe47b2c3902f5b437860c8d3faf (patch) | |
tree | a6d972ab59b08c546bce529171a3e784f098faf0 /misc | |
parent | 6f8a7c6281e52a57946ac75c80b8bff1c744bb7c (diff) | |
download | nuttx-ccbfdaa527136fe47b2c3902f5b437860c8d3faf.tar.gz nuttx-ccbfdaa527136fe47b2c3902f5b437860c8d3faf.tar.bz2 nuttx-ccbfdaa527136fe47b2c3902f5b437860c8d3faf.zip |
Update to use stdint/stdbool.h
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2381 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc')
-rw-r--r-- | misc/pascal/include/keywords.h | 14 | ||||
-rw-r--r-- | misc/pascal/include/paslib.h | 16 | ||||
-rw-r--r-- | misc/pascal/include/pdefs.h | 229 | ||||
-rw-r--r-- | misc/pascal/include/pedefs.h | 550 | ||||
-rw-r--r-- | misc/pascal/include/perr.h | 96 | ||||
-rw-r--r-- | misc/pascal/include/pfdefs.h | 8 | ||||
-rw-r--r-- | misc/pascal/include/pinsn.h | 162 | ||||
-rw-r--r-- | misc/pascal/include/podefs.h | 2 | ||||
-rw-r--r-- | misc/pascal/include/poff.h | 79 | ||||
-rw-r--r-- | misc/pascal/include/pofflib.h | 153 | ||||
-rw-r--r-- | misc/pascal/include/pxdefs.h | 2 |
11 files changed, 661 insertions, 650 deletions
diff --git a/misc/pascal/include/keywords.h b/misc/pascal/include/keywords.h index ebbed36f1..aed438af8 100644 --- a/misc/pascal/include/keywords.h +++ b/misc/pascal/include/keywords.h @@ -75,20 +75,6 @@ #define dbg(...) fprintf(stderr, __VA_ARGS__)
#define vdbg(...) DEBUG(__VA_ARGS__)
-/*************************************************************
- * Type Definitions
- *************************************************************/
-
-typedef unsigned char ubyte; /* 8-bit integers */
-typedef signed char sbyte;
-typedef unsigned short uint16; /* 16-bit integers */
-typedef signed short sint16;
-typedef unsigned long uint32; /* 32-bit integers */
-typedef signed long sint32;
-typedef float float32; /* floating point types */
-typedef double float64;
-typedef unsigned char boolean; /* boolean type */
-
#endif /* __KEYWORDS_H */
diff --git a/misc/pascal/include/paslib.h b/misc/pascal/include/paslib.h index 3dfd51191..7b2016401 100644 --- a/misc/pascal/include/paslib.h +++ b/misc/pascal/include/paslib.h @@ -2,7 +2,7 @@ * include/paslib.h * External Declarations associated with paslib * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,8 @@ ***************************************************************************/ #include "keywords.h" +#include "stdint.h" +#include "stdbool.h" #include "pdefs.h" #include "pofflib.h" @@ -67,18 +69,18 @@ /* File name extension helper */ -extern boolean extension(const char *inName, const char *ext, char *outName, - boolean force_default); +extern bool extension(const char *inName, const char *ext, char *outName, + bool force_default); /* Math helpers */ -extern sint32 signExtend16(uint16 arg16); -extern sint32 signExtend25(uint32 arg25); +extern int32_t signExtend16(uint16_t arg16); +extern int32_t signExtend25(uint32_t arg25); /* Endian-ness helpers */ -extern uint16 poffSwap16(uint16 val); -extern uint32 poffSwap32(uint32 val); +extern uint16_t poffSwap16(uint16_t val); +extern uint32_t poffSwap32(uint32_t val); /*************************************************************************** * Global Variables diff --git a/misc/pascal/include/pdefs.h b/misc/pascal/include/pdefs.h index fb5d18b55..692dd2817 100644 --- a/misc/pascal/include/pdefs.h +++ b/misc/pascal/include/pdefs.h @@ -1,114 +1,115 @@ -/***********************************************************************
- * include/pdefs.h
- * Common definitions
- *
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ***********************************************************************/
-
-#ifndef __PDEFS_H
-#define __PDEFS_H
-
-/***********************************************************************
- * Included Files
- ***********************************************************************/
-
-#include <stdio.h> /* for FILE */
-#include "config.h"
-
-/***********************************************************************
- * Definitions
- ***********************************************************************/
-
-/* Common Sizing Parameters */
-
-#define FNAME_SIZE 40 /* Max size file name */
-#define LINE_SIZE 256 /* Max size of input line buffer */
-
-/* Target P-Machine Data Storage Sizes */
-
-#ifdef CONFIG_INSN16
-# define sINT_SIZE 2
-# define MAXINT 32767
-# define MININT -32768
-# define BITS_IN_INTEGER 16
-# define MAXUINT 0xffff
-# define MINUINT 0
-#endif
-
-#ifdef CONFIG_INSN32
-# define sINT_SIZE 4
-# define MAXINT 2147483647
-# define MININT -2147483648
-# define BITS_IN_INTEGER 32
-# define MAXUINT 0xffffffff
-# define MINUINT 0
-#endif
-
-#define sCHAR_SIZE 1
-#define sBOOLEAN_SIZE sINT_SIZE
-#define sREAL_SIZE 8
-#define sPTR_SIZE sINT_SIZE
-#define sRETURN_SIZE (3*sPTR_SIZE)
-
-#define sSTRING_HDR_SIZE 2
-#define sSTRING_SIZE 256 /* size(2) + string(255) */
-#define sSTRING_MAX_SIZE (sSTRING_SIZE - 2) /* string storage size(254) */
-#define sRSTRING_SIZE (sPTR_SIZE + sINT_SIZE) /* ptr + size */
-#define sCSTRING_SIZE (sizeof(void*)) /* absolute C pointer */
-
-#define MAXCHAR 255
-#define MINCHAR 0
-
-/***********************************************************************
- * Public Structure/Types
- ***********************************************************************/
-
-/* Representation of one P-Code */
-
-#ifdef CONFIG_INSN16
-typedef struct P
-{
- ubyte op;
- ubyte arg1;
- uint16 arg2;
-} OPTYPE;
-#endif
-
-#ifdef CONFIG_INSN32
-typedef struct P
-{
- ubyte op;
- uint32 arg;
-} OPTYPE;
-#endif
-
-#endif /* __PDEFS_H */
+/*********************************************************************** + * include/pdefs.h + * Common definitions + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***********************************************************************/ + +#ifndef __PDEFS_H +#define __PDEFS_H + +/*********************************************************************** + * Included Files + ***********************************************************************/ + +#include <stdint.h> +#include <stdio.h> /* for FILE */ +#include "config.h" + +/*********************************************************************** + * Pre-processor Definitions + ***********************************************************************/ + +/* Common Sizing Parameters */ + +#define FNAME_SIZE 40 /* Max size file name */ +#define LINE_SIZE 256 /* Max size of input line buffer */ + +/* Target P-Machine Data Storage Sizes */ + +#ifdef CONFIG_INSN16 +# define sINT_SIZE 2 +# define MAXINT 32767 +# define MININT -32768 +# define BITS_IN_INTEGER 16 +# define MAXUINT 0xffff +# define MINUINT 0 +#endif + +#ifdef CONFIG_INSN32 +# define sINT_SIZE 4 +# define MAXINT 2147483647 +# define MININT -2147483648 +# define BITS_IN_INTEGER 32 +# define MAXUINT 0xffffffff +# define MINUINT 0 +#endif + +#define sCHAR_SIZE 1 +#define sBOOLEAN_SIZE sINT_SIZE +#define sREAL_SIZE 8 +#define sPTR_SIZE sINT_SIZE +#define sRETURN_SIZE (3*sPTR_SIZE) + +#define sSTRING_HDR_SIZE 2 +#define sSTRING_SIZE 256 /* size(2) + string(255) */ +#define sSTRING_MAX_SIZE (sSTRING_SIZE - 2) /* string storage size(254) */ +#define sRSTRING_SIZE (sPTR_SIZE + sINT_SIZE) /* ptr + size */ +#define sCSTRING_SIZE (sizeof(void*)) /* absolute C pointer */ + +#define MAXCHAR 255 +#define MINCHAR 0 + +/*********************************************************************** + * Public Structure/Types + ***********************************************************************/ + +/* Representation of one P-Code */ + +#ifdef CONFIG_INSN16 +typedef struct P +{ + uint8_t op; + uint8_t arg1; + uint16_t arg2; +} OPTYPE; +#endif + +#ifdef CONFIG_INSN32 +typedef struct P +{ + uint8_t op; + uint32_t arg; +} OPTYPE; +#endif + +#endif /* __PDEFS_H */ diff --git a/misc/pascal/include/pedefs.h b/misc/pascal/include/pedefs.h index 8f342bdd0..56adebe9a 100644 --- a/misc/pascal/include/pedefs.h +++ b/misc/pascal/include/pedefs.h @@ -1,270 +1,280 @@ -/***********************************************************************
- * pedefs.h
- * Definitions of error codes
- *
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ***********************************************************************/
-
-#ifndef __PEDEFS_H
-#define __PEDEFS_H
-
-/***********************************************************************
- * COMPILATION TIME ERRORS
- * eASSIGN Expected ':='
- * eBEGIN Expected 'BEGIN'
- * eCOLON Expected ':'
- * eCOMMA Expected ','
- * eCOUNT Error count exceeded (FATAL)
- * eDO Expected 'DO'
- * eDUPFILE Attempt to re-define file
- * eDUPSYM Attempt to declare duplicate symbol
- * eEND Expected 'END'
- * eEQ Expected '='
- * eEXPONENT Error in exponent of real constant
- * eFILE Expected file identifier declared in PROGRAM
- * eHUH Internal error (FATAL)
- * eIDENT Expected identifier
- * eIMPLEMENTATION Expected implementation section in unit file
- * eINCLUDE Include file OPEN error (FATAL)
- * eINTCONST Expected integer constant
- * eINTERFACE Expected interface section in unit file
- * eINTOVF Integer overflow (or underflow)
- * eINTVAR Integer variable name expected
- * eINVALIDFUNC Unrecognized built-in function
- * eINVALIDPROC Unrecognized built-in procedure
- * eINVARG Invalid procedure/function argument type
- * eINVCONST Invalid constant in declaration
- * eINVSIGNEDCONST Invalid constant after sign
- * eINVFACTOR Invalid factor
- * eINVFILE Invalid file identifier (as declared in PROGRAM)
- * eINVLABEL Invalid label
- * eINVPTR Invalid pointer type
- * eINVTYPE Invalid type identifier
- * eINVVARPARM Invalid/unsupported VAR parameter type
- * eLBRACKET Expected '['
- * eLPAREN Expected '('
- * eMULTLABEL Attempt to multiply define label
- * eNOSQUOTE EOL encounter in a string, probable missing "'"
- * eNOTYET Not implemented yet
- * eNPARMS Number of parameters in function or procedure
- * call does not match number in declaration
- * eOF Expected 'OF'
- * eOVF Internal table overflow (FATAL)
- * ePERIOD Expected '.'
- * ePOFFCONFUSION Internal logic error in POFF file generation
- * ePOFFWRITEERROR Error writing to POFF file
- * ePROGRAM Expected 'PROGRAM'
- * ePTRADR Expected pointer address (probably got value) form
- * ePTRVAL Expected pointer value form, got value form
- * eRBRACKET Expected ']'
- * eRPAREN Expected ')'
- * eRPARENorCOMMA Expected ')' or ','
- * eSEEKFAIL Seek to file position failed
- * eSEMICOLON Expected ';'
- * eSTRING Expected a string
- * eTHEN Expected 'THEN'
- * eTOorDOWNTO Expected 'TO' or 'DOWNTO' in for statement
- * eTRUNC String truncated
- * eUNDECLABEL Attempt to define an undeclared label.
- * eUNDEFILE Undefined file buffer
- * eUNDEFLABEL A declared label was not defined.
- * eUNDEFSYM Undefined symbol
- * eUNTIL Expected 'UNTIL'
- * eEXPRTYPE Illegal expression type for this operation
- * eTERMTYPE Illegal term type for this operation
- * eFACTORTYPE Illegal factor type for this operation
- * eREADPARM Illegal parameter in READ statement
- * eWRITEPARM Illegal parameter in WRITE statement
- * eARRAYTYPE Illegal type for ARRAY OF
- * ePOINTERTYPE Illegal pointer type
- * eVARPARMTYPE Illegal VAR parameter type
- * eSUBRANGE Expected ".."
- * eSUBRANGETYPE Illegal subrange type
- * eSET Expected valid/consistent type for SET OF
- * sSETRANGE Value out of range for SET OF
- * eSCALARTYPE Illegal scalar type
- * eBADSHORTINT Short integer is out of range
- * eSYMTABINTERNAL Internal error in symbol table
- * eRECORDDECLARE Error in RECORD declaration
- * eRECORDOBJECT Expected a field of RECORD
- * eRECORDVAR Expected a RECORD variable in WITH
- * eUNIT Expected UNIT at beginning of unit file
- * eUNITNAME File does not contain the expected UNIT
- * eARGIGNORED An argument was provided, but ignored
- *
- * LINK TIME ERRORS
- * eUNDEFINEDSYMBOL A necessary symbol was not defined
- * eMULTIDEFSYMBOL A symbol was defined multiple times
- *
- * ERRORS WHICH MAY OCCUR AT EITHER COMPILATION, LINK OR RUNTIME
- * eNOMEMORY Memory allocation failed
- * ePOFFREADERROR Error reading a POFF file
- * ePOFFBADFORMAT The file format does not like valid POFF
- * eRCVDSIGNAL Received SIGSEGV (or other) signal.
- *
- * RUN TIME ERRORS
- * eBADPC Program Counter is out-of-range
- * eBADSP Stack reference is out-of-range
- * eSTRSTKOVERFLOW String stack overflow
- * eILLEGALOPCODE Non-executable instruction found
- * eEXIT oEND P-Code encountered
- * eBADSYSIOFUNC Illegal SYSIO sub-function
- * eBADSYSLIBCALL Illegal runtime library call
- * eBADFPOPCODE Illegal FLOAT POINT op-code
- * eFAILEDLIBCALL Runtime library call returned failure
- * eINTEGEROVERFLOW Integer overflow
- **********************************************************************/
-
-/* This is the error code that indicates that no error has occurred */
-
-#define eNOERROR ((uint16) 0x00)
-
-/* This is the maximum number of errors that will be reported before
- * compilation is terminated.
- */
-
-#define MAX_ERRORS 100
-
-/* COMPILATION TIME ERRORS */
-
-#define eASSIGN ((uint16) 0x01)
-#define eBEGIN ((uint16) 0x02)
-#define eCOLON ((uint16) 0x03)
-#define eCOMMA ((uint16) 0x04)
-#define eCOUNT ((uint16) 0x05)
-#define eDO ((uint16) 0x06)
-#define eDUPFILE ((uint16) 0x07)
-#define eDUPSYM ((uint16) 0x08)
-#define eEND ((uint16) 0x09)
-#define eEQ ((uint16) 0x0a)
-#define eEXPONENT ((uint16) 0x0b)
-#define eFILE ((uint16) 0x0c)
-#define eHUH ((uint16) 0x0d)
-#define eIDENT ((uint16) 0x0e)
-#define eIMPLEMENTATION ((uint16) 0x0f)
-
-#define eINCLUDE ((uint16) 0x10)
-#define eINTCONST ((uint16) 0x11)
-#define eINTERFACE ((uint16) 0x12)
-#define eINTOVF ((uint16) 0x13)
-#define eINTVAR ((uint16) 0x14)
-#define eINVALIDFUNC ((uint16) 0x15)
-#define eINVALIDPROC ((uint16) 0x16)
-#define eINVARG ((uint16) 0x17)
-#define eINVCONST ((uint16) 0x18)
-#define eINVSIGNEDCONST ((uint16) 0x19)
-#define eINVFACTOR ((uint16) 0x1a)
-#define eINVFILE ((uint16) 0x1b)
-#define eINVLABEL ((uint16) 0x1c)
-#define eINVPTR ((uint16) 0x1d)
-#define eINVTYPE ((uint16) 0x1e)
-#define eINVVARPARM ((uint16) 0x1f)
-
-#define eLBRACKET ((uint16) 0x20)
-#define eLPAREN ((uint16) 0x21)
-#define eMULTLABEL ((uint16) 0x22)
-#define eNOSQUOTE ((uint16) 0x23)
-#define eNOTYET ((uint16) 0x24)
-#define eNPARMS ((uint16) 0x25)
-#define eOF ((uint16) 0x26)
-#define eOVF ((uint16) 0x27)
-#define ePERIOD ((uint16) 0x28)
-#define ePOFFCONFUSION ((uint16) 0x29)
-#define ePOFFWRITEERROR ((uint16) 0x2a)
-#define ePROGRAM ((uint16) 0x2b)
-#define ePTRADR ((uint16) 0x2c)
-#define ePTRVAL ((uint16) 0x2d)
-#define eRBRACKET ((uint16) 0x2e)
-#define eRPAREN ((uint16) 0x2f)
-
-#define eRPARENorCOMMA ((uint16) 0x30)
-#define eSEEKFAIL ((uint16) 0x31)
-#define eSEMICOLON ((uint16) 0x32)
-#define eSTRING ((uint16) 0x33)
-#define eTHEN ((uint16) 0x34)
-#define eTOorDOWNTO ((uint16) 0x35)
-#define eTRUNC ((uint16) 0x36)
-#define eUNDECLABEL ((uint16) 0x37)
-#define eUNDEFILE ((uint16) 0x38)
-#define eUNDEFLABEL ((uint16) 0x39)
-#define eUNDEFSYM ((uint16) 0x3a)
-#define eUNTIL ((uint16) 0x3b)
-#define eEXPRTYPE ((uint16) 0x3c)
-#define eTERMTYPE ((uint16) 0x3d)
-#define eFACTORTYPE ((uint16) 0x3e)
-#define eREADPARM ((uint16) 0x3f)
-
-#define eWRITEPARM ((uint16) 0x40)
-#define eARRAYTYPE ((uint16) 0x41)
-#define ePOINTERTYPE ((uint16) 0x42)
-#define eVARPARMTYPE ((uint16) 0x43)
-#define eSUBRANGE ((uint16) 0x44)
-#define eSUBRANGETYPE ((uint16) 0x45)
-#define eSET ((uint16) 0x46)
-#define eSETRANGE ((uint16) 0x47)
-#define eSCALARTYPE ((uint16) 0x48)
-#define eBADSHORTINT ((uint16) 0x49)
-#define eSYMTABINTERNAL ((uint16) 0x4a)
-#define eRECORDDECLARE ((uint16) 0x4b)
-#define eRECORDOBJECT ((uint16) 0x4c)
-#define eRECORDVAR ((uint16) 0x4d)
-#define eUNIT ((uint16) 0x4e)
-#define eUNITNAME ((uint16) 0x4f)
-
-#define eARGIGNORED ((uint16) 0x50)
-
-/* LINK TIME ERRORS */
-
-#define eUNDEFINEDSYMBOL ((uint16) 0x60)
-#define eMULTIDEFSYMBOL ((uint16) 0x61)
-
-/* ERRORS WHICH MAY OCCUR AT EITHER COMPILATION OR RUNTIME */
-
-#define eNOMEMORY ((uint16) 0x70)
-#define ePOFFREADERROR ((uint16) 0x71)
-#define ePOFFBADFORMAT ((uint16) 0x72)
-#define eRCVDSIGNAL ((uint16) 0x73)
-
-/* RUN TIME ERRORS */
-
-#define eBADPC ((uint16) 0x80)
-#define eBADSP ((uint16) 0x81)
-#define eSTRSTKOVERFLOW ((uint16) 0x82)
-#define eILLEGALOPCODE ((uint16) 0x83)
-#define eEXIT ((uint16) 0x84)
-#define eBADSYSIOFUNC ((uint16) 0x85)
-#define eBADSYSLIBCALL ((uint16) 0x86)
-#define eBADFPOPCODE ((uint16) 0x87)
-#define eINTEGEROVERFLOW ((uint16) 0x89)
-#define eFAILEDLIBCALL ((uint16) 0x90)
-
-#endif /* __PEDEFS_H */
+/*********************************************************************** + * pedefs.h + * Definitions of error codes + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***********************************************************************/ + +#ifndef __PEDEFS_H +#define __PEDEFS_H + +/*********************************************************************** + * Included Files + ***********************************************************************/ + +#include <stdint.h> + +/*********************************************************************** + * Pre-processor Definitions + ***********************************************************************/ + +/*********************************************************************** + * COMPILATION TIME ERRORS + * eASSIGN Expected ':=' + * eBEGIN Expected 'BEGIN' + * eCOLON Expected ':' + * eCOMMA Expected ',' + * eCOUNT Error count exceeded (FATAL) + * eDO Expected 'DO' + * eDUPFILE Attempt to re-define file + * eDUPSYM Attempt to declare duplicate symbol + * eEND Expected 'END' + * eEQ Expected '=' + * eEXPONENT Error in exponent of real constant + * eFILE Expected file identifier declared in PROGRAM + * eHUH Internal error (FATAL) + * eIDENT Expected identifier + * eIMPLEMENTATION Expected implementation section in unit file + * eINCLUDE Include file OPEN error (FATAL) + * eINTCONST Expected integer constant + * eINTERFACE Expected interface section in unit file + * eINTOVF Integer overflow (or underflow) + * eINTVAR Integer variable name expected + * eINVALIDFUNC Unrecognized built-in function + * eINVALIDPROC Unrecognized built-in procedure + * eINVARG Invalid procedure/function argument type + * eINVCONST Invalid constant in declaration + * eINVSIGNEDCONST Invalid constant after sign + * eINVFACTOR Invalid factor + * eINVFILE Invalid file identifier (as declared in PROGRAM) + * eINVLABEL Invalid label + * eINVPTR Invalid pointer type + * eINVTYPE Invalid type identifier + * eINVVARPARM Invalid/unsupported VAR parameter type + * eLBRACKET Expected '[' + * eLPAREN Expected '(' + * eMULTLABEL Attempt to multiply define label + * eNOSQUOTE EOL encounter in a string, probable missing "'" + * eNOTYET Not implemented yet + * eNPARMS Number of parameters in function or procedure + * call does not match number in declaration + * eOF Expected 'OF' + * eOVF Internal table overflow (FATAL) + * ePERIOD Expected '.' + * ePOFFCONFUSION Internal logic error in POFF file generation + * ePOFFWRITEERROR Error writing to POFF file + * ePROGRAM Expected 'PROGRAM' + * ePTRADR Expected pointer address (probably got value) form + * ePTRVAL Expected pointer value form, got value form + * eRBRACKET Expected ']' + * eRPAREN Expected ')' + * eRPARENorCOMMA Expected ')' or ',' + * eSEEKFAIL Seek to file position failed + * eSEMICOLON Expected ';' + * eSTRING Expected a string + * eTHEN Expected 'THEN' + * eTOorDOWNTO Expected 'TO' or 'DOWNTO' in for statement + * eTRUNC String truncated + * eUNDECLABEL Attempt to define an undeclared label. + * eUNDEFILE Undefined file buffer + * eUNDEFLABEL A declared label was not defined. + * eUNDEFSYM Undefined symbol + * eUNTIL Expected 'UNTIL' + * eEXPRTYPE Illegal expression type for this operation + * eTERMTYPE Illegal term type for this operation + * eFACTORTYPE Illegal factor type for this operation + * eREADPARM Illegal parameter in READ statement + * eWRITEPARM Illegal parameter in WRITE statement + * eARRAYTYPE Illegal type for ARRAY OF + * ePOINTERTYPE Illegal pointer type + * eVARPARMTYPE Illegal VAR parameter type + * eSUBRANGE Expected ".." + * eSUBRANGETYPE Illegal subrange type + * eSET Expected valid/consistent type for SET OF + * sSETRANGE Value out of range for SET OF + * eSCALARTYPE Illegal scalar type + * eBADSHORTINT Short integer is out of range + * eSYMTABINTERNAL Internal error in symbol table + * eRECORDDECLARE Error in RECORD declaration + * eRECORDOBJECT Expected a field of RECORD + * eRECORDVAR Expected a RECORD variable in WITH + * eUNIT Expected UNIT at beginning of unit file + * eUNITNAME File does not contain the expected UNIT + * eARGIGNORED An argument was provided, but ignored + * + * LINK TIME ERRORS + * eUNDEFINEDSYMBOL A necessary symbol was not defined + * eMULTIDEFSYMBOL A symbol was defined multiple times + * + * ERRORS WHICH MAY OCCUR AT EITHER COMPILATION, LINK OR RUNTIME + * eNOMEMORY Memory allocation failed + * ePOFFREADERROR Error reading a POFF file + * ePOFFBADFORMAT The file format does not like valid POFF + * eRCVDSIGNAL Received SIGSEGV (or other) signal. + * + * RUN TIME ERRORS + * eBADPC Program Counter is out-of-range + * eBADSP Stack reference is out-of-range + * eSTRSTKOVERFLOW String stack overflow + * eILLEGALOPCODE Non-executable instruction found + * eEXIT oEND P-Code encountered + * eBADSYSIOFUNC Illegal SYSIO sub-function + * eBADSYSLIBCALL Illegal runtime library call + * eBADFPOPCODE Illegal FLOAT POINT op-code + * eFAILEDLIBCALL Runtime library call returned failure + * eINTEGEROVERFLOW Integer overflow + **********************************************************************/ + +/* This is the error code that indicates that no error has occurred */ + +#define eNOERROR ((uint16_t) 0x00) + +/* This is the maximum number of errors that will be reported before + * compilation is terminated. + */ + +#define MAX_ERRORS 100 + +/* COMPILATION TIME ERRORS */ + +#define eASSIGN ((uint16_t) 0x01) +#define eBEGIN ((uint16_t) 0x02) +#define eCOLON ((uint16_t) 0x03) +#define eCOMMA ((uint16_t) 0x04) +#define eCOUNT ((uint16_t) 0x05) +#define eDO ((uint16_t) 0x06) +#define eDUPFILE ((uint16_t) 0x07) +#define eDUPSYM ((uint16_t) 0x08) +#define eEND ((uint16_t) 0x09) +#define eEQ ((uint16_t) 0x0a) +#define eEXPONENT ((uint16_t) 0x0b) +#define eFILE ((uint16_t) 0x0c) +#define eHUH ((uint16_t) 0x0d) +#define eIDENT ((uint16_t) 0x0e) +#define eIMPLEMENTATION ((uint16_t) 0x0f) + +#define eINCLUDE ((uint16_t) 0x10) +#define eINTCONST ((uint16_t) 0x11) +#define eINTERFACE ((uint16_t) 0x12) +#define eINTOVF ((uint16_t) 0x13) +#define eINTVAR ((uint16_t) 0x14) +#define eINVALIDFUNC ((uint16_t) 0x15) +#define eINVALIDPROC ((uint16_t) 0x16) +#define eINVARG ((uint16_t) 0x17) +#define eINVCONST ((uint16_t) 0x18) +#define eINVSIGNEDCONST ((uint16_t) 0x19) +#define eINVFACTOR ((uint16_t) 0x1a) +#define eINVFILE ((uint16_t) 0x1b) +#define eINVLABEL ((uint16_t) 0x1c) +#define eINVPTR ((uint16_t) 0x1d) +#define eINVTYPE ((uint16_t) 0x1e) +#define eINVVARPARM ((uint16_t) 0x1f) + +#define eLBRACKET ((uint16_t) 0x20) +#define eLPAREN ((uint16_t) 0x21) +#define eMULTLABEL ((uint16_t) 0x22) +#define eNOSQUOTE ((uint16_t) 0x23) +#define eNOTYET ((uint16_t) 0x24) +#define eNPARMS ((uint16_t) 0x25) +#define eOF ((uint16_t) 0x26) +#define eOVF ((uint16_t) 0x27) +#define ePERIOD ((uint16_t) 0x28) +#define ePOFFCONFUSION ((uint16_t) 0x29) +#define ePOFFWRITEERROR ((uint16_t) 0x2a) +#define ePROGRAM ((uint16_t) 0x2b) +#define ePTRADR ((uint16_t) 0x2c) +#define ePTRVAL ((uint16_t) 0x2d) +#define eRBRACKET ((uint16_t) 0x2e) +#define eRPAREN ((uint16_t) 0x2f) + +#define eRPARENorCOMMA ((uint16_t) 0x30) +#define eSEEKFAIL ((uint16_t) 0x31) +#define eSEMICOLON ((uint16_t) 0x32) +#define eSTRING ((uint16_t) 0x33) +#define eTHEN ((uint16_t) 0x34) +#define eTOorDOWNTO ((uint16_t) 0x35) +#define eTRUNC ((uint16_t) 0x36) +#define eUNDECLABEL ((uint16_t) 0x37) +#define eUNDEFILE ((uint16_t) 0x38) +#define eUNDEFLABEL ((uint16_t) 0x39) +#define eUNDEFSYM ((uint16_t) 0x3a) +#define eUNTIL ((uint16_t) 0x3b) +#define eEXPRTYPE ((uint16_t) 0x3c) +#define eTERMTYPE ((uint16_t) 0x3d) +#define eFACTORTYPE ((uint16_t) 0x3e) +#define eREADPARM ((uint16_t) 0x3f) + +#define eWRITEPARM ((uint16_t) 0x40) +#define eARRAYTYPE ((uint16_t) 0x41) +#define ePOINTERTYPE ((uint16_t) 0x42) +#define eVARPARMTYPE ((uint16_t) 0x43) +#define eSUBRANGE ((uint16_t) 0x44) +#define eSUBRANGETYPE ((uint16_t) 0x45) +#define eSET ((uint16_t) 0x46) +#define eSETRANGE ((uint16_t) 0x47) +#define eSCALARTYPE ((uint16_t) 0x48) +#define eBADSHORTINT ((uint16_t) 0x49) +#define eSYMTABINTERNAL ((uint16_t) 0x4a) +#define eRECORDDECLARE ((uint16_t) 0x4b) +#define eRECORDOBJECT ((uint16_t) 0x4c) +#define eRECORDVAR ((uint16_t) 0x4d) +#define eUNIT ((uint16_t) 0x4e) +#define eUNITNAME ((uint16_t) 0x4f) + +#define eARGIGNORED ((uint16_t) 0x50) + +/* LINK TIME ERRORS */ + +#define eUNDEFINEDSYMBOL ((uint16_t) 0x60) +#define eMULTIDEFSYMBOL ((uint16_t) 0x61) + +/* ERRORS WHICH MAY OCCUR AT EITHER COMPILATION OR RUNTIME */ + +#define eNOMEMORY ((uint16_t) 0x70) +#define ePOFFREADERROR ((uint16_t) 0x71) +#define ePOFFBADFORMAT ((uint16_t) 0x72) +#define eRCVDSIGNAL ((uint16_t) 0x73) + +/* RUN TIME ERRORS */ + +#define eBADPC ((uint16_t) 0x80) +#define eBADSP ((uint16_t) 0x81) +#define eSTRSTKOVERFLOW ((uint16_t) 0x82) +#define eILLEGALOPCODE ((uint16_t) 0x83) +#define eEXIT ((uint16_t) 0x84) +#define eBADSYSIOFUNC ((uint16_t) 0x85) +#define eBADSYSLIBCALL ((uint16_t) 0x86) +#define eBADFPOPCODE ((uint16_t) 0x87) +#define eINTEGEROVERFLOW ((uint16_t) 0x89) +#define eFAILEDLIBCALL ((uint16_t) 0x90) + +#endif /* __PEDEFS_H */ diff --git a/misc/pascal/include/perr.h b/misc/pascal/include/perr.h index cfaa40fd7..daf5a4639 100644 --- a/misc/pascal/include/perr.h +++ b/misc/pascal/include/perr.h @@ -1,40 +1,56 @@ -/***************************************************************************
- * perr.h
- * External Declarations associated with perr.c
- *
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-extern void errmsg(char *fmt, ...);
-extern void warn(uint16 errcode);
-extern void error(uint16 errcode);
-extern void fatal(uint16 errcode);
+/********************************************************************** + * perr.h + * External Declarations associated with perr.c + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***********************************************************************/ + +#ifndef __PERR_H +#define __PERR_H + +/*********************************************************************** + * Included Files + ***********************************************************************/ + +#include <stdint.h> + +/*********************************************************************** + * Public Function Prototypes + ***********************************************************************/ + +extern void errmsg(char *fmt, ...); +extern void warn(uint16_t errcode); +extern void error(uint16_t errcode); +extern void fatal(uint16_t errcode); + +#endif /* __PERR_H */ + diff --git a/misc/pascal/include/pfdefs.h b/misc/pascal/include/pfdefs.h index e58ca4ed7..76072ed2c 100644 --- a/misc/pascal/include/pfdefs.h +++ b/misc/pascal/include/pfdefs.h @@ -2,7 +2,7 @@ * pfdefs.h
* Floating point operation codes
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -37,9 +37,9 @@ #ifndef __PFDEFS_H
#define __PFDEFS_H
-/**---------------------------------------------------------------------
- FLOATING POINT SUB-OPCODES
- ---------------------------------------------------------------------**/
+/***********************************************************************
+ * FLOATING POINT SUB-OPCODES
+ ***********************************************************************/
/* This bit may be set in the opcode to indicate that the arguments
* is(are) type integer and require(s) conversion. */
diff --git a/misc/pascal/include/pinsn.h b/misc/pascal/include/pinsn.h index 3d736cdc2..de4f571dd 100644 --- a/misc/pascal/include/pinsn.h +++ b/misc/pascal/include/pinsn.h @@ -1,80 +1,82 @@ -/***************************************************************************
- * pinsn.h
- * External Declarations associated libinsn.a
- *
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ***************************************************************************/
-
-#ifndef __PINSN_H
-#define __PINSN_H
-
-/***************************************************************************
- * Included Files
- ***************************************************************************/
-
-/***************************************************************************
- * Global Function Prototypes
- ***************************************************************************/
-
-/* Opcode generators */
-
-extern void insn_GenerateSimple(enum pcode_e opcode);
-extern void insn_GenerateDataOperation(enum pcode_e opcode, sint32 data);
-extern void insn_GenerateDataSize(uint32 dwDataSize);
-extern void insn_GenerateFpOperation(ubyte fpOpcode);
-extern void insn_GenerateIoOperation(uint16 ioOpcode, uint16 fileNumber);
-extern void insn_BuiltInFunctionCall(uint16 libOpcode);
-extern void insn_GenerateLevelReference(enum pcode_e opcode, uint16 level,
- sint32 offset);
-extern void insn_GenerateProcedureCall(uint16 level, sint32 offset);
-extern void insn_GenerateLineNumber(uint16 includeNumber, uint32 lineNumber);
-extern void insn_SetStackLevel(uint32 level);
-
-/* Opcode relocation */
-
-extern int insn_Relocate(OPTYPE *op, uint32 pcOffset, uint32 roOffset);
-extern void insn_FixupProcedureCall(ubyte *progData, uint32 symValue);
-
-/* POFF-wrapped INSNS access helpers */
-
-extern uint32 insn_GetOpCode(poffHandle_t handle, OPTYPE *ptr);
-extern void insn_ResetOpCodeRead(poffHandle_t handle);
-extern void insn_AddOpCode(poffHandle_t handle, OPTYPE *ptr);
-extern void insn_ResetOpCodeWrite(poffHandle_t handle);
-extern void insn_AddTmpOpCode(poffProgHandle_t progHandle, OPTYPE *ptr);
-extern void insn_ResetTmpOpCodeWrite(poffProgHandle_t progHandle);
-
-/* INSN-specific disassembler */
-
-extern void insn_DisassemblePCode(FILE* lfile, OPTYPE *pop);
-
-#endif /* __PINSN_H */
+/*************************************************************************** + * pinsn.h + * External Declarations associated libinsn.a + * + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +#ifndef __PINSN_H +#define __PINSN_H + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include <stdint.h> + +/*************************************************************************** + * Global Function Prototypes + ***************************************************************************/ + +/* Opcode generators */ + +extern void insn_GenerateSimple(enum pcode_e opcode); +extern void insn_GenerateDataOperation(enum pcode_e opcode, int32_t data); +extern void insn_GenerateDataSize(uint32_t dwDataSize); +extern void insn_GenerateFpOperation(uint8_t fpOpcode); +extern void insn_GenerateIoOperation(uint16_t ioOpcode, uint16_t fileNumber); +extern void insn_BuiltInFunctionCall(uint16_t libOpcode); +extern void insn_GenerateLevelReference(enum pcode_e opcode, uint16_t level, + int32_t offset); +extern void insn_GenerateProcedureCall(uint16_t level, int32_t offset); +extern void insn_GenerateLineNumber(uint16_t includeNumber, uint32_t lineNumber); +extern void insn_SetStackLevel(uint32_t level); + +/* Opcode relocation */ + +extern int insn_Relocate(OPTYPE *op, uint32_t pcOffset, uint32_t roOffset); +extern void insn_FixupProcedureCall(uint8_t *progData, uint32_t symValue); + +/* POFF-wrapped INSNS access helpers */ + +extern uint32_t insn_GetOpCode(poffHandle_t handle, OPTYPE *ptr); +extern void insn_ResetOpCodeRead(poffHandle_t handle); +extern void insn_AddOpCode(poffHandle_t handle, OPTYPE *ptr); +extern void insn_ResetOpCodeWrite(poffHandle_t handle); +extern void insn_AddTmpOpCode(poffProgHandle_t progHandle, OPTYPE *ptr); +extern void insn_ResetTmpOpCodeWrite(poffProgHandle_t progHandle); + +/* INSN-specific disassembler */ + +extern void insn_DisassemblePCode(FILE* lfile, OPTYPE *pop); + +#endif /* __PINSN_H */ diff --git a/misc/pascal/include/podefs.h b/misc/pascal/include/podefs.h index ba95b0d14..25d0042b6 100644 --- a/misc/pascal/include/podefs.h +++ b/misc/pascal/include/podefs.h @@ -2,7 +2,7 @@ * podefs.h
* Logical P-code operation code definitions
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/misc/pascal/include/poff.h b/misc/pascal/include/poff.h index 244384873..e0516f9ee 100644 --- a/misc/pascal/include/poff.h +++ b/misc/pascal/include/poff.h @@ -2,7 +2,7 @@ * poff.h * Definitions for the PCode Object File Format (POFF) * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -38,18 +38,15 @@ #define __POFF_H /*************************************************************************** - * Compilation Switches - ***************************************************************************/ - -/*************************************************************************** * Included Files ***************************************************************************/ +#include <stdint.h> #include "keywords.h" #include "config.h" /*************************************************************************** - * Definitions + * Pre-processor Definitions ***************************************************************************/ /* Definitions for the fh_ident field of the poffHdr_t */ @@ -159,7 +156,7 @@ #define RLI_SYM(x) ((x) >> 8) /* Symbol index */ #define RLI_TYPE(x) ((x) & 0xff) /* Rloc type */ -#define RLI_MAKE(s,t) (((uint32)(s) << 8) | ((t) & 0xff)) +#define RLI_MAKE(s,t) (((uint32_t)(s) << 8) | ((t) & 0xff)) /*************************************************************************** * Public Types @@ -173,49 +170,49 @@ struct poffFileHeader_s * See the FHI_ definitions above. */ - ubyte fh_ident[FHI_NIDENT]; + uint8_t fh_ident[FHI_NIDENT]; /* fh_version holds the version of the POFF file format. This should * always be FHV_CURRENT. */ - ubyte fh_version; + uint8_t fh_version; /* fh_type holds the type of binary carry by the POFF file. * See the FHT_ definitions above. */ - ubyte fh_type; + uint8_t fh_type; /* fh_arch holds the mach architecture identifier. See the FHA_ * definitions above. */ - ubyte fh_arch; + uint8_t fh_arch; /* Pad so that the next field is aligned */ - ubyte fh_padding; + uint8_t fh_padding; /* fh_shsize is the size a section header. This should be * sizeof(poffSectionHeader_t) */ - uint16 fh_shsize; + uint16_t fh_shsize; /* fh_num is the number of section headers in section header * list. The total size of the section header block is then * fh_shsize * fh_shnum. */ - uint16 fh_shnum; + uint16_t fh_shnum; /* fh_name is an offset into the string table section data. * It refers to a name associated with fh_type that determines * the specific instances of the type. */ - uint32 fh_name; + uint32_t fh_name; /* For fhi_type = {FHI_EXEC or FHI_PROGRAM}, fh_entry holds the * entry point into the program. For FHI_PROGRAM, this entry point @@ -223,13 +220,13 @@ struct poffFileHeader_s * is an instruction space address offset (from address zero). */ - uint32 fh_entry; + uint32_t fh_entry; /* fh_shoff is the file offset to the beginning of the table of file * headers. fh_shoff will most likely be sizeof(poffFileHeader_t). */ - uint32 fh_shoff; + uint32_t fh_shoff; }; typedef struct poffFileHeader_s poffFileHeader_t; @@ -241,46 +238,46 @@ struct poffSectionHeader_s * See the SHT_ definitions above. */ - ubyte sh_type; + uint8_t sh_type; /* These flags describe the characteristics of the section. See the * SHF_ definitions above. */ - ubyte sh_flags; + uint8_t sh_flags; /* If the section holds a table of fixed sized entries, sh_entsize * gives the size of one entry. The number of entries can then be * obtained by dividing sh_size by sh_entsize. */ - uint16 sh_entsize; + uint16_t sh_entsize; /* sh_name is an offset into the string table section data. * It refers to a name associated with section. */ - uint32 sh_name; + uint32_t sh_name; /* If the section is loaded into memory (SHF_ALLOC), then this * address holds the address at which the data must be loaded * (if applicable). */ - uint32 sh_addr; + uint32_t sh_addr; /* sh_offset is the offset from the beginning of the file to * beginning of data associated with this section. */ - uint32 sh_offset; + uint32_t sh_offset; /* sh_size provides the total size of the section data in bytes. * If the section holds a table of fixed sized entries, then * sh_size be equal to sh_entsize times the number of entries. */ - uint32 sh_size; + uint32_t sh_size; }; typedef struct poffSectionHeader_s poffSectionHeader_t; @@ -294,14 +291,14 @@ struct poffRelocation_s * relocation type. See the RLI_* macros above. */ - uint32 rl_info; + uint32_t rl_info; /* This is the section data offset to the instruction/data * to be relocated. The effected section is implicit in the * relocation type. */ - uint32 rl_offset; /* Offset to pcode */ + uint32_t rl_offset; /* Offset to pcode */ }; typedef struct poffRelocation_s poffRelocation_t; @@ -313,7 +310,7 @@ struct poffSymbol_s * See the STT_ definitions above. */ - ubyte st_type; + uint8_t st_type; /* For data section symbols, the following provides the required * data space alignment for the symbol memory representation. For @@ -321,20 +318,20 @@ struct poffSymbol_s * definitions above. */ - ubyte st_align; + uint8_t st_align; /* These flags describe the characteristics of the symbol. See the * STF_ definitions above. */ - ubyte st_flags; - ubyte st_pad; + uint8_t st_flags; + uint8_t st_pad; /* st_name is an offset into the string table section data. * It refers to a name associated with symbol. */ - uint32 st_name; + uint32_t st_name; /* st_value is the value associated with symbol. For defined data * section symbols, this is the offset into the initialized data @@ -343,13 +340,13 @@ struct poffSymbol_s * valid can be used as as addend. */ - uint32 st_value; + uint32_t st_value; /* For data section symbols, this is the size of the initialized * data region associated with the symbol. */ - uint32 st_size; + uint32_t st_size; }; typedef struct poffSymbol_s poffSymbol_t; @@ -359,7 +356,7 @@ typedef struct poffSymbol_s poffSymbol_t; * file. */ -typedef uint32 poffFileTab_t; +typedef uint32_t poffFileTab_t; /* Line number section array entry structure. Line numbers are * associated with executable program data sections. @@ -369,21 +366,21 @@ struct poffLineNumber_s { /* This is the source file line number */ - uint16 ln_lineno; + uint16_t ln_lineno; /* This is an index (not a byte offset) to an entry in the file * section table. This can be used to identify the name of the * file for which the line number applies. */ - uint16 ln_fileno; + uint16_t ln_fileno; /* This is an offset to the beginning of the instruction in the * program data section. At present, this is limited to a single * program data section. */ - uint32 ln_poffset; + uint32_t ln_poffset; }; typedef struct poffLineNumber_s poffLineNumber_t; @@ -401,19 +398,19 @@ struct poffDebugFuncInfo_s * point. */ - uint32 df_value; + uint32_t df_value; /* This is the size of the value returned by the function in * bytes (zero for procedures). */ - uint32 df_size; + uint32_t df_size; /* This is the number of parameters accepted by the function/ * procedure. */ - uint32 df_nparms; + uint32_t df_nparms; }; typedef struct poffDebugFuncInfo_s poffDebugFuncInfo_t; @@ -425,7 +422,7 @@ struct poffDebugArgInfo_s { /* This is the size, in bytes, of one input paramter */ - uint32 da_size; + uint32_t da_size; }; typedef struct poffDebugArgInfo_s poffDebugArgInfo_t; diff --git a/misc/pascal/include/pofflib.h b/misc/pascal/include/pofflib.h index ee68bfa92..44013623c 100644 --- a/misc/pascal/include/pofflib.h +++ b/misc/pascal/include/pofflib.h @@ -2,7 +2,7 @@ * pofflib.h * Interfaces to the POFF library * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -38,13 +38,10 @@ #define __POFFLIB_H /*************************************************************************** - * Compilation Switches - ***************************************************************************/ - -/*************************************************************************** * Included Files ***************************************************************************/ +#include <stdint.h> #include "keywords.h" #include "poff.h" @@ -74,7 +71,7 @@ struct poffLibSymbol_s * See the STT_ definitions in poff.h. */ - ubyte type; + uint8_t type; /* For data section symbols, the following provides the required * data space alignment for the symbol memory representation. For @@ -82,13 +79,13 @@ struct poffLibSymbol_s * definitions in poff.h */ - ubyte align; + uint8_t align; /* These flags describe the characteristics of the symbol. See the * STF_ definitions above. */ - ubyte flags; + uint8_t flags; /* name is a reference to the symbol name in the string table * section data. @@ -103,13 +100,13 @@ struct poffLibSymbol_s * valid can be used as as addend. */ - uint32 value; + uint32_t value; /* For data section symbols, this is the size of the initialized * data region associated with the symbol. */ - uint32 size; + uint32_t size; }; typedef struct poffLibSymbol_s poffLibSymbol_t; @@ -121,7 +118,7 @@ struct poffLibLineNumber_s { /* This is the source file line number */ - uint32 lineno; + uint32_t lineno; /* This is the full filename of the file containing the line number. */ @@ -131,7 +128,7 @@ struct poffLibLineNumber_s * associated with this line number. */ - uint32 offset; + uint32_t offset; }; typedef struct poffLibLineNumber_s poffLibLineNumber_t; @@ -150,29 +147,29 @@ struct poffLibDebugFuncInfo_s * point. */ - uint32 value; + uint32_t value; /* This is the size of the value returned by the function in * bytes (zero for procedures). */ - uint32 retsize; + uint32_t retsize; /* This is the number of parameters accepted by the function/ * procedure. */ - uint32 nparms; + uint32_t nparms; /* This is the beginning of a table of input parameter sizes * the actually allocate size will be nparms entries. */ - uint32 argsize[1]; + uint32_t argsize[1]; }; typedef struct poffLibDebugFuncInfo_s poffLibDebugFuncInfo_t; -#define SIZEOFDEBUFINFO(n) (sizeof(poffLibDebugFuncInfo_t) + ((n)-1)*sizeof(uint32)) +#define SIZEOFDEBUFINFO(n) (sizeof(poffLibDebugFuncInfo_t) + ((n)-1)*sizeof(uint32_t)) /*************************************************************************** * Public Variables @@ -190,57 +187,57 @@ extern void poffResetAccess(poffHandle_t handle); /* Functions to manage writing a POFF file */ -extern void poffSetFileType(poffHandle_t handle, ubyte fh_type, - uint16 nfiles, const char *name); -extern void poffSetArchitecture(poffHandle_t handle, ubyte fh_arch); -extern void poffSetEntryPoint(poffHandle_t handle, uint32 entryPoint); -extern sint32 poffFindString(poffHandle_t handle, const char *string); -extern uint32 poffAddString(poffHandle_t handle, const char *string); -extern uint32 poffAddFileName(poffHandle_t handle, const char *name); -extern void poffAddProgByte(poffHandle_t handle, ubyte progByte); +extern void poffSetFileType(poffHandle_t handle, uint8_t fh_type, + uint16_t nfiles, const char *name); +extern void poffSetArchitecture(poffHandle_t handle, uint8_t fh_arch); +extern void poffSetEntryPoint(poffHandle_t handle, uint32_t entryPoint); +extern int32_t poffFindString(poffHandle_t handle, const char *string); +extern uint32_t poffAddString(poffHandle_t handle, const char *string); +extern uint32_t poffAddFileName(poffHandle_t handle, const char *name); +extern void poffAddProgByte(poffHandle_t handle, uint8_t progByte); #if 0 /* not used */ -extern uint32 poffAddRoDataByte(poffHandle_t handle, ubyte dataByte); +extern uint32_t poffAddRoDataByte(poffHandle_t handle, uint8_t dataByte); #endif -extern uint32 poffAddRoDataString(poffHandle_t handle, - const char *string); -extern uint32 poffAddSymbol(poffHandle_t handle, - poffLibSymbol_t *symbol); -extern uint32 poffAddLineNumber(poffHandle_t handle, - uint16 lineNumber, uint16 fileNumber, - uint32 progSectionDataOffset); -extern uint32 poffAddDebugFuncInfo(poffHandle_t handle, - poffLibDebugFuncInfo_t *pContainer); -extern uint32 poffAddRelocation(poffHandle_t handle, - ubyte relocType, uint32 symIndex, - uint32 sectionDataOffset); +extern uint32_t poffAddRoDataString(poffHandle_t handle, + const char *string); +extern uint32_t poffAddSymbol(poffHandle_t handle, + poffLibSymbol_t *symbol); +extern uint32_t poffAddLineNumber(poffHandle_t handle, + uint16_t lineNumber, uint16_t fileNumber, + uint32_t progSectionDataOffset); +extern uint32_t poffAddDebugFuncInfo(poffHandle_t handle, + poffLibDebugFuncInfo_t *pContainer); +extern uint32_t poffAddRelocation(poffHandle_t handle, + uint8_t relocType, uint32_t symIndex, + uint32_t sectionDataOffset); extern void poffWriteFile(poffHandle_t handle, FILE *poffFile); /* Functions to manage reading a POFF file */ -extern uint16 poffReadFile(poffHandle_t handle, FILE *poffFile); -extern ubyte poffGetFileType(poffHandle_t handle); -extern ubyte poffGetArchitecture(poffHandle_t handle); -extern uint32 poffGetEntryPoint(poffHandle_t handle); +extern uint16_t poffReadFile(poffHandle_t handle, FILE *poffFile); +extern uint8_t poffGetFileType(poffHandle_t handle); +extern uint8_t poffGetArchitecture(poffHandle_t handle); +extern uint32_t poffGetEntryPoint(poffHandle_t handle); extern const char *poffGetFileHdrName(poffHandle_t handle); -extern uint32 poffGetRoDataSize(poffHandle_t handle); -extern sint32 poffGetFileName(poffHandle_t handle, const char **fname); +extern uint32_t poffGetRoDataSize(poffHandle_t handle); +extern int32_t poffGetFileName(poffHandle_t handle, const char **fname); extern int poffGetProgByte(poffHandle_t handle); -extern sint32 poffGetSymbol(poffHandle_t handle, - poffLibSymbol_t *symbol); -extern const char *poffGetString(poffHandle_t handle, uint32 index); -extern sint32 poffGetLineNumber(poffHandle_t handle, - poffLibLineNumber_t *lineno); -extern sint32 poffGetRawLineNumber(poffHandle_t handle, - poffLineNumber_t *lineno); -extern sint32 poffGetRawRelocation(poffHandle_t handle, - poffRelocation_t *reloc); +extern int32_t poffGetSymbol(poffHandle_t handle, + poffLibSymbol_t *symbol); +extern const char *poffGetString(poffHandle_t handle, uint32_t index); +extern int32_t poffGetLineNumber(poffHandle_t handle, + poffLibLineNumber_t *lineno); +extern int32_t poffGetRawLineNumber(poffHandle_t handle, + poffLineNumber_t *lineno); +extern int32_t poffGetRawRelocation(poffHandle_t handle, + poffRelocation_t *reloc); extern poffLibDebugFuncInfo_t *poffGetDebugFuncInfo(poffHandle_t handle); -extern poffLibDebugFuncInfo_t *poffCreateDebugInfoContainer(uint32 nparms); +extern poffLibDebugFuncInfo_t *poffCreateDebugInfoContainer(uint32_t nparms); extern void poffReleaseDebugFuncContainer(poffLibDebugFuncInfo_t *pDebugFuncInfo); extern void poffDiscardDebugFuncInfo(poffHandle_t handle); -extern sint32 poffProgTell(poffHandle_t handle); -extern int poffProgSeek(poffHandle_t handle, uint32 offset); -extern uint32 poffGetProgSize(poffHandle_t handle); +extern int32_t poffProgTell(poffHandle_t handle); +extern int poffProgSeek(poffHandle_t handle, uint32_t offset); +extern uint32_t poffGetProgSize(poffHandle_t handle); extern void poffReleaseProgData(poffHandle_t handle); /* Functions used to manage modifications to a POFF file using a @@ -250,12 +247,12 @@ extern void poffReleaseProgData(poffHandle_t handle); extern poffProgHandle_t poffCreateProgHandle(void); extern void poffDestroyProgHandle(poffProgHandle_t handle); extern void poffResetProgHandle(poffProgHandle_t handle); -extern uint16 poffAddTmpProgByte(poffProgHandle_t handle, - ubyte progByte); -extern uint16 poffWriteTmpProgBytes(ubyte *buffer, uint32 nbyte, - poffProgHandle_t handle); +extern uint16_t poffAddTmpProgByte(poffProgHandle_t handle, + uint8_t progByte); +extern uint16_t poffWriteTmpProgBytes(uint8_t *buffer, uint32_t nbyte, + poffProgHandle_t handle); extern void poffReplaceProgData(poffHandle_t handle, - poffProgHandle_t progHandle); + poffProgHandle_t progHandle); /* Functions used to manage modifications to a POFF file using a * temporary container for the new symbol data. @@ -264,23 +261,23 @@ extern void poffReplaceProgData(poffHandle_t handle, extern poffSymHandle_t poffCreateSymHandle(void); extern void poffDestroySymHandle(poffSymHandle_t handle); extern void poffResetSymHandle(poffSymHandle_t handle); -extern uint32 poffAddTmpSymbol(poffHandle_t handle, poffSymHandle_t symHandle, - poffLibSymbol_t *symbol); +extern uint32_t poffAddTmpSymbol(poffHandle_t handle, poffSymHandle_t symHandle, + poffLibSymbol_t *symbol); extern void poffReplaceSymbolTable(poffHandle_t handle, - poffSymHandle_t symHandle); + poffSymHandle_t symHandle); /* Functions used to extract/insert whole data sections from/into a POFF * file container */ -extern uint32 poffExtractProgramData(poffHandle_t handle, - ubyte **progData); +extern uint32_t poffExtractProgramData(poffHandle_t handle, + uint8_t **progData); extern void poffInsertProgramData(poffHandle_t handle, - ubyte *progData, uint32 progSize); -extern uint32 poffExtractRoData(poffHandle_t handle, - ubyte **roData); + uint8_t *progData, uint32_t progSize); +extern uint32_t poffExtractRoData(poffHandle_t handle, + uint8_t **roData); extern void poffAppendRoData(poffHandle_t handle, - ubyte *roData, uint32 roDataSize); + uint8_t *roData, uint32_t roDataSize); /* Functions to manage printing of the POFF file content */ @@ -293,23 +290,23 @@ extern void poffDumpRelocTable(poffHandle_t handle, FILE *outFile); * just store and retrieve information by label number. */ -extern void poffAddToDefinedLabelTable(uint32 label, uint32 pc); -extern void poffAddToUndefinedLabelTable(uint32 label, - uint32 symIndex); -extern int poffGetSymIndexForUndefinedLabel(uint32 label); -extern int poffGetPcForDefinedLabel(uint32 label); +extern void poffAddToDefinedLabelTable(uint32_t label, uint32_t pc); +extern void poffAddToUndefinedLabelTable(uint32_t label, + uint32_t symIndex); +extern int poffGetSymIndexForUndefinedLabel(uint32_t label); +extern int poffGetPcForDefinedLabel(uint32_t label); extern void poffReleaseLabelReferences(void); /* Helper functions for line numbers */ extern void poffReadLineNumberTable(poffHandle_t handle); -extern poffLibLineNumber_t *poffFindLineNumber(uint32 offset); +extern poffLibLineNumber_t *poffFindLineNumber(uint32_t offset); extern void poffReleaseLineNumberTable(void); /* Helper functions for debug information */ extern void poffReadDebugFuncInfoTable(poffHandle_t handle); -extern poffLibDebugFuncInfo_t *poffFindDebugFuncInfo(uint32 offset); +extern poffLibDebugFuncInfo_t *poffFindDebugFuncInfo(uint32_t offset); extern void poffReplaceDebugFuncInfo(poffHandle_t handle); extern void poffReleaseDebugFuncInfoTable(void); diff --git a/misc/pascal/include/pxdefs.h b/misc/pascal/include/pxdefs.h index 1638028fa..202ccfe5f 100644 --- a/misc/pascal/include/pxdefs.h +++ b/misc/pascal/include/pxdefs.h @@ -2,7 +2,7 @@ * pxdefs.h
* Definitions of the arguments of the oSYSIO opcode
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
|