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.23 by greg, Thu Jan 6 15:52:17 1994 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 FILE  *popen();
36  
37 + extern char  rifname[128];              /* rad input file name */
38 +
39   extern char  VersionID[];
40   extern char  *progname;
41   extern char  *octname;
# Line 200 | Line 202 | char  *s;
202                  }
203                  s = sskip(s);
204          }
205 <        if (sscanf(s, "%s", rifname) != 1 && rifname[0] == '\0') {
205 >        while (isspace(*s))
206 >                s++;
207 >        if (*s)
208 >                atos(rifname, sizeof(rifname), s);
209 >        else if (rifname[0] == '\0') {
210                  error(COMMAND, "no previous rad file");
211                  return;
212          }
# Line 231 | Line 237 | char  *s;
237                  s = sskip(s);
238          else
239                  strcat(buf, "1");
240 <        if (sscanf(s, "%s", rifname) != 1 && rifname[0] == '\0') {
240 >        if (*s)
241 >                atos(rifname, sizeof(rifname), s);
242 >        else if (rifname[0] == '\0') {
243                  error(COMMAND, "no previous rad file");
244                  return;
245          }
# Line 628 | Line 636 | char  *s;
636          if (thisray.ro == NULL)
637                  (*dev->comout)("ray hit nothing");
638          else {
639 <                sprintf(buf, "ray hit %s %s \"%s\"",
640 <                                objptr(thisray.ro->omod)->oname,
639 >                sprintf(buf, "ray hit %s%s %s \"%s\"",
640 >                                thisray.rod < 0.0 ? "back of " : "",
641 >                                thisray.ro->omod == OVOID ? VOIDID :
642 >                                        objptr(thisray.ro->omod)->oname,
643                                  ofun[thisray.ro->otype].funame,
644                                  thisray.ro->oname);
645                  (*dev->comout)(buf);
# Line 662 | Line 672 | char  *s;
672          COLR  *scanline;
673          int  y;
674  
675 <        if (sscanf(s, "%s", buf) != 1 && buf[0] == '\0') {
675 >        while (isspace(*s))
676 >                s++;
677 >        if (*s)
678 >                atos(buf, sizeof(buf), s);
679 >        else if (buf[0] == '\0') {
680                  error(COMMAND, "no file");
681                  return;
682          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines