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.2 by greg, Fri Sep 29 13:23:54 1989 UTC vs.
Revision 1.3 by greg, Mon Jan 8 13:53:55 1990 UTC

# Line 61 | Line 61 | int  (*c_get)(), (*s_put)();
61          buf[i] = '\0';
62          (*s_put)("\n");
63   }
64 +
65 +
66 + #include  "driver.h"
67 +
68 + static char  mybuf[512];
69 +
70 +
71 + char *
72 + getcombuf(d)                            /* return buffer for my command */
73 + struct driver  *d;
74 + {
75 +        d->inpready++;
76 +        return(mybuf+strlen(mybuf));
77 + }
78 +
79 +
80 + fromcombuf(b, d)                        /* get command from my buffer */
81 + char  *b;
82 + struct driver  *d;
83 + {
84 +        register char   *cp;
85 +                                                /* get next command */
86 +        for (cp = mybuf; *cp != '\n'; cp++)
87 +                if (!*cp)
88 +                        return(0);
89 +        *cp++ = '\0';
90 +        (*d->comout)(mybuf);                    /* echo my command */
91 +        (*d->comout)("\n");
92 +                                                /* send it as reply */
93 +        strcpy(b, mybuf);
94 +        d->inpready--;
95 +                                                /* get next command */
96 +        strcpy(mybuf, cp);
97 +        return(1);
98 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines