require '_h2ph_pre.ph';

unless(defined(&_KBD_KERN_H)) {
    eval 'sub _KBD_KERN_H () {1;}' unless defined(&_KBD_KERN_H);
    require 'linux/interrupt.ph';
    require 'linux/keyboard.ph';
    eval 'sub VC_SHIFTLOCK () { &KG_SHIFT;}' unless defined(&VC_SHIFTLOCK);
    eval 'sub VC_ALTGRLOCK () { &KG_ALTGR;}' unless defined(&VC_ALTGRLOCK);
    eval 'sub VC_CTRLLOCK () { &KG_CTRL;}' unless defined(&VC_CTRLLOCK);
    eval 'sub VC_ALTLOCK () { &KG_ALT;}' unless defined(&VC_ALTLOCK);
    eval 'sub VC_SHIFTLLOCK () { &KG_SHIFTL;}' unless defined(&VC_SHIFTLLOCK);
    eval 'sub VC_SHIFTRLOCK () { &KG_SHIFTR;}' unless defined(&VC_SHIFTRLOCK);
    eval 'sub VC_CTRLLLOCK () { &KG_CTRLL;}' unless defined(&VC_CTRLLLOCK);
    eval 'sub VC_CTRLRLOCK () { &KG_CTRLR;}' unless defined(&VC_CTRLRLOCK);
    eval 'sub LED_SHOW_FLAGS () {0;}' unless defined(&LED_SHOW_FLAGS);
    eval 'sub LED_SHOW_IOCTL () {1;}' unless defined(&LED_SHOW_IOCTL);
    eval 'sub LED_SHOW_MEM () {2;}' unless defined(&LED_SHOW_MEM);
    eval 'sub VC_SCROLLOCK () {0;}' unless defined(&VC_SCROLLOCK);
    eval 'sub VC_NUMLOCK () {1;}' unless defined(&VC_NUMLOCK);
    eval 'sub VC_CAPSLOCK () {2;}' unless defined(&VC_CAPSLOCK);
    eval 'sub VC_XLATE () {0;}' unless defined(&VC_XLATE);
    eval 'sub VC_MEDIUMRAW () {1;}' unless defined(&VC_MEDIUMRAW);
    eval 'sub VC_RAW () {2;}' unless defined(&VC_RAW);
    eval 'sub VC_UNICODE () {3;}' unless defined(&VC_UNICODE);
    eval 'sub VC_APPLIC () {0;}' unless defined(&VC_APPLIC);
    eval 'sub VC_CKMODE () {1;}' unless defined(&VC_CKMODE);
    eval 'sub VC_REPEAT () {2;}' unless defined(&VC_REPEAT);
    eval 'sub VC_CRLF () {3;}' unless defined(&VC_CRLF);
    eval 'sub VC_META () {4;}' unless defined(&VC_META);
    eval 'sub U {
        local($x) = @_;
	    eval q((($x) ^ 0xf000));
    }' unless defined(&U);
}
1;
