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.6 by greg, Mon May 3 11:21:30 1993 UTC vs.
Revision 2.9 by schorsch, Mon Nov 10 12:28:56 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1991 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  Display an image and watch the rays get traced.
6   *
7   *      9/21/90 Greg Ward
8   */
9  
10 + #include <X11/Xlib.h>
11 +
12   #include "standard.h"
13 + #include "paths.h"
14   #include "view.h"
15 #include "resolu.h"
16 #include <X11/Xlib.h>
15  
16   #define MAXDEPTH        32              /* ridiculous ray tree depth */
17  
# Line 53 | Line 51 | int    argc;
51   char    *argv[];
52   {
53          int     i;
54 <        char    combuf[256];
54 >        char    combuf[PATH_MAX];
55  
56          progname = argv[0];
57          for (i = 1; i < argc-2; i++)
# Line 82 | Line 80 | char   *argv[];
80                  exit(1);
81          }
82                                          /* build input command */
83 <        sprintf(combuf, "%s %s | %s", xicom, picture, rtcom);
83 >        sprintf(combuf, "%s \"%s\" | %s", xicom, picture, rtcom);
84          for ( ; i < argc-1; i++) {
85                  strcat(combuf, " ");
86                  strcat(combuf, argv[i]);
# Line 140 | Line 138 | mainloop()                             /* get and process input */
138   freetree(tp)                            /* free a trace tree */
139   struct node     *tp;
140   {
141 <        register struct node    *kid;
141 >        register struct node    *kid, *k2;
142  
143 <        for (kid = tp->daughter; kid != NULL; kid = kid->sister)
143 >        for (kid = tp->daughter; kid != NULL; kid = k2) {
144 >                k2 = kid->sister;
145                  freetree(kid);
146 <        free((char *)tp);
146 >        }
147 >        free((void *)tp);
148   }
149  
150  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines