--- ray/src/rt/data.c 2003/05/15 05:13:35 2.18 +++ ray/src/rt/data.c 2003/07/21 22:30:19 2.23 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: data.c,v 2.18 2003/05/15 05:13:35 greg Exp $"; +static const char RCSid[] = "$Id: data.c,v 2.23 2003/07/21 22:30:19 schorsch Exp $"; #endif /* * data.c - routines dealing with interpolated data. @@ -7,12 +7,12 @@ static const char RCSid[] = "$Id: data.c,v 2.18 2003/0 #include "copyright.h" -#include "standard.h" +#include +#include "standard.h" +#include "platform.h" #include "color.h" - #include "resolu.h" - #include "data.h" /* picture memory usage before warning */ @@ -162,7 +162,7 @@ char *pname; COLR *scanin; int sl, ns; RESOLU inpres; - FLOAT loc[2]; + RREAL loc[2]; int y; register int x, i; register DATARRAY *pp; @@ -184,9 +184,7 @@ char *pname; sprintf(errmsg, "cannot open picture file \"%s\"", pfname); error(SYSTEM, errmsg); } -#ifdef MSDOS - setmode(fileno(fp), O_BINARY); -#endif + SET_FILE_BINARY(fp); /* get dimensions */ inpaspect = 1.0; getheader(fp, headaspect, (char *)&inpaspect); @@ -236,8 +234,8 @@ char *pname; fclose(fp); i = hash(pname); pp[0].next = dtab[i]; /* link into picture list */ - copystruct(&pp[1], &pp[0]); - copystruct(&pp[2], &pp[0]); + pp[1] = pp[0]; + pp[2] = pp[0]; pp[0].type = RED; /* differentiate RGB records */ pp[1].type = GRN; pp[2].type = BLU;