/* Put utf8 character to tty flip buffer. UTF-8 is defined for words of up to 31 bits, but we need only 16 bits here  */
static void to_utf8(struct tty_struct *tty, ushort c)
/* Put utf8 character to tty flip buffer. UTF-8 is defined for words of up to 31 bits, but we need only 16 bits here  */
static void to_utf8(struct tty_struct *tty, ushort c)
{
	if (c < 0x80)
		kbd_put_queue(tty, c);
	else if (c < 0x800) {
		kbd_put_queue(tty, 0xc0 | (c >> 6));
		kbd_put_queue(tty, 0x80 | (c & 0x3f));
	} else {
		kbd_put_queue(tty, 0xe0 | (c >> 12));
		kbd_put_queue(tty, 0x80 | ((c >> 6) & 0x3f));
		kbd_put_queue(tty, 0x80 | (c & 0x3f));
	}
}