Home
last modified time | relevance | path

Searched refs:ps (Results 1 – 13 of 13) sorted by relevance

/bionic/libc/bionic/
Dmbstate.cpp33 __LIBC_HIDDEN__ size_t mbstate_bytes_so_far(const mbstate_t* ps) { in mbstate_bytes_so_far() argument
35 (ps->__seq[2] != 0) ? 3 : in mbstate_bytes_so_far()
36 (ps->__seq[1] != 0) ? 2 : in mbstate_bytes_so_far()
37 (ps->__seq[0] != 0) ? 1 : 0; in mbstate_bytes_so_far()
40 __LIBC_HIDDEN__ void mbstate_set_byte(mbstate_t* ps, int i, char byte) { in mbstate_set_byte() argument
41 ps->__seq[i] = static_cast<uint8_t>(byte); in mbstate_set_byte()
44 __LIBC_HIDDEN__ uint8_t mbstate_get_byte(const mbstate_t* ps, int n) { in mbstate_get_byte() argument
45 return ps->__seq[n]; in mbstate_get_byte()
48 __LIBC_HIDDEN__ size_t reset_and_return_illegal(int _errno, mbstate_t* ps) { in reset_and_return_illegal() argument
50 *(reinterpret_cast<uint32_t*>(ps->__seq)) = 0; in reset_and_return_illegal()
[all …]
Dwchar.cpp56 int mbsinit(const mbstate_t* ps) { in mbsinit() argument
57 return (ps == NULL || (*(reinterpret_cast<const uint32_t*>(ps->__seq)) == 0)); in mbsinit()
60 size_t mbrtowc(wchar_t* pwc, const char* s, size_t n, mbstate_t* ps) { in mbrtowc() argument
62 mbstate_t* state = (ps == NULL) ? &__private_state : ps; in mbrtowc()
68 size_t mbsnrtowcs(wchar_t* dst, const char** src, size_t nmc, size_t len, mbstate_t* ps) { in mbsnrtowcs() argument
70 mbstate_t* state = (ps == NULL) ? &__private_state : ps; in mbsnrtowcs()
146 size_t mbsrtowcs(wchar_t* dst, const char** src, size_t len, mbstate_t* ps) { in mbsrtowcs() argument
147 return mbsnrtowcs(dst, src, SIZE_MAX, len, ps); in mbsrtowcs()
150 size_t wcrtomb(char* s, wchar_t wc, mbstate_t* ps) { in wcrtomb() argument
152 mbstate_t* state = (ps == NULL) ? &__private_state : ps; in wcrtomb()
[all …]
Dc32rtomb.cpp35 size_t c32rtomb(char* s, char32_t c32, mbstate_t* ps) { in c32rtomb() argument
37 mbstate_t* state = (ps == NULL) ? &__private_state : ps; in c32rtomb()
Dc16rtomb.cpp43 size_t c16rtomb(char* s, char16_t c16, mbstate_t* ps) { in c16rtomb() argument
45 mbstate_t* state = (ps == NULL) ? &__private_state : ps; in c16rtomb()
Dmbrtoc16.cpp61 size_t mbrtoc16(char16_t* pc16, const char* s, size_t n, mbstate_t* ps) { in mbrtoc16() argument
63 mbstate_t* state = (ps == NULL) ? &__private_state : ps; in mbrtoc16()
Dmbrtoc32.cpp36 size_t mbrtoc32(char32_t* pc32, const char* s, size_t n, mbstate_t* ps) { in mbrtoc32() argument
38 mbstate_t* state = (ps == NULL) ? &__private_state : ps; in mbrtoc32()
/bionic/libc/kernel/uapi/linux/
Dcoff.h22 #define COFF_SHORT_L(ps) ((short)(((unsigned short)((unsigned char)ps[1])<<8)| ((unsigned short)((… argument
24ps) (((long)(((unsigned long)((unsigned char)ps[3])<<24) | ((unsigned long)((unsigned char)ps[2])… argument
25 #define COFF_SHORT_H(ps) ((short)(((unsigned short)((unsigned char)ps[0])<<8)| ((unsigned short)((… argument
26ps) (((long)(((unsigned long)((unsigned char)ps[0])<<24) | ((unsigned long)((unsigned char)ps[1])… argument
/bionic/tests/
Duchar_test.cpp49 mbstate_t ps; in TEST() local
52 memset(&ps, 0, sizeof(ps)); in TEST()
53 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(NULL, "\xc2", 1, &ps)); in TEST()
54 EXPECT_EQ(static_cast<size_t>(-1), c32rtomb(out, 0x00a2, &ps)); in TEST()
59 memset(&ps, 0, sizeof(ps)); in TEST()
60 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(NULL, "\xc2", 1, &ps)); in TEST()
61 EXPECT_EQ(1U, c32rtomb(NULL, 0x00a2, &ps)); in TEST()
62 EXPECT_TRUE(mbsinit(&ps)); in TEST()
64 memset(&ps, 0, sizeof(ps)); in TEST()
65 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(NULL, "\xf0\xa4", 1, &ps)); in TEST()
[all …]
Dwchar_test.cpp92 mbstate_t ps; in TEST() local
95 memset(&ps, 0, sizeof(ps)); in TEST()
96 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xc2", 1, &ps)); in TEST()
97 EXPECT_EQ(static_cast<size_t>(-1), wcrtomb(out, 0x00a2, &ps)); in TEST()
102 memset(&ps, 0, sizeof(ps)); in TEST()
103 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xc2", 1, &ps)); in TEST()
104 EXPECT_EQ(1U, wcrtomb(NULL, 0x00a2, &ps)); in TEST()
105 EXPECT_TRUE(mbsinit(&ps)); in TEST()
107 memset(&ps, 0, sizeof(ps)); in TEST()
108 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(NULL, "\xf0\xa4", 1, &ps)); in TEST()
[all …]
/bionic/libc/upstream-openbsd/lib/libc/locale/
Dmbrlen.c32 mbrlen(const char * __restrict s, size_t n, mbstate_t * __restrict ps) in mbrlen() argument
36 if (ps == NULL) in mbrlen()
37 ps = &mbs; in mbrlen()
38 return (mbrtowc(NULL, s, n, ps)); in mbrlen()
/bionic/libc/private/
Dbionic_mbstate.h46 size_t mbstate_bytes_so_far(const mbstate_t* ps);
47 void mbstate_set_byte(mbstate_t* ps, int i, char byte);
48 uint8_t mbstate_get_byte(const mbstate_t* ps, int n);
49 size_t reset_and_return_illegal(int _errno, mbstate_t* ps);
50 size_t reset_and_return(int _return, mbstate_t* ps);
/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dvfprintf.c286 mbstate_t ps; in __vfprintf() local
483 memset(&ps, 0, sizeof(ps)); in __vfprintf()
489 while ((n = mbrtowc(&wc, fmt, MB_CUR_MAX, &ps)) > 0) { in __vfprintf()
1150 mbstate_t ps; in __find_arguments() local
1204 memset(&ps, 0, sizeof(ps)); in __find_arguments()
1211 while ((n = mbrtowc(&wc, fmt, MB_CUR_MAX, &ps)) > 0) { in __find_arguments()
/bionic/libc/kernel/uapi/rdma/
Drdma_user_cm.h70 __u16 ps; member