From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1634 invoked from network); 26 Apr 2008 18:13:56 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Apr 2008 18:13:56 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 56209 invoked from network); 26 Apr 2008 18:13:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Apr 2008 18:13:53 -0000 Received: (qmail 3536 invoked by alias); 26 Apr 2008 18:13:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24873 Received: (qmail 3517 invoked from network); 26 Apr 2008 18:13:49 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 26 Apr 2008 18:13:49 -0000 Received: from mtaout02-winn.ispmail.ntl.com (mtaout02-winn.ispmail.ntl.com [81.103.221.48]) by bifrost.dotsrc.org (Postfix) with ESMTP id CBB68808A38A for ; Sat, 26 Apr 2008 20:13:44 +0200 (CEST) Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com with ESMTP id <20080426181711.VUHI17818.mtaout02-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Sat, 26 Apr 2008 19:17:11 +0100 Received: from pws-pc.ntlworld.com ([81.107.40.67]) by aamtaout04-winn.ispmail.ntl.com with ESMTP id <20080426181348.QAZH29112.aamtaout04-winn.ispmail.ntl.com@pws-pc.ntlworld.com> for ; Sat, 26 Apr 2008 19:13:48 +0100 Received: from pws-pc (pws-pc [127.0.0.1]) by pws-pc.ntlworld.com (8.14.2/8.14.2) with ESMTP id m3QID0TP022098 for ; Sat, 26 Apr 2008 19:13:01 +0100 Message-Id: <200804261813.m3QID0TP022098@pws-pc.ntlworld.com> From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: PATCH: Capitalize a parameter containing combined characters In-Reply-To: Message from "Jun T." of "Sun, 27 Apr 2008 02:39:38 +0900." <4CB683B0-AA0B-45C1-BC88-29DF5ADFD5F4@kba.biglobe.ne.jp> Date: Sat, 26 Apr 2008 19:13:00 +0100 X-Virus-Scanned: ClamAV 0.91.2/6955/Sat Apr 26 18:30:27 2008 on bifrost X-Virus-Status: Clean "Jun T." wrote: > I did some quick tests of parameter expansion with combined characters, > and found a small bug: > --- Src/hist.c 17 Apr 2008 10:23:53 -0000 1.75 > +++ Src/hist.c 26 Apr 2008 16:53:56 -0000 > @@ -1567,6 +1567,8 @@ > > case CASMOD_CAPS: > default: /* shuts up compiler */ > + if (IS_COMBINING(wc)) > + break; > if (!iswalnum(wc)) > nextupper = 1; > else if (nextupper) { > IS_COMBINING() is only defined in the multibyte world, so it needs to be as follows. Index: Src/hist.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/hist.c,v retrieving revision 1.75 diff -u -r1.75 hist.c --- Src/hist.c 17 Apr 2008 10:23:53 -0000 1.75 +++ Src/hist.c 26 Apr 2008 18:12:45 -0000 @@ -1567,6 +1567,10 @@ case CASMOD_CAPS: default: /* shuts up compiler */ +#ifdef MULTIBYTE_SUPPORT + if (IS_COMBINING(wc)) + break; +#endif if (!iswalnum(wc)) nextupper = 1; else if (nextupper) { -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/