diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-16 13:20:56 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-16 13:20:56 +0000 |
commit | 3718832a1542f7bf786a1678741b8566ad3a35c6 (patch) | |
tree | ac5851de53237fb3a0c77c9cead27acd279897f0 /include | |
parent | 1e18f1bab3400246129756a35bb5752ba98f4c90 (diff) | |
download | busybox-w32-3718832a1542f7bf786a1678741b8566ad3a35c6.tar.gz busybox-w32-3718832a1542f7bf786a1678741b8566ad3a35c6.tar.bz2 busybox-w32-3718832a1542f7bf786a1678741b8566ad3a35c6.zip |
*: more readable handling of pipe fds. No code changes.
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); | |||
294 | int xopen3(const char *pathname, int flags, int mode); | 294 | int xopen3(const char *pathname, int flags, int mode); |
295 | int open_or_warn(const char *pathname, int flags); | 295 | int open_or_warn(const char *pathname, int flags); |
296 | int open3_or_warn(const char *pathname, int flags, int mode); | 296 | int open3_or_warn(const char *pathname, int flags, int mode); |
297 | void xpipe(int filedes[2]); | ||
298 | off_t xlseek(int fd, off_t offset, int whence); | 297 | off_t xlseek(int fd, off_t offset, int whence); |
299 | off_t fdlength(int fd); | 298 | off_t fdlength(int fd); |
300 | 299 | ||
300 | void xpipe(int filedes[2]); | ||
301 | /* In this form code with pipes is much more readable */ | ||
302 | struct fd_pair { int rd; int wr; }; | ||
303 | #define piped_pair(pair) pipe(&((pair).rd)) | ||
304 | #define xpiped_pair(pair) xpipe(&((pair).rd)) | ||
305 | |||
301 | /* Useful for having small structure members/global variables */ | 306 | /* Useful for having small structure members/global variables */ |
302 | typedef int8_t socktype_t; | 307 | typedef int8_t socktype_t; |
303 | typedef int8_t family_t; | 308 | 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); | |||
92 | extern char get_header_tar_lzma(archive_handle_t *archive_handle); | 92 | extern char get_header_tar_lzma(archive_handle_t *archive_handle); |
93 | extern char get_header_tar_gz(archive_handle_t *archive_handle); | 93 | extern char get_header_tar_gz(archive_handle_t *archive_handle); |
94 | 94 | ||
95 | extern void seek_by_jump(const archive_handle_t *archive_handle, const unsigned amount); | 95 | extern void seek_by_jump(const archive_handle_t *archive_handle, unsigned amount); |
96 | extern void seek_by_read(const archive_handle_t *archive_handle, const unsigned amount); | 96 | extern void seek_by_read(const archive_handle_t *archive_handle, unsigned amount); |
97 | 97 | ||
98 | extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count); | 98 | extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count); |
99 | 99 | ||