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

Comparing ray/src/rt/rv2.c (file contents):
Revision 2.19 by greg, Thu Aug 26 11:24:04 1993 UTC vs.
Revision 2.20 by greg, Thu Sep 9 13:47:55 1993 UTC

# Line 32 | Line 32 | static char SCCSid[] = "$SunId$ LBL";
32  
33   extern char  *atos();
34  
35 < extern char  rifname[];                 /* rad input file name */
35 > extern char  rifname[128];              /* rad input file name */
36  
37   extern char  VersionID[];
38   extern char  *progname;
# Line 200 | Line 200 | char  *s;
200                  }
201                  s = sskip(s);
202          }
203 <        if (sscanf(s, "%s", rifname) != 1 && rifname[0] == '\0') {
203 >        while (isspace(*s))
204 >                s++;
205 >        if (*s)
206 >                atos(rifname, sizeof(rifname), s);
207 >        else if (rifname[0] == '\0') {
208                  error(COMMAND, "no previous rad file");
209                  return;
210          }
# Line 231 | Line 235 | char  *s;
235                  s = sskip(s);
236          else
237                  strcat(buf, "1");
238 <        if (sscanf(s, "%s", rifname) != 1 && rifname[0] == '\0') {
238 >        if (*s)
239 >                atos(rifname, sizeof(rifname), s);
240 >        else if (rifname[0] == '\0') {
241                  error(COMMAND, "no previous rad file");
242                  return;
243          }
# Line 662 | Line 668 | char  *s;
668          COLR  *scanline;
669          int  y;
670  
671 <        if (sscanf(s, "%s", buf) != 1 && buf[0] == '\0') {
671 >        while (isspace(*s))
672 >                s++;
673 >        if (*s)
674 >                atos(buf, sizeof(buf), s);
675 >        else if (buf[0] == '\0') {
676                  error(COMMAND, "no file");
677                  return;
678          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines