Lines Matching defs:mbchar
104 * The mbtowc() function converts a multibyte character mbchar into
108 * If mbchar is NULL, mbtowc() returns zero to indicate that shift
111 * without them being interpreted as characters. If mbchar is null
115 * If mbchar is non-null, returns the number of bytes processed in
116 * mbchar. If mbchar is invalid, returns -1.
119 smb_mbtowc(smb_wchar_t *wcharp, const char *mbchar, size_t nbytes)
126 if (mbchar == NULL)
130 if (((mbyte = *mbchar++) & 0x80) == 0) {
154 if (((mbyte = *mbchar++) & 0xc0) != 0x80)
172 * character and stores the result in mbchar. The object pointed to by
173 * mbchar must be large enough to accommodate the multibyte character.
175 * Returns the numberof bytes written to mbchar.
178 smb_wctomb(char *mbchar, smb_wchar_t wchar)
181 *mbchar = (char)wchar;
186 *mbchar++ = (wchar >> 6) | 0xc0;
187 *mbchar = (wchar & 0x3f) | 0x80;
191 *mbchar++ = (wchar >> 12) | 0xe0;
192 *mbchar++ = ((wchar >> 6) & 0x3f) | 0x80;
193 *mbchar = (wchar & 0x3f) | 0x80;