diff options
author | mm <mm@FreeBSD.org> | 2011-12-21 15:22:05 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2011-12-21 15:22:05 +0000 |
commit | e8b564cb297c6a589faf388241f1f7dfb46957ac (patch) | |
tree | b8137b4e7a5998be517a59c08d038519ce4ecb79 /contrib | |
parent | 4a3876e1fe4ebba27e0d14dc837a2b2c39e51eb5 (diff) | |
download | FreeBSD-src-e8b564cb297c6a589faf388241f1f7dfb46957ac.zip FreeBSD-src-e8b564cb297c6a589faf388241f1f7dfb46957ac.tar.gz |
Merge FreeBSD changes from usr.bin/tar to contrib/libarchive/libarchive_fe:
r213469:
Recognize both ! and ^ as markers for negated character classes.
MFC after: 2 weeks
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libarchive/libarchive_fe/pathmatch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/libarchive/libarchive_fe/pathmatch.c b/contrib/libarchive/libarchive_fe/pathmatch.c index 85074bd..e211362 100644 --- a/contrib/libarchive/libarchive_fe/pathmatch.c +++ b/contrib/libarchive/libarchive_fe/pathmatch.c @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); /* * Check whether a character 'c' is matched by a list specification [...]: - * * Leading '!' negates the class. + * * Leading '!' or '^' negates the class. * * <char>-<char> is a range of characters * * \<char> removes any special meaning for <char> * @@ -60,7 +60,7 @@ pm_list(const char *start, const char *end, const char c, int flags) (void)flags; /* UNUSED */ /* If this is a negated class, return success for nomatch. */ - if (*p == '!' && p < end) { + if ((*p == '!' || *p == '^') && p < end) { match = 0; nomatch = 1; ++p; |