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

Comparing ray/src/common/objutil.c (file contents):
Revision 2.7 by greg, Sun Jun 14 17:44:27 2020 UTC vs.
Revision 2.10 by greg, Fri Dec 18 00:15:47 2020 UTC

# Line 460 | Line 460 | findDuplicateFaces(Scene *sc)
460                          ++nfound;
461                  }
462          }
463 +        if (verbose)
464 +                fprintf(stderr, "Found %d duplicate faces\n", nfound);
465          return(nfound);
466   }
467  
# Line 545 | Line 547 | addComment(Scene *sc, const char *comment)
547   {
548          sc->descr = chunk_alloc(char *, sc->descr, sc->ndescr);
549          sc->descr[sc->ndescr++] = savqstr((char *)comment);
550 + }
551 +
552 + /* Find index for comment containing the given string (starting from n) */
553 + int
554 + findComment(Scene *sc, const char *match, int n)
555 + {
556 +        if (n >= sc->ndescr)
557 +                return(-1);
558 +        n *= (n > 0);
559 +        while (n < sc->ndescr)
560 +                if (strstr(sc->descr[n], match) != NULL)
561 +                        return(n);
562 +        return(-1);
563   }
564  
565   /* Clear comments */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines