| 3131 | /* Return true if one of the PATTERNS matches FILE. */ |
| 3132 | |
| 3133 | static bool |
| 3134 | patterns_match (struct ignore_pattern const *patterns, char const *file) |
| 3135 | { |
| 3136 | for (struct ignore_pattern const *p = patterns; p; p = p->next) |
| 3137 | if (fnmatch (p->pattern, file, FNM_PERIOD) == 0) |
| 3138 | return true; |
| 3139 | return false; |
| 3140 | } |
| 3141 | |
| 3142 | /* Return true if FILE should be ignored. */ |
| 3143 |