| 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 |
|
|
| 1048 |
|
} |
| 1049 |
|
po = addarg(po, "-pt .04"); |
| 1050 |
|
if (vbool(PENUMBRAS)) |
| 1051 |
< |
op = addarg(op, "-ds .1 -dj .7"); |
| 1051 |
> |
op = addarg(op, "-ds .1 -dj .65"); |
| 1052 |
|
else |
| 1053 |
|
op = addarg(op, "-ds .2"); |
| 1054 |
|
op = addarg(op, "-dt .05 -dc .75 -dr 3 -sj 1 -st .01"); |
| 1499 |
|
unlink(picfile); |
| 1500 |
|
exit(1); |
| 1501 |
|
} |
| 1502 |
< |
/* remove raw file */ |
| 1503 |
< |
rmfile(rawfile); |
| 1502 |
> |
/* remove/rename raw file */ |
| 1503 |
> |
if (vbool(RAWSAVE)) { |
| 1504 |
> |
sprintf(combuf, "%s_%s.rwp", vval(PICTURE), vs); |
| 1505 |
> |
mvfile(rawfile, combuf); |
| 1506 |
> |
} else |
| 1507 |
> |
rmfile(rawfile); |
| 1508 |
|
} |
| 1509 |
|
} |
| 1510 |
|
|
| 1549 |
|
if (noaction) |
| 1550 |
|
return(0); |
| 1551 |
|
return(unlink(fn)); |
| 1552 |
+ |
} |
| 1553 |
+ |
|
| 1554 |
+ |
|
| 1555 |
+ |
mvfile(fold, fnew) /* move a file */ |
| 1556 |
+ |
char *fold, *fnew; |
| 1557 |
+ |
{ |
| 1558 |
+ |
if (!silent) |
| 1559 |
+ |
#ifdef MSDOS |
| 1560 |
+ |
printf("\trename %s %s\n", fold, fnew); |
| 1561 |
+ |
#else |
| 1562 |
+ |
printf("\tmv %s %s\n", fold, fnew); |
| 1563 |
+ |
#endif |
| 1564 |
+ |
if (noaction) |
| 1565 |
+ |
return(0); |
| 1566 |
+ |
return(rename(fold, fnew)); |
| 1567 |
|
} |
| 1568 |
|
|
| 1569 |
|
|