require '_h2ph_pre.ph';

unless(defined(&_LINUX_BUSMOUSE_H)) {
    eval 'sub _LINUX_BUSMOUSE_H () {1;}' unless defined(&_LINUX_BUSMOUSE_H);
    eval 'sub MOUSE_IRQ () {5;}' unless defined(&MOUSE_IRQ);
    eval 'sub LOGITECH_BUSMOUSE () {0;}' unless defined(&LOGITECH_BUSMOUSE);
    eval 'sub MICROSOFT_BUSMOUSE () {2;}' unless defined(&MICROSOFT_BUSMOUSE);
    eval 'sub LOGIBM_BASE () {0x23c;}' unless defined(&LOGIBM_BASE);
    eval 'sub MSE_DATA_PORT () {0x23c;}' unless defined(&MSE_DATA_PORT);
    eval 'sub MSE_SIGNATURE_PORT () {0x23d;}' unless defined(&MSE_SIGNATURE_PORT);
    eval 'sub MSE_CONTROL_PORT () {0x23e;}' unless defined(&MSE_CONTROL_PORT);
    eval 'sub MSE_INTERRUPT_PORT () {0x23e;}' unless defined(&MSE_INTERRUPT_PORT);
    eval 'sub MSE_CONFIG_PORT () {0x23f;}' unless defined(&MSE_CONFIG_PORT);
    eval 'sub LOGIBM_EXTENT () {0x4;}' unless defined(&LOGIBM_EXTENT);
    eval 'sub MSE_ENABLE_INTERRUPTS () {0x;}' unless defined(&MSE_ENABLE_INTERRUPTS);
    eval 'sub MSE_DISABLE_INTERRUPTS () {0x10;}' unless defined(&MSE_DISABLE_INTERRUPTS);
    eval 'sub MSE_READ_X_LOW () {0x80;}' unless defined(&MSE_READ_X_LOW);
    eval 'sub MSE_READ_X_HIGH () {0xa0;}' unless defined(&MSE_READ_X_HIGH);
    eval 'sub MSE_READ_Y_LOW () {0xc0;}' unless defined(&MSE_READ_Y_LOW);
    eval 'sub MSE_READ_Y_HIGH () {0xe0;}' unless defined(&MSE_READ_Y_HIGH);
    eval 'sub MSE_CONFIG_BYTE () {0x91;}' unless defined(&MSE_CONFIG_BYTE);
    eval 'sub MSE_DEFAULT_MODE () {0x90;}' unless defined(&MSE_DEFAULT_MODE);
    eval 'sub MSE_SIGNATURE_BYTE () {0xa5;}' unless defined(&MSE_SIGNATURE_BYTE);
    eval 'sub MSE_INT_OFF () {
        eval q( &outb( &MSE_DISABLE_INTERRUPTS,  &MSE_CONTROL_PORT));
    }' unless defined(&MSE_INT_OFF);
    eval 'sub MSE_INT_ON () {
        eval q( &outb( &MSE_ENABLE_INTERRUPTS,  &MSE_CONTROL_PORT));
    }' unless defined(&MSE_INT_ON);
    eval 'sub MSBM_BASE () {0x23d;}' unless defined(&MSBM_BASE);
    eval 'sub MS_MSE_DATA_PORT () {0x23d;}' unless defined(&MS_MSE_DATA_PORT);
    eval 'sub MS_MSE_SIGNATURE_PORT () {0x23e;}' unless defined(&MS_MSE_SIGNATURE_PORT);
    eval 'sub MS_MSE_CONTROL_PORT () {0x23c;}' unless defined(&MS_MSE_CONTROL_PORT);
    eval 'sub MS_MSE_CONFIG_PORT () {0x23f;}' unless defined(&MS_MSE_CONFIG_PORT);
    eval 'sub MSBM_EXTENT () {0x3;}' unless defined(&MSBM_EXTENT);
    eval 'sub MS_MSE_ENABLE_INTERRUPTS () {0x11;}' unless defined(&MS_MSE_ENABLE_INTERRUPTS);
    eval 'sub MS_MSE_DISABLE_INTERRUPTS () {0x10;}' unless defined(&MS_MSE_DISABLE_INTERRUPTS);
    eval 'sub MS_MSE_READ_BUTTONS () {0x;}' unless defined(&MS_MSE_READ_BUTTONS);
    eval 'sub MS_MSE_READ_X () {0x1;}' unless defined(&MS_MSE_READ_X);
    eval 'sub MS_MSE_READ_Y () {0x2;}' unless defined(&MS_MSE_READ_Y);
    eval 'sub MS_MSE_START () {0x80;}' unless defined(&MS_MSE_START);
    eval 'sub MS_MSE_COMMAND_MODE () {0x7;}' unless defined(&MS_MSE_COMMAND_MODE);
    eval 'sub MS_MSE_INT_OFF () {
        eval q({ &outb( &MS_MSE_COMMAND_MODE,  &MS_MSE_CONTROL_PORT);  &outb( &MS_MSE_DISABLE_INTERRUPTS,  &MS_MSE_DATA_PORT);});
    }' unless defined(&MS_MSE_INT_OFF);
    eval 'sub MS_MSE_INT_ON () {
        eval q({ &outb( &MS_MSE_COMMAND_MODE,  &MS_MSE_CONTROL_PORT);  &outb( &MS_MSE_ENABLE_INTERRUPTS,  &MS_MSE_DATA_PORT);});
    }' unless defined(&MS_MSE_INT_ON);
}
1;
