# | Line 129 | Line 129 | unkopt: | |
---|---|---|
129 | progname); | |
130 | quit(1); | |
131 | } | |
132 | < | printf("-Y %d +X %d\n", yres, xres); /* resolution */ |
132 | > | fputresolu(YMAJOR|YDECR, xres, yres, stdout); |
133 | valtopix(); | |
134 | } else { | |
135 | /* get header */ | |
136 | getheader(fin, checkhead); | |
137 | ||
138 | if (xres <= 0 || yres <= 0) /* get picture size */ | |
139 | < | if (fscanf(fin, "-Y %d +X %d\n", &yres, &xres) != 2) { |
139 | > | if (fgetresolu(&xres, &yres, fin) != (YMAJOR|YDECR)) { |
140 | fprintf(stderr, | |
141 | "%s: missing x and y resolution\n", | |
142 | progname); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |