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.36 by greg, Thu Dec 12 19:55:57 2024 UTC vs.
Revision 2.37 by greg, Thu Dec 12 23:04:31 2024 UTC

# Line 72 | Line 72 | cvcmp(const char *vv1, const char *vv2)                /* compare en
72  
73  
74   MESH *
75 < getmesh(                                /* get new mesh data reference */
75 > getmesh(                                /* get mesh data reference */
76          char    *mname,
77          int     flags
78   )
# Line 82 | Line 82 | getmesh(                               /* get new mesh data reference */
82  
83          flags &= IO_LEGAL;
84          for (ms = mlist; ms != NULL; ms = ms->next)
85 <                if (!strcmp(mname, ms->name)) {
86 <                        ms->nref++;     /* increase reference count */
85 >                if (!strcmp(mname, ms->name))
86                          break;
88                }
87          if (ms == NULL) {               /* new mesh entry? */
88                  ms = (MESH *)calloc(1, sizeof(MESH));
89                  if (ms == NULL)
90                          error(SYSTEM, "out of memory in getmesh");
91                  ms->name = savestr(mname);
94                ms->nref = 1;
92                  ms->mcube.cutree = EMPTY;
93                  ms->next = mlist;
94                  mlist = ms;
95          }
96 +        ms->nref++;                     /* bump reference count */
97          if (!(flags &= ~ms->ldflags))   /* nothing to load? */
98                  return(ms);
99          if ((pathname = getpath(mname, getrlibpath(), R_OK)) == NULL) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines