--- ray/src/util/rmatrix.c 2014/08/28 05:59:42 2.9 +++ ray/src/util/rmatrix.c 2014/12/16 20:21:46 2.11 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rmatrix.c,v 2.9 2014/08/28 05:59:42 greg Exp $"; +static const char RCSid[] = "$Id: rmatrix.c,v 2.11 2014/12/16 20:21:46 greg Exp $"; #endif /* * General matrix operations. @@ -246,6 +246,7 @@ rmx_load(const char *fname) case DTascii: if (!rmx_load_ascii(dnew, fp)) goto loaderr; + dnew->dtype = DTascii; /* should leave double? */ break; case DTfloat: if (!rmx_load_float(dnew, fp)) @@ -356,7 +357,7 @@ rmx_write_rgbe(const RMATRIX *rm, FILE *fp) } /* Write matrix to file type indicated by dtype */ -long +int rmx_write(const RMATRIX *rm, int dtype, FILE *fp) { RMATRIX *mydm = NULL; @@ -409,7 +410,7 @@ rmx_write(const RMATRIX *rm, int dtype, FILE *fp) } ok &= (fflush(fp) == 0); rmx_free(mydm); - return(ftell(fp) * ok); /* return # bytes written */ + return(ok); } /* Allocate and assign square identity matrix with n components */