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

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

# Line 17 | Line 17 | static const char      RCSid[] = "$Id$";
17   #include  <string.h>
18  
19   #include  "calcomp.h"
20 + #include  "rtio.h"
21   #include  "resolu.h"
22   #include  "rterror.h"
23   #include  "fvect.h"
# Line 58 | Line 59 | char  *argv[];
59          for (i = 8; i < argc; i++)
60                  if (!strcmp(argv[i], "-e"))
61                          scompile(argv[++i], NULL, 0);
62 <                else if (!strcmp(argv[i], "-f"))
63 <                        fcompile(argv[++i]);
64 <                else
62 >                else if (!strcmp(argv[i], "-f")) {
63 >                        char  *fpath = getpath(argv[++i], getrlibpath(), 0);
64 >                        if (fpath == NULL) {
65 >                                fprintf(stderr, "%s: cannot find file '%s'\n",
66 >                                                argv[0], argv[i]);
67 >                                quit(1);
68 >                        }
69 >                        fcompile(fpath);
70 >                } else
71                          goto userror;
72  
73          sprintf(stmp, "%s(t)=%s;", XNAME, argv[3]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines