From owner-svn-src-all@FreeBSD.ORG Wed Oct 6 04:30:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01DAB106564A; Wed, 6 Oct 2010 04:30:41 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E50888FC18; Wed, 6 Oct 2010 04:30:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o964UeVv082866; Wed, 6 Oct 2010 04:30:40 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o964Uekv082864; Wed, 6 Oct 2010 04:30:40 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201010060430.o964Uekv082864@svn.freebsd.org> From: Tim Kientzle Date: Wed, 6 Oct 2010 04:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213469 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2010 04:30:41 -0000 Author: kientzle Date: Wed Oct 6 04:30:40 2010 New Revision: 213469 URL: http://svn.freebsd.org/changeset/base/213469 Log: Recognize both ! and ^ as markers for negated character classes. Submitted by: Mykola Dzham Modified: head/usr.bin/tar/pathmatch.c Modified: head/usr.bin/tar/pathmatch.c ============================================================================== --- head/usr.bin/tar/pathmatch.c Wed Oct 6 01:23:40 2010 (r213468) +++ head/usr.bin/tar/pathmatch.c Wed Oct 6 04:30:40 2010 (r213469) @@ -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. * * - is a range of characters * * \ removes any special meaning for * @@ -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;