--- ray/src/util/rmatrix.c 2019/09/03 23:43:07 2.36 +++ ray/src/util/rmatrix.c 2019/12/28 18:05:14 2.39 @@ -1,14 +1,11 @@ #ifndef lint -static const char RCSid[] = "$Id: rmatrix.c,v 2.36 2019/09/03 23:43:07 greg Exp $"; +static const char RCSid[] = "$Id: rmatrix.c,v 2.39 2019/12/28 18:05:14 greg Exp $"; #endif /* * General matrix operations. */ -#include #include -#include -#include #include #include "rtio.h" #include "platform.h" @@ -202,7 +199,7 @@ rmx_load(const char *inspec) } else if (inspec[0] == '!') { if (!(fp = popen(inspec+1, "r"))) return(NULL); - SET_FILE_BINARY(stdin); + SET_FILE_BINARY(fp); } else { const char *sp = inspec; /* check suffix */ while (*sp) @@ -254,7 +251,7 @@ rmx_load(const char *inspec) dnew->info = dinfo.info; switch (dinfo.dtype) { case DTascii: - SET_FILE_TEXT(stdin); + SET_FILE_TEXT(fp); if (!rmx_load_ascii(dnew, fp)) goto loaderr; dnew->dtype = DTascii; /* should leave double? */ @@ -655,7 +652,7 @@ rmx_transform(const RMATRIX *msrc, int n, const double return(NULL); if (msrc->info) { char buf[128]; - sprintf(buf, "Applied %dx%d matrix transform\n", + sprintf(buf, "Applied %dx%d component transform\n", dnew->ncomp, msrc->ncomp); rmx_addinfo(dnew, msrc->info); rmx_addinfo(dnew, buf);