39 |
|
long npixinvw; /* number of pixels in view */ |
40 |
|
long npixmiss; /* number of pixels missed */ |
41 |
|
|
42 |
+ |
static int angcmp(const void *ap1, const void *ap2); |
43 |
+ |
static void init(void); |
44 |
+ |
static void cleanup(void); |
45 |
+ |
static void printsources(void); |
46 |
+ |
static void printillum(void); |
47 |
|
|
48 |
< |
main(argc, argv) |
49 |
< |
int argc; |
50 |
< |
char *argv[]; |
48 |
> |
|
49 |
> |
|
50 |
> |
int |
51 |
> |
main( |
52 |
> |
int argc, |
53 |
> |
char *argv[] |
54 |
> |
) |
55 |
|
{ |
56 |
|
int combine = 1; |
57 |
|
int gotview = 0; |
230 |
|
} |
231 |
|
|
232 |
|
|
233 |
< |
int |
234 |
< |
angcmp(ap1, ap2) /* compare two angles */ |
235 |
< |
ANGLE *ap1, *ap2; |
233 |
> |
static int |
234 |
> |
angcmp( /* compare two angles */ |
235 |
> |
const void *ap1, |
236 |
> |
const void *ap2 |
237 |
> |
) |
238 |
|
{ |
239 |
|
register int a1, a2; |
240 |
|
|
241 |
< |
a1 = *ap1; |
242 |
< |
a2 = *ap2; |
241 |
> |
a1 = *(ANGLE *)ap1; |
242 |
> |
a2 = *(ANGLE *)ap2; |
243 |
|
if (a1 == a2) { |
244 |
|
fprintf(stderr, "%s: duplicate glare angle (%d)\n", |
245 |
|
progname, a1); |
249 |
|
} |
250 |
|
|
251 |
|
|
252 |
< |
init() /* initialize global variables */ |
252 |
> |
static void |
253 |
> |
init(void) /* initialize global variables */ |
254 |
|
{ |
255 |
|
double d; |
256 |
|
register int i; |
326 |
|
} |
327 |
|
|
328 |
|
|
329 |
< |
cleanup() /* close files, wait for children */ |
329 |
> |
static void |
330 |
> |
cleanup(void) /* close files, wait for children */ |
331 |
|
{ |
332 |
|
if (verbose) |
333 |
|
fprintf(stderr, "%s: cleaning up... \n", progname); |
341 |
|
} |
342 |
|
|
343 |
|
|
344 |
< |
compdir(vd, x, y) /* compute direction for x,y */ |
345 |
< |
FVECT vd; |
346 |
< |
int x, y; |
344 |
> |
extern int |
345 |
> |
compdir( /* compute direction for x,y */ |
346 |
> |
FVECT vd, |
347 |
> |
int x, |
348 |
> |
int y |
349 |
> |
) |
350 |
|
{ |
351 |
|
int hl; |
352 |
|
FVECT org; /* dummy variable */ |
374 |
|
} |
375 |
|
|
376 |
|
|
377 |
< |
double |
378 |
< |
pixsize(x, y) /* return the solid angle of pixel at (x,y) */ |
379 |
< |
int x, y; |
377 |
> |
extern double |
378 |
> |
pixsize( /* return the solid angle of pixel at (x,y) */ |
379 |
> |
int x, |
380 |
> |
int y |
381 |
> |
) |
382 |
|
{ |
383 |
|
register int hl, xo; |
384 |
|
double disc; |
397 |
|
} |
398 |
|
|
399 |
|
|
400 |
< |
memerr(s) /* malloc failure */ |
401 |
< |
char *s; |
400 |
> |
extern void |
401 |
> |
memerr( /* malloc failure */ |
402 |
> |
char *s |
403 |
> |
) |
404 |
|
{ |
405 |
|
fprintf(stderr, "%s: out of memory for %s\n", progname, s); |
406 |
|
exit(1); |
407 |
|
} |
408 |
|
|
409 |
|
|
410 |
< |
printsources() /* print out glare sources */ |
410 |
> |
static void |
411 |
> |
printsources(void) /* print out glare sources */ |
412 |
|
{ |
413 |
|
register struct source *sp; |
414 |
|
|
421 |
|
} |
422 |
|
|
423 |
|
|
424 |
< |
printillum() /* print out indirect illuminances */ |
424 |
> |
static void |
425 |
> |
printillum(void) /* print out indirect illuminances */ |
426 |
|
{ |
427 |
|
register int i; |
428 |
|
|