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

Comparing ray/src/hd/rholo4.c (file contents):
Revision 3.23 by gwlarson, Fri Dec 18 11:56:11 1998 UTC vs.
Revision 3.24 by gwlarson, Sun Dec 20 20:39:31 1998 UTC

# Line 28 | Line 28 | static FILE    *dpout;
28   disp_open(dname)                /* open the named display driver */
29   char    *dname;
30   {
31 <        char    buf[128], fd0[8], fd1[8], *cmd[5], *ofn;
32 <        int     i, n;
31 >        char    buf[128], fd0[8], fd1[8], *cmd[5], *sfn;
32 >        int     i, n, len;
33                                  /* get full display program name */
34   #ifdef DEVPATH
35          sprintf(buf, "%s/%s%s", DEVPATH, dname, HDSUF);
# Line 68 | Line 68 | char   *dname;
68                                  /* write out hologram grids & octrees */
69          for (i = 0; hdlist[i] != NULL; i++) {
70                  bcopy((char *)hdlist[i], buf, sizeof(HDGRID));
71 <                n = vdef(OSECTION);
72 <                ofn = i<n ? nvalue(OSECTION,i) :
73 <                                n ? nvalue(OSECTION,n-1) : vval(OCTREE);
74 <                strcpy(buf+sizeof(HDGRID), ofn);
75 <                disp_result(DS_ADDHOLO, sizeof(HDGRID)+1+strlen(ofn), buf);
71 >                len = sizeof(HDGRID);
72 >                n = vdef(GEOMETRY);
73 >                sfn = i<n ? nvalue(GEOMETRY,i) :
74 >                                n ? nvalue(GEOMETRY,n-1) : vval(OCTREE);
75 >                strcpy(buf+len, sfn);
76 >                len += strlen(sfn) + 1;
77 >                n = vdef(PORTS);
78 >                sfn = i<n ? nvalue(PORTS,i) : n ? nvalue(PORTS,n-1) : "";
79 >                strcpy(buf+len, sfn);
80 >                len += strlen(sfn) + 1;
81 >                disp_result(DS_ADDHOLO, len, buf);
82          }
83          disp_flush();
84   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines