www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - wchar usage in std.c.stdio module

Phobos module std/c/stdio.d:

The current dmd code uses "wchar",
but the Unix functions use wint_t

To match the C versions, they *really*
should use the wint_t / wchar_t types...

 Integral type whose range of values can represent distinct
 wide-character codes for all members of the largest character set
 specified among the locales supported by the compilation environment
 An integral type capable of storing any valid value of wchar_t,
 or WEOF.
Could probably use type "wchar_t" in D too: "version (Windows) { alias wchar wchar_t; } else version (Unix) { alias dchar wchar_t; }" And declare the macros: (would be D constants)
     The maximum value representable by an object of type wchar_t. 
     The minimum value representable by an object of type wchar_t. 
     Constant expression of type wint_t that is returned to indicate
Nov 21 2004