--- gforth/engine/engine.c 1998/04/16 15:34:41 1.3 +++ gforth/engine/engine.c 1998/12/12 22:32:05 1.8 @@ -1,6 +1,6 @@ /* Gforth virtual machine (aka inner interpreter) - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc. This file is part of Gforth. @@ -24,23 +24,30 @@ #include #include #include +#include +#include +#include +#include "forth.h" +#include "io.h" +#include "threaded.h" +#ifndef STANDALONE #include #include #include -#include -#include #include #include #include -#include #include -#include "forth.h" -#include "io.h" -#include "threaded.h" +#else +#include "systypes.h" +#endif #if defined(HAVE_LIBDL) || defined(HAVE_DLOPEN) /* what else? */ #include #endif +#if defined(_WIN32) +#include +#endif #ifdef hpux #include #endif @@ -52,11 +59,11 @@ #define IOR(flag) ((flag)? -512-errno : 0) -typedef struct F83Name { - struct F83Name *next; /* the link field for old hands */ - char countetc; - Char name[0]; -} F83Name; +struct F83Name { + struct F83Name *next; /* the link field for old hands */ + char countetc; + char name[0]; +}; /* are macros for setting necessary? */ #define F83NAME_COUNT(np) ((np)->countetc & 0x1f) @@ -105,6 +112,12 @@ char *cstr(Char *from, UCell size, int c return b->buffer; } +#ifdef STANDALONE +char *tilde_cstr(Char *from, UCell size, int clear) +{ + return cstr(from, size, clear); +} +#else char *tilde_cstr(Char *from, UCell size, int clear) /* like cstr(), but perform tilde expansion on the string */ { @@ -146,7 +159,7 @@ char *tilde_cstr(Char *from, UCell size, return cstr(path,s1_len+s2_len,clear); } } - +#endif #define NEWLINE '\n' @@ -231,18 +244,18 @@ Label *engine(Xt *ip0, Cell *sp0, Cell * #else /* !defined(DOUBLY_INDIRECT) */ static Label symbols[]= { #endif /* !defined(DOUBLY_INDIRECT) */ - &&docol, - &&docon, - &&dovar, - &&douser, - &&dodefer, - &&dofield, - &&dodoes, + (Label)&&docol, + (Label)&&docon, + (Label)&&dovar, + (Label)&&douser, + (Label)&&dodefer, + (Label)&&dofield, + (Label)&&dodoes, /* the following entry is normally unused; it's there because its index indicates a does-handler */ CPU_DEP1, #include "prim_lab.i" - 0 + (Label)0 }; #ifdef CPU_DEP2 CPU_DEP2