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.40 by schorsch, Thu Jun 5 19:29:34 2003 UTC vs.
Revision 2.42 by schorsch, Mon Jul 21 22:30:19 2003 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7   *  External symbols declared in rpaint.h
8   */
9  
10 #include  <ctype.h>
11
10   #include "copyright.h"
11  
12 + #include  <ctype.h>
13 + #include  <string.h>
14 +
15   #include  "platform.h"
16   #include  "ray.h"
17   #include  "otypes.h"
# Line 68 | Line 69 | char  *s;
69          while (isspace(*s))
70                  s++;
71          if (*s == '-') {                        /* command line parameters */
72 <                copystruct(&nv, &ourview);
72 >                nv = ourview;
73                  if (sscanview(&nv, s))
74                          newview(&nv);
75                  else
# Line 170 | Line 171 | char  *s;
171          VIEW  nv;
172  
173          if (sscanf(s, "%s", buf) == 1) {        /* get parameters from a file */
174 <                copystruct(&nv, &stdview);
174 >                nv = stdview;
175                  if ((fname = getpath(buf, "", R_OK)) == NULL ||
176                                  (success = viewfile(fname, &nv, NULL)) == -1) {
177                          sprintf(errmsg, "cannot open \"%s\"", buf);
# Line 187 | Line 188 | char  *s;
188                  error(COMMAND, "no previous view");
189                  return;
190          }
191 <        copystruct(&nv, &ourview);
192 <        copystruct(&ourview, &oldview);
193 <        copystruct(&oldview, &nv);
191 >        nv = ourview;
192 >        ourview = oldview;
193 >        oldview = nv;
194          newimage();
195   }
196  
# Line 264 | Line 265 | char  *s;
265          buf[0] = '\0';
266          fgets(buf, sizeof(buf), fp);
267          pclose(fp);
268 <        copystruct(&nv, &stdview);
268 >        nv = stdview;
269          if (!sscanview(&nv, buf)) {
270                  error(COMMAND, "rad error -- no such view?");
271                  return;
# Line 463 | Line 464 | void  *p;
464                          (*dev->comout)(buf);
465                          (*dev->comin)(buf, NULL);
466                          if (buf[0] == '\0' ||
467 <                                        index("yY+1tTnN-0fF", buf[0]) == NULL)
467 >                                        strchr("yY+1tTnN-0fF", buf[0]) == NULL)
468                                  return(0);
469                  }
470 <                ptr->i = index("yY+1tT", buf[0]) != NULL;
470 >                ptr->i = strchr("yY+1tT", buf[0]) != NULL;
471                  return(1);
472          case 'C':                       /* color */
473                  if (sscanf(str, "%lf %lf %lf", &d0, &d1, &d2) != 3) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines