| /* common header file |
/* common header file |
| |
|
| Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008 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. |
| |
|
| #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)) |
| |
|
| /* 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 |
| 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; |
| 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); |
| void gforth_ms(UCell u); |
void gforth_ms(UCell u); |
| UCell gforth_dlopen(Char *c_addr, 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); |