--- ray/src/px/ximage.c 1989/05/11 08:25:21 1.6 +++ ray/src/px/ximage.c 1989/09/12 13:04:42 1.9 @@ -141,7 +141,7 @@ char *argv[]; /* get header */ getheader(fin, headline); /* get picture dimensions */ - if (fscanf(fin, "-Y %d +X %d\n", &ymax, &xmax) != 2) + if (fgetresolu(&xmax, &ymax, fin) != (YMAJOR|YDECR)) quiterr("bad picture size"); /* set view parameters */ if (gotview) { @@ -345,7 +345,7 @@ redraw(x, y, w, h) /* redraw section of window */ int x, y; int w, h; { - if (map_rcolors(ourras) == NULL) { + if (ourras->ncolors && map_rcolors(ourras) == NULL) { fprintf(stderr, "%s: cannot allocate colors\n", progname); return(-1); } @@ -689,7 +689,7 @@ pixel *l; } -picreadcm(map) /* do gamcor correction */ +picreadcm(map) /* do gamma correction */ colormap map; { extern double pow();