Home
last modified time | relevance | path

Searched refs:wcs (Results 1 – 25 of 37) sorted by relevance

12

/external/google-breakpad/src/common/windows/
Dstring_utils.cc48 bool WindowsStringUtils::safe_mbstowcs(const string &mbs, wstring *wcs) { in safe_mbstowcs() argument
49 assert(wcs); in safe_mbstowcs()
86 *wcs = &wcs_v[0]; in safe_mbstowcs()
91 bool WindowsStringUtils::safe_wcstombs(const wstring &wcs, string *mbs) { in safe_wcstombs() argument
99 if ((err = wcstombs_s(&mbs_length, NULL, 0, wcs.c_str(), _TRUNCATE)) != 0) { in safe_wcstombs()
104 if ((mbs_length = wcstombs(NULL, wcs.c_str(), wcs.length())) == (size_t)-1) { in safe_wcstombs()
116 if ((err = wcstombs_s(NULL, &mbs_v[0], mbs_length, wcs.c_str(), in safe_wcstombs()
121 if (wcstombs(&mbs_v[0], wcs.c_str(), wcs.length()) == (size_t)-1) { in safe_wcstombs()
Dstring_utils-inl.h88 static bool safe_mbstowcs(const string &mbs, wstring *wcs);
91 static bool safe_wcstombs(const wstring &wcs, string *mbs);
/external/exfatprogs/lib/
Dlibexfat.c239 wchar_t *wcs; in exfat_utf16_enc() local
248 wcs = calloc(mbs_len+1, sizeof(wchar_t)); in exfat_utf16_enc()
249 if (!wcs) in exfat_utf16_enc()
253 if (mbstowcs(wcs, in_str, mbs_len+1) == (size_t)-1) { in exfat_utf16_enc()
256 free(wcs); in exfat_utf16_enc()
263 (wcs[i] >= 0x10000 && 2*(out_len+2) > out_size)) { in exfat_utf16_enc()
265 free(wcs); in exfat_utf16_enc()
270 if (wcs[i] >= 0x10000) { in exfat_utf16_enc()
272 cpu_to_le16(((wcs[i] - 0x10000) >> 10) + 0xD800); in exfat_utf16_enc()
273 wcs[i] = ((wcs[i] - 0x10000) & 0x3FF) + 0xDC00; in exfat_utf16_enc()
[all …]
/external/musl/src/stdio/
Dvfscanf.c65 wchar_t *wcs; in vfscanf() local
125 wcs = 0; in vfscanf()
223 wcs = 0; in vfscanf()
229 wcs = malloc(k*sizeof(wchar_t)); in vfscanf()
230 if (!wcs) goto alloc_fail; in vfscanf()
232 wcs = dest; in vfscanf()
242 if (wcs) wcs[i++] = wc; in vfscanf()
245 wchar_t *tmp = realloc(wcs, k*sizeof(wchar_t)); in vfscanf()
247 wcs = tmp; in vfscanf()
273 if (size == SIZE_l) *(wchar_t **)dest = wcs; in vfscanf()
[all …]
Dvfwscanf.c94 wchar_t *wcs; in vfwscanf() local
148 wcs = 0; in vfwscanf()
238 wcs = (size == SIZE_l) ? dest : 0; in vfwscanf()
248 wcs = malloc(k*sizeof(wchar_t)); in vfwscanf()
249 if (!wcs) goto alloc_fail; in vfwscanf()
259 if (wcs) { in vfwscanf()
260 wcs[i++] = c; in vfwscanf()
263 wchar_t *tmp = realloc(wcs, k*sizeof(wchar_t)); in vfwscanf()
265 wcs = tmp; in vfwscanf()
288 if (size == SIZE_l) *(wchar_t **)dest = wcs; in vfwscanf()
[all …]
/external/musl/src/stdlib/
Dwcstod.c14 const wchar_t *wcs = f->cookie; in do_read() local
16 if (!wcs[0]) wcs=L"@"; in do_read()
17 for (i=0; i<f->buf_size && wcs[i]; i++) in do_read()
18 f->buf[i] = wcs[i] < 128 ? wcs[i] : '@'; in do_read()
21 f->cookie = (void *)(wcs+i); in do_read()
Dwcstol.c16 const wchar_t *wcs = f->cookie; in do_read() local
18 if (!wcs[0]) wcs=L"@"; in do_read()
19 for (i=0; i<f->buf_size && wcs[i]; i++) in do_read()
20 f->buf[i] = wcs[i] < 128 ? wcs[i] : '@'; in do_read()
23 f->cookie = (void *)(wcs+i); in do_read()
/external/musl/src/ctype/
Dwcswidth.c3 int wcswidth(const wchar_t *wcs, size_t n) in wcswidth() argument
6 for (; n-- && *wcs && (k = wcwidth(*wcs)) >= 0; l+=k, wcs++); in wcswidth()
/external/musl/src/multibyte/
Dmbsnrtowcs.c3 size_t mbsnrtowcs(wchar_t *restrict wcs, const char **restrict src, size_t n, size_t wn, mbstate_t … in mbsnrtowcs() argument
10 if (!wcs) ws = wbuf, wn = sizeof wbuf / sizeof *wbuf; in mbsnrtowcs()
11 else ws = wcs; in mbsnrtowcs()
53 if (wcs) *src = s; in mbsnrtowcs()
Dwcsnrtombs.c5 size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict wcs, size_t wn, size_t n, mbstate_t … in wcsnrtombs() argument
7 const wchar_t *ws = *wcs; in wcsnrtombs()
33 if (dst) *wcs = ws; in wcsnrtombs()
/external/scapy/scapy/layers/tls/
Drecord.py507 self.tls_session.wcs = self.tls_session.pwcs
536 alg = self.tls_session.wcs.compression
544 write_seq_num = struct.pack("!Q", self.tls_session.wcs.seq_num)
545 self.tls_session.wcs.seq_num += 1
550 return self.tls_session.wcs.cipher.auth_encrypt(s, add_data,
563 write_seq_num = struct.pack("!Q", self.tls_session.wcs.seq_num)
564 self.tls_session.wcs.seq_num += 1
566 alg = self.tls_session.wcs.hmac
587 block_size = self.tls_session.wcs.cipher.block_size
601 return self.tls_session.wcs.cipher.encrypt(s)
[all …]
Dsession.py310 wcs=None, rcs=None): argument
328 if wcs is None:
330 self.wcs = writeConnState(connection_end=connection_end)
331 self.wcs.derive_keys()
333 self.wcs = wcs
462 if hasattr(self, "wcs") and self.wcs:
463 self.wcs.connection_end = val
497 self.rcs, self.wcs = self.wcs, self.rcs
500 if self.wcs:
501 self.wcs.row = "write"
[all …]
Drecord_sslv2.py161 self.tls_session.wcs = self.tls_session.pwcs
185 secret = self.tls_session.wcs.cipher.key
189 write_seq_num = struct.pack("!I", self.tls_session.wcs.seq_num)
190 alg = self.tls_session.wcs.hash
196 block_size = self.tls_session.wcs.cipher.block_size
213 if self.pad == b"" and self.tls_session.wcs.cipher.type == 'block':
259 self.tls_session.wcs = self.tls_session.pwcs
270 self.tls_session.wcs.seq_num += 1
Drecord_tls13.py177 wcs = self.tls_session.wcs
178 write_seq_num = struct.pack("!Q", wcs.seq_num)
179 wcs.seq_num += 1
180 return wcs.cipher.auth_encrypt(s, b"", write_seq_num)
203 self.tls_session.wcs = self.tls_session.pwcs
Dbasefields.py151 return pkt.tls_session.wcs.mac_len
/external/mtools/
DmissFuncs.c69 wchar_t *wcsdup(const wchar_t *wcs) in wcsdup() argument
73 if (wcs == (wchar_t*)0) in wcsdup()
76 nwcs = (wchar_t*)calloc(wcslen(wcs) + 1, sizeof(wchar_t)); in wcsdup()
81 wcs); in wcsdup()
85 (void)wcscpy(nwcs, wcs); in wcsdup()
488 size_t wcsnlen(const wchar_t *wcs, size_t l) in wcsnlen() argument
492 if(wcs[i] == 0) in wcsnlen()
Dsysincludes.h515 wchar_t *wcsdup(const wchar_t *wcs);
523 size_t wcsnlen(const wchar_t *wcs, size_t l);
/external/apache-commons-io/src/main/java/org/apache/commons/io/
DFilenameUtils.java1582 final String[] wcs = splitOnTokens(wildcardMatcher); in wildcardMatch() local
1586 final Deque<int[]> backtrack = new ArrayDeque<>(wcs.length); in wildcardMatch()
1598 while (wcsIdx < wcs.length) { in wildcardMatch()
1600 if (wcs[wcsIdx].equals("?")) { in wildcardMatch()
1608 } else if (wcs[wcsIdx].equals("*")) { in wildcardMatch()
1611 if (wcsIdx == wcs.length - 1) { in wildcardMatch()
1619 textIdx = ioCase.checkIndexOf(fileName, textIdx, wcs[wcsIdx]); in wildcardMatch()
1624 final int repeat = ioCase.checkIndexOf(fileName, textIdx + 1, wcs[wcsIdx]); in wildcardMatch()
1628 } else if (!ioCase.checkRegionMatches(fileName, textIdx, wcs[wcsIdx])) { in wildcardMatch()
1635 textIdx += wcs[wcsIdx].length(); in wildcardMatch()
[all …]
/external/cronet/third_party/protobuf/src/google/protobuf/io/
Dio_win32_unittest.cc122 std::unique_ptr<WCHAR[]> wcs(new WCHAR[size]); in GetEnvVarAsUtf8() local
123 ::GetEnvironmentVariableW(name, wcs.get(), size); in GetEnvVarAsUtf8()
129 return strings::wcs_to_utf8(wcs.get(), result); in GetEnvVarAsUtf8()
138 std::unique_ptr<WCHAR[]> wcs(new WCHAR[size]); in GetCwdAsUtf8() local
139 ::GetCurrentDirectoryW(size, wcs.get()); in GetCwdAsUtf8()
145 return strings::wcs_to_utf8(wcs.get(), result); in GetCwdAsUtf8()
617 wstring wcs; in TEST_F() local
618 ASSERT_TRUE(strings::utf8_to_wcs(kUtf8Text, &wcs)); in TEST_F()
620 ASSERT_EQ(wcs, kUtf16Text); in TEST_F()
/external/protobuf/src/google/protobuf/io/
Dio_win32_unittest.cc122 std::unique_ptr<WCHAR[]> wcs(new WCHAR[size]); in GetEnvVarAsUtf8() local
123 ::GetEnvironmentVariableW(name, wcs.get(), size); in GetEnvVarAsUtf8()
129 return strings::wcs_to_utf8(wcs.get(), result); in GetEnvVarAsUtf8()
138 std::unique_ptr<WCHAR[]> wcs(new WCHAR[size]); in GetCwdAsUtf8() local
139 ::GetCurrentDirectoryW(size, wcs.get()); in GetCwdAsUtf8()
145 return strings::wcs_to_utf8(wcs.get(), result); in GetCwdAsUtf8()
617 wstring wcs; in TEST_F() local
618 ASSERT_TRUE(strings::utf8_to_wcs(kUtf8Text, &wcs)); in TEST_F()
620 ASSERT_EQ(wcs, kUtf16Text); in TEST_F()
/external/musl/src/time/
Dwcsftime.c66 size_t wcsftime(wchar_t *restrict wcs, size_t n, const wchar_t *restrict f, const struct tm *restri… in wcsftime() argument
68 return __wcsftime_l(wcs, n, f, tm, CURRENT_LOCALE); in wcsftime()
/external/icu/icu4c/source/test/perf/ustrperf/
Dstringperf.h252 wchar_t* wcs; in prepareLinesForStd() local
257 wcs = u_strToWCS(ws, wcap, &wl, lines_[i].name, lines_[i].len, &err); in prepareLinesForStd()
258 memcpy(wlines_[i].name, wcs, wl * sizeof(wchar_t)); in prepareLinesForStd()
262 wcs = u_strToWCS(ws, wcap, &wl, lines_[i].name, lines_[i].len-1, &err); in prepareLinesForStd()
263 memcpy(wlines_[i].name, wcs, wl*sizeof(wchar_t)); in prepareLinesForStd()
/external/cronet/third_party/icu/source/test/perf/ustrperf/
Dstringperf.h252 wchar_t* wcs; in prepareLinesForStd() local
257 wcs = u_strToWCS(ws, wcap, &wl, lines_[i].name, lines_[i].len, &err); in prepareLinesForStd()
258 memcpy(wlines_[i].name, wcs, wl * sizeof(wchar_t)); in prepareLinesForStd()
262 wcs = u_strToWCS(ws, wcap, &wl, lines_[i].name, lines_[i].len-1, &err); in prepareLinesForStd()
263 memcpy(wlines_[i].name, wcs, wl*sizeof(wchar_t)); in prepareLinesForStd()
/external/scapy/test/
Dsslv2.uts114 s.wcs.cipher.key == b'\xf4\xae\x00\x03kB>\x06\xba[\xd7\xea,\x08\xc2\xae'
176 t2.tls_session.rcs.seq_num == 6 and t2.tls_session.wcs.seq_num == 4
188 assert(t1.tls_session.rcs.seq_num == 6 and t1.tls_session.wcs.seq_num == 4)
194 assert(t2.tls_session.rcs.seq_num == 6 and t2.tls_session.wcs.seq_num == 4)
218 assert(t.tls_session.wcs.seq_num == 2)
272 assert(isinstance(s.wcs.ciphersuite, SSL_CK_DES_192_EDE3_CBC_WITH_MD5))
274 s.wcs.cipher.iv == b'\x01'*8
/external/icu/icu4c/source/test/cintltst/
Dcustrtrn.c1393 wchar_t *wcs; in Test_widestrs() local
1403 wcs = u_strToWCS(ws, wcap, &wl, ustr, ul, &err); in Test_widestrs()
1412 wl = (int32_t)uprv_wcslen(wcs); in Test_widestrs()
1413 cp = u_strFromWCS(rts, rtcap, &rtl, wcs, wl, &err); in Test_widestrs()
1420 …log_err("u_strFromWCS: wcs = %S, wl = %d,rts = %s, rtl = %d!\n", wcs, wl, u_austrcpy(astr, rts), r… in Test_widestrs()

12