summaryrefslogtreecommitdiffstats
path: root/usr.bin/unzip/unzip.c
Commit message (Collapse)AuthorAgeFilesLines
* fgets(3) returns a pointer, so compare against NULL, not integer 0.kevlo2012-01-131-1/+1
|
* Reencode files from latin1 to UTF-8.uqs2011-12-301-1/+1
| | | | | | | This makes a tiny percentage of entries in calendars ugly for latin1 users, but fixes them for UTF-8 users. This badly needs a solution involving locale-dependent re-encoding.
* Make it possible to read input from stdin.glebius2010-10-211-2/+4
| | | | | | Without this change I don't see a way to unpack a multivolume archive without wasting disk space for a temporary file.
* Check return value from archive_read_new().delphij2010-06-091-1/+3
| | | | | | | Found with: Coverity Prevent(tm) CID: 8462 Reviewed by: des MFC after: 1 week
* Implement the rename query, for when a file with the same name as the onegavin2010-02-161-17/+69
| | | | | | | | | | | | | | | | | | about to be extracted already exists. The question, and interpretation of the response is deliberately compatible with Info-Zip. This change was originally obtained from NetBSD, but has three changes: - better compatibility with Info-Zip in the handling of ^D - Use getdelim() rather than getline() - bug fix: != changed to == in the "file rename" code I suspect the latter is also a bug in NetBSD, but I can't easily confirm this. PR: bin/143307 Reviewed by: rdivacky (change to unzip.c only) Obtained from: NetBSD src/usr.bin/unzip/unzip.c 1.8 MFC after: 1 month
* When restoring files, use the mode for the mode.kientzle2010-01-061-2/+2
| | | | Thanks to: Jun Kuriyama for pointing this out
* Don't print the archive name with -p and -q options.jh2009-12-221-1/+2
| | | | | PR: bin/141280 Approved by: des, trasz (mentor)
* Add C/c/f/p/v switches plus a bunch of minor fixes and cleanups.rdivacky2009-09-081-36/+230
| | | | | | Obtained from: NetBSD Approved by: des (maintainer) Approved by: ed (mentor, implicit)
* Quick shot at implementing -t (test).des2008-06-301-4/+42
| | | | | Requested by: ache MFC after: 2 weeks
* Welcome unzip(1), a pure BSD drop-in replacement for ports/unzip. In itsdes2008-01-081-0/+756
current state, it can handle all but four of the 991 zip files (including jar files) I was able to identify in the ports tree. The remaining four are two self-extracting archives and two which have garbage preceding the first local header. This limitation is a feature of libarchive(3) which I am currently working to resolve. The code is unnecessarily large due to the need to emulate the exact command-line syntax and behaviour of ports/unzip. My initial incompatible implementation was one quarter the size of the one I am committing here.
OpenPOWER on IntegriCloud