void kbd_keycode(unsigned int keycode, int down, int hw_raw, struct pt_regs *regs) 
static void kbd_keycode(unsigned int keycode, int down, int hw_raw, struct pt_regs *regs) 
void kbd_keycode(unsigned int keycode, int down, int hw_raw, struct pt_regs *regs){	struct vc_data *vc = vc_cons[fg_console].d;	unsigned short keysym, *key_map;	unsigned char type, raw_mode;	struct tty_struct *tty;	int shift_final;	tty = vc->vc_tty;	if (tty && (!tty->driver_data)) {		/* No driver data? Strange. Okay we fix it then. */		tty->driver_data = vc;	}	kbd = kbd_table + fg_console;	if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT)		sysrq_alt = down;#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64)	if (keycode == KEY_STOP)		sparc_l1_a_state = down;#endif	rep = (down == 2);#ifdef CONFIG_MAC_EMUMOUSEBTN	if (mac_hid_mouse_emulate_buttons(1, keycode, down))		return;#endif /* CONFIG_MAC_EMUMOUSEBTN */	if ((raw_mode = (kbd->kbdmode == VC_RAW)) && !hw_raw)		if (emulate_raw(vc, keycode, !down << 7))			if (keycode < BTN_MISC)				printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode);#ifdef CONFIG_MAGIC_SYSRQ	       /* Handle the SysRq Hack */	if (keycode == KEY_SYSRQ && (sysrq_down || (down == 1 && sysrq_alt))) {		sysrq_down = down;		return;	}	if (sysrq_down && down && !rep) {		handle_sysrq(kbd_sysrq_xlate[keycode], regs, tty);		return;	}#endif#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64)	if (keycode == KEY_A && sparc_l1_a_state) {		sparc_l1_a_state = 0;		sun_do_break();	}#endif	if (kbd->kbdmode == VC_MEDIUMRAW) {		/*		 * This is extended medium raw mode, with keys above 127		 * encoded as 0, high 7 bits, low 7 bits, with the 0 bearing		 * the 'up' flag if needed. 0 is reserved, so this shouldn't		 * interfere with anything else. The two bytes after 0 will		 * always have the up flag set not to interfere with older		 * applications. This allows for 16384 different keycodes,		 * which should be enough.		 */		if (keycode < 128) {			put_queue(vc, keycode | (!down << 7));		} else {			put_queue(vc, !down << 7);			put_queue(vc, (keycode >> 7) | 0x80);			put_queue(vc, keycode | 0x80);		}		raw_mode = 1;	}	if (down)		set_bit(keycode, key_down);	else		clear_bit(keycode, key_down);	if (rep && (!vc_kbd_mode(kbd, VC_REPEAT) || (tty && 		(!L_ECHO(tty) && tty->driver->chars_in_buffer(tty))))) {		/*		 * Don't repeat a key if the input buffers are not empty and the		 * characters get aren't echoed locally. This makes key repeat 		 * usable with slow applications and under heavy loads.		 */		return;	}	shift_final = (shift_state | kbd->slockstate) ^ kbd->lockstate;	key_map = key_maps[shift_final];	if (!key_map) {		compute_shiftstate();		kbd->slockstate = 0;		return;	}	if (keycode > NR_KEYS)		return;	keysym = key_map[keycode];	type = KTYP(keysym);	if (type < 0xf0) {		if (down && !raw_mode) to_utf8(vc, keysym);		return;	}	type -= 0xf0;	if (raw_mode && type != KT_SPEC && type != KT_SHIFT)		return;	if (type == KT_LETTER) {		type = KT_LATIN;		if (vc_kbd_led(kbd, VC_CAPSLOCK)) {			key_map = key_maps[shift_final ^ (1 << KG_SHIFT)];			if (key_map)				keysym = key_map[keycode];		}	}	(*k_handler[type])(vc, keysym & 0xff, !down, regs);	if (type != KT_SLOCK)		kbd->slockstate = 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/75c96f85845a6707b0f9916cb263cb3584f7d48f/keyboard.c/clean/drivers/char/keyboard.c