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
Updated to match 2.6.6 release (which occurred on a branch).
[rsync/rsync.git]
/
lib
/
wildmatch.c
diff --git
a/lib/wildmatch.c
b/lib/wildmatch.c
index
e2dca20
..
980bc49
100644
(file)
--- a/
lib/wildmatch.c
+++ b/
lib/wildmatch.c
@@
-57,10
+57,10
@@
int wildmatch_iteration_count;
#endif
int wildmatch_iteration_count;
#endif
-static int domatch(const u
nsigned char *p, const unsigned
char *text)
+static int domatch(const u
char *p, const u
char *text)
{
int matched, special;
{
int matched, special;
- u
nsigned
char ch, prev;
+ uchar ch, prev;
#ifdef WILD_TEST_ITERATIONS
wildmatch_iteration_count++;
#ifdef WILD_TEST_ITERATIONS
wildmatch_iteration_count++;
@@
-141,9
+141,9
@@
static int domatch(const unsigned char *p, const unsigned char *text)
ch = 0; /* This makes "prev" get set to 0. */
}
else if (ch == '[' && p[1] == ':') {
ch = 0; /* This makes "prev" get set to 0. */
}
else if (ch == '[' && p[1] == ':') {
- const u
nsigned char *s = p += 2
;
+ const u
char *s
;
int i;
int i;
- while ((ch = *p) && ch != ']') p++;
+ for (s = p += 2; (ch = *p) && ch != ']'; p++) {}
if (!ch)
return ABORT_ALL;
i = p - s - 1;
if (!ch)
return ABORT_ALL;
i = p - s - 1;
@@
-210,7
+210,7
@@
static int domatch(const unsigned char *p, const unsigned char *text)
else if (*text == ch)
matched = TRUE;
} while (prev = ch, (ch = *++p) != ']');
else if (*text == ch)
matched = TRUE;
} while (prev = ch, (ch = *++p) != ']');
- if (matched == special)
+ if (matched == special
|| *text == '/'
)
return FALSE;
continue;
}
return FALSE;
continue;
}
@@
-225,5
+225,5
@@
int wildmatch(const char *p, const char *t)
#ifdef WILD_TEST_ITERATIONS
wildmatch_iteration_count = 0;
#endif
#ifdef WILD_TEST_ITERATIONS
wildmatch_iteration_count = 0;
#endif
- return domatch((const u
nsigned char*)p, (const unsigned
char*)t) == TRUE;
+ return domatch((const u
char*)p, (const u
char*)t) == TRUE;
}
}