1293 |
|
error(USER, errmsg); |
1294 |
|
} |
1295 |
|
} |
1296 |
– |
if (oent->key == NULL) /* new file entry */ |
1297 |
– |
oent->key = strcpy((char *) |
1298 |
– |
malloc(strlen(oname)+1), oname); |
1299 |
– |
if (oent->data == NULL) |
1300 |
– |
oent->data = (char *)malloc(sizeof(STREAMOUT)); |
1301 |
– |
*(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 |
+ |
} |
1302 |
|
if (j < mp->nbins) { |
1303 |
|
sprintf(errmsg, "missing data in '%s'", |
1304 |
|
oname); |
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; |
1391 |
– |
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); |