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.21 by greg, Thu Aug 18 00:52:48 2016 UTC vs.
Revision 2.22 by greg, Thu Aug 18 17:57:57 2016 UTC

# Line 195 | Line 195 | rmx_load(const char *inspec)
195  
196          if (inspec == NULL) {                   /* reading from stdin? */
197                  inspec = "<stdin>";
198 < #if defined(_WIN32) || defined(_WIN64)
199 <                _setmode(fileno(stdin), _O_BINARY);
200 < #endif
198 >                SET_FILE_BINARY(stdin);
199          } else if (inspec[0] == '!') {
200                  if ((fp = popen(inspec+1, "r")) == NULL)
201                          return(NULL);
202 < #if defined(_WIN32) || defined(_WIN64)
205 <                _setmode(fileno(fp), _O_BINARY);
206 < #endif
202 >                SET_FILE_BINARY(stdin);
203          } else {
204                  const char      *sp = inspec;   /* check suffix */
205                  while (*sp)
# Line 254 | Line 250 | rmx_load(const char *inspec)
250          dnew->info = dinfo.info;
251          switch (dinfo.dtype) {
252          case DTascii:
253 < #if defined(_WIN32) || defined(_WIN64)
258 <                _setmode(fileno(fp), _O_TEXT);
259 < #endif
253 >                SET_FILE_TEXT(stdin);
254                  if (!rmx_load_ascii(dnew, fp))
255                          goto loaderr;
256                  dnew->dtype = DTascii;          /* should leave double? */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines