Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 May 2001 09:36:10 +0300
From:      Valentin Nechayev <netch@iv.nn.kiev.ua>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        Erik Trulsson <ertr1013@student.uu.se>, hackers@FreeBSD.ORG
Subject:   Re: wint_t
Message-ID:  <20010515093610.A1835@iv.nn.kiev.ua>
In-Reply-To: <20010514174502.J2009@fw.wintelcom.net>; from bright@wintelcom.net on Mon, May 14, 2001 at 05:45:02PM -0700
References:  <20010514164401.A61243@dragon.nuxi.com> <20010515023221.A41666@student.uu.se> <20010514174502.J2009@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010515093610.A1835>