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

Comparing ray/src/util/xglaresrc.c (file contents):
Revision 2.4 by greg, Fri Dec 11 18:23:17 1992 UTC vs.
Revision 2.5 by greg, Thu Apr 29 12:58:20 1993 UTC

# Line 88 | Line 88 | char   *pname, *wname;
88          XWindowAttributes       wa;
89          XColor  xc;
90          XGCValues       gcv;
91 +        register int    i;
92                                          /* get the viewing parameters */
93          if (viewfile(pname, &ourview, &pres) <= 0 ||
94                          setview(&ourview) != NULL) {
# Line 103 | Line 104 | char   *pname, *wname;
104                  exit(1);
105          }
106                                          /* find our window */
107 <        if (wname == NULL)
108 <                wname = pname;
107 >        if (wname == NULL) {
108 >                                /* remove directory prefix from name */
109 >                for (i = strlen(pname); i-- > 0; )
110 >                        if (pname[i] == '/')
111 >                                break;
112 >                wname = pname+i+1;
113 >                i = 0;
114 >        } else
115 >                i = 1;
116          gwind = xfindwind(theDisplay, rwind, wname, 4);
117          if (gwind == None) {
118 <                if (wname != pname) {
118 >                if (i) {
119                          fprintf(stderr, "%s: cannot find \"%s\" window\n",
120                                          progname, wname);
121                          exit(2);
# Line 123 | Line 131 | char   *pname, *wname;
131                  }
132                  do
133                          sleep(8);
134 <                while ((gwind=xfindwind(theDisplay,rwind,pname,4)) == None);
134 >                while ((gwind=xfindwind(theDisplay,rwind,wname,4)) == None);
135          } else
136                  XMapRaised(theDisplay, gwind);
137          do {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines