version 1.18, 1994/10/03 18:24:01
|
version 1.22, 1995/01/10 18:57:42
|
Line 13
|
Line 13
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <time.h> |
#include <time.h> |
#include <sys/time.h> |
#include <sys/time.h> |
|
#include <unistd.h> |
#include "forth.h" |
#include "forth.h" |
#include "io.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 { |
typedef union { |
struct { |
struct { |
#ifdef BIG_ENDIAN |
#ifdef WORDS_BIGENDIAN |
Cell high; |
Cell high; |
Cell low; |
Cell low; |
#else |
#else |
Line 117 char *cstr(Char *from, UCell size, int c
|
Line 123 char *cstr(Char *from, UCell size, int c
|
|
|
#define NEWLINE '\n' |
#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"}; |
static char* fileattr[6]={"r","rb","r+","r+b","w+","w+b"}; |
|
|
Line 181 Label *engine(Xt *ip0, Cell *sp0, Cell *
|
Line 190 Label *engine(Xt *ip0, Cell *sp0, Cell *
|
|
|
#ifdef DEBUG |
#ifdef DEBUG |
fprintf(stderr,"ip=%x, sp=%x, rp=%x, fp=%x, lp=%x, up=%x\n", |
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 |
#endif |
|
|
if (ip == NULL) |
if (ip == NULL) |