| 48 |
|
error(SYSTEM, errmsg); |
| 49 |
|
} |
| 50 |
|
dt = DTfromHeader; |
| 51 |
< |
if ((err = cm_getheader(&dt, NULL, NULL, fp)) != NULL) |
| 51 |
> |
if ((err = cm_getheader(&dt, NULL, NULL, NULL, fp)) != NULL) |
| 52 |
|
error(USER, err); |
| 53 |
|
if ((dt != DTrgbe) & (dt != DTxyze) || |
| 54 |
|
!fscnresolu(&xr, &yr, fp)) { |
| 187 |
|
case 'a': |
| 188 |
|
outfmt = DTascii; |
| 189 |
|
break; |
| 190 |
+ |
case 'c': |
| 191 |
+ |
outfmt = DTrgbe; |
| 192 |
+ |
break; |
| 193 |
|
default: |
| 194 |
|
goto userr; |
| 195 |
|
} |
| 302 |
|
fprintf(ofp, "FRAME=%d\n", i); |
| 303 |
|
fprintf(ofp, "NROWS=%d\n", rvec->nrows); |
| 304 |
|
fputs("NCOLS=1\nNCOMP=3\n", ofp); |
| 305 |
+ |
if ((outfmt == 'f') | (outfmt == 'd')) |
| 306 |
+ |
fputendian(ofp); |
| 307 |
|
fputformat((char *)cm_fmt_id[outfmt], ofp); |
| 308 |
|
fputc('\n', ofp); |
| 309 |
|
} |
| 330 |
|
fprintf(ofp, "NROWS=%d\n", rmtx->nrows); |
| 331 |
|
fprintf(ofp, "NCOLS=%d\n", rmtx->ncols); |
| 332 |
|
fputs("NCOMP=3\n", ofp); |
| 333 |
+ |
if ((outfmt == 'f') | (outfmt == 'd')) |
| 334 |
+ |
fputendian(ofp); |
| 335 |
|
fputformat((char *)cm_fmt_id[outfmt], ofp); |
| 336 |
|
fputc('\n', ofp); |
| 337 |
|
} |