| 45 |
|
long nexpected = (long)dcp->res.xr * dcp->res.yr; |
| 46 |
|
|
| 47 |
|
if (dcp->inpfmt[0]) { |
| 48 |
< |
if (strcasestr(dcp->inpfmt, "ascii") != NULL) |
| 48 |
> |
if (strstr(dcp->inpfmt, "ascii") != NULL) |
| 49 |
|
dcp->format = 'a'; |
| 50 |
< |
else if (strcasestr(dcp->inpfmt, "float") != NULL) |
| 50 |
> |
else if (strstr(dcp->inpfmt, "float") != NULL) |
| 51 |
|
dcp->format = 'f'; |
| 52 |
< |
else if (strcasestr(dcp->inpfmt, "double") != NULL) |
| 52 |
> |
else if (strstr(dcp->inpfmt, "double") != NULL) |
| 53 |
|
dcp->format = 'd'; |
| 54 |
|
else { |
| 55 |
|
fputs(dcp->inpname, stderr); |
| 71 |
|
break; |
| 72 |
|
case 'f': |
| 73 |
|
ok = (getbinary(&f, sizeof(f), 1, dcp->finp) == 1); |
| 74 |
+ |
if (dcp->swapped) |
| 75 |
+ |
swap32((char *)&f, 1); |
| 76 |
|
d = f; |
| 77 |
|
break; |
| 78 |
|
case 'd': |
| 79 |
|
ok = (getbinary(&d, sizeof(d), 1, dcp->finp) == 1); |
| 80 |
+ |
if (dcp->swapped) |
| 81 |
+ |
swap64((char *)&d, 1); |
| 82 |
|
break; |
| 83 |
|
} |
| 84 |
|
if (!ok) |