]> git.wh0rd.org Git - ICEs.git/blob - 157395/ice.i.2
initial import
[ICEs.git] / 157395 / ice.i.2
1 typedef struct num {
2         char is_fixnum;
3         union {
4                 long ivalue;
5         } value;
6 } num;
7 struct cell {
8         union {
9                 struct {
10                         struct cell *_car;
11                         struct cell *_cdr;
12                 } _cons;
13         } _object;
14 };
15 struct scheme {
16         struct cell * args;
17         struct cell * NIL;
18 };
19 num 
20 nvalue(struct cell * p)
21 {
22 }
23 num num_intdiv(num a, num b)
24 {
25         num ret;
26         if (ret.is_fixnum) {
27                 ret.value.ivalue = a.value.ivalue / b.value.ivalue;
28         }
29         return ret;
30 }
31 void opexe_2()
32 {
33 struct scheme * sc;
34         struct cell * x;
35         num v;
36         int op;
37         switch (op) {
38         case 0:
39                 x = ((sc->args)->_object._cons._car);
40                 for (; x != sc->NIL; x = ((x)->_object._cons._cdr)) {
41                         if (ivalue(((x)->_object._cons._car)) != 0)
42                                 v = num_intdiv(v,
43                                                nvalue(((x)->_object._cons.
44                                                        _car)));
45                 }
46         }
47 }
48 typedef struct {
49         char *name;
50 } op_code_info;
51 op_code_info dispatch_table[] = {
52          opexe_2 
53 };
54 void scheme_init_custom_alloc()
55 {
56         int i;
57         int n = 0;
58         for (i = 0; i < n; i++) {
59                 if (dispatch_table[i].name != 0) {
60                 }
61         }
62 }