7 |
|
|
8 |
|
#include <stdio.h> |
9 |
|
#include <time.h> |
10 |
+ |
|
11 |
|
#include "color.h" |
12 |
+ |
#include "rtio.h" |
13 |
|
#include "resolu.h" |
14 |
|
|
15 |
|
char *progname; |
14 |
– |
|
16 |
|
int xmax, ymax; |
16 |
– |
|
17 |
|
double thresh = 0.5; /* threshold value */ |
18 |
– |
|
18 |
|
COLR threshclr; |
19 |
|
|
20 |
|
#define abovethresh(c) ((c)[EXP]>threshclr[EXP] || \ |
21 |
|
((c)[EXP]==threshclr[EXP] && (c)[GRN]>threshclr[GRN])) |
22 |
|
|
23 |
+ |
static void quiterr(char *err); |
24 |
+ |
static void ra2hex(void); |
25 |
|
|
26 |
< |
main(argc, argv) |
27 |
< |
int argc; |
28 |
< |
char *argv[]; |
26 |
> |
|
27 |
> |
int |
28 |
> |
main( |
29 |
> |
int argc, |
30 |
> |
char *argv[] |
31 |
> |
) |
32 |
|
{ |
33 |
|
int i; |
34 |
|
|
74 |
|
} |
75 |
|
|
76 |
|
|
77 |
< |
quiterr(err) /* print message and exit */ |
78 |
< |
char *err; |
77 |
> |
static void |
78 |
> |
quiterr( /* print message and exit */ |
79 |
> |
char *err |
80 |
> |
) |
81 |
|
{ |
82 |
|
if (err != NULL) { |
83 |
|
fprintf(stderr, "%s: %s\n", progname, err); |
87 |
|
} |
88 |
|
|
89 |
|
|
90 |
< |
ra2hex() /* convert Radiance scanlines to 4x1 bit hex */ |
90 |
> |
static void |
91 |
> |
ra2hex(void) /* convert Radiance scanlines to 4x1 bit hex */ |
92 |
|
{ |
93 |
|
static char cmap[] = "0123456789ABCDEF"; |
94 |
|
COLR *scanin; |