Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Dec 2011 15:22:06 +0000 (UTC)
From:      Martin Matuska <mm@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228775 - head/contrib/libarchive/libarchive_fe
Message-ID:  <201112211522.pBLFM6aE074396@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mm
Date: Wed Dec 21 15:22:05 2011
New Revision: 228775
URL: http://svn.freebsd.org/changeset/base/228775

Log:
  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

Modified:
  head/contrib/libarchive/libarchive_fe/pathmatch.c
Directory Properties:
  head/contrib/libarchive/libarchive_fe/   (props changed)

Modified: head/contrib/libarchive/libarchive_fe/pathmatch.c
==============================================================================
--- head/contrib/libarchive/libarchive_fe/pathmatch.c	Wed Dec 21 15:20:17 2011	(r228774)
+++ head/contrib/libarchive/libarchive_fe/pathmatch.c	Wed Dec 21 15:22:05 2011	(r228775)
@@ -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 *e
 	(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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112211522.pBLFM6aE074396>