aboutsummaryrefslogtreecommitdiff
path: root/archival/unzip.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* unzip: survive lack of CDF on non-streaming zip filesDenys Vlasenko2013-07-211-16/+39
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: increase PEEK_FROM_END from 16k to 64kDenys Vlasenko2013-07-201-1/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: add missing fflush; code shrinkDenys Vlasenko2013-01-221-8/+11
| | | | | | | | function old new delta my_fgets80 - 41 +41 unzip_main 2291 2242 -49 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: reuse more stringsDenys Vlasenko2013-01-221-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tweak help textDenys Vlasenko2012-06-191-6/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: make options parsing more robust on getopt w/o gnu extensionsDenys Vlasenko2012-06-151-67/+70
| | | | | | | | | | | | | Also, code shrank: function old new delta static.extn 15 10 -5 packed_usage 29231 29217 -14 unzip_main 2388 2291 -97 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-116) Total: -116 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: ignore chmod errorsNatanael Copa2012-05-281-1/+1
| | | | | | | | This makes unzip to FAT filesystems not exit with error. This is similar to how the "normal" unzip works. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* update seamless uncompression codeDenys Vlasenko2012-03-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes "tar tf hello_world.txz" work without adding special-casing for ".txz" extension. It also removes ever-growing magic checking code in rpm2cpio and get_header_tar - we reuse one which lives in setup_unzip_on_fd. function old new delta unpack_gz_stream 7 566 +559 check_signature16 - 70 +70 setup_unzip_on_fd 99 142 +43 handle_SIGCHLD - 41 +41 unpack_bz2_stream 342 376 +34 unzip_main 2352 2385 +33 bbunpack 503 533 +30 open_transformer 74 102 +28 unpack_Z_stream 1278 1304 +26 unpack_gunzip 101 123 +22 init_transformer_aux_data - 18 +18 unpack_xz_stream 2388 2402 +14 open_zipped 131 141 +10 rpm_main 1358 1363 +5 get_header_tar_lzma 52 57 +5 get_header_tar_bz2 52 57 +5 unpack_lzma_stream 2698 2702 +4 hash_find 234 233 -1 get_header_tar 1759 1733 -26 get_header_tar_gz 92 57 -35 unpack_uncompress 51 12 -39 rpm2cpio_main 201 147 -54 unpack_unxz 67 12 -55 unpack_bz2_stream_prime 55 - -55 get_header_tar_Z 86 - -86 unpack_gz_stream_with_info 539 - -539 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 14/6 up/down: 947/-890) Total: 57 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rename archive.h to bb_archive.h. no code changesDenys Vlasenko2011-09-221-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: fflush stdout before reading interative y/n answer from stdinDenys Vlasenko2011-09-091-2/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move help text from include/usage.src.h to archival/*.cPere Orga2011-03-271-0/+13
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rename archival/libunarchive -> archival/libarchive; move bz/ into itDenys Vlasenko2010-11-031-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: mass cosmetic removal of extra empty lines. no code changesDenys Vlasenko2010-07-261-1/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Improve unzip's handling of stream ZIP filesDan Fandrich2010-06-181-4/+9
| | | | | | | | | | | Search harder for the ZIP magic numbers at the end of a file by checking 16 KiB from the end instead of just 1 KiB. ZIP files with long comments (such as certain cryptographically signed files) or those sitting in a wrapper could have more than 1 KiB of data after the magic numbers, so they couldn't be read. Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: another small code shrinkDenys Vlasenko2010-05-241-2/+2
| | | | | | | function old new delta find_cdf_offset 173 160 -13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: tiny code shrink -2 bytesDenys Vlasenko2010-05-241-5/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: restore unix file mode if possible. closes bug 1045Denys Vlasenko2010-05-241-55/+88
| | | | | | | | | function old new delta unzip_main 2197 2188 -9 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/1 up/down: 173/-182) Total: -9 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: more compat if DESKTOP=yDenys Vlasenko2009-09-061-29/+118
| | | | | | | | | | | | function old new delta DESKTOP off: unzip_main 1648 1629 -19 DESKTOP=y: unzip_main 1939 2197 +258 Without this, midnight commander can't display .zip files Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: try lseek before resorting to readingStefani Seibold2009-07-251-1/+2
| | | | | | | function old new delta unzip_skip 16 43 +27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: fix thinko with le/be conv and size (closes bug 129)Denis Vlasenko2009-02-261-1/+1
| | | | | awk: make "struct global" hack more robust wrt alignment (closes bug 131)
* unzip: handle "central directory"Denis Vlasenko2008-09-211-47/+196
| | | | | | | | | | | | | needed for OpenOffice, gmail attachment .zips etc conditional on CONFIG_DESKTOP function old new delta unzip_main 1643 1939 +296 find_cds_offset - 173 +173 unzip_skip 11 16 +5 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/0 up/down: 474/0) Total: 474 bytes
* unzip: move check for unsupported zip features to better placeDenis Vlasenko2008-07-261-15/+17
|
* unzip: give better error message when presented with unsupportedDenis Vlasenko2008-07-261-0/+6
| | | | | | zip file. Add zip documentation and an example of file we cant (yet) unpack.
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-5/+5
|
* style fixes, no code changesDenis Vlasenko2008-06-261-3/+3
|
* nameif: extended matching (Nico Erfurth <masta@perlgolf.de>)Denis Vlasenko2007-12-241-1/+1
| | | | | | | | | | | | *: whitespace fixes function old new delta prepend_new_eth_table - 304 +304 nameif_main 620 684 +64 cc_macaddr 51 - -51 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 1/0 up/down: 368/-51) Total: 317 bytes
* unzip: hmm... gcc doesn't like ATTRIBUTE_PACKED?? Document that...Denis Vlasenko2007-11-061-1/+1
|
* telnetd: fix problem with zombies (by Paul Fox <pgf@brightstareng.com>)Denis Vlasenko2007-11-061-1/+1
| | | | | syslogd: strip trailing NULs
* change safety check on zip header to allow for extra length, andPaul Fox2007-11-051-3/+11
| | | | | | revert the header read to use the correct constant rather than sizeof. at least one version of gcc (armv4-linux-gcc-3.4.1) pads the struct to 28 bytes in spite of the packing.
* unzip: add a comment explaining why we don't dieDenis Vlasenko2007-10-191-0/+2
|
* unzip: fix endianness bugsDenis Vlasenko2007-10-181-100/+113
|
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* printf("%s\n") -> puts()Denis Vlasenko2007-10-011-9/+9
|
* overload the existing '-q' flag so that if '-l' and '-q' are usedPaul Fox2007-09-071-11/+19
| | | | | together, a "short form" listing (just pathnames) is generated. change a few flag variables to "smallint" as well.
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* unzip: fix xstrndup bug (xstrndup(s,n) can allocate less than n bytes!)Denis Vlasenko2007-03-311-2/+3
|
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* do not expose internal state of [g]zip unpacker.Denis Vlasenko2007-01-051-5/+5
| | | | fix memory leak in inflate_gunzip.
* extern variable declaration in a .c file is heresy - fixing itDenis Vlasenko2007-01-031-3/+0
|
* style fixesDenis Vlasenko2006-12-261-2/+2
| | | | last xcalloc replaced by xzalloc
* tar et al: die if bb_copyfd_size copies less than asked for.Denis Vlasenko2006-12-221-15/+8
| | | | (we have bb_copyfd_exact_size now for that kind of usage)
* inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]Denis Vlasenko2006-12-161-2/+1
|
* last nail into error_msg() (de)capitalizationDenis Vlasenko2006-10-271-8/+8
|
* correct largefile support, add comments about it.Denis Vlasenko2006-10-081-3/+2
|
* attempt to regularize atoi mess.Denis Vlasenko2006-10-081-5/+6
|
* silly switch style fixDenis Vlasenko2006-09-271-2/+2
|
* - convert a few xopen3(,,0) into xopen(,). Also peruse the fact that xopen ↵Bernhard Reutner-Fischer2006-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | defaults to 0777 on it's own, so we don't need to xopen3(,,0777). Saves a few bytes: $ size busybox.old busybox text data bss dec hex filename 839676 8780 243592 1092048 10a9d0 busybox.old 839660 8780 243592 1092032 10a9c0 busybox $ make CC=gcc-4.2-HEAD bloatcheck function old new delta static.vconfig_main 281 279 -2 static.rx_main 1076 1074 -2 static.mt_main 294 292 -2 static.gzip_main 753 751 -2 static.mkfs_minix_main 4034 4030 -4 static.unzip_main 1771 1766 -5 static.crontab_main 1513 1507 -6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-23) Total: -23 bytes
* archival: added O_TRUNC so that when we overwrite files on unpack,Denis Vlasenko2006-09-031-1/+1
| | | | | | we truncate them. Also spotted & fixed hard to trigger bug with extension handling.