Glenn L McGrath | 237ae42 | 2002-11-03 14:05:15 +0000 | [diff] [blame] | 1 | /* |
Rob Landley | 1ec5b29 | 2006-05-29 07:42:02 +0000 | [diff] [blame] | 2 | * Copyright 2002 Glenn McGrath |
Glenn L McGrath | 237ae42 | 2002-11-03 14:05:15 +0000 | [diff] [blame] | 3 | * |
Rob Landley | 1ec5b29 | 2006-05-29 07:42:02 +0000 | [diff] [blame] | 4 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
Glenn L McGrath | 237ae42 | 2002-11-03 14:05:15 +0000 | [diff] [blame] | 5 | */ |
6 | |||||
Glenn L McGrath | 61b7904 | 2002-10-19 10:40:55 +0000 | [diff] [blame] | 7 | #include "libbb.h" |
Glenn L McGrath | 237ae42 | 2002-11-03 14:05:15 +0000 | [diff] [blame] | 8 | #include "unarchive.h" |
Glenn L McGrath | 61b7904 | 2002-10-19 10:40:55 +0000 | [diff] [blame] | 9 | |
Rob Landley | dfba741 | 2006-03-06 20:47:33 +0000 | [diff] [blame] | 10 | void data_extract_to_buffer(archive_handle_t *archive_handle) |
Glenn L McGrath | 61b7904 | 2002-10-19 10:40:55 +0000 | [diff] [blame] | 11 | { |
Glenn L McGrath | ea12202 | 2002-11-06 22:31:45 +0000 | [diff] [blame] | 12 | const unsigned int size = archive_handle->file_header->size; |
Glenn L McGrath | 237ae42 | 2002-11-03 14:05:15 +0000 | [diff] [blame] | 13 | |
Rob Landley | 1ec5b29 | 2006-05-29 07:42:02 +0000 | [diff] [blame] | 14 | archive_handle->buffer = xzalloc(size + 1); |
Glenn L McGrath | ea12202 | 2002-11-06 22:31:45 +0000 | [diff] [blame] | 15 | |
16 | archive_xread_all(archive_handle, archive_handle->buffer, size); | ||||
Glenn L McGrath | 61b7904 | 2002-10-19 10:40:55 +0000 | [diff] [blame] | 17 | } |