VirtualBox

Ignore:
Timestamp:
Dec 10, 2010 5:52:01 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
68789
Message:

Moved and extended RTVfsIoStrmValidateUtf8Encoding.

Location:
trunk/src/VBox/Runtime/common/vfs
Files:
1 added
1 edited

Legend:

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

    r34964 r34967  
    22542254
    22552255
    2256 RTDECL(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 
    2287 
    22882256
    22892257
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