[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash-3.2 multibyte behavior on Solaris

From: Jan Hnatek
Subject: Re: bash-3.2 multibyte behavior on Solaris
Date: Fri, 26 Jun 2009 21:42:11 +0200
User-agent: Thunderbird (X11/20090323)

Chet Ramey wrote:
So what does the Solaris mbrtowc return in this case?  The flow of that
particular section of code isn't that great (bash-4.0 is better), but it
seems to me that point can only increase.  If mbrtowc returns -2, the
loop won't be entered at all.

I've checked it and looks to do the following
(correct me if I'm wrong):
- tmp is unsigned
- mbrtowc returns -2
- tmp > 0 is true and loop is entered

Now why don't I see the behavior on x86,
ie. why doesn't it enter the loop is that
wcwidth(wc) == 0
is false on Solaris x86 in this same particular
test case - the value of wcwidth(wc) is -1 on x86
and 0 on sparc.


Jan Hnatek

reply via email to

[Prev in Thread] Current Thread [Next in Thread]