--- ray/src/rt/data.c 2003/07/21 22:30:19 2.23 +++ ray/src/rt/data.c 2004/01/02 11:43:42 2.26 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: data.c,v 2.23 2003/07/21 22:30:19 schorsch Exp $"; +static const char RCSid[] = "$Id: data.c,v 2.26 2004/01/02 11:43:42 schorsch Exp $"; #endif /* * data.c - routines dealing with interpolated data. @@ -9,8 +9,8 @@ static const char RCSid[] = "$Id: data.c,v 2.23 2003/0 #include -#include "standard.h" #include "platform.h" +#include "standard.h" #include "color.h" #include "resolu.h" #include "data.h" @@ -33,7 +33,9 @@ static const char RCSid[] = "$Id: data.c,v 2.23 2003/0 static DATARRAY *dtab[TABSIZ]; /* data array list */ +static gethfunc headaspect; + DATARRAY * getdata(dname) /* get data array dname */ char *dname; @@ -78,7 +80,7 @@ char *dname; /* get dimensions */ if (fgetval(fp, 'i', (char *)&asize) <= 0) goto scanerr; - if (asize <= 0 | asize > MAXDDIM) { + if ((asize <= 0) | (asize > MAXDDIM)) { sprintf(errmsg, "bad number of dimensions for \"%s\"", dname); error(USER, errmsg); } @@ -138,16 +140,17 @@ scanerr: static int -headaspect(s, iap) /* check string for aspect ratio */ -char *s; -double *iap; +headaspect( /* check string for aspect ratio */ + char *s, + void *iap +) { char fmt[32]; if (isaspect(s)) - *iap *= aspectval(s); + *(double*)iap *= aspectval(s); else if (formatval(fmt, s) && !globmatch(PICFMT, fmt)) - *iap = 0.0; + *(double*)iap = 0.0; return(0); } @@ -187,7 +190,7 @@ char *pname; SET_FILE_BINARY(fp); /* get dimensions */ inpaspect = 1.0; - getheader(fp, headaspect, (char *)&inpaspect); + getheader(fp, headaspect, &inpaspect); if (inpaspect <= FTINY || !fgetsresolu(&inpres, fp)) goto readerr; pp[0].nd = 2; @@ -267,7 +270,7 @@ DATARRAY *dta; head.next = dtab[hval]; dpl = &head; while ((dp = dpl->next) != NULL) - if ((dta == NULL | dta == dp)) { + if ((dta == NULL) | (dta == dp)) { dpl->next = dp->next; if (dp->type == DATATY) free((void *)dp->arr.d);