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

Comparing ray/src/rt/editline.c (file contents):
Revision 1.3 by greg, Mon Jan 8 13:53:55 1990 UTC vs.
Revision 2.2 by greg, Wed Oct 26 10:04:12 1994 UTC

# Line 68 | Line 68 | int  (*c_get)(), (*s_put)();
68   static char  mybuf[512];
69  
70  
71 < char *
72 < getcombuf(d)                            /* return buffer for my command */
73 < struct driver  *d;
71 > tocombuf(b, d)                          /* add command(s) to my buffer */
72 > register char  *b;
73 > register struct driver  *d;
74   {
75 <        d->inpready++;
76 <        return(mybuf+strlen(mybuf));
75 >        register char  *cp;
76 >
77 >        for (cp = mybuf; *cp; cp++)
78 >                ;
79 >        while (*cp++ = *b)
80 >                if (*b++ == '\n')
81 >                        d->inpready++;
82   }
83  
84  
# Line 87 | Line 92 | struct driver  *d;
92                  if (!*cp)
93                          return(0);
94          *cp++ = '\0';
95 + #ifdef DEBUG
96          (*d->comout)(mybuf);                    /* echo my command */
97          (*d->comout)("\n");
98 + #endif
99                                                  /* send it as reply */
100          strcpy(b, mybuf);
101          d->inpready--;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines