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.35 by schorsch, Sun Jul 27 22:12:02 2003 UTC vs.
Revision 3.38 by greg, Fri Oct 5 19:19:16 2018 UTC

# Line 26 | Line 26 | static int     inp_flags;
26   static SUBPROC  dpd;
27   static FILE     *dpout;
28  
29 + static void disp_flush(void);
30 + static void disp_result(int type, int nbytes, char *p);
31  
32 < disp_open(dname)                /* open the named display driver */
33 < char    *dname;
32 >
33 > void
34 > disp_open(              /* open the named display driver */
35 >        char    *dname
36 > )
37   {
38          char    buf[sizeof(HDGRID)+512], fd0[8], fd1[8], *cmd[5], *sfn;
39          int     i, n, len;
# Line 93 | Line 98 | char   *dname;
98   }
99  
100  
101 < disp_packet(p)                  /* display a packet */
102 < register PACKHEAD       *p;
101 > void
102 > disp_packet(                    /* display a packet */
103 >        PACKHEAD        *p
104 > )
105   {
106          disp_result(DS_BUNDLE, packsiz(p->nr), (char *)p);
107   }
108  
109  
110 < disp_check(block)               /* check display process */
111 < int     block;
110 > int
111 > disp_check(             /* check display process */
112 >        int     block
113 > )
114   {
115          MSGHEAD msg;
116          int     n;
# Line 238 | Line 247 | fcntlerr:
247          error(SYSTEM, "cannot change display blocking mode");
248   readerr:
249          error(SYSTEM, "error reading from display process");
250 +        return -1; /* pro forma return */
251   }
252  
253  
254   int
255 < disp_close()                    /* close our display process */
255 > disp_close(void)                        /* close our display process */
256   {
247        int     rval;
248
257          if (dpout == NULL)
258                  return(-1);
259          myeye.rng = 0;
# Line 257 | Line 265 | disp_close()                   /* close our display process */
265   }
266  
267  
268 < disp_result(type, nbytes, p)    /* queue result message to display process */
269 < int     type, nbytes;
270 < char    *p;
268 > static void
269 > disp_result(    /* queue result message to display process */
270 >        int     type,
271 >        int     nbytes,
272 >        char    *p
273 > )
274   {
275          MSGHEAD msg;
276                                          /* consistency checks */
# Line 271 | Line 282 | char   *p;
282                  return;
283          msg.type = type;
284          msg.nbytes = nbytes;
285 <        fwrite((char *)&msg, sizeof(MSGHEAD), 1, dpout);
285 >        putbinary(&msg, sizeof(MSGHEAD), 1, dpout);
286          if (nbytes > 0)
287 <                fwrite(p, 1, nbytes, dpout);
287 >                putbinary(p, 1, nbytes, dpout);
288   }
289  
290  
291 < disp_flush()                    /* flush output to display */
291 > static void
292 > disp_flush(void)                        /* flush output to display */
293   {
294          if (fflush(dpout) < 0)
295                  error(SYSTEM, "error writing to the display process");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines