Home
last modified time | relevance | path

Searched refs:wc (Results 1 – 25 of 28) sorted by relevance

12

/bionic/libc/bionic/
Dwctype.cpp56 int iswalnum(wint_t wc) { return __icu_hasBinaryProperty(wc, UCHAR_POSIX_ALNUM, isalnum); } in iswalnum() argument
57 int iswalpha(wint_t wc) { return __icu_hasBinaryProperty(wc, UCHAR_ALPHABETIC, isalpha); } in iswalpha() argument
58 int iswblank(wint_t wc) { return __icu_hasBinaryProperty(wc, UCHAR_POSIX_BLANK, isblank); } in iswblank() argument
59 int iswgraph(wint_t wc) { return __icu_hasBinaryProperty(wc, UCHAR_POSIX_GRAPH, isgraph); } in iswgraph() argument
60 int iswlower(wint_t wc) { return __icu_hasBinaryProperty(wc, UCHAR_LOWERCASE, islower); } in iswlower() argument
61 int iswprint(wint_t wc) { return __icu_hasBinaryProperty(wc, UCHAR_POSIX_PRINT, isprint); } in iswprint() argument
62 int iswspace(wint_t wc) { return __icu_hasBinaryProperty(wc, UCHAR_WHITE_SPACE, isspace); } in iswspace() argument
63 int iswupper(wint_t wc) { return __icu_hasBinaryProperty(wc, UCHAR_UPPERCASE, isupper); } in iswupper() argument
64 int iswxdigit(wint_t wc) { return __icu_hasBinaryProperty(wc, UCHAR_POSIX_XDIGIT, isxdigit); } in iswxdigit() argument
66 int iswcntrl(wint_t wc) { in iswcntrl() argument
[all …]
Dwcwidth.cpp33 int wcwidth(wchar_t wc) { in wcwidth() argument
35 if (wc >= 0x20 && wc < 0x7f) return 1; in wcwidth()
38 if (wc == 0) return 0; in wcwidth()
41 if (wc < ' ' || (wc >= 0x7f && wc <= 0xa0)) return -1; in wcwidth()
47 switch (__icu_charType(wc)) { in wcwidth()
58 if (__icu_hasBinaryProperty(wc, UCHAR_DEFAULT_IGNORABLE_CODE_POINT, nullptr)) return 0; in wcwidth()
61 switch (__icu_getIntPropertyValue(wc, UCHAR_HANGUL_SYLLABLE_TYPE)) { in wcwidth()
71 if (wc >= 0x3248 && wc <= 0x4dff) { in wcwidth()
74 if (wc <= 0x324f) return 2; in wcwidth()
76 if (wc >= 0x4dc0) return 2; in wcwidth()
[all …]
Diconv.cpp122 wc = 0; in Convert()
138 char32_t wc; member
156 wc = **src_buf; in GetNext()
158 if (wc > 0x7f) errno = EILSEQ; in GetNext()
162 src_bytes_used = mbrtoc32(&wc, *src_buf, *src_bytes_left, &ps); in GetNext()
178 wc = In16(*src_buf, swap); in GetNext()
181 if (wc >= 0xd800 && wc <= 0xdfff) { in GetNext()
182 if (wc >= 0xdc00) { // Low surrogate before high surrogate. in GetNext()
190 uint16_t hi = wc; in GetNext()
192 wc = 0x10000 + ((hi - 0xd800) << 10) + (lo - 0xdc00); in GetNext()
[all …]
Dicu_wrappers.cpp31 int8_t __icu_charType(wint_t wc) { in __icu_charType() argument
34 return u_charType ? u_charType(wc) : -1; in __icu_charType()
37 int32_t __icu_getIntPropertyValue(wint_t wc, UProperty property) { in __icu_getIntPropertyValue() argument
41 return u_getIntPropertyValue ? u_getIntPropertyValue(wc, property) : 0; in __icu_getIntPropertyValue()
44 bool __icu_hasBinaryProperty(wint_t wc, UProperty property, int (*fallback)(int)) { in __icu_hasBinaryProperty() argument
48 return u_hasBinaryProperty ? u_hasBinaryProperty(wc, property) : fallback(wc); in __icu_hasBinaryProperty()
Dwchar.cpp139 size_t wcrtomb(char* s, wchar_t wc, mbstate_t* ps) { in wcrtomb() argument
144 return c32rtomb(s, static_cast<char32_t>(wc), state); in wcrtomb()
159 wchar_t wc = (*src)[i]; in wcsnrtombs() local
160 if (static_cast<uint32_t>(wc) < 0x80) { in wcsnrtombs()
162 if (wc == 0) { in wcsnrtombs()
167 r = wcrtomb(buf, wc, state); in wcsnrtombs()
177 wchar_t wc = (*src)[i]; in wcsnrtombs() local
178 if (static_cast<uint32_t>(wc) < 0x80) { in wcsnrtombs()
180 dst[o] = wc; in wcsnrtombs()
181 if (wc == 0) { in wcsnrtombs()
[all …]
/bionic/libc/upstream-openbsd/lib/libc/locale/
D_wcstoul.h52 wint_t wc; in FUNCNAME() local
68 wc = (wchar_t) *s++; in FUNCNAME()
69 } while (iswspace(wc)); in FUNCNAME()
70 if (wc == L'-') { in FUNCNAME()
72 wc = *s++; in FUNCNAME()
75 if (wc == L'+') in FUNCNAME()
76 wc = *s++; in FUNCNAME()
79 wc == L'0' && (*s == L'x' || *s == L'X')) { in FUNCNAME()
80 wc = s[1]; in FUNCNAME()
85 base = wc == L'0' ? 8 : 10; in FUNCNAME()
[all …]
D_wcstol.h53 wint_t wc; in FUNCNAME() local
70 wc = (wchar_t) *s++; in FUNCNAME()
71 } while (iswspace(wc)); in FUNCNAME()
72 if (wc == L'-') { in FUNCNAME()
74 wc = *s++; in FUNCNAME()
77 if (wc == L'+') in FUNCNAME()
78 wc = *s++; in FUNCNAME()
81 wc == L'0' && (*s == L'x' || *s == L'X')) { in FUNCNAME()
82 wc = s[1]; in FUNCNAME()
87 base = wc == L'0' ? 8 : 10; in FUNCNAME()
[all …]
Dbtowc.c38 wchar_t wc; in btowc() local
49 if (mbrtowc(&wc, &cc, 1, &mbs) > 1) in btowc()
51 return (wc); in btowc()
Dwctoint.h34 wctoint(wchar_t wc) in wctoint() argument
38 switch (wc) { in wctoint()
/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dungetwc.c38 __ungetwc(wint_t wc, FILE *fp) in __ungetwc() argument
42 if (wc == WEOF) in __ungetwc()
62 wcio->wcio_ungetwc_buf[wcio->wcio_ungetwc_inbuf++] = wc; in __ungetwc()
65 return wc; in __ungetwc()
69 ungetwc(wint_t wc, FILE *fp) in ungetwc() argument
74 r = __ungetwc(wc, fp); in ungetwc()
Dfgetws.c43 wint_t wc; in fgetws() local
55 if ((wc = __fgetwc_unlock(fp)) == WEOF && in fgetws()
58 if (wc == WEOF) { in fgetws()
65 *wsp++ = (wchar_t)wc; in fgetws()
66 if (wc == L'\n') { in fgetws()
Dfgetwc.c42 wchar_t wc; in __fgetwc_unlock() local
54 wc = wcio->wcio_ungetwc_buf[--wcio->wcio_ungetwc_inbuf]; in __fgetwc_unlock()
56 return wc; in __fgetwc_unlock()
70 size = mbrtowc(&wc, &c, 1, st); in __fgetwc_unlock()
77 return wc; in __fgetwc_unlock()
Dfputwc.c40 __fputwc_unlock(wchar_t wc, FILE *fp) in __fputwc_unlock() argument
63 size = wcrtomb(buf, wc, st); in __fputwc_unlock()
74 return (wint_t)wc; in __fputwc_unlock()
78 fputwc(wchar_t wc, FILE *fp) in fputwc() argument
83 r = __fputwc_unlock(wc, fp); in fputwc()
/bionic/libc/private/
Dicu.h81 int8_t __icu_charType(wint_t wc);
82 int32_t __icu_getIntPropertyValue(wint_t wc, UProperty property);
83 bool __icu_hasBinaryProperty(wint_t wc, UProperty property, int (*fallback)(int));
/bionic/libc/upstream-freebsd/lib/libc/gen/
Dglob.c194 wchar_t wc; in glob() local
220 clen = mbrtowc(&wc, patnext, MB_LEN_MAX, &mbs); in glob()
227 *bufnext++ = wc; in glob()
242 clen = mbrtowc(&wc, patnext, MB_LEN_MAX, &mbs); in glob()
249 *bufnext++ = wc | prot; in glob()
426 wchar_t wc; in globtilde() local
485 clen = mbrtowc(&wc, sc, MB_LEN_MAX, &mbs); in globtilde()
488 wc = (unsigned char)*sc; in globtilde()
492 if ((*dc++ = wc) == EOS) { in globtilde()
762 wchar_t wc; in glob3() local
[all …]
/bionic/libc/kernel/uapi/linux/netfilter/
Dnfnetlink_osf.h37 __u32 wc; member
42 struct nf_osf_wc wc; member
/bionic/libc/stdio/
Dvfwscanf.c89 static inline bool in_ccl(wchar_t wc, const wchar_t* ccl) { in in_ccl() argument
100 if (*ccl == wc) return member_result; in in_ccl()
111 if (wc >= first && wc <= last) return member_result; in in_ccl()
119 if (*ccl == wc) return member_result; in in_ccl()
Dvfscanf.cpp442 wchar_t wc = L'\0'; in __svfscanf() local
444 nconv = mbrtowc(&wc, buf, bytes, &mbs); in __svfscanf()
450 … if ((c == CT_CCL && wctob(wc) != EOF && !ccltab[wctob(wc)]) || (c == CT_STRING && iswspace(wc))) { in __svfscanf()
457 if (wcp) wcp[n] = wc; in __svfscanf()
Dprintf_common.h735 static wint_t xfputwc(wchar_t wc, FILE* fp) { in xfputwc()
736 if ((fp->_flags & __SSTR) == 0) return __fputwc_unlock(wc, fp); in xfputwc()
740 size_t len = wcrtomb(buf, wc, &mbs); in xfputwc()
754 return (__sfvwrite(fp, &uio) != EOF ? (wint_t)wc : WEOF); in xfputwc()
Dlocal.h253 wint_t __fputwc_unlock(wchar_t wc, FILE* fp);
Dstdio.cpp933 wint_t putwc(wchar_t wc, FILE* fp) { in putwc() argument
935 return fputwc(wc, fp); in putwc()
938 wint_t putwchar(wchar_t wc) { in putwchar() argument
939 return fputwc(wc, stdout); in putwchar()
/bionic/libc/upstream-openbsd/lib/libc/gdtoa/
Dmisc.c286 int k, wa, wb, wc; local
306 wc = wa + wb;
307 if (wc > a->maxwds)
312 for(x = c->x, xa = x + wc; x < xa; x++)
384 for(xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ;
385 c->wds = wc;
/bionic/tests/
Dwchar_test.cpp668 wchar_t wc; in TEST() local
672 n = mbrtowc(&wc, "x", MB_CUR_MAX, nullptr); in TEST()
674 EXPECT_EQ(L'x', wc); in TEST()
676 n = mbrtowc(&wc, "\xc2\xa2", MB_CUR_MAX, nullptr); in TEST()
678 EXPECT_EQ(L'¢', wc); in TEST()
680 n = mbrtowc(&wc, "\xe2\x82\xac", MB_CUR_MAX, nullptr); in TEST()
682 EXPECT_EQ(L'€', wc); in TEST()
684 n = mbrtowc(&wc, "\xf0\xa4\xad\xa2", MB_CUR_MAX, nullptr); in TEST()
686 EXPECT_EQ(L'��', wc); in TEST()
Dstdio_test.cpp327 wint_t wc = L'a'; in TEST() local
328 EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%lc>", wc)); in TEST()
334 wchar_t wc = L'a'; in TEST() local
335 EXPECT_EQ(3, snprintf(buf, sizeof(buf), "<%C>", wc)); in TEST()
635 wint_t wc = L'a'; in TEST() local
636 EXPECT_EQ(3, swprintf(buf, nchars, L"<%lc>", wc)); in TEST()
644 wint_t wc = L'a'; in TEST() local
645 EXPECT_EQ(3, swprintf(buf, nchars, L"<%C>", wc)); in TEST()
/bionic/benchmarks/
Dstdlib_benchmark.cpp232 wchar_t wc = 0; in BM_stdlib_mbrtowc() local
234 for (j = 0; buf_aligned[j]; j+=mbrtowc(&wc, buf_aligned + j, 4, nullptr)) { in BM_stdlib_mbrtowc()

12