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