--- gforth/engine/engine.c 1998/03/21 21:37:50 1.2 +++ gforth/engine/engine.c 2000/05/16 09:51:21 1.16 @@ -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) @@ -73,6 +80,12 @@ int emitcounter; #endif #define NULLC '\0' +#ifdef MEMCMP_AS_SUBROUTINE +extern int gforth_memcmp(const char * s1, const char * s2, size_t n); +#define memcmp(s1,s2,n) gforth_memcmp(s1,s2,n) +#endif + +#ifdef HAS_FILE char *cstr(Char *from, UCell size, int clear) /* return a C-string corresponding to the Forth string ( FROM SIZE ). the C-string lives until the next call of cstr with CLEAR being true */ @@ -124,6 +137,8 @@ char *tilde_cstr(Char *from, UCell size, UCell i; for (i=1; i