--- ray/src/common/caldefn.c 1991/08/14 15:50:38 1.19 +++ ray/src/common/caldefn.c 1992/05/15 16:38:49 2.2 @@ -38,6 +38,8 @@ static char SCCSid[] = "$SunId$ LBL"; extern char *ecalloc(), *savestr(), *strcpy(); +static int hash(); + static double dvalue(); long eclock = -1; /* value storage timer */ @@ -333,7 +335,7 @@ varinsert(name) /* get a link to a variable */ char *name; { register VARDEF *vp; - LIBR *libp; + register LIBR *libp; int hv; if ((vp = varlookup(name)) != NULL) { @@ -357,6 +359,21 @@ char *name; hashtbl[hv] = vp; return(vp); } + + +#ifdef FUNCTION +libupdate(fn) /* update library links */ +char *fn; +{ + register int i; + register VARDEF *vp; + /* if fn is NULL then relink all */ + for (i = 0; i < NHASH; i++) + for (vp = hashtbl[i]; vp != NULL; vp = vp->next) + if (vp->lib != NULL || fn == NULL || !strcmp(fn, vp->name)) + vp->lib = liblookup(vp->name); +} +#endif varfree(ln) /* release link to variable */