+#include "SDCCicode.h"
+#include "SDCCargs.h"
+#include "SDCCpeeph.h"
+#include "dbuf.h"
+
+#define TARGET_ID_MCS51 1
+#define TARGET_ID_GBZ80 2
+#define TARGET_ID_Z80 3
+#define TARGET_ID_AVR 4
+#define TARGET_ID_DS390 5
+#define TARGET_ID_PIC 6
+#define TARGET_ID_PIC16 7
+#define TARGET_ID_XA51 9
+#define TARGET_ID_DS400 10
+#define TARGET_ID_HC08 11
+
+/* Macro to test the target we are compiling for.
+ Can only be used after SDCCmain has defined the port
+*/
+#define TARGET_IS_MCS51 (port->id==TARGET_ID_MCS51)
+#define TARGET_IS_GBZ80 (port->id==TARGET_ID_GBZ80)
+#define TARGET_IS_Z80 (port->id==TARGET_ID_Z80)
+#define TARGET_Z80_LIKE (TARGET_IS_Z80 || TARGET_IS_GBZ80)
+#define TARGET_IS_AVR (port->id==TARGET_ID_AVR)
+#define TARGET_IS_DS390 (port->id==TARGET_ID_DS390)
+#define TARGET_IS_DS400 (port->id==TARGET_ID_DS400)
+#define TARGET_IS_PIC (port->id==TARGET_ID_PIC)
+#define TARGET_IS_PIC16 (port->id==TARGET_ID_PIC16)
+#define TARGET_IS_XA51 (port->id==TARGET_ID_XA51)
+#define TARGET_IS_HC08 (port->id==TARGET_ID_HC08)
+#define TARGET_MCS51_LIKE (TARGET_IS_MCS51 || TARGET_IS_DS390 || TARGET_IS_DS400)
+
+#define MAX_BUILTIN_ARGS 16
+/* definition of builtin functions */
+typedef struct builtins
+ {
+ char *name; /* name of builtin function */
+ char *rtype; /* return type as string : see typeFromStr */
+ int nParms; /* number of parms : max 8 */
+ char *parm_types[MAX_BUILTIN_ARGS]; /* each parm type as string : see typeFromStr */
+ } builtins;
+
+struct ebbIndex;
+
+/* pragma structure */
+struct pragma_s
+ {
+ const char *name;
+ int id;
+ char deprecated;
+ int (*func)(int id, const char *name, const char *cp);
+ };
+
+/* defined in SDCClex.lex */
+int process_pragma_tbl(const struct pragma_s *pragma_tbl, const char *s);
+