diff -Nurw csrc.orig/pf_all.h csrc/pf_all.h --- csrc.orig/pf_all.h 2008-07-21 04:58:11.000000000 +0200 +++ csrc/pf_all.h 2010-02-15 03:40:53.000000000 +0100 @@ -22,6 +22,8 @@ ** ***************************************************************/ +#include + #ifdef PF_EMBEDDED #define PF_NO_INIT #define PF_NO_STDIO diff -Nurw csrc.orig/pf_core.c csrc/pf_core.c --- csrc.orig/pf_core.c 2009-02-20 19:38:25.000000000 +0100 +++ csrc/pf_core.c 2010-02-15 04:29:37.000000000 +0100 @@ -74,8 +74,8 @@ /* TODO move to pf_config.h header. */ #define DEFAULT_RETURN_DEPTH (512) #define DEFAULT_USER_DEPTH (512) -#define DEFAULT_HEADER_SIZE (120000) -#define DEFAULT_CODE_SIZE (300000) +#define DEFAULT_HEADER_SIZE (65502) +#define DEFAULT_CODE_SIZE (65502) /* Initialize globals in a function to simplify loading on * embedded systems which may not support initialization of data section. diff -Nurw csrc.orig/pf_inner.c csrc/pf_inner.c --- csrc.orig/pf_inner.c 2009-02-18 18:59:02.000000000 +0100 +++ csrc/pf_inner.c 2010-02-15 03:55:15.000000000 +0100 @@ -441,7 +441,7 @@ #define PF_MEMORY_VALIDATOR (0xA81B4D69) case ID_ALLOCATE: /* Allocate at least one cell's worth because we clobber first cell. */ - if ( TOS < sizeof(cell) ) + if ( TOS < (long) sizeof(cell) ) { Temp = sizeof(cell); } diff -Nurw csrc.orig/pf_io.h csrc/pf_io.h --- csrc.orig/pf_io.h 2008-07-21 04:58:11.000000000 +0200 +++ csrc/pf_io.h 2010-02-15 04:13:01.000000000 +0100 @@ -122,8 +122,8 @@ #define sdCloseFile fclose #define sdInputChar fgetc - #define PF_STDIN ((FileStream *) stdin) - #define PF_STDOUT ((FileStream *) stdout) + #define PF_STDIN ((FileStream *) 0) + #define PF_STDOUT ((FileStream *) 0) #define PF_SEEK_SET (0) #define PF_SEEK_CUR (1) diff -Nurw csrc.orig/pf_main.c csrc/pf_main.c --- csrc.orig/pf_main.c 2008-07-21 04:58:11.000000000 +0200 +++ csrc/pf_main.c 2010-02-15 04:14:18.000000000 +0100 @@ -20,6 +20,8 @@ ** ***************************************************************/ +#include + #if (defined(PF_NO_STDIO) || defined(PF_EMBEDDED)) #define NULL ((void *) 0) #define ERR(msg) /* { printf msg; } */ @@ -55,7 +57,7 @@ } #else -int main( int argc, char **argv ) +void _main( void ) { #ifdef PF_STATIC_DIC const char *DicName = NULL; @@ -65,19 +67,23 @@ const char *SourceName = NULL; char IfInit = FALSE; - char *s; + const char *s; int32 i; int Result; + int argc = ArgCount(); + /* For Metroworks on Mac */ #ifdef __MWERKS__ argc = ccommand(&argv); #endif /* Parse command line. */ - for( i=1; i