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.

hnhn


--
Jan Hnatek
jan.hna...@sun.com


Reply via email to