--- ray/src/rt/rview.c 1990/03/09 14:00:06 1.11 +++ ray/src/rt/rview.c 1991/05/03 15:43:32 1.13 @@ -18,6 +18,8 @@ static char SCCSid[] = "$SunId$ LBL"; #include +#include + #include VIEW ourview = STDVIEW; /* viewing parameters */ @@ -55,6 +57,11 @@ PNODE ptrunk; /* the base of our image */ RECT pframe; /* current frame boundaries */ int pdepth; /* image depth in current frame */ +static jmp_buf mainloop; /* longjmp back to main loop */ +static char *reserve_mem = NULL; /* pre-allocated reserve memory */ + +#define RESERVE_AMT 8192 /* amount of memory to reserve */ + #define CTRL(c) ('c'-'@') @@ -113,7 +120,7 @@ rview() /* do a view */ devopen(devname); /* open device */ newimage(); /* set up image */ - + setjmp(mainloop); for ( ; ; ) { /* quit in command() */ while (hresolu <= 1<kid == NULL) { /* subdivide */ if ((p->kid = newptree()) == NULL) - error(SYSTEM, "out of memory in refine"); + memerror("in refine"); /* * The following paint order can leave a black pixel * when redraw() is called in (*dev->paintr)().