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

Comparing ray/src/common/header.c (file contents):
Revision 2.31 by greg, Wed May 10 18:02:08 2017 UTC vs.
Revision 2.32 by greg, Thu Aug 2 18:33:42 2018 UTC

# Line 170 | Line 170 | printargs(             /* print arguments to a file */
170  
171   int
172   formatval(                      /* get format value (return true if format) */
173 <        char  *r,
173 >        char  fmt[MAXFMTLEN],
174          const char  *s
175   )
176   {
177          const char  *cp = FMTSTR;
178 +        char  *r = fmt;
179  
180          while (*cp) if (*cp++ != *s++) return(0);
181          while (isspace(*s)) s++;
# Line 182 | Line 183 | formatval(                     /* get format value (return true if forma
183          if (r == NULL) return(1);
184          do
185                  *r++ = *s++;
186 <        while (*s && !isspace(*s));
186 >        while (*s && !isspace(*s) && r-fmt < MAXFMTLEN-1);
187          *r = '\0';
188          return(1);
189   }
# Line 230 | Line 231 | getheader(             /* get header from file */
231  
232   struct check {
233          FILE    *fp;
234 <        char    fs[64];
234 >        char    fs[MAXFMTLEN];
235   };
236  
237  
# Line 319 | Line 320 | globmatch(                     /* check for match of s against pattern p
320   int
321   checkheader(
322          FILE  *fin,
323 <        char  *fmt,
323 >        char  fmt[MAXFMTLEN],
324          FILE  *fout
325   )
326   {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines