Lines Matching refs:mb

141 show_mb(const char *mb)  in show_mb()  argument
146 if (isascii(*mb) && isgraph(*mb)) { in show_mb()
147 buf[0] = *mb; in show_mb()
152 while (*mb != 0) { in show_mb()
154 (void) snprintf(scr, sizeof (scr), "\\x%02x", *mb); in show_mb()
156 mb++; in show_mb()
181 towide_none(wchar_t *c, const char *mb, unsigned n __unused) in towide_none() argument
187 *c = (uint8_t)*mb; in towide_none()
192 tomb_none(char *mb, wchar_t wc) in tomb_none() argument
198 *(uint8_t *)mb = (wc & 0xff); in tomb_none()
199 mb[1] = 0; in tomb_none()
207 towide_utf8(wchar_t *wc, const char *mb, unsigned n) in towide_utf8() argument
213 const uint8_t *s = (const uint8_t *)mb; in towide_utf8()
238 werr("utf8 encoding too large (%s)", show_mb(mb)); in towide_utf8()
242 werr("incomplete utf8 sequence (%s)", show_mb(mb)); in towide_utf8()
256 werr("illegal redundant utf8 encoding (%s)", show_mb(mb)); in towide_utf8()
264 tomb_utf8(char *mb, wchar_t wc) in tomb_utf8() argument
266 uint8_t *s = (uint8_t *)mb; in tomb_utf8()
312 towide_dbcs(wchar_t *wc, const char *mb, unsigned n) in towide_dbcs() argument
316 c = *(const uint8_t *)mb; in towide_dbcs()
324 werr("incomplete character sequence (%s)", show_mb(mb)); in towide_dbcs()
330 c |= (uint8_t)(mb[1]); in towide_dbcs()
341 tomb_mbs(char *mb, wchar_t wc) in tomb_mbs() argument
343 uint8_t *s = (uint8_t *)mb; in tomb_mbs()
371 towide_big5(wchar_t *wc, const char *mb, unsigned n) in towide_big5() argument
373 return (towide_dbcs(wc, mb, n)); in towide_big5()
381 towide_gbk(wchar_t *wc, const char *mb, unsigned n) in towide_gbk() argument
383 return (towide_dbcs(wc, mb, n)); in towide_gbk()
391 towide_gb2312(wchar_t *wc, const char *mb, unsigned n) in towide_gb2312() argument
393 return (towide_dbcs(wc, mb, n)); in towide_gb2312()
402 towide_gb18030(wchar_t *wc, const char *mb, unsigned n) in towide_gb18030() argument
406 c = *(const uint8_t *)mb; in towide_gb18030()
414 werr("incomplete character sequence (%s)", show_mb(mb)); in towide_gb18030()
420 c |= (uint8_t)(mb[1]); in towide_gb18030()
425 show_mb(mb)); in towide_gb18030()
429 c |= (uint8_t)(mb[2]); in towide_gb18030()
431 c |= (uint8_t)(mb[3]); in towide_gb18030()
445 towide_mskanji(wchar_t *wc, const char *mb, unsigned n) in towide_mskanji() argument
449 c = *(const uint8_t *)mb; in towide_mskanji()
458 werr("incomplete character sequence (%s)", show_mb(mb)); in towide_mskanji()
464 c |= (uint8_t)(mb[1]); in towide_mskanji()
478 towide_euc_impl(wchar_t *wc, const char *mb, unsigned n, in towide_euc_impl() argument
485 c = *(const uint8_t *)mb; in towide_euc_impl()
512 werr("incomplete character sequence (%s)", show_mb(mb)); in towide_euc_impl()
519 c |= (uint8_t)(mb[i]); in towide_euc_impl()
535 towide_euccn(wchar_t *wc, const char *mb, unsigned n) in towide_euccn() argument
537 return (towide_euc_impl(wc, mb, n, 0x8e, 4, 0, 0)); in towide_euccn()
549 towide_eucjp(wchar_t *wc, const char *mb, unsigned n) in towide_eucjp() argument
551 return (towide_euc_impl(wc, mb, n, 0x8e, 2, 0x8f, 3)); in towide_eucjp()
563 towide_euckr(wchar_t *wc, const char *mb, unsigned n) in towide_euckr() argument
565 return (towide_euc_impl(wc, mb, n, 0, 0, 0, 0)); in towide_euckr()
577 towide_euctw(wchar_t *wc, const char *mb, unsigned n) in towide_euctw() argument
579 return (towide_euc_impl(wc, mb, n, 0x8e, 4, 0, 0)); in towide_euctw()
587 to_wide(wchar_t *wc, const char *mb) in to_wide() argument
590 return (_towide(wc, mb, strlen(mb))); in to_wide()
594 to_mb(char *mb, wchar_t wc) in to_mb() argument
598 if ((rv = _tomb(mb, wc)) < 0) { in to_mb()