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

Comparing ray/src/gen/mkillum.c (file contents):
Revision 2.18 by greg, Wed Oct 22 02:06:34 2003 UTC vs.
Revision 2.19 by schorsch, Sun Nov 16 10:29:38 2003 UTC

# Line 10 | Line 10 | static const char RCSid[] = "$Id$";
10  
11   #include  "platform.h"
12   #include  "mkillum.h"
13 + #include  "random.h"
14  
15                                  /* default parameters */
16   #define  SAMPDENS       48              /* points per projected steradian */
# Line 57 | Line 58 | int    doneheader = 0;         /* printed header yet? */
58  
59   int     warnings = 1;           /* print warnings? */
60  
61 + void init(void);
62 + void filter(register FILE       *infp, char     *name);
63 + void xoptions(char      *s, char        *nm);
64 + void printopts(void);
65 + void printhead(register int  ac, register char  **av);
66 + void xobject(FILE  *fp, char  *nm);
67  
68 < main(argc, argv)                /* compute illum distributions using rtrace */
69 < int     argc;
70 < char    *argv[];
68 >
69 > int
70 > main(           /* compute illum distributions using rtrace */
71 >        int     argc,
72 >        char    *argv[]
73 > )
74   {
75          char    *rtpath;
76          FILE    *fp;
# Line 126 | Line 136 | char   *argv[];
136                  }
137          else
138                  filter(stdin, "standard input");
139 <        quit(0);
139 >        return 0;
140   }
141  
142  
# Line 147 | Line 157 | int  status;
157          exit(status);
158   }
159  
160 <
161 < init()                          /* start rtrace and set up buffers */
160 > void
161 > init(void)                              /* start rtrace and set up buffers */
162   {
163          extern int  o_face(), o_sphere(), o_ring();
164          int     maxbytes;
# Line 182 | Line 192 | init()                         /* start rtrace and set up buffers */
192  
193  
194   void
195 < eputs(s)                                /* put string to stderr */
196 < register char  *s;
195 > eputs(                          /* put string to stderr */
196 >        register char  *s
197 > )
198   {
199          static int  midline = 0;
200  
# Line 206 | Line 217 | char  *s;
217   }
218  
219  
220 < filter(infp, name)              /* process stream */
221 < register FILE   *infp;
222 < char    *name;
220 > void
221 > filter(         /* process stream */
222 >        register FILE   *infp,
223 >        char    *name
224 > )
225   {
226          char    buf[512];
227          FILE    *pfp;
# Line 238 | Line 251 | char   *name;
251   }
252  
253  
254 < xoptions(s, nm)                 /* process options in string s */
255 < char    *s;
256 < char    *nm;
254 > void
255 > xoptions(                       /* process options in string s */
256 >        char    *s,
257 >        char    *nm
258 > )
259   {
260          extern FILE     *freopen();
261          char    buf[64];
# Line 399 | Line 414 | char   *nm;
414          printf("# %s", s+2);
415   }
416  
417 <
418 < printopts()                     /* print out option default values */
417 > void
418 > printopts(void)                 /* print out option default values */
419   {
420          printf("m=%-15s\t\t# material name\n", thisillum.matname);
421          printf("f=%-15s\t\t# data file name\n", thisillum.datafile);
# Line 421 | Line 436 | printopts()                    /* print out option default values */
436   }
437  
438  
439 < printhead(ac, av)                       /* print out header */
440 < register int  ac;
441 < register char  **av;
439 > void
440 > printhead(                      /* print out header */
441 >        register int  ac,
442 >        register char  **av
443 > )
444   {
445          putchar('#');
446          while (ac-- > 0) {
# Line 434 | Line 451 | register char  **av;
451   }
452  
453  
454 < xobject(fp, nm)                         /* translate an object from fp */
455 < FILE  *fp;
456 < char  *nm;
454 > void
455 > xobject(                                /* translate an object from fp */
456 >        FILE  *fp,
457 >        char  *nm
458 > )
459   {
460          OBJREC  thisobj;
461          char  str[MAXSTR];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines