Re: riched20: EM_GETLINE implementation and test

2006-06-23 Thread Kari Hurtta
"James Hawkins" <[EMAIL PROTECTED]> writes in gmane.comp.emulators.wine.devel: > On 6/22/06, Andrew Talbot <[EMAIL PROTECTED]> 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}; > > > > >

Re: riched20: EM_GETLINE implementation and test

2006-06-22 Thread Andrew Talbot
Marcus Meissner wrote: > In Linux, L"" makes 4 byte character strings (if not using explicit > -fshort-wchar). Also, if the user then calls wc* functions from glibc, > they will use 4 byte characters. > > It is all to avoid confusion. > > Ciao, Marcus Interestingly, it looks like, in one standar

Re: riched20: EM_GETLINE implementation and test

2006-06-22 Thread Mike McCormack
James Hawkins wrote: 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. wchar_t is an int on s

Re: riched20: EM_GETLINE implementation and test

2006-06-22 Thread Marcus Meissner
On Thu, Jun 22, 2006 at 10:36:10PM +0100, Andrew Talbot 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"

Re: riched20: EM_GETLINE implementation and test

2006-06-22 Thread Andrew Talbot
James Hawkins wrote: > 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. > >From what I ca

Re: riched20: EM_GETLINE implementation and test

2006-06-22 Thread James Hawkins
On 6/22/06, Andrew Talbot <[EMAIL PROTECTED]> 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 wri

Re: riched20: EM_GETLINE implementation and test

2006-06-22 Thread Andrew Talbot
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'. I

Re: riched20: EM_GETLINE implementation and test

2006-06-22 Thread James Hawkins
On 6/22/06, Krzysztof Foltman <[EMAIL PROTECTED]> wrote: This patch seems to have been overlooked or rejected - yet I do not see any reason being mentioned. Was it rejected because of use of L"" syntax? Probably, L"" is not portable, and you have to use: static const WHCAR string[] = {'s','t

Re: riched20: EM_GETLINE implementation and test (resend)

2006-04-25 Thread Mike McCormack
[EMAIL PROTECTED] wrote: + memcpy(dest, L"\r", nEndChars*2); Wide character strings aren't portable. Please use something like: static const WCHAR szsr[] = { '\r', 0 }; Mike