Home
last modified time | relevance | path

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

/bionic/libc/upstream-openbsd/lib/libc/locale/
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()
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()
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/stdio/
Dprintf_common.h690 mbstate_t mbs; in wcsconv() local
698 memset(&mbs, 0, sizeof(mbs)); in wcsconv()
700 nbytes = wcsrtombs(nullptr, (const wchar_t**)&p, 0, &mbs); in wcsconv()
711 memset(&mbs, 0, sizeof(mbs)); in wcsconv()
713 clen = wcrtomb(buf, *p++, &mbs); in wcsconv()
724 memset(&mbs, 0, sizeof(mbs)); in wcsconv()
725 if ((nbytes = wcsrtombs(convbuf, (const wchar_t**)&p, nbytes, &mbs)) == (size_t)-1) { in wcsconv()
739 mbstate_t mbs = {}; in xfputwc() local
740 size_t len = wcrtomb(buf, wc, &mbs); in xfputwc()
765 mbstate_t mbs; in mbsconv() local
[all …]
Dvfwscanf.c148 mbstate_t mbs; in __vfwscanf() local
379 memset(&mbs, 0, sizeof(mbs)); in __vfwscanf()
382 nconv = wcrtomb(mbp, wi, &mbs); in __vfwscanf()
385 nconv = wcrtomb(mbbuf, wi, &mbs); in __vfwscanf()
423 memset(&mbs, 0, sizeof(mbs)); in __vfwscanf()
426 nconv = wcrtomb(mbp, wi, &mbs); in __vfwscanf()
429 nconv = wcrtomb(mbbuf, wi, &mbs); in __vfwscanf()
Dvfscanf.cpp100 mbstate_t mbs; in __svfscanf() local
353 memset(&mbs, 0, sizeof(mbs)); in __svfscanf()
354 nconv = mbrtowc(wcp, buf, bytes, &mbs); in __svfscanf()
443 memset(&mbs, 0, sizeof(mbs)); in __svfscanf()
444 nconv = mbrtowc(&wc, buf, bytes, &mbs); in __svfscanf()
Dvfprintf.cpp312 mbstate_t mbs; in FUNCTION_NAME() local
315 memset(&mbs, 0, sizeof(mbs)); in FUNCTION_NAME()
316 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/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()
Dopen_wmemstream.c37 mbstate_t mbs; /* conversion state of the stream */ member
64 len = mbsnrtowcs(st->string + st->pos, &b, nmc, l, &st->mbs); in wmemstream_write()
105 bzero(&st->mbs, sizeof(st->mbs)); in wmemstream_seek()
154 bzero(&st->mbs, sizeof(st->mbs)); in open_wmemstream()
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()
/bionic/tests/
Dwchar_test.cpp404 const char* mbs = VALID; in test_mbsrtowcs() local
405 EXPECT_EQ(6U, mbsrtowcs(nullptr, &mbs, 0, ps)); in test_mbsrtowcs()
406 EXPECT_EQ(VALID, mbs); in test_mbsrtowcs()
407 mbs = INVALID; in test_mbsrtowcs()
408 EXPECT_EQ(static_cast<size_t>(-1), mbsrtowcs(nullptr, &mbs, 0, ps)); in test_mbsrtowcs()
409 EXPECT_EQ(INVALID, mbs); in test_mbsrtowcs()
410 mbs = INCOMPLETE; in test_mbsrtowcs()
411 EXPECT_EQ(static_cast<size_t>(-1), mbsrtowcs(nullptr, &mbs, 0, ps)); in test_mbsrtowcs()
412 EXPECT_EQ(INCOMPLETE, mbs); in test_mbsrtowcs()