| 59 |
|
return 0; |
| 60 |
|
} |
| 61 |
|
} |
| 62 |
+ |
if (dcp->format == 'a') |
| 63 |
+ |
SET_FILE_TEXT(dcp->finp); |
| 64 |
|
|
| 65 |
|
do { |
| 66 |
|
int ok = 0; |
| 258 |
|
} |
| 259 |
|
if (!check_decode_worldpos(dcp)) |
| 260 |
|
return 0; |
| 261 |
< |
|
| 261 |
> |
|
| 262 |
|
while (scanf("%d %d", &xy[0], &xy[1]) == 2) { |
| 263 |
|
loc2pix(xy, &dcp->res, |
| 264 |
|
(xy[0]+.5)/dcp->res.xr, (xy[1]+.5)/dcp->res.yr); |
| 418 |
|
fputs(": cannot open for writing\n", stderr); |
| 419 |
|
return 1; |
| 420 |
|
} |
| 421 |
< |
SET_FILE_BINARY(dc.finp); |
| 422 |
< |
if ((conversion != CV_FWD) | (dc.format != 'a')) |
| 421 |
< |
SET_FILE_BINARY(stdout); |
| 421 |
> |
SET_FILE_BINARY(dc.finp); /* starting assumption */ |
| 422 |
> |
SET_FILE_BINARY(stdout); |
| 423 |
|
#ifdef getc_unlocked /* avoid stupid semaphores */ |
| 424 |
|
flockfile(dc.finp); |
| 425 |
|
flockfile(stdout); |
| 427 |
|
/* read/copy header */ |
| 428 |
|
if (!process_dc_header(&dc, a, argv)) |
| 429 |
|
return 1; |
| 430 |
+ |
|
| 431 |
+ |
if ((conversion != CV_FWD) & (dc.format == 'a')) |
| 432 |
+ |
SET_FILE_TEXT(stdout); |
| 433 |
|
/* process data */ |
| 434 |
|
switch (conversion) { |
| 435 |
|
case CV_FWD: /* distance -> depth code */ |