VirtualBox

Ignore:
Timestamp:
Feb 27, 2008 5:41:30 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
28483
Message:

Added RTStrFormatTypeRegister/SetUser/Deregister for runtime registration of custom format types. Example: RTStrFormat("%R[pgmpage]", pPage);

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/strformat.cpp

    r6296 r7183  
    770770                    case 'R':
    771771                    {
    772                         pszFormat--;
    773                         cch += rtstrFormatRt(pfnOutput, pvArgOutput, &pszFormat, &args, cchPrecision, cchWidth, fFlags, chArgSize);
     772                        if (*pszFormat != '[')
     773                        {
     774                            pszFormat--;
     775                            cch += rtstrFormatRt(pfnOutput, pvArgOutput, &pszFormat, &args, cchPrecision, cchWidth, fFlags, chArgSize);
     776                        }
     777                        else
     778                        {
     779                            pszFormat--;
     780                            cch += rtstrFormatType(pfnOutput, pvArgOutput, &pszFormat, &args, cchPrecision, cchWidth, fFlags, chArgSize);
     781                        }
    774782                        break;
    775783                    }
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