Home
last modified time | relevance | path

Searched refs:mbs (Results 1 – 21 of 21) sorted by relevance

/bionic/libc/upstream-freebsd/lib/libc/locale/
Dwcsftime.c63 mbstate_t mbs; in wcsftime_l() local
77 mbs = initial; in wcsftime_l()
79 sflen = wcsrtombs_l(NULL, &formatp, 0, &mbs, locale); in wcsftime_l()
84 mbs = initial; in wcsftime_l()
85 wcsrtombs_l(sformat, &formatp, sflen + 1, &mbs, locale); in wcsftime_l()
103 mbs = initial; in wcsftime_l()
104 n = mbsrtowcs_l(wcs, &dstp, maxsize, &mbs, locale); in wcsftime_l()
/bionic/libc/upstream-openbsd/lib/libc/locale/
Dwctomb.c36 static mbstate_t mbs; in wctomb() local
41 memset(&mbs, 0, sizeof(mbs)); in wctomb()
44 if ((rval = wcrtomb(s, wchar, &mbs)) == (size_t)-1) in wctomb()
Dwctob.c36 mbstate_t mbs; in wctob() local
39 memset(&mbs, 0, sizeof(mbs)); in wctob()
40 if (c == WEOF || wcrtomb(buf, c, &mbs) != 1) in wctob()
Dmbstowcs.c38 mbstate_t mbs; in mbstowcs() local
41 memset(&mbs, 0, sizeof(mbs)); in mbstowcs()
43 return (mbsrtowcs(pwcs, &sp, n, &mbs)); in mbstowcs()
Dwcstombs.c37 mbstate_t mbs; in wcstombs() local
40 memset(&mbs, 0, sizeof(mbs)); in wcstombs()
42 return (wcsrtombs(s, &pwcsp, n, &mbs)); in wcstombs()
Dbtowc.c36 mbstate_t mbs; in btowc() local
47 memset(&mbs, 0, sizeof(mbs)); in btowc()
49 if (mbrtowc(&wc, &cc, 1, &mbs) > 1) in btowc()
Dmbtowc.c38 static mbstate_t mbs; in mbtowc() local
43 memset(&mbs, 0, sizeof(mbs)); in mbtowc()
46 rval = mbrtowc(pwc, s, n, &mbs); in mbtowc()
Dmbrlen.c34 static mbstate_t mbs; in mbrlen() local
37 ps = &mbs; in mbrlen()
/bionic/libc/upstream-netbsd/lib/libc/regex/
Dregexec.c78 xmbrtowc(wint_t *wi, const char *s, size_t n, mbstate_t *mbs, wint_t dummy) in __weak_alias()
84 nr = mbrtowc(&wc, s, n, mbs); in __weak_alias()
90 memset(mbs, 0, sizeof(*mbs)); in __weak_alias()
107 mbstate_t *mbs __unused, in xmbrtowc_dummy()
140 #define ZAPSTATE(mbs) ((void)(mbs)) argument
194 #define ZAPSTATE(mbs) ((void)(mbs)) argument
205 #define ZAPSTATE(mbs) memset((mbs), 0, sizeof(*(mbs))) argument
Dengine.c104 mbstate_t mbs; /* multibyte conversion state */ member
167 mbstate_t mbs; in stepback() local
178 memset(&mbs, 0, sizeof(mbs)); in stepback()
179 clen = mbrtowc(NULL, ret - mbc, mbc, &mbs); in stepback()
300 ZAPSTATE(&m->mbs); in matcher()
332 (size_t)(m->endp - m->coldp), &m->mbs, 0); in matcher()
392 (size_t)(stop - m->coldp), &m->mbs, 0); in matcher()
481 &m->mbs, 0); in dissect()
495 &m->mbs, 0); in dissect()
679 &m->mbs, BADCHAR); in backref()
[all …]
Dregcomp.c1395 mbstate_t mbs; local
1399 memset(&mbs, 0, sizeof(mbs));
1400 if ((clen = mbrtowc(&wc, sp, len, &mbs)) == len)
1499 mbstate_t mbs; local
1500 memset(&mbs, 0, sizeof(mbs));
1501 n = wcrtomb(bracket, ch, &mbs);
1652 mbstate_t mbs; local
1656 memset(&mbs, 0, sizeof(mbs));
1657 n = mbrtowc(&wc, p->next, (size_t)(p->end - p->next), &mbs);
2013 mbstate_t mbs; local
[all …]
/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dvswscanf.c55 mbstate_t mbs; in vswscanf() local
70 bzero(&mbs, sizeof(mbs)); in vswscanf()
72 if ((mlen = wcsrtombs(mbstr, &strp, len, &mbs)) == (size_t)-1) { in vswscanf()
Dvswprintf.c43 mbstate_t mbs; in vswprintf() local
82 bzero(&mbs, sizeof(mbs)); in vswprintf()
83 nwc = mbsrtowcs(s, (const char **)&mbp, n, &mbs); in vswprintf()
Dopen_wmemstream.c37 mbstate_t mbs; /* conversion state of the stream */ member
63 len = mbsnrtowcs(st->string + st->pos, &b, nmc, l, &st->mbs); in wmemstream_write()
104 bzero(&st->mbs, sizeof(st->mbs)); in wmemstream_seek()
152 bzero(&st->mbs, sizeof(st->mbs)); in open_wmemstream()
/bionic/libc/stdio/
Dprintf_common.h715 mbstate_t mbs; in wcsconv() local
723 memset(&mbs, 0, sizeof(mbs)); in wcsconv()
725 nbytes = wcsrtombs(nullptr, (const wchar_t**)&p, 0, &mbs); in wcsconv()
736 memset(&mbs, 0, sizeof(mbs)); in wcsconv()
738 clen = wcrtomb(buf, *p++, &mbs); in wcsconv()
749 memset(&mbs, 0, sizeof(mbs)); in wcsconv()
750 if ((nbytes = wcsrtombs(convbuf, (const wchar_t**)&p, nbytes, &mbs)) == (size_t)-1) { in wcsconv()
764 mbstate_t mbs = {}; in xfputwc() local
765 size_t len = wcrtomb(buf, wc, &mbs); in xfputwc()
790 mbstate_t mbs; in mbsconv() local
[all …]
Dvfwscanf.cpp97 mbstate_t mbs; in __vfwscanf() local
348 memset(&mbs, 0, sizeof(mbs)); in __vfwscanf()
351 nconv = wcrtomb(mbp, wi, &mbs); in __vfwscanf()
354 nconv = wcrtomb(mbbuf, wi, &mbs); in __vfwscanf()
392 memset(&mbs, 0, sizeof(mbs)); in __vfwscanf()
395 nconv = wcrtomb(mbp, wi, &mbs); in __vfwscanf()
398 nconv = wcrtomb(mbbuf, wi, &mbs); in __vfwscanf()
Dvfscanf.cpp55 mbstate_t mbs; in __svfscanf() local
328 memset(&mbs, 0, sizeof(mbs)); in __svfscanf()
329 nconv = mbrtowc(wcp, buf, bytes, &mbs); in __svfscanf()
418 memset(&mbs, 0, sizeof(mbs)); in __svfscanf()
419 nconv = mbrtowc(&wc, buf, bytes, &mbs); in __svfscanf()
Dvfprintf.cpp320 mbstate_t mbs; in FUNCTION_NAME() local
323 memset(&mbs, 0, sizeof(mbs)); in FUNCTION_NAME()
324 mbseqlen = wcrtomb(buf, (wchar_t)GETARG(wint_t), &mbs); in FUNCTION_NAME()
/bionic/libc/upstream-freebsd/lib/libc/gen/
Dglob.c193 mbstate_t mbs; in glob() local
218 memset(&mbs, 0, sizeof(mbs)); in glob()
220 clen = mbrtowc(&wc, patnext, MB_LEN_MAX, &mbs); in glob()
232 memset(&mbs, 0, sizeof(mbs)); in glob()
242 clen = mbrtowc(&wc, patnext, MB_LEN_MAX, &mbs); in glob()
430 mbstate_t mbs; in globtilde() local
483 memset(&mbs, 0, sizeof(mbs)); in globtilde()
485 clen = mbrtowc(&wc, sc, MB_LEN_MAX, &mbs); in globtilde()
490 memset(&mbs, 0, sizeof(mbs)); in globtilde()
764 mbstate_t mbs; in glob3() local
[all …]
/bionic/benchmarks/
Dstdlib_benchmark.cpp170 std::vector<char> mbs(count, 'e'); in BM_stdlib_mbstowcs_ascii() local
174 benchmark::DoNotOptimize(mbstowcs(&wcs[0], &mbs[0], wcs.size())); in BM_stdlib_mbstowcs_ascii()
186 std::string mbs; in BM_stdlib_mbstowcs_wide() local
188 mbs += "\xe5\xb1\xb1"; in BM_stdlib_mbstowcs_wide()
193 benchmark::DoNotOptimize(mbstowcs(&wcs[0], &mbs[0], wcs.size())); in BM_stdlib_mbstowcs_wide()
/bionic/tests/
Dwchar_test.cpp496 const char* mbs = VALID; in test_mbsrtowcs() local
497 EXPECT_EQ(6U, mbsrtowcs(nullptr, &mbs, 0, ps)); in test_mbsrtowcs()
498 EXPECT_EQ(VALID, mbs); in test_mbsrtowcs()
499 mbs = INVALID; in test_mbsrtowcs()
500 EXPECT_EQ(static_cast<size_t>(-1), mbsrtowcs(nullptr, &mbs, 0, ps)); in test_mbsrtowcs()
501 EXPECT_EQ(INVALID, mbs); in test_mbsrtowcs()
502 mbs = INCOMPLETE; in test_mbsrtowcs()
503 EXPECT_EQ(static_cast<size_t>(-1), mbsrtowcs(nullptr, &mbs, 0, ps)); in test_mbsrtowcs()
504 EXPECT_EQ(INCOMPLETE, mbs); in test_mbsrtowcs()