Edmund Grimley Evans wrote:

> > Only in glibc is wchar_t == Unicode. In other OSes, like FreeBSD,
> > wchar_t is not Unicode.
> 
> For my curiosity, what is it in FreeBSD? And does anyone used a signed
> wchar_t, and does anyone use any negative values of it?

/usr/include/stddef.h:
typedef _BSD_WCHAR_T_   wchar_t;

>From ansi.h:
#define _BSD_WCHAR_T_   _BSD_CT_RUNE_T_         /* wchar_t (see below) */

#define _BSD_CT_RUNE_T_ int                     /* arg type for ctype funcs */

And this remark:

/*
 * The rune type is declared to be an ``int'' instead of the more natural
 * ``unsigned long'' or ``long''.  Two things are happening here.  It is not
 * unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
 * it looks like 10646 will be a 31 bit standard.  This means that if your
 * ints cannot hold 32 bits, you will be in trouble.  The reason an int was
 * chosen over a long is that the is*() and to*() routines take ints (says
 * ANSI C), but they use _BSD_CT_RUNE_T_ instead of int.  By changing it
 * here, you lose a bit of ANSI conformance, but your programs will still
 * work.
 */

-- 
press CTRL-ALT-DEL for more information

///  Bram Moolenaar     [EMAIL PROTECTED]     http://www.moolenaar.net  \\\
\\\  Vim: http://www.vim.org      ICCF Holland: http://iccf-holland.org  ///
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/

Reply via email to