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.42 by greg, Thu Jan 4 23:28:54 2018 UTC vs.
Revision 2.44 by greg, Sat Dec 28 18:05:14 2019 UTC

# Line 8 | Line 8 | static const char RCSid[] = "$Id$";
8   */
9  
10   #define _USE_MATH_DEFINES
11 #include <stdio.h>
11   #include <stdlib.h>
12   #include <math.h>
13   #include "random.h"
# Line 633 | Line 632 | main(int argc, char *argv[])
632                                  if (strchr(argv[++i], '=') != NULL) {
633                                          add_wbsdf("-f", 1);
634                                          add_wbsdf(argv[i], 1);
635 <                                } else
636 <                                        fcompile(argv[i]);
635 >                                } else {
636 >                                        char    *fpath = getpath(argv[i],
637 >                                                            getrlibpath(), 0);
638 >                                        if (fpath == NULL) {
639 >                                                fprintf(stderr,
640 >                                                "%s: cannot find file '%s'\n",
641 >                                                        argv[0], argv[i]);
642 >                                                return(1);
643 >                                        }
644 >                                        fcompile(fpath);
645 >                                        single_plane_incident = 0;
646 >                                }
647                          } else
648                                  dofwd = (argv[i][0] == '+');
649                          break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines