| 813 |
|
*cp = '\0'; |
| 814 |
|
printheader(sop->ofp, info); |
| 815 |
|
} |
| 816 |
+ |
if (!accumulate) { /* global res. for -c- */ |
| 817 |
+ |
sop->xr = xres; sop->yr = yres; |
| 818 |
+ |
} |
| 819 |
|
printresolu(sop->ofp, sop->xr, sop->yr); |
| 820 |
|
/* play catch-up */ |
| 821 |
|
for (i = accumulate ? 0 : lastdone; i--; ) { |
| 1286 |
|
} |
| 1287 |
|
if ((sout.xr > 0) & (sout.yr > 0) && |
| 1288 |
|
(!fscnresolu(&xr, &yr, sout.ofp) || |
| 1289 |
< |
xr != sout.xr || |
| 1290 |
< |
yr != sout.yr)) { |
| 1289 |
> |
(xr != sout.xr) | |
| 1290 |
> |
(yr != sout.yr))) { |
| 1291 |
|
sprintf(errmsg, "resolution mismatch for '%s'", |
| 1292 |
|
oname); |
| 1293 |
|
error(USER, errmsg); |
| 1294 |
|
} |
| 1295 |
|
} |
| 1293 |
– |
if (oent->key == NULL) /* new file entry */ |
| 1294 |
– |
oent->key = strcpy((char *) |
| 1295 |
– |
malloc(strlen(oname)+1), oname); |
| 1296 |
– |
if (oent->data == NULL) |
| 1297 |
– |
oent->data = (char *)malloc(sizeof(STREAMOUT)); |
| 1298 |
– |
*(STREAMOUT *)oent->data = sout; |
| 1296 |
|
/* read in RGB value */ |
| 1297 |
|
if (!get_contrib(rgbv, sout.ofp)) { |
| 1298 |
< |
if (!j) |
| 1298 |
> |
if (!j) { |
| 1299 |
> |
fclose(sout.ofp); |
| 1300 |
|
break; /* ignore empty file */ |
| 1301 |
< |
if (j && j < mp->nbins) { |
| 1301 |
> |
} |
| 1302 |
> |
if (j < mp->nbins) { |
| 1303 |
|
sprintf(errmsg, "missing data in '%s'", |
| 1304 |
|
oname); |
| 1305 |
|
error(USER, errmsg); |
| 1309 |
|
if (j >= mp->nbins) /* grow modifier size */ |
| 1310 |
|
ment->data = (char *)(mp = growmodifier(mp, j+1)); |
| 1311 |
|
copycolor(mp->cbin[j], rgbv); |
| 1312 |
+ |
if (oent->key == NULL) /* new file entry */ |
| 1313 |
+ |
oent->key = strcpy((char *) |
| 1314 |
+ |
malloc(strlen(oname)+1), oname); |
| 1315 |
+ |
if (oent->data == NULL) |
| 1316 |
+ |
oent->data = (char *)malloc(sizeof(STREAMOUT)); |
| 1317 |
+ |
*(STREAMOUT *)oent->data = sout; |
| 1318 |
|
} |
| 1319 |
|
} |
| 1320 |
|
lu_doall(&ofiletab, myclose, NULL); /* close all files */ |
| 1390 |
|
} else { |
| 1391 |
|
sout.reclen = 0; |
| 1392 |
|
sout.outpipe = 0; |
| 1388 |
– |
sout.xr = xres; sout.yr = yres; |
| 1393 |
|
sout.ofp = NULL; |
| 1394 |
|
} |
| 1395 |
|
if (sout.ofp != NULL) { /* already open? */ |
| 1430 |
|
oname); |
| 1431 |
|
error(USER, errmsg); |
| 1432 |
|
} |
| 1433 |
< |
if ((xres > 0) & (yres > 0) && |
| 1433 |
> |
sout.xr = xres; sout.yr = yres; |
| 1434 |
> |
if ((sout.xr > 0) & (sout.yr > 0) && |
| 1435 |
|
(!fscnresolu(&xr, &yr, sout.ofp) || |
| 1436 |
< |
xr != xres || |
| 1437 |
< |
yr != yres)) { |
| 1436 |
> |
(xr != sout.xr) | |
| 1437 |
> |
(yr != sout.yr))) { |
| 1438 |
|
sprintf(errmsg, "resolution mismatch for '%s'", |
| 1439 |
|
oname); |
| 1440 |
|
error(USER, errmsg); |