--- ray/src/px/x11image.c 1990/08/30 11:21:34 1.7 +++ ray/src/px/x11image.c 1990/10/17 14:56:18 1.9 @@ -336,7 +336,7 @@ getras() /* get raster file */ } return; fail: - quit("could not create raster image"); + quiterr("could not create raster image"); } @@ -445,9 +445,10 @@ XKeyPressedEvent *ekey; XBell(thedisplay, 0); return(-1); } - viewray(rorg, rdir, &ourview, + if (viewray(rorg, rdir, &ourview, (ekey->x-xoff+.5)/xmax, - (ymax-1-ekey->y+yoff+.5)/ymax); + (ymax-1-ekey->y+yoff+.5)/ymax) < 0) + return(-1); printf("%e %e %e ", rorg[0], rorg[1], rorg[2]); printf("%e %e %e\n", rdir[0], rdir[1], rdir[2]); fflush(stdout); @@ -608,7 +609,7 @@ getmono() /* get monochrome data */ if ((inl = (rgbpixel *)malloc(xmax*sizeof(rgbpixel))) == NULL || (cerr = (short *)calloc(xmax,sizeof(short))) == NULL) - quit("out of memory in getmono"); + quiterr("out of memory in getmono"); dp = ourdata - 1; for (y = 0; y < ymax; y++) { picreadline3(y, inl); @@ -673,7 +674,7 @@ int y; if (scanpos == NULL || scanpos[y] == -1) return(-1); if (fseek(fin, scanpos[y], 0) == -1) - quit("fseek error"); + quiterr("fseek error"); cury = y; } else if (scanpos != NULL) scanpos[y] = ftell(fin);