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

Comparing ray/src/gen/gensurf.c (file contents):
Revision 2.24 by greg, Fri Jan 12 00:50:17 2018 UTC vs.
Revision 2.25 by greg, Fri May 4 23:56:49 2018 UTC

# Line 99 | Line 99 | char  *argv[];
99          for (i = 8; i < argc; i++)
100                  if (!strcmp(argv[i], "-e"))
101                          scompile(argv[++i], NULL, 0);
102 <                else if (!strcmp(argv[i], "-f"))
103 <                        fcompile(argv[++i]);
104 <                else if (!strcmp(argv[i], "-s"))
102 >                else if (!strcmp(argv[i], "-f")) {
103 >                        char  *fpath = getpath(argv[++i], getrlibpath(), 0);
104 >                        if (fpath == NULL) {
105 >                                fprintf(stderr, "%s: cannot find file '%s'\n",
106 >                                                argv[0], argv[i]);
107 >                                quit(1);
108 >                        }
109 >                        fcompile(fpath);
110 >                } else if (!strcmp(argv[i], "-s"))
111                          smooth++;
112                  else if (!strcmp(argv[i], "-o"))
113                          objout++;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines