diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 7 | ||||
-rw-r--r-- | include/unarchive.h | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h index 3175c8e7f..f505cc718 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -294,10 +294,15 @@ int xopen(const char *pathname, int flags); int xopen3(const char *pathname, int flags, int mode); int open_or_warn(const char *pathname, int flags); int open3_or_warn(const char *pathname, int flags, int mode); -void xpipe(int filedes[2]); off_t xlseek(int fd, off_t offset, int whence); off_t fdlength(int fd); +void xpipe(int filedes[2]); +/* In this form code with pipes is much more readable */ +struct fd_pair { int rd; int wr; }; +#define piped_pair(pair) pipe(&((pair).rd)) +#define xpiped_pair(pair) xpipe(&((pair).rd)) + /* Useful for having small structure members/global variables */ typedef int8_t socktype_t; typedef int8_t family_t; diff --git a/include/unarchive.h b/include/unarchive.h index 8b76217b4..bfd6488db 100644 --- a/include/unarchive.h +++ b/include/unarchive.h @@ -92,8 +92,8 @@ extern char get_header_tar_bz2(archive_handle_t *archive_handle); extern char get_header_tar_lzma(archive_handle_t *archive_handle); extern char get_header_tar_gz(archive_handle_t *archive_handle); -extern void seek_by_jump(const archive_handle_t *archive_handle, const unsigned amount); -extern void seek_by_read(const archive_handle_t *archive_handle, const unsigned amount); +extern void seek_by_jump(const archive_handle_t *archive_handle, unsigned amount); +extern void seek_by_read(const archive_handle_t *archive_handle, unsigned amount); extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count); |