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 2.8 by schorsch, Tue Mar 30 16:13:01 2004 UTC vs.
Revision 2.9 by greg, Thu Nov 14 02:05:09 2013 UTC

# Line 23 | Line 23 | static const char      RCSid[] = "$Id$";
23   #define iskill(c)       ((c) == 'U'-'@' || (c) == 'X'-'@')
24  
25  
26 < extern void
26 > void
27   editline(       /* edit input line */
28          char  *buf,
29          dr_getchf_t *c_get,
# Line 32 | Line 32 | editline(      /* edit input line */
32   {
33          static char  erases[] = "\b \b";
34          static char  obuf[4];
35 <        register int  i;
36 <        register int  c;
35 >        int  i;
36 >        int  c;
37          
38          i = 0;
39          while ((c = (*c_get)()&0177) != '\n' && c != '\r')
# Line 76 | Line 76 | static char  mybuf[512];
76  
77  
78   void
79 < tocombuf(b, d)                          /* add command(s) to my buffer */
80 < register char  *b;
81 < register struct driver  *d;
79 > tocombuf(                               /* add command(s) to my buffer */
80 >        char  *b,
81 >        struct driver  *d
82 > )
83   {
84 <        register char  *cp;
84 >        char  *cp;
85          char  *comstart;
86  
87          for (cp = mybuf; *cp; cp++)
# Line 98 | Line 99 | register struct driver  *d;
99  
100  
101   int
102 < fromcombuf(b, d)                        /* get command from my buffer */
103 < char  *b;
104 < struct driver  *d;
102 > fromcombuf(                             /* get command from my buffer */
103 >        char  *b,
104 >        struct driver  *d
105 > )
106   {
107 <        register char   *cp;
107 >        char    *cp, *cp1;
108                                                  /* get next command */
109          for (cp = mybuf; *cp != '\n'; cp++)
110                  if (!*cp)
# Line 116 | Line 118 | struct driver  *d;
118          strcpy(b, mybuf);
119          d->inpready--;
120                                                  /* advance commands */
121 <        strcpy(mybuf, cp);
121 >        cp1 = mybuf;
122 >        while ((*cp1++ = *cp++))
123 >                ;
124          return(1);
125   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines