- Timestamp:
- Apr 29, 2008 8:27:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/strformatrt.cpp
r8402 r8479 124 124 * error code define + full description. 125 125 * 126 * - \%Rfn - Pretty printing of a function or method. It drops the 127 * return code and parameter list. 128 * 126 129 * On other platforms, \%Rw? simply prints the argument in a form of 0xXXXXXXXX. 127 130 * … … 148 151 #endif 149 152 #include <iprt/time.h> 153 #include <iprt/ctype.h> 150 154 #include "internal/string.h" 151 155 … … 490 494 491 495 /* 496 * Pretty function / method name printing. 497 */ 498 case 'f': 499 { 500 char ch = *(*ppszFormat)++; 501 switch (ch) 502 { 503 /* 504 * Pretty function / method name printing. 505 * This isn't 100% right (see classic signal prototype) and it assumes 506 * standardized names, but it'll do for today. 507 */ 508 case 'n': 509 { 510 const char *pszStart; 511 const char *psz = pszStart = va_arg(*pArgs, const char *); 512 if (!VALID_PTR(psz)) 513 return pfnOutput(pvArgOutput, "<null>", sizeof("<null>") - 1); 514 515 while ((ch = *psz) != '\0' && ch != '(') 516 { 517 if (RT_C_IS_BLANK(ch)) 518 { 519 psz++; 520 while ((ch = *psz) != '\0' && (RT_C_IS_BLANK(ch) || ch == '(')) 521 psz++; 522 if (ch) 523 pszStart = psz; 524 } 525 else if (ch == '(') 526 break; 527 else 528 psz++; 529 } 530 531 return pfnOutput(pvArgOutput, pszStart, psz - pszStart); 532 } 533 534 default: 535 AssertMsgFailed(("Invalid status code format type '%.10s'!\n", ch, pszFormatOrg)); 536 break; 537 } 538 break; 539 } 540 541 542 /* 492 543 * hex dumping and COM/XPCOM. 493 544 */
Note:
See TracChangeset
for help on using the changeset viewer.