[BusyBox-cvs] busybox/include unarchive.h,1.19,1.20

Glenn McGrath bug1 at busybox.net
Sat Nov 15 23:19:10 UTC 2003


Update of /var/cvs/busybox/include
In directory winder:/tmp/cvs-serv4579/include

Modified Files:
	unarchive.h 
Log Message:
Move from read_gz to the pipe()+fork() method.
open_transformer(), common code for pipe+fork.
Function pointer for read() no longer needed.
Allow inflate to be initialised with a specified buffer size to avoid 
over-reading.
Reset static variables in inflate_get_next_window to fix a bug where 
only the first file in a .zip would be be extracted.


Index: unarchive.h
===================================================================
RCS file: /var/cvs/busybox/include/unarchive.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- unarchive.h	29 Oct 2003 03:37:54 -0000	1.19
+++ unarchive.h	15 Nov 2003 23:19:05 -0000	1.20
@@ -50,9 +50,6 @@
 	/* Count the number of bytes processed */
 	off_t offset;
 
-	/* Function that reads data: read or read_bz */
-	ssize_t (*read)(int fd, void *buf, size_t count);
-
 	/* Function that skips data: read_by_char or read_by_skip */
 	void (*seek)(const struct archive_handle_s *archive_handle, const unsigned int amount);
 
@@ -83,7 +80,6 @@
 extern void header_verbose_list(const file_header_t *file_header);
 
 extern void check_header_gzip(int src_fd);
-extern void check_trailer_gzip(int src_fd);
 
 extern char get_header_ar(archive_handle_t *archive_handle);
 extern char get_header_cpio(archive_handle_t *archive_handle);
@@ -103,14 +99,12 @@
 extern void archive_copy_file(const archive_handle_t *archive_handle, const int dst_fd);
 extern const llist_t *find_list_entry(const llist_t *list, const char *filename);
 
-extern ssize_t read_bz2(int fd, void *buf, size_t count);
-extern void BZ2_bzReadOpen(int fd, void *unused, int nUnused);
-extern void BZ2_bzReadClose(void);
-extern unsigned char uncompressStream(int src_fd, int dst_fd);
+extern int uncompressStream(int src_fd, int dst_fd);
+extern void inflate_init(unsigned int bufsize);
+extern int inflate_unzip(int in, int out);
+extern int inflate_gunzip(int in, int out);
+
+extern int open_transformer(int src_fd, int (*transformer)(int src_fd, int dst_fd));
 
-extern ssize_t read_gz(int fd, void *buf, size_t count);
-extern void GZ_gzReadOpen(int fd, void *unused, int nUnused);
-extern void GZ_gzReadClose(void);
-extern int inflate(int in, int out);
 
 #endif




More information about the busybox-cvs mailing list