blob: 96bb1dbc97ba3d504697ac22267cfe2589138362 [file] [log] [blame]
"Robert P. J. Day"63fc1a92006-07-02 19:47:05 +00001/* vi: set sw=4 ts=4: */
Glenn L McGrath237ae422002-11-03 14:05:15 +00002/*
"Robert P. J. Day"801ab142006-07-12 07:56:04 +00003 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
Glenn L McGrath237ae422002-11-03 14:05:15 +00004 */
5
6#include <unistd.h>
Glenn L McGrath7ca04f32002-09-25 02:47:48 +00007#include <string.h>
8#include "libbb.h"
9#include "unarchive.h"
10
11archive_handle_t *init_handle(void)
12{
13 archive_handle_t *archive_handle;
14
15 /* Initialise default values */
Rob Landley8bb50782006-05-26 23:44:51 +000016 archive_handle = xzalloc(sizeof(archive_handle_t));
Glenn L McGrath7ca04f32002-09-25 02:47:48 +000017 archive_handle->file_header = xmalloc(sizeof(file_header_t));
18 archive_handle->action_header = header_skip;
19 archive_handle->action_data = data_skip;
20 archive_handle->filter = filter_accept_all;
Glenn L McGrath237ae422002-11-03 14:05:15 +000021 archive_handle->seek = seek_by_jump;
Glenn L McGrath7ca04f32002-09-25 02:47:48 +000022
23 return(archive_handle);
24}