Lines Matching defs:matching

41 #include "matching.h"
64 * The matching logic here needs to be re-thought. I started out to
65 * try to mimic gtar's matching logic, but it's not entirely
75 lafe_exclude(struct lafe_matching **matching, const char *pattern)
78 if (*matching == NULL)
79 initialize_matching(matching);
80 add_pattern(&((*matching)->exclusions), pattern);
81 (*matching)->exclusions_count++;
86 lafe_exclude_from_file(struct lafe_matching **matching, const char *pathname)
94 if (lafe_exclude(matching, p) != 0)
102 lafe_include(struct lafe_matching **matching, const char *pattern)
105 if (*matching == NULL)
106 initialize_matching(matching);
107 add_pattern(&((*matching)->inclusions), pattern);
108 (*matching)->inclusions_count++;
109 (*matching)->inclusions_unmatched_count++;
114 lafe_include_from_file(struct lafe_matching **matching, const char *pathname,
123 if (lafe_include(matching, p) != 0)
151 lafe_excluded(struct lafe_matching *matching, const char *pathname)
156 if (matching == NULL)
160 for (match = matching->exclusions; match != NULL; match = match->next){
167 for (match = matching->inclusions; match != NULL; match = match->next){
175 matching->inclusions_unmatched_count--;
195 if (matching->inclusions != NULL)
230 lafe_cleanup_exclusions(struct lafe_matching **matching)
234 if (*matching == NULL)
237 for (p = (*matching)->inclusions; p != NULL; ) {
243 for (p = (*matching)->exclusions; p != NULL; ) {
249 free(*matching);
250 *matching = NULL;
254 initialize_matching(struct lafe_matching **matching)
256 *matching = calloc(sizeof(**matching), 1);
257 if (*matching == NULL)
262 lafe_unmatched_inclusions(struct lafe_matching *matching)
265 if (matching == NULL)
267 return (matching->inclusions_unmatched_count);
271 lafe_unmatched_inclusions_warn(struct lafe_matching *matching, const char *msg)
275 if (matching == NULL)
278 for (p = matching->inclusions; p != NULL; p = p->next) {
283 return (matching->inclusions_unmatched_count);