| 9 |
|
#include <stdlib.h> |
| 10 |
|
#include <string.h> |
| 11 |
|
#include <fcntl.h> |
| 12 |
+ |
#include "platform.h" |
| 13 |
|
#include "resolu.h" |
| 14 |
< |
#include "rtprocess.h" |
| 14 |
> |
#include "paths.h" |
| 15 |
|
#include "rmatrix.h" |
| 16 |
|
|
| 17 |
|
static char rmx_mismatch_warn[] = "WARNING: data type mismatch\n"; |
| 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 { |
| 215 |
|
return(NULL); |
| 216 |
|
dnew = rmx_from_cmatrix(cm); |
| 217 |
|
cm_free(cm); |
| 218 |
+ |
dnew->dtype = DTascii; |
| 219 |
|
return(dnew); |
| 220 |
|
} |
| 221 |
|
/* else open it ourselves */ |
| 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)) |