| 132 |
|
printf("%s:\n", input[nfile].name); |
| 133 |
|
getheader(input[nfile].fp, tabputs); |
| 134 |
|
/* get picture size */ |
| 135 |
< |
if (fscanf(input[nfile].fp, "-Y %d +X %d\n", |
| 136 |
< |
&input[nfile].yres, &input[nfile].xres) != 2) { |
| 135 |
> |
if (fgetresolu(&input[nfile].xres, &input[nfile].yres, |
| 136 |
> |
input[nfile].fp) != (YMAJOR|YDECR)) { |
| 137 |
|
fprintf(stderr, "%s: bad picture size\n", |
| 138 |
|
input[nfile].name); |
| 139 |
|
quit(1); |
| 173 |
|
int y; |
| 174 |
|
register int x, i; |
| 175 |
|
|
| 176 |
< |
scanin = (COLR *)malloc((xmax-xmin)*sizeof(COLR)) - xmin; |
| 177 |
< |
scanin = (COLR *)malloc((xmax-xmin)*sizeof(COLR)) - xmin; |
| 176 |
> |
scanin = (COLR *)malloc((xmax-xmin)*sizeof(COLR)); |
| 177 |
|
if (scanin == NULL) |
| 178 |
|
goto memerr; |
| 179 |
|
scanin -= xmin; |
| 192 |
|
continue; |
| 193 |
|
if (freadcolrs(scanin+input[i].xloc, |
| 194 |
|
input[i].xres, input[i].fp) < 0) { |
| 195 |
< |
fprintf(stderr, "%s: read error\n", |
| 196 |
< |
input[i].name); |
| 195 |
> |
fprintf(stderr, "%s: read error (y==%d)\n", |
| 196 |
> |
input[i].name, |
| 197 |
> |
y-input[i].yloc); |
| 198 |
|
quit(1); |
| 199 |
|
} |
| 200 |
|
if (y >= ysiz) |