riched20: EM_GETLINE implementation and test

James Hawkins truiken at gmail.com
Thu Jun 22 16:49:36 CDT 2006


On 6/22/06, Andrew Talbot <Andrew.Talbot at talbotville.com> wrote:
> James Hawkins wrote:
> > Probably, L"" is not portable, and you have to use:
> >
> > static const WHCAR string[] = {'s','t','r','i','n','g',0};
> >
> I'm just curious: not arguing, ;) but Plauger says, in "The Standard C
> Library" (1992, p. 219): "You write a wide character constant as, for
> example, L'x'. It has type wchar_t. You write a wide characer string
> literal as, for example, L"hello". It has type array of wchar_t. wchar_t is
> an integer type that can represent all the code values for all
> wide-character encodings supported by the implementation." Why might it not
> be portable?
>

To be as portable as possible, we code to the lowest common
denominator.  Not all compilers support L"".  We adhere to C89, but I
can't remember what it says about L"", if anything.  The point is that
WCHAR blah[] ={...} will work for every compiler.

-- 
James Hawkins



More information about the wine-devel mailing list