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

Comparing ray/src/rt/devcomm.c (file contents):
Revision 2.17 by greg, Tue Jul 8 18:25:00 2014 UTC vs.
Revision 2.20 by greg, Thu May 23 22:45:04 2024 UTC

# Line 10 | Line 10 | static const char      RCSid[] = "$Id$";
10   #include "copyright.h"
11  
12   #include <sys/types.h>
13 < #ifndef _WIN32
13 > #if !defined(_WIN32) && !defined(_WIN64)
14   #include <sys/wait.h>
15   #endif
16  
# Line 28 | Line 28 | int    devchild;
28  
29   static struct driver * final_connect(void);
30   static void mygets(char *s, FILE        *fp);
31 < static void myputs(char *s, FILE        *fp);
31 > static void myputs(const char   *s, FILE        *fp);
32   static void reply_error(char    *routine);
33   static void getstate(void);
34  
# Line 147 | Line 147 | comm_close(void)                       /* done with driver */
147          fclose(devin);
148          if (devchild < 0)
149                  return;
150 < #ifndef _WIN32
150 > #if !defined(_WIN32) && !defined(_WIN64)
151          while ((pid = wait(0)) != -1 && pid != devchild)
152                  ;
153   #endif
# Line 177 | Line 177 | comm_paintr(   /* paint a rectangle */
177   )
178   {
179          putc(COM_PAINTR, devout);
180 <        fwrite((char *)col, sizeof(COLOR), 1, devout);
180 >        putbinary(col, sizeof(COLOR), 1, devout);
181          putw(xmin, devout);
182          putw(ymin, devout);
183          putw(xmax, devout);
# Line 217 | Line 217 | comm_getcur(                   /* get and return cursor position */
217  
218   static void
219   comm_comout(                    /* print string to command line */
220 <        char    *str
220 >        const char      *str
221   )
222   {
223          putc(COM_COMOUT, devout);
# Line 265 | Line 265 | mygets(                                /* get string from file (with nul) */
265  
266   static void
267   myputs(                         /* put string to file (with nul) */
268 <        char    *s,
268 >        const char      *s,
269          FILE    *fp
270   )
271   {
# Line 289 | Line 289 | reply_error(                   /* what should we do here? */
289   static void
290   getstate(void)                          /* get driver state variables */
291   {
292 <        fread((char *)&comm_driver.pixaspect,
292 >        getbinary((char *)&comm_driver.pixaspect,
293                          sizeof(comm_driver.pixaspect), 1, devin);
294          comm_driver.xsiz = getw(devin);
295          comm_driver.ysiz = getw(devin);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines