# | Line 34 | Line 34 | char **argv; | |
---|---|---|
34 | exit(1); | |
35 | } | |
36 | ||
37 | – | /* discard header */ |
38 | – | getheader(input, NULL); |
37 | /* get picture dimensions */ | |
38 | < | if (fgetresolu(&xres, &yres, input) != (YMAJOR|YDECR)) { |
39 | < | fprintf(stderr, "%s: bad picture size\n", argv[0]); |
38 | > | if (checkheader(input, COLRFMT, NULL) < 0 || |
39 | > | fgetresolu(&xres, &yres, input) != (YMAJOR|YDECR)) { |
40 | > | fprintf(stderr, "%s: bad picture format\n", argv[0]); |
41 | exit(1); | |
42 | } | |
43 | if (xres > NCOLS) { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |