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.7 by greg, Wed Nov 1 17:33:03 1989 UTC vs.
Revision 1.8 by greg, Mon Jan 8 13:37:54 1990 UTC

# Line 39 | Line 39 | int    comm_close(), comm_clear(), comm_paintr(), comm_er
39  
40   struct driver   comm_driver, comm_default = {
41          comm_close, comm_clear, comm_paintr, comm_getcur,
42 <        comm_comout, comm_comin,
43 <        MAXRES, MAXRES, 0
42 >        comm_comout, comm_comin
43   };
44  
45   FILE    *devin, *devout;
# Line 89 | Line 88 | char   *dname, *id;
88                  return(NULL);
89          comm_driver.xsiz = getw(devin);
90          comm_driver.ysiz = getw(devin);
91 +        fread(comm_driver.pixaspect, sizeof(comm_driver.pixaspect), 1, devin);
92                                                  /* input handling */
93          signal(SIGIO, onsigio);
94                                                  /* set error vectors */
# Line 123 | Line 123 | comm_clear(xres, yres)                         /* clear screen */
123   int     xres, yres;
124   {
125          putc(COM_CLEAR, devout);
126 <        fwrite(&xres, sizeof(xres), 1, devout);
127 <        fwrite(&yres, sizeof(yres), 1, devout);
126 >        putw(xres, devout);
127 >        putw(yres, devout);
128          fflush(devout);
129   }
130  
# Line 139 | Line 139 | int    xmin, ymin, xmax, ymax;
139  
140          putc(COM_PAINTR, devout);
141          fwrite(col, sizeof(COLOR), 1, devout);
142 <        fwrite(&xmin, sizeof(xmin), 1, devout);
143 <        fwrite(&ymin, sizeof(ymin), 1, devout);
144 <        fwrite(&xmax, sizeof(xmax), 1, devout);
145 <        fwrite(&ymax, sizeof(ymax), 1, devout);
142 >        putw(xmin, devout);
143 >        putw(ymin, devout);
144 >        putw(xmax, devout);
145 >        putw(ymax, devout);
146          if (nrays - lastflush >= WFLUSH) {
147                  fflush(devout);
148                  lastflush = nrays;
# Line 161 | Line 161 | int    *xp, *yp;
161          if (getc(devin) != COM_GETCUR)
162                  reply_error("getcur");
163          c = getc(devin);
164 <        fread(xp, sizeof(*xp), 1, devin);
165 <        fread(yp, sizeof(*yp), 1, devin);
164 >        *xp = getw(devin);
165 >        *yp = getw(devin);
166          return(c);
167   }
168  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines