Lines Matching defs:wc

178 tomb_none(char *mb, wchar_t wc)
184 *(uint8_t *)mb = (wc & 0xff);
193 towide_utf8(wchar_t *wc, const char *mb, unsigned n)
205 *wc = c;
245 *wc = c;
250 tomb_utf8(char *mb, wchar_t wc)
257 if (wc <= 0x7f) {
258 s[0] = wc & 0x7f;
262 if (wc <= 0x7ff) {
265 } else if (wc <= 0xffff) {
268 } else if (wc <= 0x1fffff) {
272 werr("illegal uf8 char (%x)", wc);
276 s[i] = (wc & 0x3f) | 0x80;
277 wc >>= 6;
279 s[0] = (msk) | wc;
297 towide_dbcs(wchar_t *wc, const char *mb, unsigned n)
305 *wc = c;
316 *wc = c;
326 tomb_mbs(char *mb, wchar_t wc)
331 if ((wc & 0xff000000U) != 0) {
333 } else if ((wc & 0x00ff0000U) != 0) {
335 } else if ((wc & 0x0000ff00U) != 0) {
343 s[n] = wc & 0xff;
344 wc >>= 8;
356 towide_big5(wchar_t *wc, const char *mb, unsigned n)
358 return (towide_dbcs(wc, mb, n));
366 towide_gbk(wchar_t *wc, const char *mb, unsigned n)
368 return (towide_dbcs(wc, mb, n));
376 towide_gb2312(wchar_t *wc, const char *mb, unsigned n)
378 return (towide_dbcs(wc, mb, n));
387 towide_gb18030(wchar_t *wc, const char *mb, unsigned n)
395 *wc = c;
417 *wc = c;
421 *wc = c;
430 towide_mskanji(wchar_t *wc, const char *mb, unsigned n)
438 *wc = c;
450 *wc = c;
463 towide_euc_impl(wchar_t *wc, const char *mb, unsigned n,
478 *wc = c;
507 *wc = c;
520 towide_euccn(wchar_t *wc, const char *mb, unsigned n)
522 return (towide_euc_impl(wc, mb, n, 0x8e, 4, 0, 0));
534 towide_eucjp(wchar_t *wc, const char *mb, unsigned n)
536 return (towide_euc_impl(wc, mb, n, 0x8e, 2, 0x8f, 3));
548 towide_euckr(wchar_t *wc, const char *mb, unsigned n)
550 return (towide_euc_impl(wc, mb, n, 0, 0, 0, 0));
562 towide_euctw(wchar_t *wc, const char *mb, unsigned n)
564 return (towide_euc_impl(wc, mb, n, 0x8e, 4, 0, 0));
572 to_wide(wchar_t *wc, const char *mb)
575 return (_towide(wc, mb, strlen(mb)));
579 to_mb(char *mb, wchar_t wc)
583 if ((rv = _tomb(mb, wc)) < 0) {