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.19 by greg, Tue Feb 2 18:02:32 2016 UTC vs.
Revision 2.20 by schorsch, Sun Mar 6 01:13:18 2016 UTC

# Line 9 | Line 9 | static const char RCSid[] = "$Id$";
9   #include <stdlib.h>
10   #include <string.h>
11   #include <fcntl.h>
12 + #include "platform.h"
13   #include "resolu.h"
14   #include "paths.h"
15   #include "rmatrix.h"
# Line 193 | Line 194 | rmx_load(const char *inspec)
194  
195          if (inspec == NULL) {                   /* reading from stdin? */
196                  inspec = "<stdin>";
197 < #ifdef _WIN32
197 > #if defined(_WIN32) || defined(_WIN64)
198                  _setmode(fileno(stdin), _O_BINARY);
199   #endif
200          } else if (inspec[0] == '!') {
201                  if ((fp = popen(inspec+1, "r")) == NULL)
202                          return(NULL);
203 < #ifdef _WIN32
203 > #if defined(_WIN32) || defined(_WIN64)
204                  _setmode(fileno(fp), _O_BINARY);
205   #endif
206          } else {
# Line 252 | Line 253 | rmx_load(const char *inspec)
253          dnew->info = dinfo.info;
254          switch (dinfo.dtype) {
255          case DTascii:
256 < #ifdef _WIN32
256 > #if defined(_WIN32) || defined(_WIN64)
257                  _setmode(fileno(fp), _O_TEXT);
258   #endif
259                  if (!rmx_load_ascii(dnew, fp))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines