Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed rule_match() to rule_strcmp(). Likewise for the
[rsync/rsync.git]
/
exclude.c
diff --git
a/exclude.c
b/exclude.c
index
a7bd9ca
..
49ce25f
100644
(file)
--- a/
exclude.c
+++ b/
exclude.c
@@
-605,9
+605,9
@@
int check_filter(struct filter_list_struct *listp, char *name, int name_is_dir)
return 0;
}
return 0;
}
-#define RULE_
MATCH(s,r) rule_match
((s), (r), sizeof (r) - 1)
+#define RULE_
STRCMP(s,r) rule_strcmp
((s), (r), sizeof (r) - 1)
-static const char *rule_
match
(const char *str, const char *rule, int rule_len)
+static const char *rule_
strcmp
(const char *str, const char *rule, int rule_len)
{
if (strncmp(str, rule, rule_len) != 0)
return NULL;
{
if (strncmp(str, rule, rule_len) != 0)
return NULL;
@@
-667,23
+667,23
@@
static const char *parse_rule_tok(const char *p, uint32 mflags, int xflags,
char ch = 0, *mods = "";
switch (*s) {
case 'c':
char ch = 0, *mods = "";
switch (*s) {
case 'c':
- if ((s = RULE_
MATCH
(s, "clear")) != NULL)
+ if ((s = RULE_
STRCMP
(s, "clear")) != NULL)
ch = '!';
break;
case 'd':
ch = '!';
break;
case 'd':
- if ((s = RULE_
MATCH
(s, "dir-merge")) != NULL)
+ if ((s = RULE_
STRCMP
(s, "dir-merge")) != NULL)
ch = ':';
break;
case 'e':
ch = ':';
break;
case 'e':
- if ((s = RULE_
MATCH
(s, "exclude")) != NULL)
+ if ((s = RULE_
STRCMP
(s, "exclude")) != NULL)
ch = '-';
break;
case 'i':
ch = '-';
break;
case 'i':
- if ((s = RULE_
MATCH
(s, "include")) != NULL)
+ if ((s = RULE_
STRCMP
(s, "include")) != NULL)
ch = '+';
break;
case 'm':
ch = '+';
break;
case 'm':
- if ((s = RULE_
MATCH
(s, "merge")) != NULL)
+ if ((s = RULE_
STRCMP
(s, "merge")) != NULL)
ch = '.';
break;
default:
ch = '.';
break;
default: