Annotation of OpenXM_contrib2/asir2000/builtin/result.c, Revision 1.1.1.1
1.1 noro 1: /* $OpenXM: OpenXM/src/asir99/builtin/result.c,v 1.1.1.1 1999/11/10 08:12:26 noro Exp $ */
2: #include "ca.h"
3: #include "parse.h"
4:
5: void Presult(), Psrcr();
6:
7: struct ftab result_tab[] = {
8: {"res",Presult,-4},
9: {"srcr",Psrcr,3},
10: {0,0,0},
11: };
12:
13: void Presult(arg,rp)
14: NODE arg;
15: P *rp;
16: {
17: int mod;
18: P p1,p2,r;
19:
20: asir_assert(ARG0(arg),O_P,"res");
21: asir_assert(ARG1(arg),O_P,"res");
22: asir_assert(ARG2(arg),O_P,"res");
23: if ( argc(arg) == 3 )
24: resultp(CO,VR((P)ARG0(arg)),(P)ARG1(arg),(P)ARG2(arg),rp);
25: else {
26: mod = QTOS((Q)ARG3(arg));
27: ptomp(mod,(P)ARG1(arg),&p1); ptomp(mod,(P)ARG2(arg),&p2);
28: resultmp(CO,mod,VR((P)ARG0(arg)),p1,p2,&r);
29: mptop(r,rp);
30: }
31: }
32:
33: void Psrcr(arg,rp)
34: NODE arg;
35: P *rp;
36: {
37: asir_assert(ARG0(arg),O_P,"srcr");
38: asir_assert(ARG1(arg),O_P,"srcr");
39: asir_assert(ARG2(arg),O_P,"srcr");
40: res_ch_det(CO,VR((P)ARG0(arg)),(P)ARG1(arg),(P)ARG2(arg),rp);
41: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>