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.2 by greg, Wed Oct 25 16:49:45 1989 UTC vs.
Revision 1.7 by greg, Tue Jan 30 11:37:52 1990 UTC

# Line 62 | Line 62 | char   *argv[];
62          if ((dev = dinit(argv[0], argv[3])) == NULL)
63                  quit(1);
64          putw(COM_RECVM, devout);                /* verify initialization */
65 +        fwrite((char *)&dev->pixaspect, sizeof(dev->pixaspect), 1, devout);
66          putw(dev->xsiz, devout);
67          putw(dev->ysiz, devout);
68          fflush(devout);
# Line 102 | Line 103 | r_paintr()                             /* paint a rectangle */
103          int     xmin, ymin, xmax, ymax;
104  
105          nrays += 5;                     /* pretend */
106 <        fread(col, sizeof(COLOR), 1, devin);
106 >        fread((char *)col, sizeof(COLOR), 1, devin);
107          xmin = getw(devin); ymin = getw(devin);
108          xmax = getw(devin); ymax = getw(devin);
109          (*dev->paintr)(col, xmin, ymin, xmax, ymax);
110                                          /* check for input */
111 <        if (dev->inpready > notified) {
111 >        if (!notified && dev->inpready > 0) {
112 >                notified = 1;
113                  kill(getppid(), SIGIO);
112                notified = dev->inpready;
114          }
115   }
116  
# Line 144 | Line 145 | r_comout()                             /* print string to command line */
145  
146   r_comin()                               /* read string from command line */
147   {
148 <        char    buf[256];
148 >        char    buf[256], *prompt;
149 >                                        /* get prompt */
150 >        if (getc(devin)) {
151 >                mygets(buf, devin);
152 >                prompt = buf;
153 >        } else
154 >                prompt = NULL;
155                                          /* get string */
156 <        (*dev->comin)(buf);
156 >        (*dev->comin)(buf, prompt);
157                                          /* reply */
158          putc(COM_COMIN, devout);
159          myputs(buf, devout);
# Line 176 | Line 183 | register FILE  *fp;
183          do
184                  putc(*s, fp);
185          while (*s++);
179 }
180
181
182 repaint(xmin, ymin, xmax, ymax)         /* repaint section of display */
183 int     xmin, ymin, xmax, ymax;
184 {
185        /* no can do! */
186   }
187  
188  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines