93 |
|
} |
94 |
|
/* flat file check */ |
95 |
|
if ((data_start = ftell(fp)) > 0 && fseek(fp, 0L, SEEK_END) == 0) { |
96 |
< |
flat_file = (ftell(fp) == data_start + sizeof(COLR)*xr*yr); |
96 |
> |
flat_file = (ftell(fp) >= data_start + sizeof(COLR)*xr*yr); |
97 |
|
if (fseek(fp, data_start, SEEK_SET) < 0) { |
98 |
|
sprintf(errmsg, "cannot seek on picture '%s'", fname); |
99 |
|
error(SYSTEM, errmsg); |
475 |
|
fprintf(ofp, "FRAME=%d\n", i); |
476 |
|
fprintf(ofp, "NROWS=%d\n", rvec->nrows); |
477 |
|
fputs("NCOLS=1\nNCOMP=3\n", ofp); |
478 |
< |
if ((outfmt == 'f') | (outfmt == 'd')) |
478 |
> |
if ((outfmt == DTfloat) | (outfmt == DTdouble)) |
479 |
|
fputendian(ofp); |
480 |
|
fputformat(cm_fmt_id[outfmt], ofp); |
481 |
|
fputc('\n', ofp); |
508 |
|
fprintf(ofp, "NCOLS=%d\n", rmtx->ncols); |
509 |
|
fputs("NCOMP=3\n", ofp); |
510 |
|
#endif /* DC_GLARE */ |
511 |
< |
if ((outfmt == 'f') | (outfmt == 'd')) |
511 |
> |
if ((outfmt == DTfloat) | (outfmt == DTdouble)) |
512 |
|
fputendian(ofp); |
513 |
|
fputformat(cm_fmt_id[outfmt], ofp); |
514 |
|
fputc('\n', ofp); |