wine/dlls/avifil32: implemented many functions

Michael Günnewig MichaelGuennewig at gmx.de
Sun Oct 13 04:36:57 CDT 2002


"Dmitry Timoshkov" <dmitry at baikal.ru> writes:

> "Michael GXnnewig" <MichaelGuennewig at gmx.de> wrote:
>
>> + LPWSTR szExt = strrchrW(szFile, L'.');
>
>> +#define SLASH(w) ((w) == L'/' || (w) == L'\\')
>
> As were discussed many times using L prefix in order to create unicode
> chars/strings is wrong due to difference in size of unicode characters
> between windows and unix (2 vs. 4).
>
> We forced to create unicode strings explicitly:
> static const WCHAR fooW[] = { 'f','o','o',0 };
> static const WCHAR dotW[] = { '.',0 };
> static const WCHAR slashW[] = { '/',0 };
> static const WCHAR bkslashW[] = { '\\',0 };
>
> That's somewhat ugly and awkward, but it's really needed for
> portability.

But when I change the code to use the "static const WCHAR[]" the
compiler complains:
,-----
| factory.c: In function `AVIFILE_BasenameW':
| factory.c:163: warning: comparison between pointer and integer
| factory.c:163: warning: comparison between pointer and integer
| factory.c:163: warning: comparison between pointer and integer
`-----

So I have adjusted to use this:

static const WCHAR dotW = (WCHAR)'.';

The it compiles and works also for my. Is this okay? When it's I will
change it with my next patch, which still waits to be verified and
be submitted.


  Michael Günnewig




More information about the wine-devel mailing list