Changeset 25596 in vbox for trunk/src/VBox/Runtime/common/string
- Timestamp:
- Dec 30, 2009 10:53:20 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56287
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/strformatrt.cpp
r25000 r25596 131 131 * - \%Rfn - Pretty printing of a function or method. It drops the 132 132 * return code and parameter list. 133 * - \%Rbn - Prints the base name. For dropping the path in 134 * order to save space when printing a path name. 133 135 * 134 136 * On other platforms, \%Rw? simply prints the argument in a form of 0xXXXXXXXX. … … 160 162 #include <iprt/time.h> 161 163 #include <iprt/net.h> 164 #include <iprt/path.h> 162 165 #include "internal/string.h" 163 166 … … 568 571 569 572 /* 573 * Base name printing. 574 */ 575 case 'b': 576 { 577 switch (*(*ppszFormat)++) 578 { 579 case 'n': 580 { 581 const char *pszLastSep; 582 const char *psz = pszLastSep = va_arg(*pArgs, const char *); 583 if (!VALID_PTR(psz)) 584 return pfnOutput(pvArgOutput, "<null>", sizeof("<null>") - 1); 585 586 while ((ch = *psz) != '\0') 587 { 588 if (RTPATH_IS_SEP(ch)) 589 { 590 do 591 psz++; 592 while ((ch = *psz) != '\0' && RTPATH_IS_SEP(ch)); 593 if (!ch) 594 break; 595 pszLastSep = psz; 596 } 597 psz++; 598 } 599 600 return pfnOutput(pvArgOutput, pszLastSep, psz - pszLastSep); 601 } 602 603 default: 604 AssertMsgFailed(("Invalid status code format type '%.10s'!\n", pszFormatOrg)); 605 break; 606 } 607 break; 608 } 609 610 611 /* 570 612 * Pretty function / method name printing. 571 613 */
Note:
See TracChangeset
for help on using the changeset viewer.