init_handle.c 577 B

12345678910111213141516171819202122
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  4. */
  5. #include "libbb.h"
  6. #include "archive.h"
  7. archive_handle_t* FAST_FUNC init_handle(void)
  8. {
  9. archive_handle_t *archive_handle;
  10. /* Initialize default values */
  11. archive_handle = xzalloc(sizeof(archive_handle_t));
  12. archive_handle->file_header = xzalloc(sizeof(file_header_t));
  13. archive_handle->action_header = header_skip;
  14. archive_handle->action_data = data_skip;
  15. archive_handle->filter = filter_accept_all;
  16. archive_handle->seek = seek_by_jump;
  17. return archive_handle;
  18. }