summaryrefslogtreecommitdiffhomepage
path: root/archival/libunarchive/data_extract_to_buffer.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-10-19 10:40:55 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-10-19 10:40:55 +0000
commit61b7904afdf2fca21e4d6a4f70a73d1079f8f877 (patch)
tree1043011878a4948559389074556e24940a71cfa8 /archival/libunarchive/data_extract_to_buffer.c
parentc5c1a8a112ebae29862a902e6e511b392c59da74 (diff)
Update dpkg to use new unarchive code
Diffstat (limited to 'archival/libunarchive/data_extract_to_buffer.c')
-rw-r--r--archival/libunarchive/data_extract_to_buffer.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/archival/libunarchive/data_extract_to_buffer.c b/archival/libunarchive/data_extract_to_buffer.c
new file mode 100644
index 000000000..02ee4b362
--- /dev/null
+++ b/archival/libunarchive/data_extract_to_buffer.c
@@ -0,0 +1,11 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include "unarchive.h"
+#include "libbb.h"
+
+extern void data_extract_to_buffer(archive_handle_t *archive_handle)
+{
+ archive_handle->buffer = xmalloc(archive_handle->file_header->size + 1);
+
+ xread_all(archive_handle->src_fd, archive_handle->buffer, archive_handle->file_header->size);
+}