--- gforth/Attic/engine.c 1994/09/28 17:02:46 1.17 +++ gforth/Attic/engine.c 1995/01/10 18:57:42 1.22 @@ -1,5 +1,4 @@ /* - $Id: engine.c,v 1.17 1994/09/28 17:02:46 anton Exp $ Copyright 1992 by the ANSI figForth Development Group */ @@ -14,12 +13,18 @@ #include #include #include +#include #include "forth.h" #include "io.h" +#ifndef SEEK_SET +/* should be defined in stdio.h, but some systems don't have it */ +#define SEEK_SET 0 +#endif + typedef union { struct { -#ifdef BIG_ENDIAN +#ifdef WORDS_BIGENDIAN Cell high; Cell low; #else @@ -118,6 +123,9 @@ char *cstr(Char *from, UCell size, int c #define NEWLINE '\n' +#ifndef HAVE_RINT +#define rint(x) floor((x)+0.5) +#endif static char* fileattr[6]={"r","rb","r+","r+b","w+","w+b"}; @@ -182,7 +190,8 @@ Label *engine(Xt *ip0, Cell *sp0, Cell * #ifdef DEBUG fprintf(stderr,"ip=%x, sp=%x, rp=%x, fp=%x, lp=%x, up=%x\n", - ip,sp,rp,fp,lp,up); + (unsigned)ip,(unsigned)sp,(unsigned)rp, + (unsigned)fp,(unsigned)lp,(unsigned)up); #endif if (ip == NULL)