Index: engine/main.c =================================================================== RCS file: /usr/local/lib/cvs-repository/src-master/gforth/engine/main.c,v retrieving revision 1.139 retrieving revision 1.140 diff -u -r1.139 -r1.140 --- engine/main.c.old 2004/01/20 19:07:41 1.139 +++ engine/main.c 2004/04/10 00:16:55 1.140 @@ -70,8 +70,21 @@ void engine_callback(Xt* fcall, void * alist) { + /* save global valiables */ + Cell *rp = RP; + Cell *sp = SP; + Float *fp = FP; + Address lp = LP; + clist = (va_alist)alist; - engine(fcall, SP, RP, FP, LP); + + engine(fcall, sp, rp, fp, lp); + + /* restore global variables */ + RP = rp; + SP = sp; + FP = fp; + LP = lp; } #endif