"Dmitry Timoshkov" dmitry@baikal.ru writes:
"Michael GXnnewig" MichaelGuennewig@gmx.de wrote:
So I have adjusted to use this:
static const WCHAR dotW = (WCHAR)'.';
The it compiles and works also for my. Is this okay?
No.
Why?
Look at other places in Wine source how to do it properly.
Okay I have done a
find . -name '*.c' | xargs fgrep strchrW
and have found these variations: ,----- | ./controls/menu.c: p = strchrW (p + 2, '&'); | ./dlls/comctl32/comctl32undoc.c: return strchrW(lpStart, wMatch); | ./dlls/comctl32/comctl32undoc.c: if( strchrW(lpSet, *(WORD*)lpLoop)) | ./dlls/msvcrt/dir.c: if ((ptr = strchrW(path, (WCHAR)L':')) != (WCHAR)L'\0') | ./dlls/shlwapi/url.c: mp = strchrW(wk1, L'/'); `-----
Variant 1: use simply a char, let compiler auto-convert to WCHAR Variant 2: use a WORD Variant 3: use L'.' construct and cast to WCHAR Variant 4: use L'.' construct
What's the correct way now? Is it documentat anywhere, I haven't found it in the docu from the CVS.
Michael Günnewig