16 |
|
#include "resolu.h" |
17 |
|
|
18 |
|
int rgbinp = -1; /* input is RGBE? */ |
19 |
– |
|
19 |
|
int rgbout = 0; /* output should be RGBE? */ |
21 |
– |
|
20 |
|
RGBPRIMS inprims = STDPRIMS; /* input primaries */ |
23 |
– |
|
21 |
|
RGBPRIMS outprims = STDPRIMS; /* output primaries */ |
25 |
– |
|
22 |
|
double expcomp = 1.0; /* exposure compensation */ |
27 |
– |
|
23 |
|
int doflat = -1; /* produce flat file? */ |
29 |
– |
|
24 |
|
char *progname; |
25 |
|
|
26 |
+ |
static gethfunc headline; |
27 |
+ |
static void quiterr(char *err); |
28 |
+ |
static void convert(void); |
29 |
|
|
30 |
< |
int |
31 |
< |
headline(s) /* process header line */ |
32 |
< |
char *s; |
30 |
> |
|
31 |
> |
|
32 |
> |
static int |
33 |
> |
headline( /* process header line */ |
34 |
> |
char *s, |
35 |
> |
void *p |
36 |
> |
) |
37 |
|
{ |
38 |
|
char fmt[32]; |
39 |
|
|
55 |
|
} |
56 |
|
|
57 |
|
|
58 |
< |
main(argc, argv) |
59 |
< |
int argc; |
59 |
< |
char *argv[]; |
58 |
> |
int |
59 |
> |
main(int argc, char *argv[]) |
60 |
|
{ |
61 |
|
int i; |
62 |
|
SET_DEFAULT_BINARY(); |
128 |
|
} |
129 |
|
|
130 |
|
|
131 |
< |
quiterr(err) /* print message and exit */ |
132 |
< |
char *err; |
131 |
> |
static void |
132 |
> |
quiterr( /* print message and exit */ |
133 |
> |
char *err |
134 |
> |
) |
135 |
|
{ |
136 |
|
if (err != NULL) { |
137 |
|
fprintf(stderr, "%s: %s\n", progname, err); |
141 |
|
} |
142 |
|
|
143 |
|
|
144 |
< |
convert() /* convert to XYZE or RGBE picture */ |
144 |
> |
static void |
145 |
> |
convert(void) /* convert to XYZE or RGBE picture */ |
146 |
|
{ |
147 |
|
int order; |
148 |
|
int xmax, ymax; |