15 |
|
#ifdef BSD |
16 |
|
#include <sys/time.h> |
17 |
|
#include <sys/resource.h> |
18 |
– |
#else |
19 |
– |
#include <signal.h> |
18 |
|
#endif |
19 |
+ |
|
20 |
+ |
#include <signal.h> |
21 |
|
#include <fcntl.h> |
22 |
|
|
23 |
|
#include "view.h" |
24 |
|
|
25 |
+ |
#include "resolu.h" |
26 |
+ |
|
27 |
|
#include "random.h" |
28 |
|
|
29 |
|
int dimlist[MAXDIM]; /* sampling dimensions */ |
42 |
|
double dstrsrc = 0.0; /* square source distribution */ |
43 |
|
double shadthresh = .05; /* shadow threshold */ |
44 |
|
double shadcert = .5; /* shadow certainty */ |
45 |
< |
int directrelay = 0; /* number of source relays */ |
45 |
> |
int directrelay = 1; /* number of source relays */ |
46 |
|
int vspretest = 512; /* virtual source pretest density */ |
47 |
|
int directinvis = 0; /* sources invisible? */ |
48 |
+ |
double srcsizerat = .25; /* maximum ratio source size/dist. */ |
49 |
|
|
50 |
|
int maxdepth = 6; /* maximum recursion depth */ |
51 |
|
double minweight = 5e-3; /* minimum ray weight */ |
162 |
|
zbar[i] = NULL; |
163 |
|
} |
164 |
|
/* write out boundaries */ |
165 |
< |
fputresolu(YMAJOR|YDECR, hresolu, vresolu, stdout); |
165 |
> |
fprtresolu(hresolu, vresolu, stdout); |
166 |
|
/* recover file and compute first */ |
167 |
|
i = salvage(oldfile); |
168 |
|
if (zfd != -1 && i > 0 && |
400 |
|
/* discard header */ |
401 |
|
getheader(fp, NULL); |
402 |
|
/* get picture size */ |
403 |
< |
if (fgetresolu(&x, &y, fp) != (YMAJOR|YDECR)) { |
403 |
> |
if (!fscnresolu(&x, &y, fp)) { |
404 |
|
sprintf(errmsg, "bad recover file \"%s\"", oldfile); |
405 |
|
error(WARNING, errmsg); |
406 |
|
fclose(fp); |