--- gforth/Attic/forth.h 1996/05/23 15:13:08 1.22 +++ gforth/Attic/forth.h 1996/12/28 17:19:24 1.27 @@ -21,6 +21,9 @@ #include "config.h" #include +#if defined(NeXT) +# include +#endif /* NeXT */ typedef void *Label; @@ -131,9 +134,10 @@ typedef Label *Xt; #define PFA1(cfa) PFA(cfa) /* CODE_ADDRESS is the address of the code jumped to through the code field */ #define CODE_ADDRESS(cfa) (*(Label *)(cfa)) - /* DOES_CODE is the Forth code does jumps to */ -#define DOES_CODE(cfa) (cfa[1]) -#define DOES_CODE1(cfa) DOES_CODE(cfa) +/* DOES_CODE is the Forth code does jumps to */ +#define DOES_CODE(cfa) ({Xt _cfa=(Xt)(cfa); \ + _cfa[0] == symbols[DODOES] ? _cfa[1] : NULL;}) +#define DOES_CODE1(cfa) (cfa[1]) /* MAKE_CF creates an appropriate code field at the cfa; ca is the code address */ #define MAKE_CF(cfa,ca) ((*(Label *)(cfa)) = ((Label)ca)) @@ -166,6 +170,20 @@ typedef Label *Xt; #define CACHE_FLUSH(addr,size) #endif +#ifdef USE_TOS +#define IF_TOS(x) x +#else +#define IF_TOS(x) +#define TOS (sp[0]) +#endif + +#ifdef USE_FTOS +#define IF_FTOS(x) x +#else +#define IF_FTOS(x) +#define FTOS (fp[0]) +#endif + Label *engine(Xt *ip, Cell *sp, Cell *rp, Float *fp, Address lp); /* dblsub routines */