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.6 by greg, Thu Apr 29 14:36:49 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 > #define putc    putc_unlocked
18 > #endif
19  
20 + static void oputstr(char *s);
21 + static void putfullnode(OCTREE fn);
22 + static void oputint(long i, int siz);
23 + static void oputflt(double f);
24 + static void puttree(OCTREE ot);
25  
26 < writeoct(store, scene, ofn)             /* write octree structures to stdout */
27 < int  store;
28 < CUBE  *scene;
29 < char  *ofn[];
26 >
27 > void
28 > writeoct(               /* write octree structures to stdout */
29 >        int  store,
30 >        CUBE  *scene,
31 >        char  *ofn[]
32 > )
33   {
34          char  sbuf[64];
35          int  i;
# Line 55 | Line 65 | char  *ofn[];
65   }
66  
67  
68 < static
69 < oputstr(s)                      /* write null-terminated string to stdout */
70 < register char  *s;
68 > static void
69 > oputstr(                        /* write null-terminated string to stdout */
70 >        register char  *s
71 > )
72   {
73          putstr(s, stdout);
74          if (ferror(stdout))
# Line 65 | Line 76 | register char  *s;
76   }
77  
78  
79 < static
80 < putfullnode(fn)                 /* write out a full node */
81 < OCTREE  fn;
79 > static void
80 > putfullnode(                    /* write out a full node */
81 >        OCTREE  fn
82 > )
83   {
84          OBJECT  oset[MAXSET+1];
85          register int  i;
# Line 78 | Line 90 | OCTREE  fn;
90   }
91  
92  
93 < static
94 < oputint(i, siz)                 /* write a siz-byte integer to stdout */
95 < register long  i;
96 < register int  siz;
93 > static void
94 > oputint(                        /* write a siz-byte integer to stdout */
95 >        register long  i,
96 >        register int  siz
97 > )
98   {
99          putint(i, siz, stdout);
100          if (ferror(stdout))
# Line 89 | Line 102 | register int  siz;
102   }
103  
104  
105 < static
106 < oputflt(f)                      /* put out floating point number */
107 < double  f;
105 > static void
106 > oputflt(                        /* put out floating point number */
107 >        double  f
108 > )
109   {
110          putflt(f, stdout);
111          if (ferror(stdout))
# Line 99 | Line 113 | double  f;
113   }
114  
115  
116 < static
117 < puttree(ot)                     /* write octree to stdout in pre-order form */
118 < register OCTREE  ot;
116 > static void
117 > puttree(                        /* write octree to stdout in pre-order form */
118 >        register OCTREE  ot
119 > )
120   {
121          register int  i;
122          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines