%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/perl5/site_perl/mach/5.32/sys/
Upload File :
Create Path :
Current File : //usr/local/lib/perl5/site_perl/mach/5.32/sys/bitstring.ph

require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_BITSTRING_H_)) {
    eval 'sub _SYS_BITSTRING_H_ () {1;}' unless defined(&_SYS_BITSTRING_H_);
    if(defined(&_KERNEL)) {
	require 'sys/libkern.ph';
	require 'sys/malloc.ph';
    }
    require 'sys/types.ph';
    eval 'sub _BITSTR_MASK () {(~0);}' unless defined(&_BITSTR_MASK);
    eval 'sub _BITSTR_BITS () {($sizeof{ &bitstr_t} * 8);}' unless defined(&_BITSTR_BITS);
    if(defined(&roundup2)) {
	eval 'sub _bit_roundup2 () { &roundup2;}' unless defined(&_bit_roundup2);
    } else {
	eval 'sub _bit_roundup2 {
	    my($x, $y) = @_;
    	    eval q(((($x)+(($y)-1))(~(($y)-1))));
	}' unless defined(&_bit_roundup2);
    }
    eval 'sub _bit_make_mask {
        my($_start,$_stop) = @_;
	    eval q({ (( &_BITSTR_MASK <<  &_bit_offset($_start)) & ( &_BITSTR_MASK >> ( &_BITSTR_BITS -  &_bit_offset($_stop) - 1))); });
    }' unless defined(&_bit_make_mask);
    eval 'sub bitstr_size {
        my($_nbits) = @_;
	    eval q(( &_bit_roundup2($_nbits,  &_BITSTR_BITS) / 8));
    }' unless defined(&bitstr_size);
    if(defined(&_KERNEL)) {
	eval 'sub bit_alloc {
	    my($_nbits,$type,$flags) = @_;
    	    eval q({ (( &bitstr_t *) &malloc( &bitstr_size($_nbits), $type, $flags |  &M_ZERO)); });
	}' unless defined(&bit_alloc);
    } else {
	eval 'sub bit_alloc {
	    my($_nbits) = @_;
    	    eval q({ (( &bitstr_t *) &calloc( &bitstr_size($_nbits), 1)); });
	}' unless defined(&bit_alloc);
    }
    eval 'sub bit_decl {
        my($name, $nbits) = @_;
	    eval q((($name)[ &bitstr_size($nbits) / $sizeof{ &bitstr_t}]));
    }' unless defined(&bit_decl);
}
1;

Zerion Mini Shell 1.0