diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2002-09-25 02:47:48 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2002-09-25 02:47:48 +0000 |
commit | 7ca04f328e22fcbee4659d73f9a72dfdf1dd6a23 (patch) | |
tree | f38c7ef4317eea28c6abdb0adbbb286fe041711e /include/libbb.h | |
parent | ecfa290cfd4953598e6d91989bd66ac16e135f84 (diff) | |
download | busybox-w32-7ca04f328e22fcbee4659d73f9a72dfdf1dd6a23.tar.gz busybox-w32-7ca04f328e22fcbee4659d73f9a72dfdf1dd6a23.tar.bz2 busybox-w32-7ca04f328e22fcbee4659d73f9a72dfdf1dd6a23.zip |
New common unarchive code.
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/include/libbb.h b/include/libbb.h index 6ab942bd8..bd0d1e942 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -48,10 +48,6 @@ | |||
48 | # include "sha1.h" | 48 | # include "sha1.h" |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | /* Compatability with ANSI C */ | ||
52 | #ifndef inline | ||
53 | # define inline | ||
54 | #endif | ||
55 | 51 | ||
56 | #if (__GNU_LIBRARY__ < 5) && (!defined __dietlibc__) | 52 | #if (__GNU_LIBRARY__ < 5) && (!defined __dietlibc__) |
57 | /* libc5 doesn't define socklen_t */ | 53 | /* libc5 doesn't define socklen_t */ |
@@ -74,6 +70,9 @@ char *strtok_r(char *s, const char *delim, char **ptrptr); | |||
74 | #define BUF_SIZE 8192 | 70 | #define BUF_SIZE 8192 |
75 | #define EXPAND_ALLOC 1024 | 71 | #define EXPAND_ALLOC 1024 |
76 | 72 | ||
73 | static inline int is_decimal(int ch) { return ((ch >= '0') && (ch <= '9')); } | ||
74 | static inline int is_octal(int ch) { return ((ch >= '0') && (ch <= '7')); } | ||
75 | |||
77 | /* Macros for min/max. */ | 76 | /* Macros for min/max. */ |
78 | #ifndef MIN | 77 | #ifndef MIN |
79 | #define MIN(a,b) (((a)<(b))?(a):(b)) | 78 | #define MIN(a,b) (((a)<(b))?(a):(b)) |
@@ -83,8 +82,6 @@ char *strtok_r(char *s, const char *delim, char **ptrptr); | |||
83 | #define MAX(a,b) (((a)>(b))?(a):(b)) | 82 | #define MAX(a,b) (((a)>(b))?(a):(b)) |
84 | #endif | 83 | #endif |
85 | 84 | ||
86 | |||
87 | |||
88 | extern void show_usage(void) __attribute__ ((noreturn)); | 85 | extern void show_usage(void) __attribute__ ((noreturn)); |
89 | extern void error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); | 86 | extern void error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
90 | extern void error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); | 87 | extern void error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); |
@@ -228,10 +225,7 @@ extern long arith (const char *startbuf, int *errcode); | |||
228 | int read_package_field(const char *package_buffer, char **field_name, char **field_value); | 225 | int read_package_field(const char *package_buffer, char **field_name, char **field_value); |
229 | char *fgets_str(FILE *file, const char *terminating_string); | 226 | char *fgets_str(FILE *file, const char *terminating_string); |
230 | 227 | ||
231 | extern int inflate(FILE *in, FILE *out); | 228 | extern int inflate(int in, int out); |
232 | extern int unzip(FILE *l_in_file, FILE *l_out_file); | ||
233 | extern void gz_close(int gunzip_pid); | ||
234 | extern FILE *gz_open(FILE *compressed_file, int *pid); | ||
235 | 229 | ||
236 | extern struct hostent *xgethostbyname(const char *name); | 230 | extern struct hostent *xgethostbyname(const char *name); |
237 | extern struct hostent *xgethostbyname2(const char *name, int af); | 231 | extern struct hostent *xgethostbyname2(const char *name, int af); |
@@ -335,4 +329,11 @@ extern char *pw_encrypt(const char *clear, const char *salt); | |||
335 | extern struct spwd *pwd_to_spwd(const struct passwd *pw); | 329 | extern struct spwd *pwd_to_spwd(const struct passwd *pw); |
336 | extern int obscure(const char *old, const char *newval, const struct passwd *pwdp); | 330 | extern int obscure(const char *old, const char *newval, const struct passwd *pwdp); |
337 | 331 | ||
332 | //extern int xopen(const char *pathname, int flags, mode_t mode); | ||
333 | extern int xopen(const char *pathname, int flags); | ||
334 | extern ssize_t xread(int fd, void *buf, size_t count); | ||
335 | extern ssize_t xread_all_eof(int fd, void *buf, size_t count); | ||
336 | extern void xread_all(int fd, void *buf, size_t count); | ||
337 | extern unsigned char xread_char(int fd); | ||
338 | |||
338 | #endif /* __LIBCONFIG_H__ */ | 339 | #endif /* __LIBCONFIG_H__ */ |