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 2.5 by greg, Thu Aug 18 00:52:48 2016 UTC vs.
Revision 2.6 by greg, Thu Feb 9 21:54:11 2023 UTC

# Line 127 | Line 127 | r_getcur()                             /* get and return cursor position */
127   }
128  
129  
130 + void
131 + mygets(char *s, FILE *fp)                       /* get string from file (with nul) */
132 + {
133 +        int     c;
134 +
135 +        while ((c = getc(fp)) != EOF)
136 +                if ((*s++ = c) == '\0')
137 +                        return;
138 +        *s = '\0';
139 + }
140 +
141 +
142 + void
143 + myputs(const char *s, FILE *fp)                 /* put string to file (with nul) */
144 + {
145 +        do
146 +                putc(*s, fp);
147 +        while (*s++);
148 + }
149 +
150 +
151   r_comout()                              /* print string to command line */
152   {
153          char    str[256];
# Line 155 | Line 176 | r_comin()                              /* read string from command line */
176   }
177  
178  
158 mygets(s, fp)                           /* get string from file (with nul) */
159 register char   *s;
160 register FILE   *fp;
161 {
162        register int    c;
163
164        while ((c = getc(fp)) != EOF)
165                if ((*s++ = c) == '\0')
166                        return;
167        *s = '\0';
168 }
169
170
171 myputs(s, fp)                           /* put string to file (with nul) */
172 register char   *s;
173 register FILE   *fp;
174 {
175        do
176                putc(*s, fp);
177        while (*s++);
178 }
179
180
179   void
180 < eputs(s)                                /* put string to stderr */
183 < register char  *s;
180 > eputs(const char *s)                            /* put string to stderr */
181   {
182          static int  midline = 0;
183  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines