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.8 by greg, Tue Jun 23 19:29:40 2020 UTC

# Line 547 | Line 547 | addComment(Scene *sc, const char *comment)
547          sc->descr[sc->ndescr++] = savqstr((char *)comment);
548   }
549  
550 + /* Find index for comment containing the given string (starting from n) */
551 + int
552 + findComment(Scene *sc, const char *match, int n)
553 + {
554 +        if (n >= sc->ndescr)
555 +                return(-1);
556 +        n *= (n > 0);
557 +        while (n < sc->ndescr)
558 +                if (strcasestr(sc->descr[n], match) != NULL)
559 +                        return(n);
560 +        return(-1);
561 + }
562 +
563   /* Clear comments */
564   void
565   clearComments(Scene *sc)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines