require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_PROPLIB_PROP_INGEST_H_)) {
    eval 'sub _PROPLIB_PROP_INGEST_H_ () {1;}' unless defined(&_PROPLIB_PROP_INGEST_H_);
    require 'prop/prop_dictionary.ph';
    eval("sub PROP_INGEST_ERROR_NO_ERROR () { 0; }") unless defined(&PROP_INGEST_ERROR_NO_ERROR);
    eval("sub PROP_INGEST_ERROR_NO_KEY () { 1; }") unless defined(&PROP_INGEST_ERROR_NO_KEY);
    eval("sub PROP_INGEST_ERROR_WRONG_TYPE () { 2; }") unless defined(&PROP_INGEST_ERROR_WRONG_TYPE);
    eval("sub PROP_INGEST_ERROR_HANDLER_FAILED () { 3; }") unless defined(&PROP_INGEST_ERROR_HANDLER_FAILED);
    eval("sub PROP_INGEST_FLAG_OPTIONAL () { 0x01; }") unless defined(&PROP_INGEST_FLAG_OPTIONAL);
    eval 'sub PROP_INGEST {
        my($key_, $type_, $handler_) = @_;
	    eval q({ . &pite_key = $key_ , . &pite_type = $type_ , . &pite_flags = 0, . &pite_handler = $handler_ });
    }' unless defined(&PROP_INGEST);
    eval 'sub PROP_INGEST_OPTIONAL {
        my($key_, $type_, $handler_) = @_;
	    eval q({ . &pite_key = $key_ , . &pite_type = $type_ , . &pite_flags =  &PROP_INGEST_FLAG_OPTIONAL , . &pite_handler = $handler_ });
    }' unless defined(&PROP_INGEST_OPTIONAL);
    eval 'sub PROP_INGEST_END () {{ . &pite_key =  &NULL };}' unless defined(&PROP_INGEST_END);
}
1;
