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

Comparing ray/src/ot/writeoct.c (file contents):
Revision 2.4 by greg, Fri Mar 14 21:27:46 2003 UTC vs.
Revision 2.7 by greg, Tue Nov 9 16:09:20 2004 UTC

# Line 10 | Line 10 | static const char RCSid[] = "$Id$";
10   #include  "standard.h"
11  
12   #include  "octree.h"
13
13   #include  "object.h"
14 + #include  "oconv.h"
15  
16 < static int  oputint(), oputstr(), puttree();
16 > #ifdef putc_unlocked            /* avoid horrendous overhead of flockfile */
17 > #undef putc
18 > #define putc    putc_unlocked
19 > #endif
20  
21 + static void oputstr(char *s);
22 + static void putfullnode(OCTREE fn);
23 + static void oputint(long i, int siz);
24 + static void oputflt(double f);
25 + static void puttree(OCTREE ot);
26  
27 < writeoct(store, scene, ofn)             /* write octree structures to stdout */
28 < int  store;
29 < CUBE  *scene;
30 < char  *ofn[];
27 >
28 > void
29 > writeoct(               /* write octree structures to stdout */
30 >        int  store,
31 >        CUBE  *scene,
32 >        char  *ofn[]
33 > )
34   {
35          char  sbuf[64];
36          int  i;
# Line 55 | Line 66 | char  *ofn[];
66   }
67  
68  
69 < static
70 < oputstr(s)                      /* write null-terminated string to stdout */
71 < register char  *s;
69 > static void
70 > oputstr(                        /* write null-terminated string to stdout */
71 >        register char  *s
72 > )
73   {
74          putstr(s, stdout);
75          if (ferror(stdout))
# Line 65 | Line 77 | register char  *s;
77   }
78  
79  
80 < static
81 < putfullnode(fn)                 /* write out a full node */
82 < OCTREE  fn;
80 > static void
81 > putfullnode(                    /* write out a full node */
82 >        OCTREE  fn
83 > )
84   {
85          OBJECT  oset[MAXSET+1];
86          register int  i;
# Line 78 | Line 91 | OCTREE  fn;
91   }
92  
93  
94 < static
95 < oputint(i, siz)                 /* write a siz-byte integer to stdout */
96 < register long  i;
97 < register int  siz;
94 > static void
95 > oputint(                        /* write a siz-byte integer to stdout */
96 >        register long  i,
97 >        register int  siz
98 > )
99   {
100          putint(i, siz, stdout);
101          if (ferror(stdout))
# Line 89 | Line 103 | register int  siz;
103   }
104  
105  
106 < static
107 < oputflt(f)                      /* put out floating point number */
108 < double  f;
106 > static void
107 > oputflt(                        /* put out floating point number */
108 >        double  f
109 > )
110   {
111          putflt(f, stdout);
112          if (ferror(stdout))
# Line 99 | Line 114 | double  f;
114   }
115  
116  
117 < static
118 < puttree(ot)                     /* write octree to stdout in pre-order form */
119 < register OCTREE  ot;
117 > static void
118 > puttree(                        /* write octree to stdout in pre-order form */
119 >        register OCTREE  ot
120 > )
121   {
122          register int  i;
123          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines