30 |
|
int argc; |
31 |
|
char *argv[]; |
32 |
|
{ |
33 |
+ |
extern long getint(); |
34 |
|
int reverse = 0; |
35 |
|
int i; |
36 |
|
|
75 |
|
setcolrgam(gamma); /* set up gamma correction */ |
76 |
|
if (reverse) { |
77 |
|
/* get their image resolution */ |
78 |
< |
fread((char *)&xmax, sizeof(int), 1, stdin); |
79 |
< |
fread((char *)&ymax, sizeof(int), 1, stdin); |
78 |
> |
xmax = getint(4, stdin); |
79 |
> |
ymax = getint(4, stdin); |
80 |
|
/* put our header */ |
81 |
|
printargs(i, argv, stdout); |
82 |
|
fputformat(COLRFMT, stdout); |
90 |
|
fgetresolu(&xmax, &ymax, stdin) < 0) |
91 |
|
quiterr("bad picture format"); |
92 |
|
/* write their header */ |
93 |
< |
fwrite((char *)&xmax, sizeof(int), 1, stdout); |
94 |
< |
fwrite((char *)&ymax, sizeof(int), 1, stdout); |
93 |
> |
putint((long)xmax, 4, stdout); |
94 |
> |
putint((long)ymax, 4, stdout); |
95 |
|
/* convert file */ |
96 |
|
ra2avs(); |
97 |
|
} |