| # | 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 (strstr(sc->descr[n], match) != NULL) |
| 559 | + | return(n); |
| 560 | + | return(-1); |
| 561 | + | } |
| 562 | + | |
| 563 | /* Clear comments */ | |
| 564 | void | |
| 565 | clearComments(Scene *sc) | |
| – | Removed lines |
| + | Added lines |
| < | Changed lines (old) |
| > | Changed lines (new) |