[gforth] / gforth / engine / forth.h  

gforth: gforth/engine/forth.h

Diff for /gforth/engine/forth.h between version 1.94 and 1.108

version 1.94, Tue Feb 12 20:28:51 2008 UTC version 1.108, Mon Apr 5 22:17:56 2010 UTC
Line 1 
Line 1 
 /* common header file  /* common header file
   
   Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007 Free Software Foundation, Inc.    Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
   
   This file is part of Gforth.    This file is part of Gforth.
   
Line 23 
Line 23 
 #include <stdio.h>  #include <stdio.h>
 #include <sys/time.h>  #include <sys/time.h>
 #include <unistd.h>  #include <unistd.h>
   #ifndef STANDALONE
   #if defined(HAVE_LIBLTDL)
 #include <ltdl.h>  #include <ltdl.h>
   #endif
   #endif
   
 #if !defined(FORCE_LL) && !defined(BUGGY_LONG_LONG)  #if !defined(FORCE_LL) && !defined(BUGGY_LONG_LONG)
 #define BUGGY_LONG_LONG  #define BUGGY_LONG_LONG
Line 97 
Line 101 
 #define DOVAL   6  #define DOVAL   6
 #define DODOES  7  #define DODOES  7
 #define DOESJUMP        8  #define DOESJUMP        8
   #define DOABICODE       9
   #define DOER_MAX        9
   
 /* the size of the DOESJUMP, which resides between DOES> and the does-code */  /* the size of the DOESJUMP, which resides between DOES> and the does-code */
 #define DOES_HANDLER_SIZE       (2*sizeof(Cell))  #define DOES_HANDLER_SIZE       (2*sizeof(Cell))
Line 167 
Line 173 
   
 /* shifts by less than CELL_BITS */  /* shifts by less than CELL_BITS */
 #define DLSHIFT(d,u)  ({DCell _d=(d); UCell _u=(u); \  #define DLSHIFT(d,u)  ({DCell _d=(d); UCell _u=(u); \
                        (DCell){(_d.hi<<_u)|(_d.lo>>(CELL_BITS-_u)),_d.lo<<_u};})                         ((_u==0) ? \
                           _d : \
                           (DCell){(_d.hi<<_u)|(_d.lo>>(CELL_BITS-_u)), \
                                    _d.lo<<_u});})
   
 #define UDLSHIFT(ud,u) D2UD(DLSHIFT(UD2D(ud),u))  #define UDLSHIFT(ud,u) D2UD(DLSHIFT(UD2D(ud),u))
   
 #if SMALL_OFF_T  #if SMALL_OFF_T
Line 328 
Line 338 
   char          name[0];    char          name[0];
 };  };
   
 #define LONGNAME_COUNT(np)      ((np)->countetc & (((~((UCell)0))<<3)>>3))  #define LONGNAME_COUNT(np)      ((np)->countetc & (((~((UCell)0))<<4)>>4))
   
 struct Cellpair {  struct Cellpair {
   Cell n1;    Cell n1;
Line 389 
Line 399 
 UCell hashkey1(Char *c_addr, UCell u, UCell ubits);  UCell hashkey1(Char *c_addr, UCell u, UCell ubits);
 struct Cellpair parse_white(Char *c_addr1, UCell u1);  struct Cellpair parse_white(Char *c_addr1, UCell u1);
 Cell rename_file(Char *c_addr1, UCell u1, Char *c_addr2, UCell u2);  Cell rename_file(Char *c_addr1, UCell u1, Char *c_addr2, UCell u2);
 struct Cellquad read_line(Char *c_addr, UCell u1, Cell wfileid);  struct Cellquad read_line(Char *c_addr, UCell u1, FILE *wfileid);
 struct Cellpair file_status(Char *c_addr, UCell u);  struct Cellpair file_status(Char *c_addr, UCell u);
 Cell to_float(Char *c_addr, UCell u, Float *r_p);  Cell to_float(Char *c_addr, UCell u, Float *r_p);
 Float v_star(Float *f_addr1, Cell nstride1, Float *f_addr2, Cell nstride2, UCell ucount);  Float v_star(Float *f_addr1, Cell nstride1, Float *f_addr2, Cell nstride2, UCell ucount);
Line 398 
Line 408 
 UCell rshift(UCell u1, UCell n);  UCell rshift(UCell u1, UCell n);
 int gforth_system(Char *c_addr, UCell u);  int gforth_system(Char *c_addr, UCell u);
 void gforth_ms(UCell u);  void gforth_ms(UCell u);
   UCell gforth_dlopen(Char *c_addr, UCell u);
 Cell capscompare(Char *c_addr1, UCell u1, Char *c_addr2, UCell u2);  Cell capscompare(Char *c_addr1, UCell u1, Char *c_addr2, UCell u2);
   int gf_ungetc(int c, FILE *stream);
   void gf_regetc(FILE *stream);
   int gf_ungottenc(FILE *stream);
   
 /* signal handler stuff */  /* signal handler stuff */
 void install_signal_handlers(void);  void install_signal_handlers(void);
Line 445 
Line 459 
 #endif  #endif
   
 extern Cell *gforth_SP;  extern Cell *gforth_SP;
   extern Cell *gforth_RP;
   extern Address gforth_LP;
 extern Float *gforth_FP;  extern Float *gforth_FP;
 extern Address gforth_UP;  extern Address gforth_UP;
   #ifndef HAS_LINKBACK
   extern void * gforth_pointers[];
   #endif
   
 #ifdef HAS_FFCALL  #ifdef HAS_FFCALL
 extern Cell *gforth_RP;  extern Cell *gforth_RP;
Line 454 
Line 473 
 extern void gforth_callback(Xt* fcall, void * alist);  extern void gforth_callback(Xt* fcall, void * alist);
 #endif  #endif
   
 #ifdef HAS_LIBFFI  
 extern Cell *gforth_RP;  
 extern Address gforth_LP;  
 #include <ffi.h>  
 extern void gforth_callback(ffi_cif * cif, void * resp, void ** args, void * ip);  
 #endif  
   
 #ifdef NO_IP  #ifdef NO_IP
 extern Label next_code;  extern Label next_code;
 #endif  #endif


Generate output suitable for use with a patch program
Legend:
Removed from v.1.94  
changed lines
  Added in v.1.108

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help