VirtualBox

Ignore:
Timestamp:
Nov 16, 2011 10:52:07 AM (13 years ago)
Author:
vboxsync
Message:

scm whitespace cleanups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/stream.cpp

    r38904 r39327  
    9696    0,
    9797    stdin,
    98     true, 
     98    true,
    9999    /*.fBinary = */ false,
    100100    /*.fRecheckMode = */ true
     
    109109    RTSTREAM_MAGIC,
    110110    0,
    111     stderr, 
     111    stderr,
    112112    true,
    113113    /*.fBinary = */ false,
     
    469469
    470470/**
    471  * Recheck the stream mode. 
    472  * 
     471 * Recheck the stream mode.
     472 *
    473473 * @param   pStream             The stream (locked).
    474474 */
     
    564564
    565565/**
    566  * Check if the input text is valid UTF-8. 
    567  * 
     566 * Check if the input text is valid UTF-8.
     567 *
    568568 * @returns true/false.
    569569 * @param   pvBuf               Pointer to the buffer.
     
    581581#ifdef RT_OS_WINDOWS
    582582/**
    583  * Check if the stream is for a Window console. 
    584  * 
     583 * Check if the stream is for a Window console.
     584 *
    585585 * @returns true / false.
    586586 * @param   pStream             The stream.
     
    606606
    607607/**
    608  * Internal write API, stream lock already held. 
    609  * 
     608 * Internal write API, stream lock already held.
     609 *
    610610 * @returns IPRT status code.
    611611 * @param   pStream             The stream.
    612612 * @param   pvBuf               What to write.
    613613 * @param   cbWrite             How much to write.
    614  * @param   pcbWritten          Where to optionally return the number of bytes 
     614 * @param   pcbWritten          Where to optionally return the number of bytes
    615615 *                              written.
    616616 * @param   fSureIsText         Set if we're sure this is UTF-8 text already.
    617617 */
    618 static int rtStrmWriteLocked(PRTSTREAM pStream, const void *pvBuf, size_t cbWrite, size_t *pcbWritten, 
     618static int rtStrmWriteLocked(PRTSTREAM pStream, const void *pvBuf, size_t cbWrite, size_t *pcbWritten,
    619619                              bool fSureIsText)
    620620{
     
    627627#ifdef RT_OS_WINDOWS
    628628    /*
    629      * Use the unicode console API when possible in order to avoid stuff 
     629     * Use the unicode console API when possible in order to avoid stuff
    630630     * getting lost in unnecessary code page translations.
    631631     */
     
    656656                        if (!WriteConsoleW(hCon, &pwszSrc[cwcWritten], 1, &cwcThis, NULL))
    657657                        {
    658                             if (!pcbWritten || cwcWritten == 0) 
     658                            if (!pcbWritten || cwcWritten == 0)
    659659                                rc = RTErrConvertFromErrno(GetLastError());
    660660                            break;
     
    696696        return rc;
    697697    }
    698 #endif /* RT_OS_WINDOWS */ 
     698#endif /* RT_OS_WINDOWS */
    699699
    700700    /*
    701      * If we're sure it's text output, convert it from UTF-8 to the current 
    702      * code page before printing it. 
    703      * 
    704      * Note! Partial writes are not supported in this scenario because we 
     701     * If we're sure it's text output, convert it from UTF-8 to the current
     702     * code page before printing it.
     703     *
     704     * Note! Partial writes are not supported in this scenario because we
    705705     *       cannot easily report back a written length matching the input.
    706706     */
     
    708708    if (   pStream->fCurrentCodeSet
    709709        && !pStream->fBinary
    710         && (   fSureIsText 
     710        && (   fSureIsText
    711711            || rtStrmIsUtf8Text(pvBuf, cbWrite))
    712712       )
     
    761761
    762762    /*
    763      * Otherwise, just write it as-is. 
     763     * Otherwise, just write it as-is.
    764764     */
    765765    if (pcbWritten)
     
    809809
    810810/**
    811  * Internal write API. 
    812  * 
     811 * Internal write API.
     812 *
    813813 * @returns IPRT status code.
    814814 * @param   pStream             The stream.
    815815 * @param   pvBuf               What to write.
    816816 * @param   cbWrite             How much to write.
    817  * @param   pcbWritten          Where to optionally return the number of bytes 
     817 * @param   pcbWritten          Where to optionally return the number of bytes
    818818 *                              written.
    819819 * @param   fSureIsText         Set if we're sure this is UTF-8 text already.
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