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.18 by greg, Wed Aug 25 14:13:51 1993 UTC vs.
Revision 2.19 by greg, Thu Aug 26 11:24:04 1993 UTC

# Line 163 | Line 163 | char  *s;
163  
164          if (sscanf(s, "%s", buf) == 1) {        /* get parameters from a file */
165                  copystruct(&nv, &stdview);
166 <                if ((fname = getpath(buf, NULL, 0)) == NULL ||
166 >                if ((fname = getpath(buf, "", R_OK)) == NULL ||
167                                  (success = viewfile(fname, &nv, NULL)) == -1) {
168                          sprintf(errmsg, "cannot open \"%s\"", buf);
169                          error(COMMAND, errmsg);
# Line 193 | Line 193 | char  *s;
193          char  *fname;
194          FILE  *fp;
195  
196 <        if (*atos(view, sizeof(view), s))
196 >        if (*atos(view, sizeof(view), s)) {
197 >                if (isint(view)) {
198 >                        error(COMMAND, "cannot write view by number");
199 >                        return;
200 >                }
201                  s = sskip(s);
202 +        }
203          if (sscanf(s, "%s", rifname) != 1 && rifname[0] == '\0') {
204                  error(COMMAND, "no previous rad file");
205                  return;
# Line 230 | Line 235 | char  *s;
235                  error(COMMAND, "no previous rad file");
236                  return;
237          }
238 <        fname = getpath(rifname, NULL, 0);
234 <        if (fname == NULL || access(fname, R_OK) == -1) {
238 >        if ((fname = getpath(rifname, "", R_OK)) == NULL) {
239                  sprintf(errmsg, "cannot access \"%s\"", rifname);
240                  error(COMMAND, errmsg);
241                  return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines