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.5 by gregl, Mon Nov 10 18:07:15 1997 UTC vs.
Revision 3.6 by gregl, Thu Nov 20 11:40:11 1997 UTC

# Line 18 | Line 18 | static char SCCSid[] = "$SunId$ SGI";
18  
19   static int      inp_flags;
20   static int      dpd[3];
21 static int      pipesiz;
21   static FILE     *dpout;
22  
23  
# Line 34 | Line 33 | char   *dname;
33          sprintf(dpath, "dev/%s%s", dname, HDSUF);
34   #endif
35          com[0] = dpath; com[1] = froot; com[2] = NULL;
36 <        pipesiz = open_process(dpd, com);
37 <        if (pipesiz <= 0)
36 >        i = open_process(dpd, com);
37 >        if (i <= 0)
38                  error(USER, "cannot start display process");
39          if ((dpout = fdopen(dup(dpd[1]), "w")) == NULL)
40                  error(SYSTEM, "cannot associate FILE with display pipe");
# Line 61 | Line 60 | int    block;
60          int     n;
61          char    *buf = NULL;
62  
63 <        if (pipesiz <= 0)
63 >        if (dpout == NULL)
64                  return(-1);
65                                          /* flush display output */
66          disp_flush();
# Line 144 | Line 143 | disp_close()                   /* close our display process */
143   {
144          int     rval;
145  
146 <        if (pipesiz <= 0)
146 >        if (dpout == NULL)
147                  return(-1);
148          disp_result(DS_SHUTDOWN, 0, NULL);
149          fclose(dpout);
150          dpout = NULL;
152        pipesiz = 0;
151          return(close_process(dpd));
152   }
153  
# Line 160 | Line 158 | char   *p;
158   {
159          MSGHEAD msg;
160  
161 +        if (dpout == NULL)
162 +                return;
163          msg.type = type;
164          msg.nbytes = nbytes;
165          fwrite((char *)&msg, sizeof(MSGHEAD), 1, dpout);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines