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.23 by greg, Tue Jan 30 11:37:48 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 202 | Line 202 | int  xmin, ymin, xmax, ymax;
202  
203  
204   static
205 < x_comin(inp)                    /* read in a command line */
206 < char  *inp;
205 > x_comin(inp, prompt)            /* read in a command line */
206 > char  *inp, *prompt;
207   {
208          int  x_getc(), x_comout();
209  
210 <        if (fromcombuf(inp, &x_driver))
211 <                return;
210 >        if (prompt != NULL)
211 >                if (fromcombuf(inp, &x_driver))
212 >                        return;
213 >                else
214 >                        xt_puts(prompt, comline);
215          xt_cursor(comline, TBLKCURS);
216          editline(inp, x_getc, x_comout);
217          xt_cursor(comline, TNOCURS);
# Line 285 | Line 288 | getpixels()                            /* get the color map */
288   {
289          int  planes;
290  
291 <        freepixels();
291 >        if (ncolors > 0)
292 >                return(ncolors);
293          for (ncolors=(1<<DisplayPlanes())-3; ncolors>12; ncolors=ncolors*.937){
294                  pixval = (int *)malloc(ncolors*sizeof(int));
295                  if (pixval == NULL)
# Line 361 | Line 365 | register XExposeEvent  *eexp;
365                  return;
366          }
367                                          /* remap colors */
368 <        if (ncolors == 0 && getpixels() == 0) {
368 >        if (getpixels() == 0) {
369                  stderr_v("cannot allocate colors\n");
370                  return;
371          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines