require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_USB_UMIDI_QUIRKS_H_)) {
    eval 'sub _DEV_USB_UMIDI_QUIRKS_H_ () {1;}' unless defined(&_DEV_USB_UMIDI_QUIRKS_H_);
    eval 'sub UMQ_TYPE_FIXED_EP () {1;}' unless defined(&UMQ_TYPE_FIXED_EP);
    eval 'sub UMQ_TYPE_YAMAHA () {2;}' unless defined(&UMQ_TYPE_YAMAHA);
    eval 'sub UMQ_ISTYPE {
        my($q, $type) = @_;
	    eval q((($q)-> &sc_quirk  && (($q)-> ($sc_quirk->{type_mask}) & (1<<(($type)-1)))));
    }' unless defined(&UMQ_ISTYPE);
    eval 'sub UMQ_TERMINATOR () {{ 0, };}' unless defined(&UMQ_TERMINATOR);
    eval 'sub UMQ_DEF {
        my($v, $p, $i) = @_;
	    eval q( &static \'struct umq_data\'  &umq_$v &_$p &_$i->[]);
    }' unless defined(&UMQ_DEF);
    eval 'sub UMQ_REG {
        my($v, $p, $i) = @_;
	    eval q({  &USB_VENDOR_$v,  &USB_PRODUCT_$p, $i,  &umq_$v &_$p &_$i, 0});
    }' unless defined(&UMQ_REG);
    eval 'sub ANYIFACE () {-1;}' unless defined(&ANYIFACE);
    eval 'sub ANYVENDOR () {-1;}' unless defined(&ANYVENDOR);
    eval 'sub USB_VENDOR_ANYVENDOR () { &ANYVENDOR;}' unless defined(&USB_VENDOR_ANYVENDOR);
    eval 'sub ANYPRODUCT () {-1;}' unless defined(&ANYPRODUCT);
    eval 'sub USB_PRODUCT_ANYPRODUCT () { &ANYPRODUCT;}' unless defined(&USB_PRODUCT_ANYPRODUCT);
    eval 'sub UMQ_FIXED_EP_DEF {
        my($v, $p, $i, $noep, $niep) = @_;
	    eval q( &static \'struct umq_fixed_ep_endpoint\'  &umq_$v &_$p &_$i $_fixed_ep_endpoints[$noep+$niep];  &static \'struct umq_fixed_ep_desc\'  &umq_$v &_$p &_$i &_fixed_ep_desc = { $noep, $niep,  &umq_$v &_$p &_$i $_fixed_ep_endpoints[0],  &umq_$v &_$p &_$i $_fixed_ep_endpoints[$noep], };  &static \'struct umq_fixed_ep_endpoint\'  &umq_$v &_$p &_$i $_fixed_ep_endpoints[$noep+$niep]);
    }' unless defined(&UMQ_FIXED_EP_DEF);
    eval 'sub UMQ_FIXED_EP_REG {
        my($v, $p, $i) = @_;
	    eval q({  &UMQ_TYPE_FIXED_EP, ( &void *) &umq_$v &_$p &_$i &_fixed_ep_desc });
    }' unless defined(&UMQ_FIXED_EP_REG);
    eval 'sub UMQ_YAMAHA_REG {
        my($v, $p, $i) = @_;
	    eval q({  &UMQ_TYPE_YAMAHA,  &NULL });
    }' unless defined(&UMQ_YAMAHA_REG);
}
1;
