require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_I386_APMVAR_H_)) {
    eval 'sub _I386_APMVAR_H_ () {1;}' unless defined(&_I386_APMVAR_H_);
    require 'sys/ioccom.ph';
    eval 'sub APM_VERSION () {0x102;}' unless defined(&APM_VERSION);
    eval 'sub APM_16BIT_SUPPORTED () {0x10000;}' unless defined(&APM_16BIT_SUPPORTED);
    eval 'sub APM_32BIT_SUPPORTED () {0x20000;}' unless defined(&APM_32BIT_SUPPORTED);
    eval 'sub APM_IDLE_SLOWS () {0x40000;}' unless defined(&APM_IDLE_SLOWS);
    eval 'sub APM_BIOS_PM_DISABLED () {0x80000;}' unless defined(&APM_BIOS_PM_DISABLED);
    eval 'sub APM_BIOS_PM_DISENGAGED () {0x100000;}' unless defined(&APM_BIOS_PM_DISENGAGED);
    eval 'sub APM_MAJOR {
        local($f) = @_;
	    eval q(((($f) >> 8) & 0xff));
    }' unless defined(&APM_MAJOR);
    eval 'sub APM_MINOR {
        local($f) = @_;
	    eval q((($f) & 0xff));
    }' unless defined(&APM_MINOR);
    eval 'sub APM_VERMASK () {0xffff;}' unless defined(&APM_VERMASK);
    eval 'sub APM_NOCLI () {0x10000;}' unless defined(&APM_NOCLI);
    eval 'sub APM_BEBATT () {0x20000;}' unless defined(&APM_BEBATT);
    eval 'sub APM_ERR_CODE {
        local($regs) = @_;
	    eval q(((($regs)-> &ax & 0xff00) >> 8));
    }' unless defined(&APM_ERR_CODE);
    eval 'sub APM_ERR_PM_DISABLED () {0x1;}' unless defined(&APM_ERR_PM_DISABLED);
    eval 'sub APM_ERR_REALALREADY () {0x2;}' unless defined(&APM_ERR_REALALREADY);
    eval 'sub APM_ERR_NOTCONN () {0x3;}' unless defined(&APM_ERR_NOTCONN);
    eval 'sub APM_ERR_16ALREADY () {0x5;}' unless defined(&APM_ERR_16ALREADY);
    eval 'sub APM_ERR_16NOTSUPP () {0x6;}' unless defined(&APM_ERR_16NOTSUPP);
    eval 'sub APM_ERR_32ALREADY () {0x7;}' unless defined(&APM_ERR_32ALREADY);
    eval 'sub APM_ERR_32NOTSUPP () {0x8;}' unless defined(&APM_ERR_32NOTSUPP);
    eval 'sub APM_ERR_UNRECOG_DEV () {0x9;}' unless defined(&APM_ERR_UNRECOG_DEV);
    eval 'sub APM_ERR_ERANGE () {0xa;}' unless defined(&APM_ERR_ERANGE);
    eval 'sub APM_ERR_NOTENGAGED () {0xb;}' unless defined(&APM_ERR_NOTENGAGED);
    eval 'sub APM_ERR_EOPNOSUPP () {0xc;}' unless defined(&APM_ERR_EOPNOSUPP);
    eval 'sub APM_ERR_RTIMER_DISABLED () {0xd;}' unless defined(&APM_ERR_RTIMER_DISABLED);
    eval 'sub APM_ERR_UNABLE () {0x60;}' unless defined(&APM_ERR_UNABLE);
    eval 'sub APM_ERR_NOEVENTS () {0x80;}' unless defined(&APM_ERR_NOEVENTS);
    eval 'sub APM_ERR_NOT_PRESENT () {0x86;}' unless defined(&APM_ERR_NOT_PRESENT);
    eval 'sub APM_DEV_APM_BIOS () {0x;}' unless defined(&APM_DEV_APM_BIOS);
    eval 'sub APM_DEV_ALLDEVS () {0x1;}' unless defined(&APM_DEV_ALLDEVS);
    eval 'sub APM_DEV_DISPLAY {
        local($x) = @_;
	    eval q((0x100|(($x)&0xff)));
    }' unless defined(&APM_DEV_DISPLAY);
    eval 'sub APM_DEV_DISK {
        local($x) = @_;
	    eval q((0x200|(($x)&0xff)));
    }' unless defined(&APM_DEV_DISK);
    eval 'sub APM_DEV_PARALLEL {
        local($x) = @_;
	    eval q((0x300|(($x)&0xff)));
    }' unless defined(&APM_DEV_PARALLEL);
    eval 'sub APM_DEV_SERIAL {
        local($x) = @_;
	    eval q((0x400|(($x)&0xff)));
    }' unless defined(&APM_DEV_SERIAL);
    eval 'sub APM_DEV_NETWORK {
        local($x) = @_;
	    eval q((0x500|(($x)&0xff)));
    }' unless defined(&APM_DEV_NETWORK);
    eval 'sub APM_DEV_PCMCIA {
        local($x) = @_;
	    eval q((0x600|(($x)&0xff)));
    }' unless defined(&APM_DEV_PCMCIA);
    eval 'sub APM_DEV_BATTERIES {
        local($x) = @_;
	    eval q((0x8000|(($x)&0xff)));
    }' unless defined(&APM_DEV_BATTERIES);
    eval 'sub APM_DEV_ALLUNITS () {0xff;}' unless defined(&APM_DEV_ALLUNITS);
    eval 'sub APM_INSTCHECK () {0x5300;}' unless defined(&APM_INSTCHECK);
    eval 'sub APM_16BIT_SUPPORT () {0x1;}' unless defined(&APM_16BIT_SUPPORT);
    eval 'sub APM_32BIT_SUPPORT () {0x2;}' unless defined(&APM_32BIT_SUPPORT);
    eval 'sub APM_CPUIDLE_SLOW () {0x4;}' unless defined(&APM_CPUIDLE_SLOW);
    eval 'sub APM_DISABLED () {0x8;}' unless defined(&APM_DISABLED);
    eval 'sub APM_DISENGAGED () {0x10;}' unless defined(&APM_DISENGAGED);
    eval 'sub APM_REAL_CONNECT () {0x5301;}' unless defined(&APM_REAL_CONNECT);
    eval 'sub APM_PROT16_CONNECT () {0x5302;}' unless defined(&APM_PROT16_CONNECT);
    eval 'sub APM_PROT32_CONNECT () {0x5303;}' unless defined(&APM_PROT32_CONNECT);
    eval 'sub APM_DISCONNECT () {0x5304;}' unless defined(&APM_DISCONNECT);
    eval 'sub APM_CPU_IDLE () {0x5305;}' unless defined(&APM_CPU_IDLE);
    eval 'sub APM_CPU_BUSY () {0x5306;}' unless defined(&APM_CPU_BUSY);
    eval 'sub APM_SET_PWR_STATE () {0x5307;}' unless defined(&APM_SET_PWR_STATE);
    eval 'sub APM_SYS_READY () {0x;}' unless defined(&APM_SYS_READY);
    eval 'sub APM_SYS_STANDBY () {0x1;}' unless defined(&APM_SYS_STANDBY);
    eval 'sub APM_SYS_SUSPEND () {0x2;}' unless defined(&APM_SYS_SUSPEND);
    eval 'sub APM_SYS_OFF () {0x3;}' unless defined(&APM_SYS_OFF);
    eval 'sub APM_LASTREQ_INPROG () {0x4;}' unless defined(&APM_LASTREQ_INPROG);
    eval 'sub APM_LASTREQ_REJECTED () {0x5;}' unless defined(&APM_LASTREQ_REJECTED);
    eval 'sub APM_PWR_MGT_ENABLE () {0x5308;}' unless defined(&APM_PWR_MGT_ENABLE);
    eval 'sub APM_MGT_ALL () {0xffff;}' unless defined(&APM_MGT_ALL);
    eval 'sub APM_MGT_DISABLE () {0x;}' unless defined(&APM_MGT_DISABLE);
    eval 'sub APM_MGT_ENABLE () {0x1;}' unless defined(&APM_MGT_ENABLE);
    eval 'sub APM_SYSTEM_DEFAULTS () {0x5309;}' unless defined(&APM_SYSTEM_DEFAULTS);
    eval 'sub APM_DEFAULTS_ALL () {0xffff;}' unless defined(&APM_DEFAULTS_ALL);
    eval 'sub APM_POWER_STATUS () {0x530a;}' unless defined(&APM_POWER_STATUS);
    eval 'sub APM_AC_OFF () {0x;}' unless defined(&APM_AC_OFF);
    eval 'sub APM_AC_ON () {0x1;}' unless defined(&APM_AC_ON);
    eval 'sub APM_AC_BACKUP () {0x2;}' unless defined(&APM_AC_BACKUP);
    eval 'sub APM_AC_UNKNOWN () {0xff;}' unless defined(&APM_AC_UNKNOWN);
    eval 'sub APM_BATT_HIGH () {0x;}' unless defined(&APM_BATT_HIGH);
    eval 'sub APM_BATT_LOW () {0x1;}' unless defined(&APM_BATT_LOW);
    eval 'sub APM_BATT_CRITICAL () {0x2;}' unless defined(&APM_BATT_CRITICAL);
    eval 'sub APM_BATT_CHARGING () {0x3;}' unless defined(&APM_BATT_CHARGING);
    eval 'sub APM_BATT_UNKNOWN () {0xff;}' unless defined(&APM_BATT_UNKNOWN);
    eval 'sub APM_BATT_FLAG_HIGH () {0x1;}' unless defined(&APM_BATT_FLAG_HIGH);
    eval 'sub APM_BATT_FLAG_LOW () {0x2;}' unless defined(&APM_BATT_FLAG_LOW);
    eval 'sub APM_BATT_FLAG_CRITICAL () {0x4;}' unless defined(&APM_BATT_FLAG_CRITICAL);
    eval 'sub APM_BATT_FLAG_CHARGING () {0x8;}' unless defined(&APM_BATT_FLAG_CHARGING);
    eval 'sub APM_BATT_FLAG_NOBATTERY () {0x10;}' unless defined(&APM_BATT_FLAG_NOBATTERY);
    eval 'sub APM_BATT_FLAG_NOSYSBATT () {0x80;}' unless defined(&APM_BATT_FLAG_NOSYSBATT);
    eval 'sub APM_BATT_LIFE_UNKNOWN () {0xff;}' unless defined(&APM_BATT_LIFE_UNKNOWN);
    eval 'sub BATT_STATE {
        local($regp) = @_;
	    eval q((($regp)-> &bx & 0xff));
    }' unless defined(&BATT_STATE);
    eval 'sub BATT_FLAGS {
        local($regp) = @_;
	    eval q(((($regp)-> &cx & 0xff00) >> 8));
    }' unless defined(&BATT_FLAGS);
    eval 'sub AC_STATE {
        local($regp) = @_;
	    eval q(((($regp)-> &bx & 0xff00) >> 8));
    }' unless defined(&AC_STATE);
    eval 'sub BATT_LIFE {
        local($regp) = @_;
	    eval q((($regp)-> &cx & 0xff));
    }' unless defined(&BATT_LIFE);
    eval 'sub BATT_REMAINING {
        local($regp) = @_;
	    eval q(((($regp)-> &dx & 0x8000) ? (($regp)-> &dx & 0x7fff) : (($regp)-> &dx & 0x7fff)/60));
    }' unless defined(&BATT_REMAINING);
    eval 'sub BATT_REM_VALID {
        local($regp) = @_;
	    eval q(((($regp)-> &dx & 0xffff) != 0xffff));
    }' unless defined(&BATT_REM_VALID);
    eval 'sub BATT_COUNT {
        local($regp) = @_;
	    eval q((($regp)-> &si));
    }' unless defined(&BATT_COUNT);
    eval 'sub APM_GET_PM_EVENT () {0x530b;}' unless defined(&APM_GET_PM_EVENT);
    eval 'sub APM_NOEVENT () {0x;}' unless defined(&APM_NOEVENT);
    eval 'sub APM_STANDBY_REQ () {0x1;}' unless defined(&APM_STANDBY_REQ);
    eval 'sub APM_SUSPEND_REQ () {0x2;}' unless defined(&APM_SUSPEND_REQ);
    eval 'sub APM_NORMAL_RESUME () {0x3;}' unless defined(&APM_NORMAL_RESUME);
    eval 'sub APM_CRIT_RESUME () {0x4;}' unless defined(&APM_CRIT_RESUME);
    eval 'sub APM_BATTERY_LOW () {0x5;}' unless defined(&APM_BATTERY_LOW);
    eval 'sub APM_POWER_CHANGE () {0x6;}' unless defined(&APM_POWER_CHANGE);
    eval 'sub APM_UPDATE_TIME () {0x7;}' unless defined(&APM_UPDATE_TIME);
    eval 'sub APM_CRIT_SUSPEND_REQ () {0x8;}' unless defined(&APM_CRIT_SUSPEND_REQ);
    eval 'sub APM_USER_STANDBY_REQ () {0x9;}' unless defined(&APM_USER_STANDBY_REQ);
    eval 'sub APM_USER_SUSPEND_REQ () {0xa;}' unless defined(&APM_USER_SUSPEND_REQ);
    eval 'sub APM_SYS_STANDBY_RESUME () {0xb;}' unless defined(&APM_SYS_STANDBY_RESUME);
    eval 'sub APM_CAPABILITY_CHANGE () {0xc;}' unless defined(&APM_CAPABILITY_CHANGE);
    eval 'sub APM_EVENT_MASK () {0xffff;}' unless defined(&APM_EVENT_MASK);
    eval 'sub APM_EVENT_COMPOSE {
        local($t,$i) = @_;
	    eval q((((($i) & 0x7fff) << 16)|(($t) &  &APM_EVENT_MASK)));
    }' unless defined(&APM_EVENT_COMPOSE);
    eval 'sub APM_EVENT_TYPE {
        local($e) = @_;
	    eval q((($e) &  &APM_EVENT_MASK));
    }' unless defined(&APM_EVENT_TYPE);
    eval 'sub APM_EVENT_INDEX {
        local($e) = @_;
	    eval q((($e) >> 16));
    }' unless defined(&APM_EVENT_INDEX);
    eval 'sub APM_GET_POWER_STATE () {0x530c;}' unless defined(&APM_GET_POWER_STATE);
    eval 'sub APM_DEVICE_MGMT_ENABLE () {0x530d;}' unless defined(&APM_DEVICE_MGMT_ENABLE);
    eval 'sub APM_DRIVER_VERSION () {0x530e;}' unless defined(&APM_DRIVER_VERSION);
    eval 'sub APM_CONN_MINOR {
        local($regp) = @_;
	    eval q((($regp)-> &ax & 0xff));
    }' unless defined(&APM_CONN_MINOR);
    eval 'sub APM_CONN_MAJOR {
        local($regp) = @_;
	    eval q(((($regp)-> &ax & 0xff00) >> 8));
    }' unless defined(&APM_CONN_MAJOR);
    eval 'sub APM_PWR_MGT_ENGAGE () {0x530f;}' unless defined(&APM_PWR_MGT_ENGAGE);
    eval 'sub APM_MGT_DISENGAGE () {0x;}' unless defined(&APM_MGT_DISENGAGE);
    eval 'sub APM_MGT_ENGAGE () {0x1;}' unless defined(&APM_MGT_ENGAGE);
    eval 'sub APM_GET_CAPABILITIES () {0x5310;}' unless defined(&APM_GET_CAPABILITIES);
    eval 'sub APM_NBATTERIES {
        local($regp) = @_;
	    eval q((($regp)-> &bx));
    }' unless defined(&APM_NBATTERIES);
    eval 'sub APM_GLOBAL_STANDBY () {0x1;}' unless defined(&APM_GLOBAL_STANDBY);
    eval 'sub APM_GLOBAL_SUSPEND () {0x2;}' unless defined(&APM_GLOBAL_SUSPEND);
    eval 'sub APM_RTIMER_STANDBY () {0x4;}' unless defined(&APM_RTIMER_STANDBY);
    eval 'sub APM_RTIMER_SUSPEND () {0x8;}' unless defined(&APM_RTIMER_SUSPEND);
    eval 'sub APM_IRRING_STANDBY () {0x10;}' unless defined(&APM_IRRING_STANDBY);
    eval 'sub APM_IRRING_SUSPEND () {0x20;}' unless defined(&APM_IRRING_SUSPEND);
    eval 'sub APM_PCCARD_STANDBY () {0x40;}' unless defined(&APM_PCCARD_STANDBY);
    eval 'sub APM_PCCARD_SUSPEND () {0x80;}' unless defined(&APM_PCCARD_SUSPEND);
    eval 'sub APM_RESUME_TIMER () {0x5311;}' unless defined(&APM_RESUME_TIMER);
    eval 'sub APM_RT_DISABLE () {0x;}' unless defined(&APM_RT_DISABLE);
    eval 'sub APM_RT_GET () {0x1;}' unless defined(&APM_RT_GET);
    eval 'sub APM_RT_SET () {0x2;}' unless defined(&APM_RT_SET);
    eval 'sub APM_RESUME_ON_RING () {0x5312;}' unless defined(&APM_RESUME_ON_RING);
    eval 'sub APM_ROR_DISABLE () {0x;}' unless defined(&APM_ROR_DISABLE);
    eval 'sub APM_ROR_ENABLE () {0x1;}' unless defined(&APM_ROR_ENABLE);
    eval 'sub APM_ROR_STATUS () {0x2;}' unless defined(&APM_ROR_STATUS);
    eval 'sub APM_INACTIVITY_TIMER () {0x5313;}' unless defined(&APM_INACTIVITY_TIMER);
    eval 'sub APM_IT_DISABLE () {0x;}' unless defined(&APM_IT_DISABLE);
    eval 'sub APM_IT_ENABLE () {0x1;}' unless defined(&APM_IT_ENABLE);
    eval 'sub APM_IT_STATUS () {0x2;}' unless defined(&APM_IT_STATUS);
    eval 'sub APM_OEM () {0x5380;}' unless defined(&APM_OEM);
    eval 'sub APM_OEM_INSTCHECK () {0x7f;}' unless defined(&APM_OEM_INSTCHECK);
    eval 'sub APM_BATTERY_ABSENT () {4;}' unless defined(&APM_BATTERY_ABSENT);
    eval 'sub APM_IOC_REJECT () { &_IOW(ord(\'A\'), 0, \'struct apm_event_info\');}' unless defined(&APM_IOC_REJECT);
    eval 'sub APM_IOC_STANDBY () { &_IO(ord(\'A\'), 1);}' unless defined(&APM_IOC_STANDBY);
    eval 'sub APM_IOC_SUSPEND () { &_IO(ord(\'A\'), 2);}' unless defined(&APM_IOC_SUSPEND);
    eval 'sub APM_IOC_GETPOWER () { &_IOR(ord(\'A\'), 3, \'struct apm_power_info\');}' unless defined(&APM_IOC_GETPOWER);
    eval 'sub APM_IOC_DEV_CTL () { &_IOW(ord(\'A\'), 5, \'struct apm_ctl\');}' unless defined(&APM_IOC_DEV_CTL);
    eval 'sub APM_IOC_PRN_CTL () { &_IOW(ord(\'A\'), 6, \'int\' );}' unless defined(&APM_IOC_PRN_CTL);
    eval 'sub APM_PRINT_ON () {0;}' unless defined(&APM_PRINT_ON);
    eval 'sub APM_PRINT_OFF () {1;}' unless defined(&APM_PRINT_OFF);
    eval 'sub APM_PRINT_PCT () {2;}' unless defined(&APM_PRINT_PCT);
    if(defined(&_KERNEL)) {
    }
}
1;
