70 |
|
|
71 |
|
int xpos, ypos; /* output position */ |
72 |
|
|
73 |
– |
char *progname; /* global argv[0] */ |
74 |
– |
|
73 |
|
int echoheader = 1; |
74 |
|
int wrongformat = 0; |
75 |
|
int gotview; |
102 |
|
SET_DEFAULT_BINARY(); |
103 |
|
SET_FILE_BINARY(stdin); |
104 |
|
SET_FILE_BINARY(stdout); |
105 |
< |
progname = argv[0]; |
105 |
> |
fixargv0(argv[0]); /* sets global progname */ |
106 |
|
esupport |= E_VARIABLE|E_FUNCTION|E_RCONST; |
107 |
|
esupport &= ~(E_OUTCHAN|E_INCHAN); |
108 |
|
/* scan options */ |
238 |
|
fprintview(commvp, stdout); |
239 |
|
fputc('\n', stdout); |
240 |
|
} |
241 |
< |
if (outfloat) { /* print format if known */ |
241 |
> |
if (outfloat) { /* print output format */ |
242 |
|
printf("NROWS=%d\nNCOLS=%d\n", yres, xres); |
243 |
|
fputncomp(outfloat, stdout); |
244 |
|
fputendian(stdout); |
245 |
|
fputformat("float", stdout); |
246 |
|
} else if (strcmp(ourfmt, PICFMT)) |
247 |
|
fputformat(ourfmt, stdout); |
248 |
+ |
else |
249 |
+ |
fputformat(COLRFMT, stdout); |
250 |
|
fputc('\n', stdout); /* end header */ |
251 |
|
if (!outfloat) |
252 |
|
fprtresolu(xres, yres, stdout); |
253 |
|
|
254 |
+ |
doptimize(1); /* optimize definitions */ |
255 |
|
combine(); /* combine pictures */ |
256 |
|
quit(0); |
257 |
|
usage: |