--- ray/src/rt/func.c 1991/05/24 13:52:10 1.15 +++ ray/src/rt/func.c 1991/06/17 08:51:33 1.17 @@ -36,6 +36,10 @@ XF *bx; extern double l_arg(); extern long eclock; static char *initfile = "rayinit.cal"; + static long lastrno = -1; + /* check to see if already set */ + if (m == fobj && r->rno == lastrno) + return(0); /* initialize if first call */ if (initfile != NULL) { loadfunc(initfile); @@ -61,7 +65,9 @@ XF *bx; copystruct(&funcxf, &r->rox->b); else copystruct(&funcxf, bx); + lastrno = r->rno; eclock++; /* notify expression evaluator */ + return(1); } @@ -91,8 +97,7 @@ RAY *r; } m->os = (char *)mxf; } - setmap(m, r, mxf); - return; + return(setmap(m, r, mxf)); memerr: error(SYSTEM, "out of memory in setfunc"); }