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

Comparing ray/src/cv/bsdf2ttree.c (file contents):
Revision 2.1 by greg, Fri Oct 19 04:14:29 2012 UTC vs.
Revision 2.2 by greg, Sat Oct 20 17:01:26 2012 UTC

# Line 160 | Line 160 | main(int argc, char *argv[])
160                  }
161                  argv += 2; argc -= 2;
162          }
163 <        if (argc == 2)
163 >        if (argc == 2) {                        /* open input if given */
164                  fpin = fopen(argv[1], "r");
165 <        else if (argc != 1)
165 >                if (fpin == NULL) {
166 >                        fprintf(stderr, "%s: cannot open BSDF interpolant '%s'\n",
167 >                                        progname, argv[1]);
168 >                        return(1);
169 >                }
170 >        } else if (argc != 1)
171                  goto userr;
172          SET_FILE_BINARY(fpin);                  /* load BSDF interpolant */
173          if (!load_bsdf_rep(fpin))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines