Lines Matching refs:pwszSrc
27 int vboxClipboardUtf16GetWinSize(PRTUTF16 pwszSrc, size_t cwSrc, size_t *pcwDest)
31 LogFlowFunc(("pwszSrc=%.*ls, cwSrc=%u\n", cwSrc, pwszSrc, cwSrc));
32 AssertLogRelMsgReturn(pwszSrc != NULL, ("vboxClipboardUtf16GetWinSize: received a null Utf16 string, returning VERR_INVALID_PARAMETER\n"), VERR_INVALID_PARAMETER);
41 if (pwszSrc[0] == UTF16BEMARKER)
44 AssertReturn(pwszSrc[0] != UTF16BEMARKER, VERR_INVALID_PARAMETER);
49 for (i = (pwszSrc[0] == UTF16LEMARKER ? 1 : 0); i < cwSrc; ++i, ++cwDest)
52 if (pwszSrc[i] == LINEFEED)
56 if (pwszSrc[i] == CARRIAGERETURN)
59 if (pwszSrc[i] == 0)
72 int vboxClipboardUtf16LinToWin(PRTUTF16 pwszSrc, size_t cwSrc, PRTUTF16 pu16Dest,
76 LogFlowFunc(("pwszSrc=%.*ls, cwSrc=%u\n", cwSrc, pwszSrc, cwSrc));
77 if (!VALID_PTR(pwszSrc) || !VALID_PTR(pu16Dest))
79 LogRel(("vboxClipboardUtf16LinToWin: received an invalid pointer, pwszSrc=%p, pu16Dest=%p, returning VERR_INVALID_PARAMETER\n", pwszSrc, pu16Dest));
80 AssertReturn(VALID_PTR(pwszSrc) && VALID_PTR(pu16Dest), VERR_INVALID_PARAMETER);
94 if (pwszSrc[0] == UTF16BEMARKER)
97 AssertReturn(pwszSrc[0] != UTF16BEMARKER, VERR_INVALID_PARAMETER);
100 for (i = (pwszSrc[0] == UTF16LEMARKER ? 1 : 0), j = 0; i < cwSrc; ++i, ++j)
103 if (pwszSrc[i] == 0)
110 if (pwszSrc[i] == LINEFEED)
122 else if (pwszSrc[i] == CARRIAGERETURN)
137 pu16Dest[j] = pwszSrc[i];
150 int vboxClipboardUtf16GetLinSize(PRTUTF16 pwszSrc, size_t cwSrc, size_t *pcwDest)
154 LogFlowFunc(("pwszSrc=%.*ls, cwSrc=%u\n", cwSrc, pwszSrc, cwSrc));
155 if (!VALID_PTR(pwszSrc))
157 LogRel(("vboxClipboardUtf16GetLinSize: received an invalid Utf16 string %p. Returning VERR_INVALID_PARAMETER.\n", pwszSrc));
158 AssertReturn(VALID_PTR(pwszSrc), VERR_INVALID_PARAMETER);
167 if (pwszSrc[0] == UTF16BEMARKER)
170 AssertReturn(pwszSrc[0] != UTF16BEMARKER, VERR_INVALID_PARAMETER);
174 if (pwszSrc[0] == UTF16LEMARKER)
181 && (pwszSrc[i] == CARRIAGERETURN)
182 && (pwszSrc[i + 1] == LINEFEED))
186 if (pwszSrc[i] == 0)
198 int vboxClipboardUtf16WinToLin(PRTUTF16 pwszSrc, size_t cwSrc, PRTUTF16 pu16Dest,
203 LogFlowFunc(("pwszSrc=%.*ls, cwSrc=%u, pu16Dest=%p, cwDest=%u\n",
204 cwSrc, pwszSrc, cwSrc, pu16Dest, cwDest));
207 if (!VALID_PTR(pwszSrc) || !VALID_PTR(pu16Dest))
209 LogRel(("vboxClipboardUtf16WinToLin: received an invalid ptr, pwszSrc=%p, pu16Dest=%p, returning VERR_INVALID_PARAMETER\n", pwszSrc, pu16Dest));
210 AssertReturn(VALID_PTR(pwszSrc) && VALID_PTR(pu16Dest), VERR_INVALID_PARAMETER);
213 if (pwszSrc[0] == UTF16BEMARKER)
230 if (pwszSrc[0] == UTF16LEMARKER)
241 if (pwszSrc[i] == 0)
251 && (pwszSrc[i] == CARRIAGERETURN)
252 && (pwszSrc[i + 1] == LINEFEED))
256 pu16Dest[cwDestPos] = pwszSrc[i];