2006-07-02 19:47:05 +00:00
|
|
|
/* vi: set sw=4 ts=4: */
|
2002-11-03 14:05:15 +00:00
|
|
|
/*
|
2010-08-16 18:14:46 +00:00
|
|
|
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
|
2002-11-03 14:05:15 +00:00
|
|
|
*/
|
|
|
|
|
2002-09-25 02:47:48 +00:00
|
|
|
#include "libbb.h"
|
2011-09-22 10:45:14 +00:00
|
|
|
#include "bb_archive.h"
|
2002-09-25 02:47:48 +00:00
|
|
|
|
2008-06-27 02:52:20 +00:00
|
|
|
archive_handle_t* FAST_FUNC init_handle(void)
|
2002-09-25 02:47:48 +00:00
|
|
|
{
|
|
|
|
archive_handle_t *archive_handle;
|
|
|
|
|
2006-10-10 21:00:47 +00:00
|
|
|
/* Initialize default values */
|
2006-05-26 23:44:51 +00:00
|
|
|
archive_handle = xzalloc(sizeof(archive_handle_t));
|
2006-11-21 00:55:46 +00:00
|
|
|
archive_handle->file_header = xzalloc(sizeof(file_header_t));
|
2002-09-25 02:47:48 +00:00
|
|
|
archive_handle->action_header = header_skip;
|
|
|
|
archive_handle->action_data = data_skip;
|
|
|
|
archive_handle->filter = filter_accept_all;
|
2002-11-03 14:05:15 +00:00
|
|
|
archive_handle->seek = seek_by_jump;
|
2002-09-25 02:47:48 +00:00
|
|
|
|
2006-10-10 21:00:47 +00:00
|
|
|
return archive_handle;
|
2002-09-25 02:47:48 +00:00
|
|
|
}
|