X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 24 Feb 2011 12:55:11 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Mg3a - a version of Mg2a developed on Cygwin Message-ID: <20110224115511.GU9392@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <35i9m6pt07r66fib882etg5tgirkr413co AT 4ax DOT com> <0105D5C1E0353146B1B222348B0411A209DAA0FF98 AT NIHMLBX02 DOT nih DOT gov> <20110224085617 DOT GM9392 AT calimero DOT vinschen DOT de> <4nccm61h5q3f207me4u69qfk6i0vqrd2f2 AT 4ax DOT com> <20110224111447 DOT GS9392 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Feb 24 12:40, Bengt Larsson wrote: > Corinna Vinschen wrote: > >> Using wcswidth isn't very useful in the editor because it has special > >> requirements, like showing control characters with ^C. > > > >Well, it's not really such a big problem to special case wide char > >control values and just call wcswidth otherwise... > > Oh I see. wcwidth takes a wchar_t. Handily, Kuhn's implementation takes > an UCS character. Now I understand what you mean by wcswidth. Yeah, newlibs wcswidth combines UTF-16 surrogates into UCS-32 chars and calls the internal __wcwidth function, which is basically Kuhn's code, and which takes a wint_t as parameter. Since wint_t is 32 bit... Of course, this trick doesn't work for wcwidth, which will blindly call __wcwidth with every incoming surrogate half. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple