2009-02-25 01:49:48 -05:00
|
|
|
/* all platform-specific includes and defines go in this file */
|
|
|
|
#ifndef PLATFORM_H
|
|
|
|
#define PLATFORM_H
|
|
|
|
|
|
|
|
/* common includes */
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
/* configurable options */
|
|
|
|
#define UNIX_HOST /* select your host type */
|
|
|
|
#undef FLYINGFOX_HOST
|
|
|
|
#undef SURVEYOR_HOST
|
|
|
|
|
|
|
|
#define HEAP_SIZE 16384 /* space for the heap and the stack */
|
|
|
|
#define LARGE_INT_POWER_OF_TEN 1000000000 /* the largest power of ten which fits in an int on this architecture */
|
|
|
|
#define ARCH_ALIGN_WORDSIZE sizeof(int) /* memory alignment boundary on this architecture */
|
|
|
|
|
|
|
|
#define GLOBAL_TABLE_SIZE 397 /* global variable table */
|
|
|
|
#define STRING_TABLE_SIZE 97 /* shared string table size */
|
|
|
|
#define PARAMETER_MAX 16 /* maximum number of parameters to a function */
|
|
|
|
#define LINEBUFFER_MAX 256 /* maximum number of characters on a line */
|
|
|
|
#define LOCAL_TABLE_SIZE 11 /* size of local variable table (can expand) */
|
|
|
|
#define STRUCT_TABLE_SIZE 11 /* size of struct/union member table (can expand) */
|
|
|
|
|
|
|
|
/* host platform includes */
|
|
|
|
#ifdef UNIX_HOST
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <memory.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#ifndef NO_FP
|
|
|
|
#include <math.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#else
|
|
|
|
# ifdef FLYINGFOX_HOST
|
|
|
|
|
|
|
|
# else
|
|
|
|
# ifdef SURVEYOR_HOST
|
|
|
|
# define NO_FP
|
|
|
|
# define NO_CTYPE
|
2009-02-26 22:02:05 -05:00
|
|
|
# include "../string.h"
|
|
|
|
# include "../print.h"
|
|
|
|
# include "../malloc.h"
|
2009-02-28 00:43:28 -05:00
|
|
|
# include "../setjmp.h"
|
|
|
|
# include "../stdarg.h"
|
2009-02-25 01:49:48 -05:00
|
|
|
# define assert(x)
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* PLATFORM_H */
|
|
|
|
|