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

Comparing ray/src/rt/x11.c (file contents):
Revision 1.12 by greg, Thu Mar 8 10:09:58 1990 UTC vs.
Revision 1.14 by greg, Mon Mar 12 11:08:48 1990 UTC

# Line 67 | Line 67 | static GC  ourgc = 0;                  /* our graphics context for dr
67  
68   static Colormap ourmap = 0;             /* our color map */
69  
70 < extern char  *malloc();
70 > extern char  *malloc(), *getcombuf();
71  
72 < int  x11_close(), x11_clear(), x11_paintr(), x11_errout(),
72 > static int  x11_close(), x11_clear(), x11_paintr(), x11_errout(),
73                  x11_getcur(), x11_comout(), x11_comin(), x11_flush();
74  
75   static struct driver  x11_driver = {
# Line 175 | Line 175 | static
175   x11_clear(xres, yres)                   /* clear our display */
176   int  xres, yres;
177   {
178                                                /* destroy command line */
179        if (comline != NULL)
180                xt_close(comline);
178                                                  /* check limits */
179          if (xres < MINWIDTH)
180                  xres = MINWIDTH;
# Line 193 | Line 190 | int  xres, yres;
190                  sleep(2);                       /* wait for window manager */
191                  XSync(ourdisplay, 1);           /* discard input */
192          }
193 +        XClearWindow(ourdisplay, gwind);
194 +                                                /* reinitialize color table */
195 +        if (ourvisual->class == PseudoColor)
196 +                if (getpixels() == 0)
197 +                        stderr_v("cannot allocate colors\n");
198 +                else
199 +                        new_ctab(ncolors);
200                                                  /* get new command line */
201 +        if (comline != NULL)
202 +                xt_close(comline);
203          comline = xt_open(ourdisplay,
204                          DefaultGC(ourdisplay,ourscreen),
205                          gwind, 0, gheight, gwidth, COMHEIGHT, 0, COMFN);
# Line 202 | Line 208 | int  xres, yres;
208                  quit(1);
209          }
210          XSelectInput(ourdisplay, comline->w, ExposureMask);
205                                                /* clear graphics window */
206        XClearWindow(ourdisplay, gwind);
207                                                /* reinitialize color table */
208        if (ourvisual->class == PseudoColor)
209                if (getpixels() == 0)
210                        stderr_v("cannot allocate colors\n");
211                else
212                        new_ctab(ncolors);
211                                                  /* remove earmuffs */
212          XSelectInput(ourdisplay, gwind,
213                  StructureNotifyMask|ExposureMask|KeyPressMask|ButtonPressMask);
# Line 250 | Line 248 | static
248   x11_comin(inp, prompt)          /* read in a command line */
249   char  *inp, *prompt;
250   {
251 <        int  x11_getc(), x11_comout();
251 >        extern int  x11_getc();
252  
253          if (prompt != NULL)
254                  if (fromcombuf(inp, &x11_driver))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines