Searched defs:cbDst (Results 1 - 23 of 23) sorted by relevance

/vbox/src/VBox/Runtime/common/string/
H A DRTStrCopy.cpp35 RTDECL(int) RTStrCopy(char *pszDst, size_t cbDst, const char *pszSrc) argument
38 if (RT_LIKELY(cchSrc < cbDst))
44 if (cbDst != 0)
46 memcpy(pszDst, pszSrc, cbDst - 1);
47 pszDst[cbDst - 1] = '\0';
H A DRTStrCat.cpp35 RTDECL(int) RTStrCat(char *pszDst, size_t cbDst, const char *pszSrc) argument
37 char *pszDst2 = RTStrEnd(pszDst, cbDst);
39 cbDst -= pszDst2 - pszDst;
42 if (RT_LIKELY(cchSrc < cbDst))
48 if (cbDst != 0)
50 memcpy(pszDst2, pszSrc, cbDst - 1);
51 pszDst2[cbDst - 1] = '\0';
H A DRTStrCatP.cpp42 size_t cbDst = *pcbDst; local
43 char *pszDst = RTStrEnd(pszDstOrg, cbDst);
46 *pcbDst = cbDst - (pszDst - pszDstOrg);
H A DRTStrCatPEx.cpp41 size_t cbDst = *pcbDst; local
42 char *pszDst = RTStrEnd(*ppszDst, cbDst);
H A DRTStrCopyEx.cpp35 RTDECL(int) RTStrCopyEx(char *pszDst, size_t cbDst, const char *pszSrc, size_t cchMaxSrc) argument
39 if (RT_LIKELY(cchSrc < cbDst))
46 if (cbDst != 0)
48 memcpy(pszDst, pszSrc, cbDst - 1);
49 pszDst[cbDst - 1] = '\0';
H A DRTStrCopyP.cpp38 size_t const cbDst = *pcbDst; local
40 if (RT_LIKELY(cchSrc < cbDst))
48 if (cbDst != 0)
50 memcpy(*ppszDst, pszSrc, cbDst - 1);
51 *ppszDst = pszDst += cbDst - 1;
H A DRTStrCatEx.cpp35 RTDECL(int) RTStrCatEx(char *pszDst, size_t cbDst, const char *pszSrc, size_t cchMaxSrc) argument
37 char *pszDst2 = RTStrEnd(pszDst, cbDst);
39 cbDst -= pszDst2 - pszDst;
43 if (RT_LIKELY(cchSrc < cbDst))
50 if (cbDst != 0)
52 memcpy(pszDst2, pszSrc, cbDst - 1);
53 pszDst2[cbDst - 1] = '\0';
H A DRTStrCopyPEx.cpp39 size_t const cbDst = *pcbDst; local
41 if (RT_LIKELY(cchSrc < cbDst))
50 if (cbDst != 0)
52 memcpy(*ppszDst, pszSrc, cbDst - 1);
53 *ppszDst = pszDst += cbDst - 1;
H A Dstrtonum.cpp974 size_t cbDst; local
981 cbDst = cb;
993 return cbDst == 0 ? VINF_SUCCESS : VERR_BUFFER_UNDERFLOW;
1006 if (!cbDst)
1008 cbDst--;
/vbox/src/VBox/Runtime/common/path/
H A DRTPathCopyComponents.cpp40 RTDECL(int) RTPathCopyComponents(char *pszDst, size_t cbDst, const char *pszSrc, size_t cComponents) argument
47 if (cbDst == 0)
77 if (off >= cbDst)
/vbox/src/VBox/Runtime/testcase/
H A DtstRTZip.cpp53 size_t cbDst = RT_MAX(cbSrc * 8, _1M); local
54 void *pvDst = RTMemAllocZ(cbDst);
56 rc = RTZipBlockDecompress(RTZIPTYPE_ZLIB, 0, pvSrc, cbSrc, &cbSrcActually, pvDst, cbDst, &cbDstActually);
57 RTTestIPrintf(RTTESTLVL_ALWAYS, "cbSrc=%zu cbSrcActually=%zu cbDst=%zu cbDstActually=%zu rc=%Rrc\n",
58 cbSrc, cbSrcActually, cbDst, cbDstActually, rc);
/vbox/src/VBox/VMM/VMMR3/
H A DDBGFR3Trace.cpp386 size_t cbDst = cbConfig; local
392 if (cchThis >= cbDst)
405 cbDst -= cchThis;
409 rc = PDMR3TracingQueryConfig(pVM, pszDst, cbDst);
H A DPDM.cpp2702 size_t cbDst = cbConfig; local
2708 rc = pdmR3TracingAdd(&pszDst, &cbDst, pszDst != pszConfig, "dev", pDevIns->Internal.s.pDevR3->pReg->szName);
2717 rc = pdmR3TracingAdd(&pszDst, &cbDst, pszDst != pszConfig, "drv", pDrvIns->Internal.s.pDrv->pReg->szName);
2728 rc = pdmR3TracingAdd(&pszDst, &cbDst, pszDst != pszConfig, "usb", pUsbIns->Internal.s.pUsbDev->pReg->szName);
2737 rc = pdmR3TracingAdd(&pszDst, &cbDst, pszDst != pszConfig, "drv", pDrvIns->Internal.s.pDrv->pReg->szName);
/vbox/src/VBox/HostServices/SharedClipboard/
H A DVBoxClipboard-win.cpp98 void *pvDst, uint32_t cbDst, uint32_t *pcbActualDst)
104 LogFlow(("vboxClipboardGetData cbSrc = %d, cbDst = %d\n", cbSrc, cbDst));
106 if (cbSrc > cbDst)
97 vboxClipboardGetData(uint32_t u32Format, const void *pvSrc, uint32_t cbSrc, void *pvDst, uint32_t cbDst, uint32_t *pcbActualDst) argument
/vbox/src/VBox/VMM/testcase/
H A DtstCompressionBenchmark.cpp432 size_t cbDst; local
435 pbDstPage, cbLeft, &cbDst);
442 *pcb = (uint32_t)cbDst;
443 cbLeft -= cbDst;
444 pbDstPage += cbDst;
501 size_t cbDst = RT_MIN(g_cPages - iPage, cPagesAtATime) * PAGE_SIZE; local
507 pbDstPage, cbDst, &cbDst);
514 pbDstPage += cbDst;
/vbox/src/VBox/Main/src-client/
H A DDisplayImplLegacy.cpp362 static void i_vbvaFetchBytes(VBVAMEMORY *pVbvaMemory, uint8_t *pu8Dst, uint32_t cbDst) argument
364 if (cbDst >= VBVA_RING_BUFFER_SIZE)
366 AssertMsgFailed(("cbDst = 0x%08X, ring buffer size 0x%08X\n", cbDst, VBVA_RING_BUFFER_SIZE));
372 int32_t i32Diff = cbDst - u32BytesTillBoundary;
377 memcpy (pu8Dst, src, cbDst);
387 pVbvaMemory->off32Data = (pVbvaMemory->off32Data + cbDst) % VBVA_RING_BUFFER_SIZE;
/vbox/src/VBox/Additions/common/VBoxService/
H A DVBoxServiceVMInfo-win.cpp630 * @param cbDst Size in bytes - not WCHAR count!
634 static void VBoxServiceVMInfoWinSafeCopy(PWCHAR pwszDst, size_t cbDst, LSA_UNICODE_STRING const *pSrc, const char *pszWhat) argument
636 Assert(RT_ALIGN(cbDst, sizeof(WCHAR)) == cbDst);
639 if (cbCopy + sizeof(WCHAR) > cbDst)
642 pszWhat, cbCopy, cbDst);
643 cbCopy = cbDst - sizeof(WCHAR);
/vbox/src/VBox/HostDrivers/Support/
H A DSUPR3HardenedMain.cpp190 * @param cbDst The size of the destination buffer.
194 static int suplibHardenedStrCopyEx(char *pszDst, size_t cbDst, ...) argument
198 if (cbDst == 0)
202 va_start(va, cbDst);
210 if (cchSrc < cbDst)
214 cbDst -= cchSrc;
219 if (cbDst > 1)
221 suplibHardenedMemCopy(pszDst, pszSrc, cbDst - 1);
222 pszDst += cbDst - 1;
223 cbDst
[all...]
/vbox/src/VBox/Devices/VMMDev/
H A DVMMDevHGCM.cpp390 static int vmmdevHGCMPageListRead(PPDMDEVINSR3 pDevIns, void *pvDst, uint32_t cbDst, const HGCMPageListInfo *pPageListInfo) argument
397 return PDMDevHlpPhysRead(pDevIns, pPageListInfo->aPages[0] | pPageListInfo->offFirstPage, pvDst, cbDst);
406 size_t cbRemaining = (size_t)cbDst;
/vbox/src/VBox/Runtime/common/asn1/
H A Dasn1-ut-string.cpp1025 static int rtIso2022RecodeAsUtf8(uint32_t uProfile, const char *pchSrc, uint32_t cchSrc, char *pszDst, size_t cbDst) argument
1028 AssertReturn(cbDst > 0, VERR_INVALID_PARAMETER);
1041 if (uc < 0x80 && cbDst > 1)
1044 cbDst--;
1049 if (cbDst > cchUniCp)
1051 cbDst -= cchUniCp;
1104 static int rtWin1252RecodeAsUtf8(const char *pchSrc, uint32_t cchSrc, char *pszDst, size_t cbDst) argument
1111 if (cbDst <= 1)
1119 if (cbDst <= cchCp)
1125 if (!cbDst)
[all...]
/vbox/include/iprt/
H A Dstring.h2161 * @param cbDst The size of the destination buffer (in bytes).
2164 RTDECL(int) RTStrCopy(char *pszDst, size_t cbDst, const char *pszSrc);
2175 * @param cbDst The size of the destination buffer (in bytes).
2181 RTDECL(int) RTStrCopyEx(char *pszDst, size_t cbDst, const char *pszSrc, size_t cchSrcMax);
2233 * @param cbDst The size of the destination buffer (in bytes).
2236 RTDECL(int) RTStrCat(char *pszDst, size_t cbDst, const char *pszSrc);
2247 * @param cbDst The size of the destination buffer (in bytes).
2253 RTDECL(int) RTStrCatEx(char *pszDst, size_t cbDst, const char *pszSrc, size_t cchSrcMax);
1427 AssertReturn(CodePoint < 0x100, NULL); *psz++ = (unsigned char)CodePoint; return psz; } DECLINLINE(char *) RTLatin1NextCp(const char *psz) { psz++; return (char *)psz; } DECLINLINE(char *) RTLatin1PrevCp(const char *psz) { psz--; return (char *)psz; } typedef DECLCALLBACK(size_t) FNRTSTROUTPUT(void *pvArg, const char *pachChars, size_t cbChars); typedef FNRTSTROUTPUT *PFNRTSTROUTPUT; typedef DECLCALLBACK(size_t) FNSTRFORMAT(void *pvArg, PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, const char **ppszFormat, va_list *pArgs, int cchWidth, int cchPrecision, unsigned fFlags, char chArgSize); typedef FNSTRFORMAT *PFNSTRFORMAT; RTDECL(size_t) RTStrFormatV(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, PFNSTRFORMAT pfnFormat, void *pvArgFormat, const char *pszFormat, va_list InArgs); RTDECL(size_t) RTStrFormat(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, PFNSTRFORMAT pfnFormat, void *pvArgFormat, const char *pszFormat, ...); RTDECL(int) RTStrFormatNumber(char *psz, uint64_t u64Value, unsigned int uiBase, signed int cchWidth, signed int cchPrecision, unsigned int fFlags); RTDECL(ssize_t) RTStrFormatU8(char *pszBuf, size_t cbBuf, uint8_t u8Value, unsigned int uiBase, signed int cchWidth, signed int cchPrecision, uint32_t fFlags); RTDECL(ssize_t) RTStrFormatU16(char *pszBuf, size_t cbBuf, uint16_t u16Value, unsigned int uiBase, signed int cchWidth, signed int cchPrecision, uint32_t fFlags); RTDECL(ssize_t) RTStrFormatU32(char *pszBuf, size_t cbBuf, uint32_t u32Value, unsigned int uiBase, signed int cchWidth, signed int cchPrecision, uint32_t fFlags); RTDECL(ssize_t) RTStrFormatU64(char *pszBuf, size_t cbBuf, uint64_t u64Value, unsigned int uiBase, signed int cchWidth, signed int cchPrecision, uint32_t fFlags); RTDECL(ssize_t) RTStrFormatU128(char *pszBuf, size_t cbBuf, PCRTUINT128U pu128Value, unsigned int uiBase, signed int cchWidth, signed int cchPrecision, uint32_t fFlags); RTDECL(ssize_t) RTStrFormatR80(char *pszBuf, size_t cbBuf, PCRTFLOAT80U pr80Value, signed int cchWidth, signed int cchPrecision, uint32_t fFlags); RTDECL(ssize_t) RTStrFormatR80u2(char *pszBuf, size_t cbBuf, PCRTFLOAT80U2 pr80Value, signed int cchWidth, signed int cchPrecision, uint32_t fFlags); typedef DECLCALLBACK(size_t) FNRTSTRFORMATTYPE(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, const char *pszType, void const *pvValue, int cchWidth, int cchPrecision, unsigned fFlags, void *pvUser); typedef FNRTSTRFORMATTYPE *PFNRTSTRFORMATTYPE; RTDECL(int) RTStrFormatTypeRegister(const char *pszType, PFNRTSTRFORMATTYPE pfnHandler, void *pvUser); RTDECL(int) RTStrFormatTypeDeregister(const char *pszType); RTDECL(int) RTStrFormatTypeSetUser(const char *pszType, void *pvUser); RTDECL(size_t) RTStrPrintfV(char *pszBuffer, size_t cchBuffer, const char *pszFormat, va_list args); RTDECL(size_t) RTStrPrintf(char *pszBuffer, size_t cchBuffer, const char *pszFormat, ...); RTDECL(size_t) RTStrPrintfExV(PFNSTRFORMAT pfnFormat, void *pvArg, char *pszBuffer, size_t cchBuffer, const char *pszFormat, va_list args); RTDECL(size_t) RTStrPrintfEx(PFNSTRFORMAT pfnFormat, void *pvArg, char *pszBuffer, size_t cchBuffer, const char *pszFormat, ...); RTDECL(int) RTStrAPrintfVTag(char **ppszBuffer, const char *pszFormat, va_list args, const char *pszTag); DECLINLINE(int) RTStrAPrintf(char **ppszBuffer, const char *pszFormat, ...) { int cbRet; va_list va; va_start(va, pszFormat); cbRet = RTStrAPrintfVTag(ppszBuffer, pszFormat, va, RTSTR_TAG); va_end(va); return cbRet; } DECLINLINE(int) RTStrAPrintfTag(char **ppszBuffer, const char *pszTag, const char *pszFormat, ...) { int cbRet; va_list va; va_start(va, pszFormat); cbRet = RTStrAPrintfVTag(ppszBuffer, pszFormat, va, pszTag); va_end(va); return cbRet; } RTDECL(char *) RTStrAPrintf2VTag(const char *pszFormat, va_list args, const char *pszTag); DECLINLINE(char *) RTStrAPrintf2(const char *pszFormat, ...) { char *pszRet; va_list va; va_start(va, pszFormat); pszRet = RTStrAPrintf2VTag(pszFormat, va, RTSTR_TAG); va_end(va); return pszRet; } DECLINLINE(char *) RTStrAPrintf2Tag(const char *pszTag, const char *pszFormat, ...) { char *pszRet; va_list va; va_start(va, pszFormat); pszRet = RTStrAPrintf2VTag(pszFormat, va, pszTag); va_end(va); return pszRet; } RTDECL(char *) RTStrStrip(char *psz); RTDECL(char *) RTStrStripL(const char *psz); RTDECL(char *) RTStrStripR(char *psz); RTDECL(int) RTStrCopy(char *pszDst, size_t cbDst, const char *pszSrc); RTDECL(int) RTStrCopyEx(char *pszDst, size_t cbDst, const char *pszSrc, size_t cchSrcMax); RTDECL(int) RTStrCopyP(char **ppszDst, size_t *pcbDst, const char *pszSrc); RTDECL(int) RTStrCopyPEx(char **ppszDst, size_t *pcbDst, const char *pszSrc, size_t cchSrcMax); RTDECL(int) RTStrCat(char *pszDst, size_t cbDst, const char *pszSrc); RTDECL(int) RTStrCatEx(char *pszDst, size_t cbDst, const char *pszSrc, size_t cchSrcMax); RTDECL(int) RTStrCatP(char **ppszDst, size_t *pcbDst, const char *pszSrc); RTDECL(int) RTStrCatPEx(char **ppszDst, size_t *pcbDst, const char *pszSrc, size_t cchSrcMax); RTDECL(int) RTStrCmp(const char *psz1, const char *psz2); RTDECL(int) RTStrNCmp(const char *psz1, const char *psz2, size_t cchMax); RTDECL(int) RTStrICmp(const char *psz1, const char *psz2); RTDECL(int) RTStrNICmp(const char *psz1, const char *psz2, size_t cchMax); RTDECL(char *) RTStrStr(const char *pszHaystack, const char *pszNeedle); RTDECL(char *) RTStrIStr(const char *pszHaystack, const char *pszNeedle); RTDECL(char *) RTStrToLower(char *psz); RTDECL(char *) RTStrToUpper(char *psz); RTDECL(bool) RTStrIsCaseFoldable(const char *psz); RTDECL(bool) RTStrIsUpperCased(const char *psz); RTDECL(bool) RTStrIsLowerCased(const char *psz); RTDECL(size_t) RTStrNLen(const char *pszString, size_t cchMax); RTDECL(int) RTStrNLenEx(const char *pszString, size_t cchMax, size_t *pcch); RT_C_DECLS_END DECLINLINE(char const *) RTStrEnd(char const *pszString, size_t cchMax) { while (cchMax > RTSTR_MEMCHR_MAX) argument
/vbox/src/VBox/HostDrivers/Support/win/
H A DSUPHardenedVerifyProcess-win.cpp1717 size_t cbDst = cbFree; local
1732 cbDst -= cbAdj;
1735 if (cbSrc > cbDst)
1736 cbSrc = cbDst;
/vbox/src/VBox/Runtime/r3/
H A Dsocket.cpp288 static int rtSocketAddrFromNetAddr(PCRTNETADDR pAddr, RTSOCKADDRUNION *pDst, size_t cbDst, int *pcbAddr) argument
290 RT_BZERO(pDst, cbDst);
292 && cbDst >= sizeof(struct sockaddr_in))
302 && cbDst >= sizeof(struct sockaddr_in6))

Completed in 87 milliseconds