--- gforth/engine/engine.c 2011/11/16 20:36:13 1.115 +++ gforth/engine/engine.c 2012/07/15 12:03:07 1.119 @@ -1,6 +1,6 @@ /* Gforth virtual machine (aka inner interpreter) - Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2010 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2010,2011 Free Software Foundation, Inc. This file is part of Gforth. @@ -89,7 +89,13 @@ #ifdef MEMCMP_AS_SUBROUTINE extern int gforth_memcmp(const char * s1, const char * s2, size_t n); +extern Char *gforth_memmove(Char * dest, const Char* src, Cell n); +extern Char *gforth_memset(Char * s, Cell c, UCell n); +extern Char *gforth_memcpy(Char * dest, const Char* src, Cell n); #define memcmp(s1,s2,n) gforth_memcmp(s1,s2,n) +#define memmove(a,b,c) gforth_memmove(a,b,c) +#define memset(a,b,c) gforth_memset(a,b,c) +#define memcpy(a,b,c) gforth_memcpy(a,b,c) #endif #define NEWLINE '\n' @@ -202,6 +208,9 @@ extern int gforth_memcmp(const char * s1 #ifndef FTOSREG #define FTOSREG #endif +#ifndef OPREG +#define OPREG +#endif #ifndef CPU_DEP1 # define CPU_DEP1 0 @@ -263,11 +272,11 @@ extern int gforth_memcmp(const char * s1 #endif #ifdef STANDALONE -jmp_buf throw_jmp_buf; +jmp_buf * throw_jmp_handler; void throw(int code) { - longjmp(throw_jmp_buf,code); /* !! or use siglongjmp ? */ + longjmp(*throw_jmp_handler,code); /* !! or use siglongjmp ? */ } #endif @@ -331,6 +340,9 @@ Label *gforth_engine(Xt *ip0, Cell *sp0, register Address lp LPREG = lp0; register Xt cfa CFAREG; register Label real_ca CAREG; +#ifdef HAS_OBJECTS + register Char * op OPREG = NULL; +#endif #ifdef MORE_VARS MORE_VARS #endif