require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_PMF_H)) {
    eval 'sub _SYS_PMF_H () {1;}' unless defined(&_SYS_PMF_H);
    if(defined(&_KERNEL) || defined(&_KMEMUSER)) {
	require 'sys/types.ph';
	require 'sys/device_if.ph';
	eval("sub PMFE_DISPLAY_ON () { 0; }") unless defined(&PMFE_DISPLAY_ON);
	eval("sub PMFE_DISPLAY_REDUCED () { 1; }") unless defined(&PMFE_DISPLAY_REDUCED);
	eval("sub PMFE_DISPLAY_STANDBY () { 2; }") unless defined(&PMFE_DISPLAY_STANDBY);
	eval("sub PMFE_DISPLAY_SUSPEND () { 3; }") unless defined(&PMFE_DISPLAY_SUSPEND);
	eval("sub PMFE_DISPLAY_OFF () { 4; }") unless defined(&PMFE_DISPLAY_OFF);
	eval("sub PMFE_DISPLAY_BRIGHTNESS_UP () { 5; }") unless defined(&PMFE_DISPLAY_BRIGHTNESS_UP);
	eval("sub PMFE_DISPLAY_BRIGHTNESS_DOWN () { 6; }") unless defined(&PMFE_DISPLAY_BRIGHTNESS_DOWN);
	eval("sub PMFE_AUDIO_VOLUME_UP () { 7; }") unless defined(&PMFE_AUDIO_VOLUME_UP);
	eval("sub PMFE_AUDIO_VOLUME_DOWN () { 8; }") unless defined(&PMFE_AUDIO_VOLUME_DOWN);
	eval("sub PMFE_AUDIO_VOLUME_TOGGLE () { 9; }") unless defined(&PMFE_AUDIO_VOLUME_TOGGLE);
	eval("sub PMFE_CHASSIS_LID_CLOSE () { 10; }") unless defined(&PMFE_CHASSIS_LID_CLOSE);
	eval("sub PMFE_CHASSIS_LID_OPEN () { 11; }") unless defined(&PMFE_CHASSIS_LID_OPEN);
	eval("sub PMFE_RADIO_ON () { 12; }") unless defined(&PMFE_RADIO_ON);
	eval("sub PMFE_RADIO_OFF () { 13; }") unless defined(&PMFE_RADIO_OFF);
	eval("sub PMFE_RADIO_TOGGLE () { 14; }") unless defined(&PMFE_RADIO_TOGGLE);
	eval("sub PMFE_POWER_CHANGED () { 15; }") unless defined(&PMFE_POWER_CHANGED);
	eval("sub PMFE_SPEED_CHANGED () { 16; }") unless defined(&PMFE_SPEED_CHANGED);
	eval("sub PMFE_THROTTLE_ENABLE () { 17; }") unless defined(&PMFE_THROTTLE_ENABLE);
	eval("sub PMFE_THROTTLE_DISABLE () { 18; }") unless defined(&PMFE_THROTTLE_DISABLE);
	eval("sub PMFE_KEYBOARD_BRIGHTNESS_UP () { 19; }") unless defined(&PMFE_KEYBOARD_BRIGHTNESS_UP);
	eval("sub PMFE_KEYBOARD_BRIGHTNESS_DOWN () { 20; }") unless defined(&PMFE_KEYBOARD_BRIGHTNESS_DOWN);
	eval("sub PMFE_KEYBOARD_BRIGHTNESS_TOGGLE () { 21; }") unless defined(&PMFE_KEYBOARD_BRIGHTNESS_TOGGLE);
    }
    if(defined(&_KERNEL)) {
	eval 'sub pmf_device_register {
	    my($__d, $__s, $__r) = @_;
    	    eval q( &pmf_device_register1(($__d), ($__s), ($__r),  &NULL));
	}' unless defined(&pmf_device_register);
	eval 'sub pmf_qual_suspension {
	    my($pq) = @_;
    	    eval q({  ($pq->{pq_suspensor}); });
	}' unless defined(&pmf_qual_suspension);
	eval 'sub pmf_qual_depth {
	    my($pq) = @_;
    	    eval q({  ($pq->{pq_actlvl}); });
	}' unless defined(&pmf_qual_depth);
	eval 'sub pmf_qual_descend_ok {
	    my($pq) = @_;
    	    eval q({  ($pq->{pq_actlvl}) ==  &DEVACT_LEVEL_FULL; });
	}' unless defined(&pmf_qual_descend_ok);
    }
}
1;
