Changeset 26514 in vbox
- Timestamp:
- Feb 14, 2010 10:02:43 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57685
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.scm-settings
r26513 r26514 74 74 --filter-out-files "*/src/VBox/Devices/Audio/sys-queue.h" 75 75 --filter-out-files "*/src/VBox/HostDrivers/VBoxUSB/os2/usbcalls.h" 76 --filter-out-files "*/src/VBox/RDP/x11server/Init*.c" 76 77 77 78 -
trunk/src/VBox/GuestHost/HGSMI/HGSMICommon.cpp
r25062 r26514 496 496 else 497 497 { 498 498 rc = VERR_INVALID_FUNCTION; 499 499 } 500 500 } 501 501 else 502 502 { 503 503 rc = VERR_INVALID_HANDLE; 504 504 // LogRel(("HGSMI[%s]: ignored invalid guest buffer 0x%08X!!!\n", pIns->pszName, offBuffer)); 505 505 } -
trunk/src/VBox/HostServices/SharedFolders/shflhandle.cpp
r26291 r26514 90 90 if(pHandles[handle].pvUserData == 0) 91 91 { 92 93 92 lastHandleIndex = handle; 93 break; 94 94 } 95 95 } … … 102 102 if(pHandles[handle].pvUserData == 0) 103 103 { 104 105 104 lastHandleIndex = handle; 105 break; 106 106 } 107 107 } -
trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp
r25994 r26514 315 315 * The question is simply whether the NFD normalization is actually applied on a (virtaul) file 316 316 * system level in darwin, or just by the user mode application libs. */ 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 317 SHFLSTRING *pPathParameter = pPath; 318 size_t cbPathLength; 319 CFMutableStringRef inStr = ::CFStringCreateMutable(NULL, 0); 320 uint16_t ucs2Length; 321 CFRange rangeCharacters; 322 323 // Is 8 times length enough for decomposed in worst case...? 324 cbPathLength = sizeof(SHFLSTRING) + pPathParameter->u16Length * 8 + 2; 325 pPath = (SHFLSTRING *)RTMemAllocZ (cbPathLength); 326 if (!pPath) 327 { 328 rc = VERR_NO_MEMORY; 329 Log(("RTMemAllocZ %x failed!!\n", cbPathLength)); 330 return rc; 331 } 332 333 ::CFStringAppendCharacters(inStr, (UniChar*)pPathParameter->String.ucs2, pPathParameter->u16Length / sizeof(pPathParameter->String.ucs2[0])); 334 ::CFStringNormalize(inStr, kCFStringNormalizationFormD); 335 ucs2Length = ::CFStringGetLength(inStr); 336 337 rangeCharacters.location = 0; 338 rangeCharacters.length = ucs2Length; 339 ::CFStringGetCharacters(inStr, rangeCharacters, pPath->String.ucs2); 340 pPath->String.ucs2[ucs2Length] = 0x0000; // NULL terminated 341 pPath->u16Length = ucs2Length * sizeof(pPath->String.ucs2[0]); 342 pPath->u16Size = pPath->u16Length + sizeof(pPath->String.ucs2[0]); 343 344 CFRelease(inStr); 345 345 #endif 346 346 /* Client sends us UCS2, so convert it to UTF8. */ … … 1597 1597 * The question is simply whether the NFD normalization is actually applied on a (virtaul) file 1598 1598 * system level in darwin, or just by the user mode application libs. */ 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1599 { 1600 // Convert to 1601 // Normalization Form C (composed Unicode). We need this because 1602 // Mac OS X file system uses NFD (Normalization Form D :decomposed Unicode) 1603 // while most other OS', server-side programs usually expect NFC. 1604 uint16_t ucs2Length; 1605 CFRange rangeCharacters; 1606 CFMutableStringRef inStr = ::CFStringCreateMutable(NULL, 0); 1607 1608 ::CFStringAppendCharacters(inStr, (UniChar *)pwszString, RTUtf16Len (pwszString)); 1609 ::CFStringNormalize(inStr, kCFStringNormalizationFormC); 1610 ucs2Length = ::CFStringGetLength(inStr); 1611 1612 rangeCharacters.location = 0; 1613 rangeCharacters.length = ucs2Length; 1614 ::CFStringGetCharacters(inStr, rangeCharacters, pwszString); 1615 pwszString[ucs2Length] = 0x0000; // NULL terminated 1616 1617 CFRelease(inStr); 1618 } 1619 1619 #endif 1620 1620 pSFDEntry->name.u16Length = (uint32_t)RTUtf16Len (pSFDEntry->name.String.ucs2) * 2;
Note:
See TracChangeset
for help on using the changeset viewer.