Searched refs:cwc (Results 1 - 20 of 20) sorted by relevance

/vbox/src/VBox/Runtime/common/string/
H A Dutf-16-latin-1.cpp46 * @param cwc The max length of the UTF-16 string to consider.
49 static int rtUtf16CalcLatin1Length(PCRTUTF16 pwsz, size_t cwc, size_t *pcch) argument
53 while (cwc > 0)
55 RTUTF16 wc = *pwsz++; cwc--;
79 if (cwc <= 0)
85 wc = *pwsz++; cwc--;
110 * @param cwc The number of RTUTF16 characters to process from pwsz. The recoding
111 * will stop when cwc or '\\0' is reached.
115 static int rtUtf16RecodeAsLatin1(PCRTUTF16 pwsz, size_t cwc, char *psz, size_t cch) argument
119 while (cwc >
286 RTUtf16CalcLatin1LenEx(PCRTUTF16 pwsz, size_t cwc, size_t *pcch) argument
328 rtLatin1RecodeAsUtf16(const char *psz, size_t cch, PRTUTF16 pwsz, size_t cwc) argument
371 size_t cwc; local
400 RTLatin1ToUtf16ExTag(const char *pszString, size_t cchString, PRTUTF16 *ppwsz, size_t cwc, size_t *pcwc, const char *pszTag) argument
463 size_t cwc; local
472 size_t cwc; local
[all...]
H A Dutf-16.cpp47 * @param cwc The max length of the string in UTF-16 units. Use
53 static int rtUtf16Length(PCRTUTF16 pwsz, size_t cwc, size_t *pcuc, size_t *pcwcActual) argument
57 while (cwc > 0)
66 cwc--;
71 RTStrAssertMsgFailed(("Lone UTF-16 trail surrogate: %#x (%.*Rhxs)\n", wc, RT_MIN(cwc * 2, 10), pwsz));
74 else if (cwc < 2)
90 cwc -= 2;
194 RTDECL(int) RTUtf16ValidateEncodingEx(PCRTUTF16 pwsz, size_t cwc, uint32_t fFlags) argument
205 int rc = rtUtf16Length(pwsz, cwc, &cCpsIgnored, &cwcActual);
212 if (cwcActual == cwc)
276 rtUtf16CalcUtf8Length(PCRTUTF16 pwsz, size_t cwc, size_t *pcch) argument
343 rtUtf16RecodeAsUtf8(PCRTUTF16 pwsz, size_t cwc, char *psz, size_t cch, size_t *pcch) argument
549 RTUtf16CalcUtf8LenEx(PCRTUTF16 pwsz, size_t cwc, size_t *pcch) argument
[all...]
H A Dutf-8.cpp510 size_t cwc = 0; local
519 cwc++;
600 cwc++;
623 cwc++;
628 *pcwc = cwc;
643 * @param cwc The number of RTUTF16 items the pwsz buffer can hold, excluding the terminator ('\\0').
645 static int rtUtf8RecodeAsUtf16(const char *psz, size_t cch, PRTUTF16 pwsz, size_t cwc) argument
658 if (RT_UNLIKELY(cwc < 1))
663 cwc--;
697 if (RT_UNLIKELY(cwc <
730 size_t cwc; local
759 RTStrToUtf16ExTag(const char *pszString, size_t cchString, PRTUTF16 *ppwsz, size_t cwc, size_t *pcwc, const char *pszTag) argument
822 size_t cwc; local
831 size_t cwc; local
[all...]
H A Dstrformat.cpp100 unsigned cwc = 0; local
108 cwc++;
110 return cwc;
/vbox/src/VBox/Runtime/r3/win/
H A Dutf8-win.cpp132 int cwc = MultiByteToWideChar(CP_ACP, 0, pszString, -1, NULL, 0); local
133 if (cwc > 0)
138 PRTUTF16 pwszString = (PRTUTF16)RTMemTmpAlloc(cwc * sizeof(RTUTF16));
144 if (MultiByteToWideChar(CP_ACP, 0, pszString, -1, pwszString, cwc) > 0)
H A Dpath-win.cpp201 size_t const cwc = RTUtf16Len(&wszPath[0]); local
202 if ( !GetEnvironmentVariableW(L"HOMEPATH", &wszPath[cwc], RTPATH_MAX - (DWORD)cwc)
698 size_t cwc = RTUtf16Len(pwszPath); local
699 if ( cwc >= 2
700 && ( pwszPath[cwc - 1] == L'/'
701 || pwszPath[cwc - 1] == L'\\')
702 && pwszPath[cwc - 2] != ':')
703 pwszPath[cwc - 1] = L'\0';
/vbox/src/VBox/Main/glue/
H A Dstring.cpp51 size_t cwc;
52 int vrc = ::RTStrCalcUtf16LenEx(a_pszSrc, a_cchMax, &cwc);
60 m_bstr = ::SysAllocStringByteLen(NULL, (unsigned)(cwc * sizeof(OLECHAR)));
65 vrc = ::RTStrToUtf16Ex(a_pszSrc, a_cchMax, &pwsz, cwc + 1, NULL);
/vbox/src/VBox/Runtime/r3/darwin/
H A DRTSystemQueryDmiString-darwin.cpp123 CFIndex cwc = CFStringGetLength(StringRef); local
124 size_t cbTmp = cwc + 1;
/vbox/src/VBox/Devices/Graphics/shaderlib/wine/include/
H A Dindexsrv.idl69 [in] ULONG cwc,
74 [in] ULONG cwc,
/vbox/src/VBox/Additions/WINNT/Graphics/Wine/include/
H A Dindexsrv.idl69 [in] ULONG cwc,
74 [in] ULONG cwc,
/vbox/src/VBox/Main/src-server/win/
H A Dsvcmain.cpp163 DWORD cwc = cEnv; /* doesn't include NUL */ local
164 cEnv = GetEnvironmentVariable(L"HOMEPATH", &wszHome[cEnv], RTPATH_MAX - cwc);
165 if (cEnv && cEnv < RTPATH_MAX - cwc)
/vbox/src/VBox/Runtime/common/dvm/
H A Ddvmgpt.cpp298 for (unsigned cwc = 0; cwc < RT_ELEMENTS(pThis->paGptEntries[i].aPartitionName); cwc++)
299 pThis->paGptEntries[i].aPartitionName[cwc] = RT_LE2H_U16(pThis->paGptEntries[i].aPartitionName[cwc]);
/vbox/src/VBox/Runtime/generic/
H A Denv-generic.cpp788 size_t cwc; local
792 rc = RTStrCalcUtf16LenEx(pIntEnv->papszEnv[iVar], RTSTR_MAX, &cwc);
794 cwcTotal += cwc + 1;
810 &pwszz, cwcTotal - (pwszz - pwszzBlock), &cwc);
812 pwszz += cwc + 1;
813 cwcLeft -= cwc + 1;
/vbox/include/iprt/
H A Dstring.h849 * @param ppwsz If cwc is non-zero, this must either be pointing to pointer to
851 * If *ppwsz is NULL or cwc is zero a buffer of at least cwc items
854 * @param cwc The buffer size in RTUTF16s. This includes the terminator.
863 #define RTStrToUtf16Ex(pszString, cchString, ppwsz, cwc, pcwc) \
864 RTStrToUtf16ExTag((pszString), (cchString), (ppwsz), (cwc), (pcwc), RTSTR_TAG)
875 * @param ppwsz If cwc is non-zero, this must either be pointing to pointer to
877 * If *ppwsz is NULL or cwc is zero a buffer of at least cwc items
880 * @param cwc Th
[all...]
/vbox/src/VBox/Installer/win/Stub/
H A DVBoxStub.cpp695 size_t cwc; local
698 rc = RTStrToUtf16Ex(szSrcDir, RTSTR_MAX, &pwszSrcDir, RTPATH_MAX, &cwc);
701 wszSrcDir[cwc] = '\0';
705 rc = RTStrToUtf16Ex(pszDstDir, RTSTR_MAX, &pwszDstDir, RTPATH_MAX, &cwc);
708 wszDstDir[cwc] = '\0';
/vbox/src/VBox/GuestHost/SharedClipboard/
H A Dx11-clipboard.cpp1011 * @param cwc the size in USC-2 elements of the source text, with or
1015 static int clipWinTxtBufSizeForUtf8(PRTUTF16 pwsz, size_t cwc, argument
1019 int rc = RTUtf16CalcUtf8LenEx(pwsz, cwc, &cbRet);
2098 size_t cwc = 0;
2100 RT_ELEMENTS(wcExp), &cwc);
2101 size_t cbExp = cwc * 2 + 2;
2156 size_t cwc;
2157 for (cwc = 0; cwc == 0 || pcszExp[cwc
[all...]
/vbox/src/VBox/HostDrivers/Support/win/
H A DSUPR3HardenedMain-win.cpp1005 uint32_t cwc = aDirs[i].cwcDir; local
1006 wszPath[cwc++] = '\\';
1007 cwcName = RT_ELEMENTS(wszPath) - cwc;
1008 pwszName = &wszPath[cwc];
1015 NtName.Length = (USHORT)((cwc + cwcName) * sizeof(WCHAR));
1565 UINT cwc; local
1566 *pcwc = cwc = pUniStrResult->Length / sizeof(WCHAR);
1568 pwszPath[cwc] = '\0';
1571 if (cwc > cwcPath - 1)
1580 pwszPath[cwc]
1682 UINT cwc; local
1766 UINT cwc; local
[all...]
H A DSUPHardenedVerifyImage-win.cpp568 size_t cwc = RTUtf16Len(pwsz); local
570 if (cwc >= cchSuffix)
571 return supHardViUtf16PathIsEqual(pwsz + cwc - cchSuffix, pszSuffix);
/vbox/src/VBox/Devices/USB/
H A DVUSBDevice.cpp670 size_t cwc; local
671 int rc = RTStrToUtf16Ex(pString->psz, RT_ELEMENTS(wsz) - 1, &pwsz, RT_ELEMENTS(wsz), &cwc);
678 cwc = 3;
682 StringDesc.bLength = (uint8_t)(sizeof(StringDesc) + cwc * sizeof(RTUTF16));
685 COPY_DATA(pbBuf, cbLeft, wsz, (uint32_t)cwc * sizeof(RTUTF16));
/vbox/src/VBox/Runtime/testcase/
H A DtstUtf8.cpp902 size_t cwc; /* Zero means the strings are Utf-8. */ member in struct:__anon16766
925 if (!aTests[i].cwc)
934 Assert(aTests[i].cwc <= RT_ELEMENTS(wszInCopy));
935 memcpy(wszInCopy, aTests[i].pcszIn, aTests[i].cwc * 2);
936 memcpy(wszOutCopy, aTests[i].pcszOut, aTests[i].cwc * 2);

Completed in 131 milliseconds