--- ray/src/px/ximage.c 1990/03/12 15:14:49 1.24 +++ ray/src/px/ximage.c 1990/10/17 15:15:52 1.26 @@ -287,7 +287,7 @@ getras() /* get raster file */ } return; memerr: - quit("out of memory"); + quiterr("out of memory"); } @@ -407,8 +407,9 @@ XKeyEvent *ekey; XFeep(0); return(-1); } - viewray(rorg, rdir, &ourview, (ekey->x-xoff+.5)/xmax, - (ymax-1-ekey->y+yoff+.5)/ymax); + if (viewray(rorg, rdir, &ourview, (ekey->x-xoff+.5)/xmax, + (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); @@ -547,7 +548,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 = ourras->data.m - 1; for (y = 0; y < ymax; y++) { picreadline3(y, inl); @@ -634,7 +635,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);