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

Comparing ray/src/cv/mgflib/mgf2inv.c (file contents):
Revision 1.10 by greg, Tue Aug 5 20:40:16 2003 UTC vs.
Revision 1.11 by schorsch, Sat Nov 15 17:54:06 2003 UTC

# Line 61 | Line 61 | char   tabs[MAXIND*SHIFTW+1];  /* current tab-in string *
61  
62   int     outtype = O_INV2;       /* output format */
63  
64 < extern int      i_comment(), i_object(), i_xf(),
65 <                i_cyl(), i_face(), i_sph();
64 > int i_comment(int ac, char **av);
65 > int i_object(int ac, char **av);
66 > int i_xf(int ac, char **av);
67 > int put_xform(register XF_SPEC *spec);
68 > int put_material(void);
69 > int i_face(int ac, char **av);
70 > int i_sph(int ac, char **av);
71 > int i_cyl(int ac, char **av);
72 > char * to_id(register char *name);
73 > char * to_id(register char *name);
74 > void flush_cache(void);
75  
67 extern char     *to_id();
76  
77 <
78 < main(argc, argv)
79 < int     argc;
80 < char    *argv[];
77 > int
78 > main(
79 >        int     argc,
80 >        char    *argv[]
81 > )
82   {
83          int     i;
84                                  /* initialize dispatch table */
# Line 154 | Line 163 | userr:
163   }
164  
165  
166 < indent(deeper)                          /* indent in or out */
167 < int     deeper;
166 > void
167 > indent(                         /* indent in or out */
168 >        int     deeper
169 > )
170   {
171          static int      level;          /* current nesting level */
172          register int    i;
# Line 175 | Line 186 | int    deeper;
186  
187  
188   int
189 < i_comment(ac, av)                       /* transfer comment as is */
190 < int     ac;
191 < char    **av;
189 > i_comment(                      /* transfer comment as is */
190 >        int     ac,
191 >        char    **av
192 > )
193   {
194          fputs(tabs, stdout);
195          putchar('#');                   /* Inventor comment character */
# Line 191 | Line 203 | char   **av;
203  
204  
205   int
206 < i_object(ac, av)                        /* group object name */
207 < int     ac;
208 < char    **av;
206 > i_object(                       /* group object name */
207 >        int     ac,
208 >        char    **av
209 > )
210   {
211          static int      objnest;
212  
# Line 217 | Line 230 | char   **av;
230  
231  
232   int
233 < i_xf(ac, av)                            /* transform object(s) */
234 < int     ac;
235 < char    **av;
233 > i_xf(                           /* transform object(s) */
234 >        int     ac,
235 >        char    **av
236 > )
237   {
238          static long     xfid;
239          register XF_SPEC        *spec;
# Line 285 | Line 299 | char   **av;
299  
300  
301   int
302 < put_xform(spec)                 /* translate and print transform */
303 < register XF_SPEC        *spec;
302 > put_xform(                      /* translate and print transform */
303 >        register XF_SPEC        *spec
304 > )
305   {
306          register char   **av;
307          register int    n;
# Line 316 | Line 331 | register XF_SPEC       *spec;
331  
332  
333   int
334 < put_material()                  /* put out current material */
334 > put_material(void)                      /* put out current material */
335   {
336          char    *mname = curmatname;
337          float   rgbval[3];
# Line 363 | Line 378 | put_material()                 /* put out current material */
378  
379  
380   int
381 < i_face(ac, av)                  /* translate an N-sided face */
382 < int     ac;
383 < char    **av;
381 > i_face(                 /* translate an N-sided face */
382 >        int     ac,
383 >        char    **av
384 > )
385   {
386          static char     lastmat[MAXID];
387          struct face     *newf;
# Line 413 | Line 429 | char   **av;
429  
430  
431   int
432 < i_sph(ac, av)                   /* translate sphere description */
433 < int     ac;
434 < char    **av;
432 > i_sph(                  /* translate sphere description */
433 >        int     ac,
434 >        char    **av
435 > )
436   {
437          register C_VERTEX       *cent;
438  
# Line 443 | Line 460 | char   **av;
460  
461  
462   int
463 < i_cyl(ac, av)                   /* translate a cylinder description */
464 < int     ac;
465 < char    **av;
463 > i_cyl(                  /* translate a cylinder description */
464 >        int     ac,
465 >        char    **av
466 > )
467   {
468          register C_VERTEX       *v1, *v2;
469          FVECT   va;
# Line 491 | Line 509 | char   **av;
509  
510  
511   char *
512 < to_id(name)                     /* make sure a name is a valid Inventor ID */
513 < register char   *name;
512 > to_id(                  /* make sure a name is a valid Inventor ID */
513 >        register char   *name
514 > )
515   {
516          static char     id[MAXID];
517          register char   *cp;
# Line 507 | Line 526 | register char  *name;
526   }
527  
528  
529 < flush_cache()                   /* put out cached faces */
529 > void
530 > flush_cache(void)                       /* put out cached faces */
531   {
532          int     donorms = 0;
533          register struct face    *f;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines