summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-01-02 13:52:26 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-01-02 13:52:26 +0000
commit87ac7028e01cdc4f504ea558a6ae3d086ed1bf2b (patch)
tree4f406c877f88a013c4e1dc650ac312640a95cb00 /include
parent438803311b67c6337ea97476e97336e027ef9a3a (diff)
downloadbusybox-w32-87ac7028e01cdc4f504ea558a6ae3d086ed1bf2b.tar.gz
busybox-w32-87ac7028e01cdc4f504ea558a6ae3d086ed1bf2b.tar.bz2
busybox-w32-87ac7028e01cdc4f504ea558a6ae3d086ed1bf2b.zip
unzip applet by Laurence Anderson
----------------------------------------------------------------------
Diffstat (limited to 'include')
-rw-r--r--include/applets.h3
-rw-r--r--include/libbb.h1
-rw-r--r--include/unarchive.h2
-rw-r--r--include/usage.h13
4 files changed, 19 insertions, 0 deletions
diff --git a/include/applets.h b/include/applets.h
index ba0a9aaa9..0d310bdc3 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -470,6 +470,9 @@
470#ifdef CONFIG_UNIX2DOS 470#ifdef CONFIG_UNIX2DOS
471 APPLET(unix2dos, dos2unix_main, _BB_DIR_USR_BIN) 471 APPLET(unix2dos, dos2unix_main, _BB_DIR_USR_BIN)
472#endif 472#endif
473#ifdef CONFIG_UNZIP
474 APPLET(unzip, unzip_main, _BB_DIR_USR_BIN)
475#endif
473#ifdef CONFIG_UPDATE 476#ifdef CONFIG_UPDATE
474 APPLET(update, update_main, _BB_DIR_SBIN) 477 APPLET(update, update_main, _BB_DIR_SBIN)
475#endif 478#endif
diff --git a/include/libbb.h b/include/libbb.h
index fccdf5fdf..8dadfd958 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -215,6 +215,7 @@ extern long arith (const char *startbuf, int *errcode);
215int read_package_field(const char *package_buffer, char **field_name, char **field_value); 215int read_package_field(const char *package_buffer, char **field_name, char **field_value);
216char *fgets_str(FILE *file, const char *terminating_string); 216char *fgets_str(FILE *file, const char *terminating_string);
217 217
218extern int inflate(FILE *in, FILE *out);
218extern int unzip(FILE *l_in_file, FILE *l_out_file); 219extern int unzip(FILE *l_in_file, FILE *l_out_file);
219extern void gz_close(int gunzip_pid); 220extern void gz_close(int gunzip_pid);
220extern FILE *gz_open(FILE *compressed_file, int *pid); 221extern FILE *gz_open(FILE *compressed_file, int *pid);
diff --git a/include/unarchive.h b/include/unarchive.h
index be49f3d01..eada1c337 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -26,11 +26,13 @@ typedef struct file_headers_s {
26 mode_t mode; 26 mode_t mode;
27 time_t mtime; 27 time_t mtime;
28 dev_t device; 28 dev_t device;
29 int (*extract_func)(FILE *, FILE *);
29} file_header_t; 30} file_header_t;
30 31
31file_header_t *get_header_ar(FILE *in_file); 32file_header_t *get_header_ar(FILE *in_file);
32file_header_t *get_header_cpio(FILE *src_stream); 33file_header_t *get_header_cpio(FILE *src_stream);
33file_header_t *get_header_tar(FILE *tar_stream); 34file_header_t *get_header_tar(FILE *tar_stream);
35file_header_t *get_header_zip(FILE *zip_stream);
34 36
35void seek_sub_file(FILE *src_stream, const int count); 37void seek_sub_file(FILE *src_stream, const int count);
36 38
diff --git a/include/usage.h b/include/usage.h
index 20e2448fd..cd3af9c55 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -1851,6 +1851,19 @@
1851 "\t-u\toutput will be in UNIX format\n" \ 1851 "\t-u\toutput will be in UNIX format\n" \
1852 "\t-d\toutput will be in DOS format" 1852 "\t-d\toutput will be in DOS format"
1853 1853
1854#define unzip_trivial_usage \
1855 "[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]"
1856#define unzip_full_usage \
1857 "Extracts files from ZIP archives\n" \
1858 "Options:\n" \
1859 "\t-l\tlist archive contents (short form)\n" \
1860 "\t-n\tnever overwrite existing files (default)\n" \
1861 "\t-o\toverwrite files without prompting\n" \
1862 "\t-p\tsend output to stdout\n" \
1863 "\t-q\tbe quiet\n" \
1864 "\t-x\texclude these files\n" \
1865 "\t-d\textract files into this directory"
1866
1854#define update_trivial_usage \ 1867#define update_trivial_usage \
1855 "[options]" 1868 "[options]"
1856#define update_full_usage \ 1869#define update_full_usage \