Documentation improvements, add a TODO.
diff --git a/TODO b/TODO index 8e8d4ef..cc6034d 100644 --- a/TODO +++ b/TODO
@@ -48,8 +48,7 @@ * add append-only mode writing file to disk incrementally to keep memory usage low * add zipalign mode or tool that puts uncompressed data on an offset that's a multiple of four; used on Android to speed up loading of data -* ziptool - * add support for enums +* zip_file_set_mtime: support InfoZIP time stamps * support streaming output (creating new archive to e.g. stdout) * add functions to:
diff --git a/man/zipcmp.mdoc b/man/zipcmp.mdoc index 5f60c2a..c22bff3 100644 --- a/man/zipcmp.mdoc +++ b/man/zipcmp.mdoc
@@ -1,5 +1,5 @@ .\" zipcmp.mdoc -- compare zip archives -.\" Copyright (C) 2003-2015 Dieter Baron and Thomas Klausner +.\" Copyright (C) 2003-2016 Dieter Baron and Thomas Klausner .\" .\" This file is part of libzip, a library to manipulate ZIP archives. .\" The authors can be contacted at <libzip@nih.at> @@ -29,7 +29,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 29, 2015 +.Dd January 19, 2016 .Dt ZIPCMP 1 .Os .Sh NAME @@ -78,6 +78,7 @@ and \*[Gt]1 if an error occurred. .Sh SEE ALSO .Xr zipmerge 1 , +.Xr ziptool 1 , .Xr libzip 3 .Sh AUTHORS .An -nosplit
diff --git a/man/zipmerge.mdoc b/man/zipmerge.mdoc index 60d002d..40a8cc5 100644 --- a/man/zipmerge.mdoc +++ b/man/zipmerge.mdoc
@@ -1,5 +1,5 @@ .\" zipmerge.mdoc -- merge zip archives -.\" Copyright (C) 2004-2015 Dieter Baron and Thomas Klausner +.\" Copyright (C) 2004-2016 Dieter Baron and Thomas Klausner .\" .\" This file is part of libzip, a library to manipulate ZIP archives. .\" The authors can be contacted at <libzip@nih.at> @@ -29,7 +29,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 29, 2015 +.Dd January 19, 2016 .Dt ZIPMERGE 1 .Os .Sh NAME @@ -77,6 +77,7 @@ exits 0 on success and \*[Gt]1 if an error occurred. .Sh SEE ALSO .Xr zipcmp 1 , +.Xr ziptool 1 , .Xr libzip 3 .Sh AUTHORS .An -nosplit
diff --git a/man/ziptool.mdoc b/man/ziptool.mdoc index 365210f..851f36c 100644 --- a/man/ziptool.mdoc +++ b/man/ziptool.mdoc
@@ -78,7 +78,7 @@ This command is for internal testing of .Xr libzip 3 . .It Fl n -Create archive if it doesn't exist (default). +Create archive if it doesn't exist. See also .Fl e . .It Fl r @@ -90,9 +90,9 @@ .Cm stat command). .It Fl t -Disregard current archive contents, if any. +Disregard current file contents, if any. .Em Note : -use this with care, it deletes all existing zip archive contents when +use this with care, it deletes all existing file contents when you modify the archive. .El .Ss Commands @@ -201,7 +201,8 @@ Find entry in archive with the filename .Ar name using -.Ar flags . +.Ar flags +and print its index. .It Cm rename Ar index name Rename archive entry .Ar index @@ -216,11 +217,10 @@ Set archive comment to .Ar comment . .It Cm set_extra Ar index extra_id extra_index flags value -Set extra field +Set extra field number .Ar extra_index -.Ar index of type -.Ar extra_index +.Ar extra_id for archive entry .Ar index using @@ -232,13 +232,17 @@ .Ar index to string .Ar comment . -.It Cm set_file_compression Ar index method flags +.It Cm set_file_compression Ar index method compression_flags Set file compression method for archive entry .Ar index to .Ar method using -.Ar flags . +.Ar compression_flags . +.Em Note : +Currently, +.Ar compression_flags +are ignored. .It Cm set_file_mtime Ar index timestamp Set file modification time for archive entry .Ar index @@ -247,7 +251,7 @@ .It Cm set_file_mtime_all Ar timestamp Set file modification time for all archive entries to UNIX mtime .Ar timestamp . -.It Cm set_password Ar set default password +.It Cm set_password Ar password Set default password for encryption/decryption to .Ar password . .It Cm stat Ar index @@ -258,7 +262,7 @@ Mostly useful for testing. .It Cm zin_close Ar index Close input zip_source -.Ar index +.Ar index . For internal tests only. .El .Ss Flags @@ -310,6 +314,7 @@ .Ex -std .Sh SEE ALSO .Xr zipcmp 1 , +.Xr zipmerge 1 , .Xr libzip 3 .Sh AUTHORS .An -nosplit
diff --git a/src/ziptool.c b/src/ziptool.c index 7442ceb..d23b2a4 100644 --- a/src/ziptool.c +++ b/src/ziptool.c
@@ -876,7 +876,7 @@ { "set_archive_comment", 1, "comment", "set archive comment", set_archive_comment }, { "set_extra", 5, "index extra_id extra_index flags value", "set extra field", set_extra }, { "set_file_comment", 2, "index comment", "set file comment", set_file_comment }, - { "set_file_compression", 3, "index method flags", "set file compression method", set_file_compression }, + { "set_file_compression", 3, "index method compression_flags", "set file compression method", set_file_compression }, { "set_file_mtime", 2, "index timestamp", "set file modification time", set_file_mtime }, { "set_file_mtime_all", 1, "timestamp", "set file modification time for all files", set_file_mtime_all }, { "set_password", 1, "password", "set default password for encryption", set_password }, @@ -931,7 +931,7 @@ "\t-H\twrite files with holes compactly\n" "\t-h\tdisplay this usage\n" "\t-m\tread archive into memory, and modify there; write out at end\n" - "\t-n\tcreate archive if it doesn't exist (default)\n" + "\t-n\tcreate archive if it doesn't exist\n" "\t-r\tprint raw file name encoding without translation (for stat)\n" "\t-s\tfollow file name convention strictly (for stat)\n" "\t-t\tdisregard current archive contents, if any\n");