Mon, May 14, 2001 at 17:45:02, bright (Alfred Perlstein) wrote about "Re: wint_t": 

> > The C standard says that wchar_t should be able to all members of thye
> > largest extended chracter set. AFAIK FreeBSD doesn't have any character
> > set which requires more than 8 bits.
> > wint_t should also be able to hold all members of the largest character
> > set plus one extra value (WEOF). Also it must be at least 16 bits.
> Wouldn't it be kinda painful unless we did this with a 16 bit type?

Modern Unicode allows character codes more than 65534.
wchar_t(65536) is Egyptian glyph;) Maximum allowed AFAIR is 2**31-1.
So at least 32 bits integer type required if you don't want adapt system
to former millennium requires.

But wint_t must be no narrower than wchar_t. <curses.h> and <ncurses.h>
define wchar_t as unsigned long. System headers define wchar_t as int
(thru _BSD_WCHAR_T_ and _BSD_CT_RUNE_T_). This difference in size and
signness is at least annoying. I suppose wchar_t should be __uint32_t,
and wint_t - __int32_t, but this may break binary compatibility.


/netch

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to