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.6 by greg, Mon Aug 4 22:37:53 2003 UTC vs.
Revision 2.7 by schorsch, Sun Nov 16 10:29:38 2003 UTC

# Line 11 | Line 11 | static const char      RCSid[] = "$Id$";
11   *      9/24/87
12   */
13  
14 + #include  <stdlib.h>
15   #include  <stdio.h>
16   #include  <math.h>
17 + #include  <string.h>
18 +
19   #include  "calcomp.h"
20   #include  "fvect.h"
21  
# Line 26 | Line 29 | static const char      RCSid[] = "$Id$";
29   #define  max(a,b)       ((a) > (b) ? (a) : (b))
30  
31  
32 + /* XXX redundant, move to library */
33   double  l_hermite(char *), l_bezier(char *), l_bspline(char *);
30 void  quit();
34  
35  
36 + static void printhead(int  ac, char  **av);
37 +
38 +
39 + int
40   main(argc, argv)
41   int  argc;
42   char  *argv[];
43   {
44          char  stmp[256];
45 <        double  t, f, lastr, r;
45 >        double  t, f, lastr = 0, r;
46          FVECT  lastp, p;
47          int  i, nseg;
48  
# Line 110 | Line 117 | char  *argv[];
117                  VCOPY(lastp, p);
118                  lastr = r;
119          }
120 <        quit(0);
120 >        return 0;
121  
122   userror:
123          fprintf(stderr,
124   "Usage: %s material name x(t) y(t) z(t) r(t) nseg [-e expr] [-f file]\n",
125                          argv[0]);
126 <        quit(1);
126 >        return 1;
127   }
128  
129  
# Line 144 | Line 151 | int  code;
151   }
152  
153  
154 < printhead(ac, av)               /* print command header */
155 < register int  ac;
156 < register char  **av;
154 > void
155 > printhead(              /* print command header */
156 >        register int  ac,
157 >        register char  **av
158 > )
159   {
160          putchar('#');
161          while (ac--) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines