ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/rmatrix.c
(Generate patch)

Comparing ray/src/util/rmatrix.c (file contents):
Revision 2.35 by greg, Wed Aug 14 18:20:02 2019 UTC vs.
Revision 2.39 by greg, Sat Dec 28 18:05:14 2019 UTC

# Line 5 | Line 5 | static const char RCSid[] = "$Id$";
5   * General matrix operations.
6   */
7  
8 #include <stdio.h>
8   #include <stdlib.h>
10 #include <string.h>
11 #include <fcntl.h>
9   #include <errno.h>
10   #include "rtio.h"
11   #include "platform.h"
# Line 32 | Line 29 | rmx_alloc(int nr, int nc, int n)
29                  return(NULL);
30          dnew->nrows = nr; dnew->ncols = nc; dnew->ncomp = n;
31          dnew->dtype = DTdouble;
32 +        dnew->swapin = 0;
33          dnew->info = NULL;
34          return(dnew);
35   }
# Line 201 | Line 199 | rmx_load(const char *inspec)
199          } else if (inspec[0] == '!') {
200                  if (!(fp = popen(inspec+1, "r")))
201                          return(NULL);
202 <                SET_FILE_BINARY(stdin);
202 >                SET_FILE_BINARY(fp);
203          } else {
204                  const char      *sp = inspec;   /* check suffix */
205                  while (*sp)
# Line 253 | Line 251 | rmx_load(const char *inspec)
251          dnew->info = dinfo.info;
252          switch (dinfo.dtype) {
253          case DTascii:
254 <                SET_FILE_TEXT(stdin);
254 >                SET_FILE_TEXT(fp);
255                  if (!rmx_load_ascii(dnew, fp))
256                          goto loaderr;
257                  dnew->dtype = DTascii;          /* should leave double? */
# Line 654 | Line 652 | rmx_transform(const RMATRIX *msrc, int n, const double
652                  return(NULL);
653          if (msrc->info) {
654                  char    buf[128];
655 <                sprintf(buf, "Applied %dx%d matrix transform\n",
655 >                sprintf(buf, "Applied %dx%d component transform\n",
656                                  dnew->ncomp, msrc->ncomp);
657                  rmx_addinfo(dnew, msrc->info);
658                  rmx_addinfo(dnew, buf);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines