Changeset 84207 in vbox
- Timestamp:
- May 8, 2020 11:54:10 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
include/iprt/string.h (modified) (1 diff)
-
src/VBox/Runtime/common/string/strformatrt.cpp (modified) (2 diffs)
-
src/VBox/Runtime/common/zip/tarvfswriter.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/string.h
r84054 r84207 1506 1506 * Use the precision to specify the length. Default length is 16 bytes. 1507 1507 * The width, if specified, is ignored. 1508 * The space separtor can get change to a colon by 1509 * using the ' flag, and removed entirely using \#. 1508 1510 * - \%RhXd - Same as \%Rhxd, but takes an additional uint64_t 1509 1511 * value with the memory start address/offset after -
trunk/src/VBox/Runtime/common/string/strformatrt.cpp
r84063 r84207 988 988 /* 989 989 * Hex string. 990 * The default separator is ' ', RTSTR_F_THOUSAND_SEP changes it to ':', 991 * and RTSTR_F_SPECIAL removes it. 990 992 */ 991 993 case 's': … … 998 1000 cch = RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%0*llx: %02x", 999 1001 cchMemAddrWidth, uMemAddr, *pu8++); 1000 for (; cchPrecision > 0; cchPrecision--, pu8++) 1001 cch += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, " %02x", *pu8); 1002 if (!(fFlags & (RTSTR_F_SPECIAL | RTSTR_F_THOUSAND_SEP))) 1003 for (; cchPrecision > 0; cchPrecision--, pu8++) 1004 cch += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, " %02x", *pu8); 1005 else if (fFlags & RTSTR_F_SPECIAL) 1006 for (; cchPrecision > 0; cchPrecision--, pu8++) 1007 cch += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "%02x", *pu8); 1008 else 1009 for (; cchPrecision > 0; cchPrecision--, pu8++) 1010 cch += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, ":%02x", *pu8); 1002 1011 return cch; 1003 1012 } -
trunk/src/VBox/Runtime/common/zip/tarvfswriter.cpp
r84192 r84207 2134 2134 AssertPtrReturn(phVfsFss, VERR_INVALID_HANDLE); 2135 2135 *phVfsFss = NIL_RTVFSFSSTREAM; 2136 Assert PtrReturn(hVfsFile != NIL_RTVFSFILE, VERR_INVALID_HANDLE);2136 AssertReturn(hVfsFile != NIL_RTVFSFILE, VERR_INVALID_HANDLE); 2137 2137 AssertReturn(enmFormat > RTZIPTARFORMAT_INVALID && enmFormat < RTZIPTARFORMAT_END, VERR_INVALID_PARAMETER); 2138 2138 AssertReturn(!(fFlags & ~RTZIPTAR_C_VALID_MASK), VERR_INVALID_FLAGS); … … 2159 2159 size_t const cbThis = sizeof(*pThis) + (fFlags & RTZIPTAR_C_UPDATE ? sizeof(*pThis->pRead) : 0); 2160 2160 RTVFSFSSTREAM hVfsFss; 2161 int rc = RTVfsNewFsStream(&g_rtZipTarFssOps, cbThis, NIL_RTVFS, NIL_RTVFSLOCK, RTFILE_O_WRITE, 2161 int rc = RTVfsNewFsStream(&g_rtZipTarFssOps, cbThis, NIL_RTVFS, NIL_RTVFSLOCK, 2162 fFlags & RTZIPTAR_C_UPDATE ? RTFILE_O_READWRITE : RTFILE_O_WRITE, 2162 2163 &hVfsFss, (void **)&pThis); 2163 2164 if (RT_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.

