Changeset 91787 in vbox
- Timestamp:
- Oct 17, 2021 5:48:02 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/strprintf.cpp
r82968 r91787 99 99 100 100 101 RTDECL(size_t) RTStrPrintf (char *pszBuffer, size_t cchBuffer, const char *pszFormat, ...)101 RTDECL(size_t) RTStrPrintfV(char *pszBuffer, size_t cchBuffer, const char *pszFormat, va_list args) 102 102 { 103 /* Explicitly inline RTStrPrintfV + RTStrPrintfExV here because this is a frequently use API. */104 103 STRBUFARG Arg; 105 va_list args;106 size_t cbRet;107 108 104 AssertMsgReturn(cchBuffer, ("Excellent idea! Format a string with no space for the output!\n"), 0); 109 105 Arg.psz = pszBuffer; 110 106 Arg.cch = cchBuffer - 1; 107 return RTStrFormatV(strbufoutput, &Arg, NULL, NULL, pszFormat, args); 108 } 109 RT_EXPORT_SYMBOL(RTStrPrintfV); 111 110 112 va_start(args, pszFormat);113 cbRet = RTStrFormatV(strbufoutput, &Arg, NULL, NULL, pszFormat, args);114 va_end(args);115 111 112 RTDECL(size_t) RTStrPrintf(char *pszBuffer, size_t cchBuffer, const char *pszFormat, ...) 113 { 114 size_t cbRet; 115 va_list va; 116 va_start(va, pszFormat); 117 cbRet = RTStrPrintfV(pszBuffer, cchBuffer, pszFormat, va); 118 va_end(va); 116 119 return cbRet; 117 120 } … … 130 133 131 134 132 RTDECL(size_t) RTStrPrintfV(char *pszBuffer, size_t cchBuffer, const char *pszFormat, va_list args)133 {134 return RTStrPrintfExV(NULL, NULL, pszBuffer, cchBuffer, pszFormat, args);135 }136 RT_EXPORT_SYMBOL(RTStrPrintfV);137 138 135 139 136 RTDECL(size_t) RTStrPrintfEx(PFNSTRFORMAT pfnFormat, void *pvArg, char *pszBuffer, size_t cchBuffer, const char *pszFormat, ...)
Note:
See TracChangeset
for help on using the changeset viewer.