From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5031 invoked from network); 12 Jan 2006 01:27:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Jan 2006 01:27:05 -0000 Received: (qmail 48906 invoked from network); 12 Jan 2006 01:26:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Jan 2006 01:26:59 -0000 Received: (qmail 7190 invoked by alias); 12 Jan 2006 01:26:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22152 Received: (qmail 7180 invoked from network); 12 Jan 2006 01:26:53 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 Jan 2006 01:26:53 -0000 Received: (qmail 48303 invoked from network); 12 Jan 2006 01:26:53 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO dot.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 12 Jan 2006 01:26:51 -0000 Received: by dot.blorf.net (Postfix, from userid 1000) id 7DED18DFF; Wed, 11 Jan 2006 17:26:49 -0800 (PST) Date: Wed, 11 Jan 2006 17:26:49 -0800 From: Wayne Davison To: Peter Stephenson Cc: zsh-workers@sunsite.dk Subject: Re: bug in completion/expansion of files with LANG=C Message-ID: <20060112012649.GA28221@dot.blorf.net> References: <20060106215829.GG10111@dot.blorf.net> <20060107224447.GA30232@dot.blorf.net> <1060108055620.ZM15382@candle.brasslantern.com> <20060108080621.GA32692@dot.blorf.net> <20060108180309.01082ac4.p.w.stephenson@ntlworld.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060108180309.01082ac4.p.w.stephenson@ntlworld.com> User-Agent: Mutt/1.5.11 On Sun, Jan 08, 2006 at 06:03:09PM +0000, Peter Stephenson wrote: > You mean output everything remaining in the string as special codes > rather than real (multibyte) characters? Yes, that would make sense. OK, I've made the code do this in all the instances where a -2 means that it scanned clear to the end of the string (not when we're converting a single input byte at a time). Some other changes that I made: - A few more places in the code now treat the size_t return value from mbrtowc() and mbsrtowcs() as a size_t. - A spot in utils.c was treating the return of wctomb() as a size_t instead of an int. - Defined MB_INCOMPLETE & MB_INVALID to be used instead of some literal (size_t)-2 and (size_t)-1 values. - Tweaked some variable names to make them more consistent (e.g. we use "mbs" for the multibyte state everywhere instead of sometimes mbs, and sometimes ps). - Found a couple more places that needed to reset "mbs" on error. A diff of what I changed can be found here for those who wish to see it: http://opencoder.net/zsh-multibyte.diff ..wayne..