--- gforth/engine/engine.c 1998/10/25 23:15:47 1.4 +++ gforth/engine/engine.c 2000/07/01 20:48:53 1.19 @@ -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. @@ -38,6 +38,12 @@ #include #include #include +#include +#ifdef HAVE_FNMATCH_H +#include +#else +#include "fnmatch.h" +#endif #else #include "systypes.h" #endif @@ -45,6 +51,9 @@ #if defined(HAVE_LIBDL) || defined(HAVE_DLOPEN) /* what else? */ #include #endif +#if defined(_WIN32) +#include +#endif #ifdef hpux #include #endif @@ -77,6 +86,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 */ @@ -109,12 +124,6 @@ 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 */ { @@ -134,6 +143,8 @@ char *tilde_cstr(Char *from, UCell size, UCell i; for (i=1; i