Re: WinHugs bug: putChar (chr 255)
Robert Praetorius <[email protected]> Mon, 06 Feb 2006 13:45:39 -0500
| Newsgroups | gmane.comp.lang.haskell.hugs.user |
|---|---|
| Message-ID | <[email protected]> |
> > > In the underlying C API, (char)255 == (char)-1 == EOF.
> > > Regards,
> > > Malcolm
> > But I think the underlying C API is actually int, and char 255 is
> > a Unicode char. Anyway, I should be able to make some progress on
> > it in the next few days.
> The example works fine under Unix, BTW.
(Just a WAG, but) Perhaps this is not due to OS but different
compiler defaults, because:
http://c-faq.com/stdio/getcharc.html
"Whether plain char is signed or unsigned is implementation-
defined."
( http://www.dreamsongs.com/WorseIsBetter.html leaps suddenly to
mind. . . )