12 |
|
|
13 |
|
#include <stdio.h> |
14 |
|
|
15 |
+ |
#include <math.h> |
16 |
+ |
|
17 |
|
#include "color.h" |
18 |
|
|
19 |
|
|
41 |
|
int argc; |
42 |
|
char *argv[]; |
43 |
|
{ |
44 |
< |
double d, atof(); |
44 |
> |
double d; |
45 |
|
int xres, yres; |
46 |
|
int an; |
47 |
|
|
98 |
|
fputs(":\n", stdout); |
99 |
|
getheader(fptr[nfile], tabputs); |
100 |
|
/* get picture size */ |
101 |
< |
if (fscanf(fptr[nfile], "-Y %d +X %d\n", &yres, &xres) != 2) { |
101 |
> |
if (fgetresolu(&xres, &yres, fptr[nfile]) != (YMAJOR|YDECR)) { |
102 |
|
fprintf(stderr, "%s: bad picture size\n", progname); |
103 |
|
quit(1); |
104 |
|
} else if (nfile == 0) { |
114 |
|
} |
115 |
|
/* add new header info. */ |
116 |
|
printargs(argc, argv, stdout); |
117 |
< |
printf("\n-Y %d +X %d\n", ysiz, xsiz); |
117 |
> |
putchar('\n'); |
118 |
> |
fputresolu(YMAJOR|YDECR, xsiz, ysiz, stdout); |
119 |
|
|
120 |
|
psum(); |
121 |
|
|