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

Comparing ray/src/gen/genrev.c (file contents):
Revision 2.9 by greg, Sat Oct 11 04:29:39 2008 UTC vs.
Revision 2.13 by greg, Sat Dec 7 02:21:42 2019 UTC

# Line 16 | Line 16 | static const char      RCSid[] = "$Id$";
16   #include  <string.h>
17   #include  <math.h>
18  
19 + #include  "rtio.h"
20   #include  "rterror.h"
21   #include  "resolu.h"
21 #include  "rterror.h"
22   #include  "calcomp.h"
23  
24   #define  ZNAME          "Z`SYS`"                /* z function name */
# Line 100 | Line 100 | char  *argv[];
100          int  i, nseg;
101          int  orient;
102  
103 +        esupport |= E_VARIABLE|E_FUNCTION|E_RCONST;
104 +        esupport &= ~(E_OUTCHAN|E_INCHAN);
105          varset("PI", ':', PI);
106          funset("hermite", 5, ':', l_hermite);
107          funset("bezier", 5, ':', l_bezier);
# Line 111 | Line 113 | char  *argv[];
113          for (i = 6; i < argc; i++)
114                  if (!strcmp(argv[i], "-e"))
115                          scompile(argv[++i], NULL, 0);
116 <                else if (!strcmp(argv[i], "-f"))
117 <                        fcompile(argv[++i]);
118 <                else if (!strcmp(argv[i], "-s"))
116 >                else if (!strcmp(argv[i], "-f")) {
117 >                        char  *fpath = getpath(argv[++i], getrlibpath(), 0);
118 >                        if (fpath == NULL) {
119 >                                fprintf(stderr, "%s: cannot find file '%s'\n",
120 >                                                argv[0], argv[i]);
121 >                                quit(1);
122 >                        }
123 >                        fcompile(fpath);
124 >                } else if (!strcmp(argv[i], "-s"))
125                          smooth = 1;
126                  else
127                          goto userror;
# Line 122 | Line 130 | char  *argv[];
130          scompile(stmp, NULL, 0);
131          sprintf(stmp, "%s(t)=%s;", RNAME, argv[4]);
132          scompile(stmp, NULL, 0);
133 <        nseg = atoi(argv[5]);
133 >        nseg = eval(argv[5]) + .5;
134          if (nseg <= 0)
135                  goto userror;
136          modname = smooth ? "Phong" : argv[1];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines