static char *sccsid
= "@(#)eval2.c 34.1 10/3/80";
/* Iarray - handle array call.
* args - arguments to the array call , most likely subscripts.
* evalp - flag, if TRUE then the arguments should be evaluated when they
register lispval fun
,args
;
register lispval reg
, temp
;
register struct argent
*lbot
, *np
;
for ( ; args
!= nil
; args
= args
->d
.cdr
) /* stack subscripts */
if(evalp
) protect(eval(args
->d
.car
));
else protect(args
->d
.car
);
return(vtemp
= Lfuncal());
register struct argent
*mynp
;
register struct argent
*lbot
;
register struct argent
*np
;
arglist
= alloca((nargs
+ 1) * sizeof(int));
for(index
= 1; index
<= nargs
; index
++) {
switch(TYPE(ltemp
=mynp
->val
)) {
*(int *) arglist
[index
] = ltemp
->i
;
*(double *) arglist
[index
] = ltemp
->r
;
arglist
[index
] = (int) ltemp
;
arglist
[index
] = (int) ltemp
->ar
.data
;
arglist
[index
] = (int) ltemp
->bcd
.entry
;
error("foreign call: illegal argument ",FALSE
);
switch(((char *)a
->bcd
.discipline
)[0]) {
case 'i': /* integer-function */
ltemp
= inewint(callg(a
->bcd
.entry
,arglist
));
case 'r': /* real-function*/
ltemp
->r
= (* ((double (*)()) callg
))(a
->bcd
.entry
,arglist
);
ltemp
= (lispval
) callg(a
->bcd
.entry
,arglist
);
case 's': /* subroutine */
callg(a
->bcd
.entry
,arglist
);
asm(" callg *8(ap),*4(ap)");