VirtualBox

Changeset 34964 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 10, 2010 5:18:30 PM (14 years ago)
Author:
vboxsync
Message:

Added RTVfsIoStrmValidateUtf8Encoding (stubbed).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/vfs/vfsbase.cpp

    r34786 r34964  
    22542254
    22552255
     2256RTDECL(int) RTVfsIoStrmValidateUtf8Encoding(RTVFSIOSTREAM hVfsIos)
     2257{
     2258    char    achBuf[1024 + 1];
     2259    size_t  cbUsed = 0;
     2260    int     rc;
     2261    for (;;)
     2262    {
     2263        /*
     2264         * Fill the buffer
     2265         */
     2266        size_t cbRead = 0;
     2267        rc = RTVfsIoStrmRead(hVfsIos, &achBuf[cbUsed], sizeof(achBuf) - cbUsed - 1, true /*fBlocking*/, &cbRead);
     2268        if (RT_FAILURE(rc))
     2269            break;
     2270        cbUsed += cbRead;
     2271        if (!cbUsed)
     2272        {
     2273            Assert(rc == VINF_EOF);
     2274            break;
     2275        }
     2276
     2277        /*
     2278         * Process the data in the buffer, maybe leaving the final chars till
     2279         * the next round.
     2280         */
     2281/** @todo  implement this */
     2282    }
     2283
     2284    return rc == VINF_EOF ? VINF_SUCCESS : rc;
     2285}
     2286
    22562287
    22572288
Note: See TracChangeset for help on using the changeset viewer.

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