require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&SEQ_MAXQ)) {
    sub SEQ_MAXQ () {	256;}
}
unless(defined(&SEQ_QINIT)) {
    sub SEQ_QINIT {
	my($q) = @_;
	eval q((($q)-> &in = ($q)-> &out = ($q)-> &count = 0));
    }
}
unless(defined(&SEQ_QEMPTY)) {
    sub SEQ_QEMPTY {
	my($q) = @_;
	eval q((($q)-> &count == 0));
    }
}
unless(defined(&SEQ_QFULL)) {
    sub SEQ_QFULL {
	my($q) = @_;
	eval q((($q)-> &count >=  &SEQ_MAXQ));
    }
}
unless(defined(&SEQ_QPUT)) {
    sub SEQ_QPUT {
	my($q, $e) = @_;
	eval q((($q)-> $buf[($q)-> &in++] = ($e), ($q)-> &in %=  &SEQ_MAXQ, ($q)-> &count++));
    }
}
unless(defined(&SEQ_QGET)) {
    sub SEQ_QGET {
	my($q, $e) = @_;
	eval q((($e) = ($q)-> $buf[($q)-> &out++], ($q)-> &out %=  &SEQ_MAXQ, ($q)-> &count--));
    }
}
unless(defined(&SEQ_QLEN)) {
    sub SEQ_QLEN {
	my($q) = @_;
	eval q((($q)-> &count));
    }
}
unless(defined(&MAXCHAN)) {
    sub MAXCHAN () {	16;}
}
unless(defined(&SEQ_OLD)) {
    sub SEQ_OLD () {	0;}
}
unless(defined(&SEQ_NEW)) {
    sub SEQ_NEW () {	1;}
}
unless(defined(&SEQUENCERUNIT)) {
    sub SEQUENCERUNIT {
	my($d) = @_;
	eval q((($d) & 0x7f));
    }
}
unless(defined(&SEQ_IS_OLD)) {
    sub SEQ_IS_OLD {
	my($d) = @_;
	eval q((($d) & 0x80));
    }
}
1;
