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.4 by greg, Thu May 25 14:59:05 1989 UTC vs.
Revision 1.8 by greg, Tue May 30 09:53:10 1989 UTC

# Line 41 | Line 41 | static char SCCSid[] = "$SunId$ LBL";
41  
42   #define  hashcolr(c)    ((67*(c)[RED]+59*(c)[GRN]+71*(c)[BLU])%ncolors)
43  
44 < #define  flush()        while (XPending() > 0) getevent()
44 > #define  checkinp()     while (XPending() > 0) getevent()
45  
46   #define  levptr(etype)  ((etype *)&thisevent)
47  
# Line 117 | Line 117 | char  *name;
117                          BlackPixel, WhitePixel, GXcopy);
118          clientname = name;
119          x_driver.inpready = 0;
120 <        errvec = x_errout;                      /* set error vectors */
121 <        cmdvec = x_comout;
120 >        cmdvec = x_comout;                      /* set error vectors */
121          if (wrnvec != NULL)
122                  wrnvec = x_errout;
123          return(&x_driver);
# Line 128 | Line 127 | char  *name;
127   static
128   x_close()                       /* close our display */
129   {
130 <        errvec = stderr_v;                      /* reset error vectors */
132 <        cmdvec = NULL;
130 >        cmdvec = NULL;                          /* reset error vectors */
131          if (wrnvec != NULL)
132                  wrnvec = stderr_v;
133          if (ourdisplay == NULL)
# Line 176 | Line 174 | int  xres, yres;
174          } else                                          /* just clear */
175                  XClear(gwind);
176          newmap();
177 <        flush();
177 >        checkinp();
178          return;
179   fail:
180          stderr_v("Failure opening window in x_clear\n");
# Line 203 | Line 201 | int  xmin, ymin, xmax, ymax;
201                                  pixval[ndx]);
202          }
203          if (nrays - lastflush >= WFLUSH) {
204 <                flush();                /* also checks for input */
204 >                checkinp();
205                  lastflush = nrays;
206          }
207   }
# Line 227 | Line 225 | char  *out;
225   {
226          if (comline != NULL)
227                  xt_puts(out, comline);
228 <        XFlush();               /* don't process events! */
228 >        XFlush();
229   }
230  
231  
# Line 254 | Line 252 | int  *xp, *yp;
252          *yp = gheight-1 - levptr(XKeyOrButtonEvent)->y;
253          XFocusKeyboard(RootWindow);
254          XUngrabMouse();
255 <        flush();                                /* insure release */
255 >        XFlush();                               /* insure release */
256          if (c_last > c_first)                   /* key pressed */
257                  return(x_getc());
258                                                  /* button pressed */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines