require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&NO_BORDER)) {
    sub NO_BORDER () {	0;}
}
unless(defined(&BORDER)) {
    sub BORDER () {	1;}
}
unless(defined(&N_COLS)) {
    sub N_COLS {
	my($dconf) = @_;
	eval q((($dconf)-> ($scrdata->{ncols})));
    }
}
unless(defined(&N_ROWS)) {
    sub N_ROWS {
	my($dconf) = @_;
	eval q((($dconf)-> ($scrdata->{nrows})));
    }
}
unless(defined(&WS_NCOLS)) {
    sub WS_NCOLS {
	my($scr) = @_;
	eval q( &N_COLS(($scr)-> &scr_dconf));
    }
}
unless(defined(&WS_NROWS)) {
    sub WS_NROWS {
	my($scr) = @_;
	eval q( &N_ROWS(($scr)-> &scr_dconf));
    }
}
unless(defined(&MAXCOL)) {
    sub MAXCOL {
	my($dconf) = @_;
	eval q(( &N_COLS($dconf) - 1));
    }
}
unless(defined(&MAXROW)) {
    sub MAXROW {
	my($dconf) = @_;
	eval q(( &N_ROWS($dconf) - 1));
    }
}
unless(defined(&GETCHAR)) {
    sub GETCHAR {
	my($scr, $pos, $cellp) = @_;
	eval q(((*($scr)-> ($sc->{sc_accessops}->{getchar})) (($scr)-> ($sc->{sc_accesscookie}), ($pos) /  &N_COLS(($scr)-> &scr_dconf), ($pos) %  &N_COLS(($scr)-> &scr_dconf), $cellp)));
    }
}
unless(defined(&PUTCHAR)) {
    sub PUTCHAR {
	my($dconf, $pos, $uc, $attr) = @_;
	eval q(((*($dconf)-> ($emulops->{putchar})) (($dconf)-> &emulcookie, (($pos) /  &N_COLS($dconf)), (($pos) %  &N_COLS($dconf)), ($uc), ($attr))));
    }
}
unless(defined(&MOUSE_COPY_BUTTON)) {
    sub MOUSE_COPY_BUTTON () {	0;}
}
unless(defined(&MOUSE_PASTE_BUTTON)) {
    sub MOUSE_PASTE_BUTTON () {	1;}
}
unless(defined(&MOUSE_EXTEND_BUTTON)) {
    sub MOUSE_EXTEND_BUTTON () {	2;}
}
unless(defined(&IS_ALPHANUM)) {
    sub IS_ALPHANUM {
	my($c) = @_;
	eval q((($c) != ord(' ')));
    }
}
unless(defined(&IS_SPACE)) {
    sub IS_SPACE {
	my($c) = @_;
	eval q((($c) == ord(' ')));
    }
}
1;
