VirtualBox

Changeset 26514 in vbox


Ignore:
Timestamp:
Feb 14, 2010 10:02:43 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57685
Message:

remainder: tabs -> spaces.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/.scm-settings

    r26513 r26514  
    7474--filter-out-files "*/src/VBox/Devices/Audio/sys-queue.h"
    7575--filter-out-files "*/src/VBox/HostDrivers/VBoxUSB/os2/usbcalls.h"
     76--filter-out-files "*/src/VBox/RDP/x11server/Init*.c"
    7677
    7778
  • trunk/src/VBox/GuestHost/HGSMI/HGSMICommon.cpp

    r25062 r26514  
    496496        else
    497497        {
    498                 rc = VERR_INVALID_FUNCTION;
     498            rc = VERR_INVALID_FUNCTION;
    499499        }
    500500    }
    501501    else
    502502    {
    503         rc = VERR_INVALID_HANDLE;
     503        rc = VERR_INVALID_HANDLE;
    504504//        LogRel(("HGSMI[%s]: ignored invalid guest buffer 0x%08X!!!\n", pIns->pszName, offBuffer));
    505505    }
  • trunk/src/VBox/HostServices/SharedFolders/shflhandle.cpp

    r26291 r26514  
    9090        if(pHandles[handle].pvUserData == 0)
    9191        {
    92             lastHandleIndex = handle;
    93                 break;
     92            lastHandleIndex = handle;
     93            break;
    9494        }
    9595    }
     
    102102            if(pHandles[handle].pvUserData == 0)
    103103            {
    104                 lastHandleIndex = handle;
    105                     break;
     104                lastHandleIndex = handle;
     105                break;
    106106            }
    107107        }
  • trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp

    r25994 r26514  
    315315 * The question is simply whether the NFD normalization is actually applied on a (virtaul) file
    316316 * system level in darwin, or just by the user mode application libs. */
    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);
     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);
    345345#endif
    346346        /* Client sends us UCS2, so convert it to UTF8. */
     
    15971597 * The question is simply whether the NFD normalization is actually applied on a (virtaul) file
    15981598 * system level in darwin, or just by the user mode application libs. */
    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                         }
     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            }
    16191619#endif
    16201620            pSFDEntry->name.u16Length = (uint32_t)RTUtf16Len (pSFDEntry->name.String.ucs2) * 2;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette