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

Comparing ray/src/common/readmesh.c (file contents):
Revision 2.3 by schorsch, Thu Jun 5 19:29:34 2003 UTC vs.
Revision 2.4 by schorsch, Sat Jun 7 12:50:20 2003 UTC

# Line 9 | Line 9 | static const char RCSid[] = "$Id$";
9   #include  "octree.h"
10   #include  "object.h"
11   #include  "mesh.h"
12 + #include  "resolu.h"
13  
14   static char     *meshfn;        /* input file name */
15   static FILE     *meshfp;        /* mesh file pointer */
# Line 73 | Line 74 | gettree()                              /* get a pre-ordered octree */
74          register int  i;
75          
76          switch (getc(meshfp)) {
77 <        case OT_EMPTY:
78 <                return(EMPTY);
79 <        case OT_FULL:
80 <                return(getfullnode());
81 <        case OT_TREE:
82 <                if ((ot = octalloc()) == EMPTY)
83 <                        mesherror(SYSTEM, "out of tree space in readmesh");
84 <                for (i = 0; i < 8; i++)
85 <                        octkid(ot, i) = gettree();
86 <                return(ot);
87 <        case EOF:
88 <                mesherror(USER, "truncated mesh octree");
89 <        default:
90 <                mesherror(USER, "damaged mesh octree");
77 >                case OT_EMPTY:
78 >                        return(EMPTY);
79 >                case OT_FULL:
80 >                        return(getfullnode());
81 >                case OT_TREE:
82 >                        if ((ot = octalloc()) == EMPTY)
83 >                                mesherror(SYSTEM, "out of tree space in readmesh");
84 >                        for (i = 0; i < 8; i++)
85 >                                octkid(ot, i) = gettree();
86 >                        return(ot);
87 >                case EOF:
88 >                        mesherror(USER, "truncated mesh octree");
89 >                default:
90 >                        mesherror(USER, "damaged mesh octree");
91          }
92 +        return NULL; /* pro forma return */
93   }
94  
95  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines