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

Comparing ray/src/rt/devmain.c (file contents):
Revision 1.10 by greg, Tue Mar 6 17:44:44 1990 UTC vs.
Revision 1.11 by greg, Wed Mar 21 09:46:57 1990 UTC

# Line 57 | Line 57 | char   *argv[];
57          if ((dev = dinit(argv[0], argv[3])) == NULL)
58                  quit(1);
59          putw(COM_RECVM, devout);                /* verify initialization */
60 +        sendstate();
61          fflush(devout);
62                                                  /* loop on requests */
63          while ((com = getc(devin)) != EOF) {
# Line 106 | Line 107 | r_flush()                              /* flush output */
107          if (dev->flush != NULL)
108                  (*dev->flush)();
109          putc(COM_FLUSH, devout);
110 <        fwrite((char *)&dev->pixaspect, sizeof(dev->pixaspect), 1, devout);
110 <        putw(dev->xsiz, devout);
111 <        putw(dev->ysiz, devout);
112 <        putw(dev->inpready, devout);
110 >        sendstate();
111          fflush(devout);
112   }
113  
# Line 156 | Line 154 | r_comin()                              /* read string from command line */
154                                          /* reply */
155          putc(COM_COMIN, devout);
156          myputs(buf, devout);
157 <        putw(dev->inpready, devout);
157 >        sendstate();
158          fflush(devout);
159   }
160  
# Line 198 | Line 196 | register char  *s;
196                  fflush(stderr);
197                  inline = 0;
198          }
199 + }
200 +
201 +
202 + sendstate()                             /* send driver state variables */
203 + {
204 +        fwrite((char *)&dev->pixaspect, sizeof(dev->pixaspect), 1, devout);
205 +        putw(dev->xsiz, devout);
206 +        putw(dev->ysiz, devout);
207 +        putw(dev->inpready, devout);
208   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines