[WideChar conversion improvements - 2/5] Implement new versionsofwctomb and wcstombs

Vitaliy Margolen wine-devel at kievinfo.com
Mon Jul 28 09:19:30 CDT 2008


Colin Finck wrote:
> Dmitry Timoshkov wrote:
>>> -INT CDECL MSVCRT_wctomb( char *dst, MSVCRT_wchar_t ch )
>>> +INT CDECL MSVCRT_wctomb(char *mbchar, MSVCRT_wchar_t wchar)
>> What's the point of the above change?
> 
> While rewriting that function, I used the parameter names described on MSDN.
> I don't see a point in inventing new parameter names for documented
> functions.
That doesn't mean they have to be used in Wine. Please don't do that.

>> Please don't use ugly mixed case variable names. Same for other tests.
> 
> Well, this is the variable naming convention used by most Win32 developers.
That doesn't make it right in the *NIX world. Please use notation more 
accepted in Wine - all lover case with underscores.


>> What are you calling a "null character" here? A NULL pointer is not a NUL
>> character. What happens
>> in the code below if mbchar is not NULL but wchar is?
> 
> if(mbchar && !wchar)  --> Put a NULL character into mbchar and return 1 as
> its length.
NULL is a null pointer. NUL is a \0 character. Please don't mix and match 
the two. They are totally separate things.

> These behaviours are also covered by some of the added tests in the 4th
> patch.
Then those particular tests should go together with this patch to show it's 
correct.

Vitaliy.



More information about the wine-devel mailing list