summaryrefslogtreecommitdiff
blob: 28ab2e5f572fdb80fa7e02e409bd8925db77b523 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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