+static void report_exclude_result(char const *name,
+ struct exclude_struct const *ent,
+ STRUCT_STAT const *st)
+{
+ /* If a trailing slash is present to match only directories,
+ * then it is stripped out by make_exclude. So as a special
+ * case we add it back in here. */
+
+ if (verbose >= 2)
+ rprintf(FINFO, "%s %s %s because of pattern %s%s\n",
+ ent->include ? "including" : "excluding",
+ S_ISDIR(st->st_mode) ? "directory" : "file",
+ name, ent->pattern,
+ ent->directory ? "/" : "");
+}
+
+
+/*
+ * Return true if file NAME is defined to be excluded by either
+ * LOCAL_EXCLUDE_LIST or the globals EXCLUDE_LIST.
+ */
+int check_exclude(char *name, struct exclude_struct **local_exclude_list,