windows/clipboard.c: Get rid of W->A calls

Jacek Caban jack at itma.pwr.wroc.pl
Sun Jan 9 14:12:16 CST 2005


Dmitry Timoshkov wrote:

>"Jacek Caban" <jack at itma.pwr.wroc.pl> wrote:
>
>  
>
>>@@ -310,15 +335,24 @@ static void intern_atoms(void)
>>     names = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*names) );
>>     atoms = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*atoms) );
>> 
>>-    for (format = ClipFormats, i = 0; format; format = format->NextFormat)
>>-        if (!format->drvData) names[i++] = format->Name;
>>+    for (format = ClipFormats, i = 0; format; format = format->NextFormat) {
>>+        if (!format->drvData) {
>>+            len = WideCharToMultiByte(CP_ACP, 0, format->Name, -1, NULL, -1, 0, 0);
>>+            names[i] = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
>>+            WideCharToMultiByte(CP_ACP, 0, format->Name, -1, names[i++], len, 0, 0);
>>    
>>
>
>You have to use CP_UNIXCP to convert unicode strings in order to pass
>them to the X11/unix system (here and everywhere else).
>
>  
>
I didn't know this. Thanks.

Changelog:
   Get rid of W->A calls

-------------- next part --------------
A non-text attachment was scrubbed...
Name: clipboard2.diff
Type: text/x-patch
Size: 23197 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050109/9f4526c1/clipboard2.bin


More information about the wine-patches mailing list