Diff for /gforth/engine/main.c between versions 1.206 and 1.207

version 1.206, 2008/05/04 17:04:58 version 1.207, 2008/07/03 12:29:05
Line 62  typedef enum prim_num { Line 62  typedef enum prim_num {
 Cell *gforth_SP;  Cell *gforth_SP;
 Float *gforth_FP;  Float *gforth_FP;
 Address gforth_UP=NULL;  Address gforth_UP=NULL;
   
 #ifdef HAS_FFCALL  
 Cell *gforth_RP;  Cell *gforth_RP;
 Address gforth_LP;  Address gforth_LP;
   
   #ifdef HAS_FFCALL
   
 #include <callback.h>  #include <callback.h>
   
 va_alist gforth_clist;  va_alist gforth_clist;
Line 93  void gforth_callback(Xt* fcall, void * a Line 93  void gforth_callback(Xt* fcall, void * a
 }  }
 #endif  #endif
   
 #ifdef HAS_LIBFFI  
 Cell *gforth_RP;  
 Address gforth_LP;  
   
 #include <ffi.h>  
   
 void ** gforth_clist;  
 void * gforth_ritem;  
   
 void gforth_callback(ffi_cif * cif, void * resp, void ** args, void * ip)  
 {  
   Cell *rp1 = gforth_RP;  
   Cell *sp = gforth_SP;  
   Float *fp = gforth_FP;  
   Address lp = gforth_LP;  
   void ** clist = gforth_clist;  
   void * ritem = gforth_ritem;  
   
   gforth_clist = args;  
   gforth_ritem = resp;  
   
   gforth_engine((Xt *)ip, sp, rp1, fp, lp sr_call);  
   
   /* restore global variables */  
   gforth_RP = rp1;  
   gforth_SP = sp;  
   gforth_FP = fp;  
   gforth_LP = lp;  
   gforth_clist = clist;  
   gforth_ritem = ritem;  
 }  
 #endif  
   
 #ifdef GFORTH_DEBUGGING  #ifdef GFORTH_DEBUGGING
 /* define some VM registers as global variables, so they survive exceptions;  /* define some VM registers as global variables, so they survive exceptions;
    global register variables are not up to the task (according to the      global register variables are not up to the task (according to the 
Line 2217  SIZE arguments consist of an integer fol Line 2184  SIZE arguments consist of an integer fol
 static void print_diag()  static void print_diag()
 {  {
   
 #if !defined(HAVE_GETRUSAGE) || (!defined(HAS_FFCALL) && !defined(HAS_LIBFFI))  #if !defined(HAVE_GETRUSAGE)
   fprintf(stderr, "*** missing functionality ***\n"    fprintf(stderr, "*** missing functionality ***\n"
 #ifndef HAVE_GETRUSAGE  #ifndef HAVE_GETRUSAGE
           "    no getrusage -> CPUTIME broken\n"            "    no getrusage -> CPUTIME broken\n"
 #endif  #endif
 #if !defined(HAS_FFCALL) && !defined(HAS_LIBFFI)  
           "    no ffcall -> only old-style foreign function calls (no fflib.fs)\n"  
 #endif  
           );            );
 #endif  #endif
   if((relocs < nonrelocs) ||    if((relocs < nonrelocs) ||

Removed from v.1.206  
changed lines
  Added in v.1.207


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