7 |
|
|
8 |
|
#include <stdio.h> |
9 |
|
#include <math.h> |
10 |
+ |
#include <string.h> |
11 |
|
|
12 |
|
#include "platform.h" |
13 |
|
#include "color.h" |
14 |
+ |
#include "resolu.h" |
15 |
|
|
16 |
|
|
17 |
|
int orig = 0; |
20 |
|
|
21 |
|
COLOR expos = WHTCOLOR; |
22 |
|
|
23 |
+ |
static gethfunc headline; |
24 |
|
|
25 |
< |
headline(s) /* check header line */ |
26 |
< |
char *s; |
25 |
> |
|
26 |
> |
static int |
27 |
> |
headline( /* check header line */ |
28 |
> |
char *s, |
29 |
> |
void *p |
30 |
> |
) |
31 |
|
{ |
32 |
< |
char fmt[32]; |
32 |
> |
char fmt[MAXFMTLEN]; |
33 |
|
double d; |
34 |
|
COLOR ctmp; |
35 |
|
|
50 |
|
} |
51 |
|
|
52 |
|
|
53 |
< |
main(argc, argv) |
54 |
< |
int argc; |
55 |
< |
char *argv[]; |
53 |
> |
int |
54 |
> |
main( |
55 |
> |
int argc, |
56 |
> |
char *argv[] |
57 |
> |
) |
58 |
|
{ |
59 |
|
int i; |
60 |
|
int xres, yres; |
86 |
|
fprintf(stderr, "%s: out of memory\n", argv[0]); |
87 |
|
exit(1); |
88 |
|
} |
89 |
< |
setcolr(cmin, 1e10, 1e10, 1e10); |
90 |
< |
setcolr(cmax, 0., 0., 0.); |
89 |
> |
setcolr(cmin, 1e30, 1e30, 1e30); |
90 |
> |
setcolr(cmax, 0., 0., 0.); xmax=ymax=0; |
91 |
|
/* find extrema */ |
92 |
|
for (y = yres-1; y >= 0; y--) { |
93 |
|
if (freadcolrs(scan, xres, stdin) < 0) { |
112 |
|
} |
113 |
|
} |
114 |
|
free((void *)scan); |
115 |
< |
printf("%d %d\t%e %e %e\n", xmin, ymin, |
115 |
> |
printf("%d %d\t%.2e %.2e %.2e\n", xmin, ymin, |
116 |
|
colrval(cmin,RED)/colval(expos,RED), |
117 |
|
colrval(cmin,GRN)/colval(expos,GRN), |
118 |
|
colrval(cmin,BLU)/colval(expos,BLU)); |
119 |
< |
printf("%d %d\t%e %e %e\n", xmax, ymax, |
119 |
> |
printf("%d %d\t%.2e %.2e %.2e\n", xmax, ymax, |
120 |
|
colrval(cmax,RED)/colval(expos,RED), |
121 |
|
colrval(cmax,GRN)/colval(expos,GRN), |
122 |
|
colrval(cmax,BLU)/colval(expos,BLU)); |