--- gforth/engine/engine.c 2006/10/22 16:54:01 1.92 +++ gforth/engine/engine.c 2007/01/21 23:22:29 1.96 @@ -1,6 +1,6 @@ /* Gforth virtual machine (aka inner interpreter) - Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of Gforth. @@ -54,7 +54,7 @@ #include "fnmatch.h" #endif #else -#include "systypes.h" +/* #include */ #endif #if defined(HAVE_LIBDL) || defined(HAVE_DLOPEN) /* what else? */ @@ -97,14 +97,20 @@ extern int gforth_memcmp(const char * s1 #endif #define NEWLINE '\n' -#define CELL_MIN (((Cell)1)<<(sizeof(Cell)*CHAR_BIT-1)) -/* set CHECK_DIVISION to 0 if the hardware checks division by zero and - division overflow. Note that not all checks are controlled by - CHECK_DIVISION, in particular not overflow checks in mixed-size - words implemented by C's double-by-double division, because that - division does not signal such overflows. !! make an autoconf test - that sets CHECK_DIVISION */ + +/* These two flags control whether divisions are checked by software. + The CHECK_DIVISION_SW is for those cases where the event is a + division by zero or overflow on the C level, and might be reported + by hardware; we might check forr that in autoconf and set the + switch appropriately, but currently don't. The CHECK_DIVISION flag + is for the other cases. */ +#ifdef GFORTH_DEBUGGING +#define CHECK_DIVISION_SW 1 #define CHECK_DIVISION 1 +#else +#define CHECK_DIVISION_SW 0 +#define CHECK_DIVISION 0 +#endif /* conversion on fetch */