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 1.14 by greg, Wed Feb 28 16:03:57 1990 UTC vs.
Revision 1.16 by greg, Mon Mar 12 11:08:44 1990 UTC

# Line 20 | Line 20 | static char SCCSid[] = "$SunId$ LBL";
20   #define DEVPATH         getenv("PATH")  /* device search path */
21   #endif
22  
23 + #ifndef DELAY
24 + #define DELAY           20              /* seconds to wait for response */
25 + #endif
26 +
27   #ifndef BSD
28   #define vfork           fork
29   #endif
30  
31   extern char     *getpath(), *getenv();
32  
33 < int     onsigio();
30 <
31 < int     comm_close(), comm_clear(), comm_paintr(), comm_errout(),
33 > static int      comm_close(), comm_clear(), comm_paintr(), comm_errout(),
34                  comm_getcur(), comm_comout(), comm_comin(), comm_flush();
35  
36   struct driver   comm_driver = {
# Line 74 | Line 76 | char   *dname, *id;
76                  goto syserr;
77          if ((devin = fdopen(p2[0], "r")) == NULL)
78                  goto syserr;
79 <                                                /* verify & get resolution */
79 >                                                /* verify initialization */
80          putw(COM_SENDM, devout);
81          fflush(devout);
82          if (getw(devin) != COM_RECVM)
83                  return(NULL);
84 <        fread((char *)&comm_driver.pixaspect,
85 <                        sizeof(comm_driver.pixaspect), 1, devin);
84 <        comm_driver.xsiz = getw(devin);
85 <        comm_driver.ysiz = getw(devin);
84 >                                                /* get driver parameters */
85 >        comm_flush();
86                                                  /* set error vectors */
87          cmdvec = comm_comout;
88          if (wrnvec != NULL)
# Line 141 | Line 141 | comm_flush()                           /* flush output to driver */
141          fflush(devout);
142          if (getc(devin) != COM_FLUSH)
143                  reply_error("flush");
144 +        fread((char *)&comm_driver.pixaspect,
145 +                        sizeof(comm_driver.pixaspect), 1, devin);
146 +        comm_driver.xsiz = getw(devin);
147 +        comm_driver.ysiz = getw(devin);
148          comm_driver.inpready = getw(devin);
149   }
150  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines