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.12 by greg, Thu Feb 22 11:46:13 1990 UTC vs.
Revision 1.13 by greg, Thu Feb 22 12:45:27 1990 UTC

# Line 12 | Line 12 | static char SCCSid[] = "$SunId$ LBL";
12  
13   #include "standard.h"
14  
15 #include <signal.h>
16
15   #include "color.h"
16  
17   #include "driver.h"
# Line 85 | Line 83 | char   *dname, *id;
83                          sizeof(comm_driver.pixaspect), 1, devin);
84          comm_driver.xsiz = getw(devin);
85          comm_driver.ysiz = getw(devin);
88                                                /* input handling */
89        signal(SIGIO, onsigio);
86                                                  /* set error vectors */
87          cmdvec = comm_comout;
88          if (wrnvec != NULL)
# Line 106 | Line 102 | comm_close()                   /* done with driver */
102          cmdvec = NULL;                          /* reset error vectors */
103          if (wrnvec != NULL)
104                  wrnvec = stderr_v;
109        signal(SIGIO, SIG_DFL);
105          fclose(devout);
106          fclose(devin);
107          while ((pid = wait(0)) != -1 && pid != devchild)
# Line 144 | Line 139 | comm_flush()                           /* flush output to driver */
139   {
140          putc(COM_FLUSH, devout);
141          fflush(devout);
142 +        if (getc(devin) != COM_FLUSH)
143 +                reply_error("flush");
144 +        comm_driver.inpready = getw(devin);
145   }
146  
147  
# Line 190 | Line 188 | char   *prompt;
188          if (getc(devin) != COM_COMIN)
189                  reply_error("comin");
190          mygets(buf, devin);
191 <        if (comm_driver.inpready > 0)
194 <                comm_driver.inpready--;
191 >        comm_driver.inpready = getw(devin);
192   }
193  
194  
# Line 236 | Line 233 | char   *routine;
233          stderr_v(routine);
234          stderr_v(": driver reply error\n");
235          quit(1);
239 }
240
241
242 static
243 onsigio()                               /* input ready */
244 {
245        comm_driver.inpready++;
236   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines