1 |
– |
/* Copyright (c) 1991 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* Find glare sources in a scene or image. |
6 |
|
* |
53 |
|
/* process options */ |
54 |
|
for (i = 1; i < argc && argv[i][0] == '-'; i++) { |
55 |
|
/* expand arguments */ |
56 |
< |
while (rval = expandarg(&argc, &argv, i)) |
57 |
< |
if (rval < 0) { |
58 |
< |
fprintf(stderr, "%s: cannot expand '%s'", |
59 |
< |
argv[0], argv[i]); |
60 |
< |
exit(1); |
61 |
< |
} |
56 |
> |
while ((rval = expandarg(&argc, &argv, i)) > 0) |
57 |
> |
; |
58 |
> |
if (rval < 0) { |
59 |
> |
fprintf(stderr, "%s: cannot expand '%s'", |
60 |
> |
argv[0], argv[i]); |
61 |
> |
exit(1); |
62 |
> |
} |
63 |
|
rval = getviewopt(&ourview, argc-i, argv+i); |
64 |
|
if (rval >= 0) { |
65 |
|
i += rval; |
174 |
|
progname); |
175 |
|
exit(1); |
176 |
|
} |
177 |
< |
copystruct(&ourview, &pictview); |
177 |
> |
ourview = pictview; |
178 |
|
} else if (picture != NULL && !VEQ(ourview.vp, pictview.vp)) { |
179 |
|
fprintf(stderr, "%s: picture must have same viewpoint\n", |
180 |
|
progname); |
269 |
|
if (indirect == NULL) |
270 |
|
memerr("indirect illuminances"); |
271 |
|
npixinvw = npixmiss = 0L; |
272 |
< |
copystruct(&leftview, &ourview); |
273 |
< |
copystruct(&rightview, &ourview); |
272 |
> |
leftview = ourview; |
273 |
> |
rightview = ourview; |
274 |
|
spinvector(leftview.vdir, ourview.vdir, ourview.vup, maxtheta); |
275 |
|
spinvector(rightview.vdir, ourview.vdir, ourview.vup, -maxtheta); |
276 |
|
setview(&leftview); |