require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_READLINE_H_)) {
    eval 'sub _READLINE_H_ () {1;}' unless defined(&_READLINE_H_);
    require 'sys/types.ph';
    require 'stdio.ph';
    eval 'sub ISFUNC () {0;}' unless defined(&ISFUNC);
    eval 'sub ISKMAP () {1;}' unless defined(&ISKMAP);
    eval 'sub ISMACR () {2;}' unless defined(&ISMACR);
    eval 'sub KEYMAP_SIZE () {256;}' unless defined(&KEYMAP_SIZE);
    eval 'sub control_character_threshold () {0x20;}' unless defined(&control_character_threshold);
    eval 'sub control_character_bit () {0x40;}' unless defined(&control_character_bit);
    unless(defined(&CTRL)) {
	require 'sys/ioctl.ph';
	if(!defined(&__sun)  && !defined(&__hpux)  && !defined(&_AIX)) {
	    require 'sys/ttydefaults.ph';
	}
	unless(defined(&CTRL)) {
	    eval 'sub CTRL {
	        my($c) = @_;
    		eval q((($c) & 037));
	    }' unless defined(&CTRL);
	}
    }
    unless(defined(&UNCTRL)) {
	eval 'sub UNCTRL {
	    my($c) = @_;
    	    eval q(((($c) - ord(\'a\' + \'A\'))| &control_character_bit));
	}' unless defined(&UNCTRL);
    }
    eval 'sub RUBOUT () {0x7f;}' unless defined(&RUBOUT);
    eval 'sub ABORT_CHAR () { &CTRL(ord(\'G\'));}' unless defined(&ABORT_CHAR);
    eval 'sub RL_READLINE_VERSION () {0x402;}' unless defined(&RL_READLINE_VERSION);
    eval 'sub RL_PROMPT_START_IGNORE () {ord(\'\\1\');}' unless defined(&RL_PROMPT_START_IGNORE);
    eval 'sub RL_PROMPT_END_IGNORE () {ord(\'\\2\');}' unless defined(&RL_PROMPT_END_IGNORE);
    if(defined(&__cplusplus)) {
    }
    if(defined(&__cplusplus)) {
    }
}
1;
