ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/x10.c
(Generate patch)

Comparing ray/src/rt/x10.c (file contents):
Revision 1.21 by greg, Wed Jan 10 10:04:30 1990 UTC vs.
Revision 1.22 by greg, Tue Jan 30 09:47:21 1990 UTC

# Line 170 | Line 170 | int  xres, yres;
170          } else                                          /* just clear */
171                  XClear(gwind);
172                                                  /* reinitialize color table */
173 <        if (ncolors == 0 && getpixels() == 0)
173 >        if (getpixels() == 0)
174                  stderr_v("cannot allocate colors\n");
175          else
176                  new_ctab(ncolors);
# Line 285 | Line 285 | getpixels()                            /* get the color map */
285   {
286          int  planes;
287  
288 <        freepixels();
288 >        if (ncolors > 0)
289 >                return(ncolors);
290          for (ncolors=(1<<DisplayPlanes())-3; ncolors>12; ncolors=ncolors*.937){
291                  pixval = (int *)malloc(ncolors*sizeof(int));
292                  if (pixval == NULL)
# Line 361 | Line 362 | register XExposeEvent  *eexp;
362                  return;
363          }
364                                          /* remap colors */
365 <        if (ncolors == 0 && getpixels() == 0) {
365 >        if (getpixels() == 0) {
366                  stderr_v("cannot allocate colors\n");
367                  return;
368          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines