[BusyBox-cvs] busybox/include libbb.h, 1.121, 1.122 unarchive.h, 1.21, 1.22

Glenn McGrath bug1 at busybox.net
Fri Nov 21 22:24:57 UTC 2003


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

Modified Files:
	libbb.h unarchive.h 
Log Message:
As we no longer use function pointers for read in common archiving code 
archive_xread can be replaced with bb_full_read, and archive_copy_file 
with bb_copyfd*
bb_copyfd is split into two functions bb_copyfd_size and bb_copyfd_eof, 
they share a common backend.


Index: libbb.h
===================================================================
RCS file: /var/cvs/busybox/include/libbb.h,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- libbb.h	20 Nov 2003 21:30:54 -0000	1.121
+++ libbb.h	21 Nov 2003 22:24:53 -0000	1.122
@@ -136,7 +136,8 @@
 extern char *find_real_root_device_name(const char* name);
 extern char *bb_get_line_from_file(FILE *file);
 extern char *bb_get_chomped_line_from_file(FILE *file);
-extern int   bb_copyfd(int fd1, int fd2, const off_t chunksize);
+extern int bb_copyfd_size(int fd1, int fd2, const off_t size);
+extern int bb_copyfd_eof(int fd1, int fd2);
 extern void  bb_xprint_and_close_file(FILE *file);
 extern int   bb_xprint_file_by_name(const char *filename);
 extern char  bb_process_escape_sequence(const char **ptr);
@@ -480,6 +481,6 @@
 #define HASH_SHA1	1
 #define HASH_MD5	2
 extern int hash_fd(int fd, const size_t size, const uint8_t hash_algo, uint8_t *hashval);
-
+extern size_t bb_full_fd_action(int src_fd, int dst_fd, const size_t size, ssize_t (*action)(int fd, const void *, size_t));
 
 #endif /* __LIBCONFIG_H__ */

Index: unarchive.h
===================================================================
RCS file: /var/cvs/busybox/include/unarchive.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- unarchive.h	20 Nov 2003 22:36:57 -0000	1.21
+++ unarchive.h	21 Nov 2003 22:24:53 -0000	1.22
@@ -90,12 +90,10 @@
 extern void seek_by_jump(const archive_handle_t *archive_handle, const unsigned int amount);
 extern void seek_by_char(const archive_handle_t *archive_handle, const unsigned int amount);
 
-extern ssize_t archive_xread(const archive_handle_t *archive_handle, unsigned char *buf, const size_t count);
 extern void archive_xread_all(const archive_handle_t *archive_handle, void *buf, const size_t count);
 extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count);
 
 extern void data_align(archive_handle_t *archive_handle, const unsigned short boundary);
-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 int uncompressStream(int src_fd, int dst_fd);




More information about the busybox-cvs mailing list