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

Comparing ray/src/util/rtcontrib.c (file contents):
Revision 1.8 by greg, Tue May 31 18:01:09 2005 UTC vs.
Revision 1.9 by greg, Wed Jun 1 16:11:01 2005 UTC

# Line 202 | Line 202 | main(int argc, char *argv[])
202                                  break;
203                          case 'f':               /* file or i/o format */
204                                  if (!argv[i][2]) {
205 +                                        char    *fpath;
206                                          if (i >= argc-1) break;
207 <                                        fcompile(argv[++i]);
207 >                                        fpath = getpath(argv[++i],
208 >                                                        getrlibpath(), R_OK);
209 >                                        if (fpath == NULL) {
210 >                                                sprintf(errmsg,
211 >                                                        "cannot find file '%s'",
212 >                                                                argv[i]);
213 >                                                error(USER, errmsg);
214 >                                        }
215 >                                        fcompile(fpath);
216                                          continue;
217                                  }
218                                  setformat(argv[i]+2);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines