--- ray/src/rt/data.c 2004/03/30 16:13:01 2.27 +++ ray/src/rt/data.c 2013/08/07 05:10:09 2.30 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: data.c,v 2.27 2004/03/30 16:13:01 schorsch Exp $"; +static const char RCSid[] = "$Id: data.c,v 2.30 2013/08/07 05:10:09 greg Exp $"; #endif /* * data.c - routines dealing with interpolated data. @@ -10,6 +10,7 @@ static const char RCSid[] = "$Id: data.c,v 2.27 2004/0 #include #include "platform.h" +#include "paths.h" #include "standard.h" #include "color.h" #include "resolu.h" @@ -19,9 +20,9 @@ static const char RCSid[] = "$Id: data.c,v 2.27 2004/0 /* picture memory usage before warning */ #ifndef PSIZWARN #ifdef SMLMEM -#define PSIZWARN 1500000 +#define PSIZWARN 3000000 #else -#define PSIZWARN 5000000 +#define PSIZWARN 10000000 #endif #endif @@ -44,7 +45,7 @@ getdata( /* get data array dname */ { char *dfname; FILE *fp; - int asize; + int asize=0; register int i, j; register DATARRAY *dp; /* look for array in list */ @@ -217,8 +218,8 @@ getpict( /* get picture pname */ i = ns*sl*sizeof(COLR); #if PSIZWARN if (i > PSIZWARN) { /* memory warning */ - sprintf(errmsg, "picture file \"%s\" using %d bytes of memory", - pname, i); + sprintf(errmsg, "picture file \"%s\" using %.1f MB of memory", + pname, i*(1.0/(1024*1024))); error(WARNING, errmsg); } #endif