Diff for /gforth/Attic/engine.c between versions 1.6 and 1.7

version 1.6, 1994/05/18 17:29:52 version 1.7, 1994/06/01 10:05:15
Line 14 Line 14
 #include <stdlib.h>  #include <stdlib.h>
 #include <time.h>  #include <time.h>
 #include <sys/time.h>  #include <sys/time.h>
   #include <sys/unistd.h>
 #include "forth.h"  #include "forth.h"
 #include "io.h"  #include "io.h"
   
 #ifndef unlink  
         extern unlink(char *);  
 #endif  
 #ifndef ftruncate  
         extern ftruncate(int, int);  
 #endif  
   
 typedef union {  typedef union {
   struct {    struct {
 #ifdef BIG_ENDIAN  #ifdef BIG_ENDIAN
Line 87  int emitcounter; Line 81  int emitcounter;
   
 static char* fileattr[6]={"r","rb","r+","r+b","w+","w+b"};  static char* fileattr[6]={"r","rb","r+","r+b","w+","w+b"};
   
 #if ~defined(select) && defined(DOS)  
 /* select replacement for DOS computers for ms only */  
 void select(int n, int a, int b, int c, struct timeval * timeout)  
 {  
    struct timeval time1;  
    struct timeval time2;  
    struct timezone zone1;  
   
    gettimeofday(&time1,&zone1);  
    time1.tv_sec += timeout->tv_sec;  
    time1.tv_usec += timeout->tv_usec;  
    while(time1.tv_usec >= 1000000)  
      {  
         time1.tv_usec -= 1000000;  
         time1.tv_sec++;  
      }  
    do  
      {  
         gettimeofday(&time2,&zone1);  
      }  
    while(time2.tv_usec < time1.tv_usec || time2.tv_sec < time1.tv_sec);  
 }  
 #endif  
   
 Label *engine(Xt *ip, Cell *sp, Cell *rp, Float *fp, Address lp)  Label *engine(Xt *ip, Cell *sp, Cell *rp, Float *fp, Address lp)
 /* executes code at ip, if ip!=NULL  /* executes code at ip, if ip!=NULL
    returns array of machine code labels (for use in a loader), if ip==NULL     returns array of machine code labels (for use in a loader), if ip==NULL

Removed from v.1.6  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>