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

Comparing ray/src/common/readoct.c (file contents):
Revision 2.15 by greg, Fri Mar 14 21:27:46 2003 UTC vs.
Revision 2.24 by schorsch, Mon Oct 27 10:19:31 2003 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7  
8   #include "copyright.h"
9  
10 < #include  "standard.h"
10 > #include  <stdio.h>
11 > #include  <time.h>
12  
13 + #include  "platform.h"
14 + #include  "rtprocess.h"
15 + #include  "standard.h"
16   #include  "octree.h"
13
17   #include  "object.h"
15
18   #include  "otypes.h"
19 + #include  "resolu.h"
20  
21 < static double  ogetflt();
22 < static long  ogetint();
23 < static char  *ogetstr();
24 < static int  nonsurfinset();
25 < static int  octerror(), skiptree();
26 < static OCTREE  getfullnode(), gettree();
21 > static double  ogetflt(void);
22 > static long  ogetint(int);
23 > static char  *ogetstr(char *);
24 > static int  nonsurfinset(OBJECT *);
25 > static void  octerror(int  etyp, char  *msg);
26 > static void  skiptree(void);
27 > static OCTREE  getfullnode(void), gettree(void);
28  
29   static char  *infn;                     /* input file specification */
30   static FILE  *infp;                     /* input file stream */
# Line 58 | Line 62 | char  *ofn[];
62                          error(SYSTEM, errmsg);
63                  }
64          }
65 < #ifdef MSDOS
62 <        setmode(fileno(infp), O_BINARY);
63 < #endif
65 >        SET_FILE_BINARY(infp);
66                                          /* get header */
67          if (checkheader(infp, OCTFMT, load&IO_INFO ? stdout : (FILE *)NULL) < 0)
68                  octerror(USER, "not an octree");
# Line 98 | Line 100 | char  *ofn[];
100          else if (load & IO_SCENE && nf == 0)
101                  skiptree();
102                  
103 <        if (load & IO_SCENE)            /* get the scene */
103 >        if (load & IO_SCENE) {          /* get the scene */
104              if (nf == 0) {
105                                          /* load binary scene data */
106                  readscene(infp, objsize);
# Line 111 | Line 113 | char  *ofn[];
113                  if (dosets(nonsurfinset))
114                          octerror(USER, "modifier in tree; octree stale?");
115              }
116 +        }
117                                  /* close the input */
118          if (infn[0] == '!')
119                  pclose(infp);
# Line 199 | Line 202 | gettree()                      /* get a pre-ordered octree */
202          default:
203                  octerror(USER, "damaged octree");
204          }
205 +        return EMPTY; /* pro forma return */
206   }
207  
208  
# Line 217 | Line 221 | register OBJECT  *os;
221   }
222  
223  
224 < static
225 < skiptree()                              /* skip octree on input */
224 > static void
225 > skiptree(void)                          /* skip octree on input */
226   {
227          register int  i;
228          
# Line 242 | Line 246 | skiptree()                             /* skip octree on input */
246   }
247  
248  
249 < static
249 > static void
250   octerror(etyp, msg)                     /* octree error */
251   int  etyp;
252   char  *msg;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines