Exemplo n.º 1
0
blargg_err_t Gzip_Extractor::open_v()
{
	// Remove .gz suffix
	size_t len = strlen( arc_path() );
	if ( fex_has_extension( arc_path(), ".gz" ) )
		len -= 3;
	
	RETURN_ERR( name.resize( len + 1 ) );
	memcpy( name.begin(), arc_path(), name.size() );
	name [name.size() - 1] = '\0';
	
	set_name( name.begin() );
	return blargg_ok;
}
Exemplo n.º 2
0
blargg_err_t File_Extractor::open_arc_file( bool unbuffered )
{
	if ( reader_ )
		return blargg_ok;
	
	FEX_FILE_READER* in = BLARGG_NEW FEX_FILE_READER;
	CHECK_ALLOC( in );
	
	blargg_err_t err = in->open( arc_path() );
	if ( err )
	{
		delete in;
	}
	else
	{
		reader_ = in;
		own_file();
		if ( unbuffered )
			make_unbuffered( in );
	}
	
	return err;
}
Exemplo n.º 3
0
blargg_err_t Binary_Extractor::open_v()
{
	set_name( arc_path() );
	set_info( arc().remain(), 0, 0 );
	return blargg_ok;
}
Exemplo n.º 4
0
blargg_err_t Binary_Extractor::open_path_v()
{
	set_name( arc_path() );
	return blargg_ok;
}