--- ray/src/px/pcompos.c 1989/06/12 10:07:29 1.2 +++ ray/src/px/pcompos.c 1989/09/12 13:04:24 1.4 @@ -132,8 +132,8 @@ getfile: printf("%s:\n", input[nfile].name); getheader(input[nfile].fp, tabputs); /* get picture size */ - if (fscanf(input[nfile].fp, "-Y %d +X %d\n", - &input[nfile].yres, &input[nfile].xres) != 2) { + if (fgetresolu(&input[nfile].xres, &input[nfile].yres, + input[nfile].fp) != (YMAJOR|YDECR)) { fprintf(stderr, "%s: bad picture size\n", input[nfile].name); quit(1); @@ -173,8 +173,7 @@ compos() /* composite pictures */ int y; register int x, i; - scanin = (COLR *)malloc((xmax-xmin)*sizeof(COLR)) - xmin; - scanin = (COLR *)malloc((xmax-xmin)*sizeof(COLR)) - xmin; + scanin = (COLR *)malloc((xmax-xmin)*sizeof(COLR)); if (scanin == NULL) goto memerr; scanin -= xmin;