49 |
|
#define PENUMBRAS 20 /* shadow penumbras are desired */ |
50 |
|
#define VARIABILITY 21 /* level of light variability */ |
51 |
|
#define REPORT 22 /* report frequency and errfile */ |
52 |
+ |
#define RAWSAVE 23 /* save raw picture file */ |
53 |
|
/* total number of variables */ |
54 |
< |
#define NVARS 23 |
54 |
> |
#define NVARS 24 |
55 |
|
|
56 |
|
VARIABLE vv[NVARS] = { /* variable-value pairs */ |
57 |
|
{"objects", 3, 0, NULL, catvalues}, |
77 |
|
{"PENUMBRAS", 3, 0, NULL, boolvalue}, |
78 |
|
{"VARIABILITY", 3, 0, NULL, qualvalue}, |
79 |
|
{"REPORT", 3, 0, NULL, onevalue}, |
80 |
+ |
{"RAWSAVE", 3, 0, NULL, boolvalue}, |
81 |
|
}; |
82 |
|
|
83 |
|
VARIABLE *matchvar(); |
649 |
|
vval(VARIABILITY) = "L"; |
650 |
|
vdef(VARIABILITY)++; |
651 |
|
} |
652 |
+ |
if (!vdef(RAWSAVE)) { |
653 |
+ |
vval(RAWSAVE) = "F"; |
654 |
+ |
vdef(RAWSAVE)++; |
655 |
+ |
} |
656 |
|
} |
657 |
|
|
658 |
|
|
1185 |
|
zpos = -1; vs++; |
1186 |
|
} |
1187 |
|
viewtype = 'v'; |
1188 |
< |
if (*vs == 'v' | *vs == 'l' | *vs == 'a' | *vs == 'h') |
1188 |
> |
if (*vs == 'v' | *vs == 'l' | *vs == 'a' | *vs == 'h' | *vs == 'c') |
1189 |
|
viewtype = *vs++; |
1190 |
|
cp = viewopts; |
1191 |
|
if ((!*vs || isspace(*vs)) && (xpos|ypos|zpos)) { /* got one! */ |
1240 |
|
case 'h': |
1241 |
|
cp = addarg(cp, "-vh 180 -vv 180"); |
1242 |
|
break; |
1243 |
+ |
case 'c': |
1244 |
+ |
cp = addarg(cp, "-vh 180 -vv 90"); |
1245 |
+ |
break; |
1246 |
|
} |
1247 |
|
} else { |
1248 |
|
while (!isspace(*vs)) /* else skip id */ |
1502 |
|
unlink(picfile); |
1503 |
|
exit(1); |
1504 |
|
} |
1505 |
< |
/* remove raw file */ |
1506 |
< |
rmfile(rawfile); |
1505 |
> |
/* remove/rename raw file */ |
1506 |
> |
if (vbool(RAWSAVE)) { |
1507 |
> |
sprintf(combuf, "%s_%s.rwp", vval(PICTURE), vs); |
1508 |
> |
mvfile(rawfile, combuf); |
1509 |
> |
} else |
1510 |
> |
rmfile(rawfile); |
1511 |
|
} |
1512 |
|
} |
1513 |
|
|
1552 |
|
if (noaction) |
1553 |
|
return(0); |
1554 |
|
return(unlink(fn)); |
1555 |
+ |
} |
1556 |
+ |
|
1557 |
+ |
|
1558 |
+ |
mvfile(fold, fnew) /* move a file */ |
1559 |
+ |
char *fold, *fnew; |
1560 |
+ |
{ |
1561 |
+ |
if (!silent) |
1562 |
+ |
#ifdef MSDOS |
1563 |
+ |
printf("\trename %s %s\n", fold, fnew); |
1564 |
+ |
#else |
1565 |
+ |
printf("\tmv %s %s\n", fold, fnew); |
1566 |
+ |
#endif |
1567 |
+ |
if (noaction) |
1568 |
+ |
return(0); |
1569 |
+ |
return(rename(fold, fnew)); |
1570 |
|
} |
1571 |
|
|
1572 |
|
|