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.7 by schorsch, Sun Nov 16 10:29:38 2003 UTC vs.
Revision 2.9 by greg, Fri Jan 12 00:50:17 2018 UTC

# Line 17 | Line 17 | static const char      RCSid[] = "$Id$";
17   #include  <string.h>
18  
19   #include  "calcomp.h"
20 + #include  "resolu.h"
21 + #include  "rterror.h"
22   #include  "fvect.h"
23  
24   #define  XNAME          "X`SYS`"                /* x function name */
# Line 33 | Line 35 | static const char      RCSid[] = "$Id$";
35   double  l_hermite(char *), l_bezier(char *), l_bspline(char *);
36  
37  
36 static void printhead(int  ac, char  **av);
37
38
38   int
39   main(argc, argv)
40   int  argc;
# Line 46 | Line 45 | char  *argv[];
45          FVECT  lastp, p;
46          int  i, nseg;
47  
48 +        esupport |= E_VARIABLE|E_FUNCTION|E_RCONST;
49 +        esupport &= ~(E_OUTCHAN|E_INCHAN);
50          varset("PI", ':', PI);
51          funset("hermite", 5, ':', l_hermite);
52          funset("bezier", 5, ':', l_bezier);
# Line 74 | Line 75 | char  *argv[];
75          if (nseg <= 0)
76                  goto userror;
77  
78 <        printhead(argc, argv);
78 >        fputs("# ", stdout);
79 >        printargs(argc, argv, stdout);
80          eclock = 0;
81  
82          for (i = 0; i <= nseg; i++) {
# Line 124 | Line 126 | userror:
126   "Usage: %s material name x(t) y(t) z(t) r(t) nseg [-e expr] [-f file]\n",
127                          argv[0]);
128          return 1;
127 }
128
129
130 void
131 eputs(msg)
132 char  *msg;
133 {
134        fputs(msg, stderr);
135 }
136
137
138 void
139 wputs(msg)
140 char  *msg;
141 {
142        eputs(msg);
143 }
144
145
146 void
147 quit(code)
148 int  code;
149 {
150        exit(code);
151 }
152
153
154 void
155 printhead(              /* print command header */
156        register int  ac,
157        register char  **av
158 )
159 {
160        putchar('#');
161        while (ac--) {
162                putchar(' ');
163                fputs(*av++, stdout);
164        }
165        putchar('\n');
129   }
130  
131  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines