Home
last modified time | relevance | path

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

/bionic/libc/private/
Dbionic_mbstate.h41 static inline __wur bool mbstate_is_initial(const mbstate_t* ps) { in mbstate_is_initial() argument
42 return *(reinterpret_cast<const uint32_t*>(ps->__seq)) == 0; in mbstate_is_initial()
45 static inline __wur size_t mbstate_bytes_so_far(const mbstate_t* ps) { in mbstate_bytes_so_far() argument
47 (ps->__seq[2] != 0) ? 3 : in mbstate_bytes_so_far()
48 (ps->__seq[1] != 0) ? 2 : in mbstate_bytes_so_far()
49 (ps->__seq[0] != 0) ? 1 : 0; in mbstate_bytes_so_far()
52 static inline void mbstate_set_byte(mbstate_t* ps, int i, char byte) { in mbstate_set_byte() argument
53 ps->__seq[i] = static_cast<uint8_t>(byte); in mbstate_set_byte()
56 static inline __wur uint8_t mbstate_get_byte(const mbstate_t* ps, int n) { in mbstate_get_byte() argument
57 return ps->__seq[n]; in mbstate_get_byte()
[all …]
/bionic/tests/
Duchar_test.cpp76 mbstate_t ps; in TEST() local
78 memset(&ps, 0, sizeof(ps)); in TEST()
79 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(nullptr, "\xc2", 1, &ps)); in TEST()
81 EXPECT_EQ(static_cast<size_t>(-1), c32rtomb(out, 0x00a2, &ps)); in TEST()
89 memset(&ps, 0, sizeof(ps)); in TEST()
90 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(nullptr, "\xc2", 1, &ps)); in TEST()
91 EXPECT_EQ(1U, c32rtomb(nullptr, 0x00a2, &ps)); in TEST()
92 EXPECT_TRUE(mbsinit(&ps)); in TEST()
94 memset(&ps, 0, sizeof(ps)); in TEST()
95 EXPECT_EQ(static_cast<size_t>(-2), mbrtoc32(nullptr, "\xf0\xa4", 1, &ps)); in TEST()
[all …]
Dspawn_test.cpp318 static __attribute__((unused)) void GetChildStat(posix_spawnattr_t* sa, ProcStat* ps) { in GetChildStat() argument
322 ASSERT_EQ(4, sscanf(content.c_str(), "%d (cat) %*c %d %d %d", &ps->pid, &ps->ppid, &ps->pgrp, in GetChildStat()
323 &ps->sid)); in GetChildStat()
325 ASSERT_EQ(getpid(), ps->ppid); in GetChildStat()
333 static void __attribute__((unused)) GetChildStatus(posix_spawnattr_t* sa, ProcStatus* ps) { in GetChildStatus() argument
340 if (sscanf(line.c_str(), "SigBlk: %" SCNx64, &ps->sigblk) == 1) saw_blk = true; in GetChildStatus()
341 if (sscanf(line.c_str(), "SigIgn: %" SCNx64, &ps->sigign) == 1) saw_ign = true; in GetChildStatus()
354 ProcStat ps = {}; in TEST() local
355 GetChildStat(&sa, &ps); in TEST()
356 ASSERT_EQ(parent_sid, ps.sid); in TEST()
[all …]
Dwchar_test.cpp133 mbstate_t ps; in TEST() local
136 memset(&ps, 0, sizeof(ps)); in TEST()
137 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(nullptr, "\xc2", 1, &ps)); in TEST()
138 EXPECT_EQ(static_cast<size_t>(-1), wcrtomb(out, 0x00a2, &ps)); in TEST()
143 memset(&ps, 0, sizeof(ps)); in TEST()
144 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(nullptr, "\xc2", 1, &ps)); in TEST()
145 EXPECT_EQ(1U, wcrtomb(nullptr, 0x00a2, &ps)); in TEST()
146 EXPECT_TRUE(mbsinit(&ps)); in TEST()
148 memset(&ps, 0, sizeof(ps)); in TEST()
149 EXPECT_EQ(static_cast<size_t>(-2), mbrtowc(nullptr, "\xf0\xa4", 1, &ps)); in TEST()
[all …]
/bionic/libc/kernel/uapi/linux/
Dcoff.h12 #define COFF_SHORT_L(ps) ((short) (((unsigned short) ((unsigned char) ps[1]) << 8) | ((unsigned sho… argument
13ps) (((long) (((unsigned long) ((unsigned char) ps[3]) << 24) | ((unsigned long) ((unsigned char) argument
14 #define COFF_SHORT_H(ps) ((short) (((unsigned short) ((unsigned char) ps[0]) << 8) | ((unsigned sho… argument
15ps) (((long) (((unsigned long) ((unsigned char) ps[0]) << 24) | ((unsigned long) ((unsigned char) argument
/bionic/libc/bionic/
Dwchar.cpp56 int mbsinit(const mbstate_t* ps) { in mbsinit() argument
57 return ps == nullptr || mbstate_is_initial(ps); 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 == nullptr) ? &__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 == nullptr) ? &__private_state : ps; in mbsnrtowcs()
135 size_t mbsrtowcs(wchar_t* dst, const char** src, size_t len, mbstate_t* ps) { in mbsrtowcs() argument
136 return mbsnrtowcs(dst, src, SIZE_MAX, len, ps); in mbsrtowcs()
140 size_t wcrtomb(char* s, wchar_t wc, mbstate_t* ps) { in wcrtomb() argument
142 mbstate_t* state = (ps == nullptr) ? &__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 == nullptr) ? &__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 == nullptr) ? &__private_state : ps; in c16rtomb()
Dmbrtoc16.cpp82 size_t mbrtoc16(char16_t* pc16, const char* s, size_t n, mbstate_t* ps) { in mbrtoc16() argument
84 mbstate_t* state = (ps == nullptr) ? &__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 == nullptr) ? &__private_state : ps; in mbrtoc32()
Diconv.cpp123 memset(&ps, 0, sizeof(ps)); in Convert()
142 mbstate_t ps; member
162 src_bytes_used = mbrtoc32(&wc, *src_buf, *src_bytes_left, &ps); in GetNext()
237 dst_bytes_used = c32rtomb(buf, wc, &ps); in Convert()
/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/kernel/uapi/rdma/
Drdma_user_cm.h55 __u16 ps; member