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

Comparing ray/src/px/xshowtrace.c (file contents):
Revision 2.3 by greg, Fri Oct 30 09:54:19 1992 UTC vs.
Revision 2.6 by greg, Mon May 3 11:21:30 1993 UTC

# Line 24 | Line 24 | static char SCCSid[] = "$SunId$ LBL";
24   #endif
25  
26   char    rtcom[] = "rtrace -h- -otp -fa -x 1";
27 < char    xicom[] = "ximage";
27 > char    xicom[] = "ximage -c 256";
28  
29   VIEW    ourview = STDVIEW;              /* view for picture */
30   RESOLU  ourres;                         /* picture resolution */
# Line 189 | Line 189 | int    xoff, yoff;
189   setvec(ipt)                     /* set up vector drawing for pick */
190   int     ipt[2];
191   {
192 +        extern Window   xfindwind();
193          XWindowAttributes       wa;
194          XColor  xc;
195          XGCValues       gcv;
# Line 196 | Line 197 | int    ipt[2];
197          Window  rw, cw;
198          unsigned int    pm;
199                                          /* compute pointer location */
200 <        if (gwind == 0 &&
201 <                (gwind = xfindwind(theDisplay, rwind, picture, 2)) == 0) {
202 <                fprintf(stderr, "%s: cannot find display window!\n", progname);
203 <                exit(1);
200 >        if (gwind == 0) {
201 >                register char   *wn;
202 >                for (wn = picture; *wn; wn++);
203 >                while (wn > picture && wn[-1] != '/') wn--;
204 >                if ((gwind = xfindwind(theDisplay, rwind, wn, 4)) == 0) {
205 >                        fprintf(stderr, "%s: cannot find display window!\n",
206 >                                        progname);
207 >                        exit(1);
208 >                }
209          }
210          XQueryPointer(theDisplay, gwind, &rw, &cw, &rx, &ry, &wx, &wy, &pm);
211          xoff = wx - ipt[0];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines