From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25640 invoked from network); 3 Mar 2009 18:11:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Mar 2009 18:11:26 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 80448 invoked from network); 3 Mar 2009 18:11:16 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Mar 2009 18:11:16 -0000 Received: (qmail 4616 invoked by alias); 3 Mar 2009 18:11:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26680 Received: (qmail 4591 invoked from network); 3 Mar 2009 18:11:08 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 3 Mar 2009 18:11:08 -0000 Received: from cluster-g.mailcontrol.com (cluster-g.mailcontrol.com [208.87.233.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 79E698058F82 for ; Tue, 3 Mar 2009 19:11:05 +0100 (CET) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly23g.srv.mailcontrol.com (MailControl) with ESMTP id n23IAwmU026481 for ; Tue, 3 Mar 2009 18:10:59 GMT Received: from news01 ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Tue, 3 Mar 2009 18:10:57 +0000 Date: Tue, 3 Mar 2009 18:10:56 +0000 From: Peter Stephenson To: Zsh hackers list Subject: Re: PATCH: caps strings Message-ID: <20090303181056.3ec33006@news01> In-Reply-To: <237967ef0903030955l1bbe4224p9d3f4a2bf1d04c77@mail.gmail.com> References: <27480.1236102218@csr.com> <237967ef0903030955l1bbe4224p9d3f4a2bf1d04c77@mail.gmail.com> Organization: CSR X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Mar 2009 18:10:57.0703 (UTC) FILETIME=[66AED370:01C99C2B] X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.71.0.133 X-Virus-Scanned: ClamAV 0.92.1/9065/Tue Mar 3 11:43:41 2009 on bifrost X-Virus-Status: Clean On Tue, 3 Mar 2009 18:55:30 +0100 Mikael Magnusson wrote: > I think the two zwarnnam calls with *argv needs them to be > re-metafy()ed. When i didn't do that in attr.c, I got output like > myutf8file\M-p. Index: Src/Modules/cap.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/cap.c,v retrieving revision 1.8 diff -u -r1.8 cap.c --- Src/Modules/cap.c 3 Mar 2009 17:46:51 -0000 1.8 +++ Src/Modules/cap.c 3 Mar 2009 18:09:50 -0000 @@ -72,7 +72,10 @@ do { char *result = NULL; ssize_t length; - cap_t caps = cap_get_file(*argv); + cap_t caps; + char *filename; + + caps = cap_get_file(unmetafy(dupstring(*argv), NULL)); if(caps) result = cap_to_text(caps, &length); if (!caps || !result) { @@ -99,8 +102,7 @@ } do { - unmetafy(*argv, NULL); - if(cap_set_file(*argv, caps)) { + if(cap_set_file(unmetafy(dupstring(*argv, NULL)), caps)) { zwarnnam(nam, "%s: %e", *argv, errno); ret = 1; } -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070