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

Comparing ray/src/common/mesh.c (file contents):
Revision 2.10 by greg, Thu Jul 10 03:30:11 2003 UTC vs.
Revision 2.11 by greg, Thu Jul 10 03:47:00 2003 UTC

# Line 79 | Line 79 | int    flags;
79  
80          flags &= IO_LEGAL;
81          for (ms = mlist; ms != NULL; ms = ms->next)
82 <                if (!strcmp(mname, ms->name))
82 >                if (!strcmp(mname, ms->name)) {
83 >                        ms->nref++;     /* increase reference count */
84                          break;
85 +                }
86          if (ms == NULL) {               /* load first time */
87                  ms = (MESH *)calloc(1, sizeof(MESH));
88                  if (ms == NULL)
89                          error(SYSTEM, "out of memory in getmesh");
90                  ms->name = savestr(mname);
91 +                ms->nref = 1;
92                  ms->mcube.cutree = EMPTY;
93                  ms->next = mlist;
94                  mlist = ms;
# Line 97 | Line 100 | int    flags;
100          flags &= ~ms->ldflags;
101          if (flags)
102                  readmesh(ms, pathname, flags);
100        ms->nref++;                     /* increase reference count */
103          return(ms);
104   }
105  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines