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

Comparing ray/src/gen/gencat.c (file contents):
Revision 2.2 by greg, Mon Aug 2 14:23:02 1993 UTC vs.
Revision 2.6 by greg, Thu Sep 20 21:28:35 2007 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1993 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*****************************************************************************
5    This program is to make series of right triangles forming hyperbolic cosin
6    (ie, cosh) curve in between of 2 points.
# Line 28 | Line 25 | static char SCCSid[] = "$SunId$ LBL";
25   ******************************************************************************/
26  
27   #include <stdio.h>
28 + #include <stdlib.h>
29   #include <math.h>
30  
33 #ifdef  DCL_ATOF
34 extern double  atof();
35 #endif
36
31   char  *cmtype, *cname;
32   double z0, z1;
33   double k, D;
# Line 70 | Line 64 | fprintf(stderr, "Interation limit exceeded -- invalid
64   }
65  
66  
67 + static void
68 + printhead(ac, av)               /* print command header */
69 + register int  ac;
70 + register char  **av;
71 + {
72 +        putchar('#');
73 +        while (ac--) {
74 +                putchar(' ');
75 +                fputs(*av++, stdout);
76 +        }
77 +        putchar('\n');
78 + }
79 +
80 + int
81   main (argc, argv)
82   int argc;
83   char *argv[];
# Line 83 | Line 91 | char *argv[];
91     int  n;
92  
93     if (argc != 11) {
94 <      fprintf(stderr, "Usage: gencat material name x0 y0 z0 x1 y1 z1 k d\n");
94 >      fprintf(stderr, "Usage: %s  material name x0 y0 z0 x1 y1 z1 k d\n",
95 >                argv[0]);
96        exit(1);
97     }      
98  
# Line 128 | Line 137 | char *argv[];
137        }
138        h += delh;
139     }
140 +   return 0;
141   }
142  
133
134 printhead(ac, av)               /* print command header */
135 register int  ac;
136 register char  **av;
137 {
138        putchar('#');
139        while (ac--) {
140                putchar(' ');
141                fputs(*av++, stdout);
142        }
143        putchar('\n');
144 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines