[BACK]Return to compobj.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / builtin

Annotation of OpenXM_contrib2/asir2000/builtin/compobj.c, Revision 1.1.1.1

1.1       noro        1: /* $OpenXM: OpenXM/src/asir99/builtin/compobj.c,v 1.1.1.1 1999/11/10 08:12:25 noro Exp $ */
                      2: #include "ca.h"
                      3: #include "parse.h"
                      4: #include "comp.h"
                      5:
                      6: void Parfreg();
                      7:
                      8: struct ftab comp_tab[] = {
                      9:        {"arfreg",Parfreg,8},
                     10:        {0,0,0},
                     11: };
                     12:
                     13: void Parfreg(arg,rp)
                     14: NODE arg;
                     15: Q *rp;
                     16: {
                     17:        char *name;
                     18:        P t;
                     19:        SDEF s;
                     20:        int i;
                     21:
                     22:        asir_assert(ARG0(arg),O_STR,"arfreg");
                     23:        name = ((STRING)ARG0(arg))->body;
                     24:        for ( s = LSS->sa, i = 0; i < LSS->n; i++ )
                     25:                if ( !strcmp(s[i].name,name) )
                     26:                        break;
                     27:        if ( i == LSS->n )
                     28:                error("argreg : no such structure");
                     29:
                     30:        t = (P)ARG1(arg); s[i].arf.add = !t ? 0 : (FUNC)VR(t)->priv;
                     31:        t = (P)ARG2(arg); s[i].arf.sub = !t ? 0 : (FUNC)VR(t)->priv;
                     32:        t = (P)ARG3(arg); s[i].arf.mul = !t ? 0 : (FUNC)VR(t)->priv;
                     33:        t = (P)ARG4(arg); s[i].arf.div = !t ? 0 : (FUNC)VR(t)->priv;
                     34:        t = (P)ARG5(arg); s[i].arf.pwr = !t ? 0 : (FUNC)VR(t)->priv;
                     35:        t = (P)ARG6(arg); s[i].arf.chsgn = !t ? 0 : (FUNC)VR(t)->priv;
                     36:        t = (P)ARG7(arg); s[i].arf.comp = !t ? 0 : (FUNC)VR(t)->priv;
                     37:        *rp = ONE;
                     38: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>