regen (with mandoc-1.12.2)
diff --git a/man/libzip.man b/man/libzip.man index e4b6abf..9372046 100644 --- a/man/libzip.man +++ b/man/libzip.man
@@ -1,43 +1,15 @@ -.\" libzip.mdoc \-- general overview of available functions -.\" Copyright (C) 2005-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH LIBZIP 3 "June 23, 2012" NiH +.TH "LIBZIP" "3" "June 23, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -libzip \- library for manipulating zip archives +\fBlibzip\fR +\- library for manipulating zip archives .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> +\fB#include <zip.h>\fR .SH "DESCRIPTION" -.B libzip +\fBlibzip\fR is a library for reading, creating, and modifying zip archives. .PP Below there are two sections listing functions: one for how to read @@ -110,7 +82,6 @@ zip_error_get_sys_type(3) zip_errors(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_add.man b/man/zip_add.man index 9d417ac..5e49ecf 100644 --- a/man/zip_add.man +++ b/man/zip_add.man
@@ -1,75 +1,46 @@ -.\" zip_add.mdoc \-- add files to zip archive -.\" Copyright (C) 2004-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_ADD 3 "October 6, 2012" NiH +.TH "ZIP_ADD" "3" "October 6, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_add , \- .Nm zip_replace -add file to zip archive or replace file in zip archive +\fBzip_add\fR, +\fBzip_replace\fR +\- add file to zip archive or replace file in zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -zip_int64_t -zip_add(struct zip *archive, const char *name); \ -"struct zip_source *source" -.PP -int -zip_replace(struct zip *archive, zip_uint64_t index); \ -"struct zip_source *source" +\fB#include <zip.h>\fR +.sp +\fIzip_int64_t\fR +.br +\fBzip_add\fR(\fIstruct zip *archive\fR,\ \fIconst char *name\fR,\ \fIstruct zip_source *source\fR); +.sp +\fIint\fR +.br +\fBzip_replace\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIstruct zip_source *source\fR); .SH "DESCRIPTION" The function -zip_add +\fBzip_add\fR() is the obsolete version of zip_file_add(3). It is the same as calling zip_file_add(3) with an empty -\fBflags\fR +\fIflags\fR argument. Similarly, the -zip_replace +\fBzip_replace\fR() function is the obsolete version of zip_file_replace(3). It is the same as calling zip_file_replace(3) with an empty -\fBflags\fR +\fIflags\fR argument. .SH "SEE ALSO" libzip(3), zip_file_add(3), zip_file_replace(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_add_dir.man b/man/zip_add_dir.man index 3e492cc..283cb83 100644 --- a/man/zip_add_dir.man +++ b/man/zip_add_dir.man
@@ -1,47 +1,20 @@ -.\" zip_add_dir.mdoc \-- add directory to zip archive -.\" Copyright (C) 2006-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_ADD_DIR 3 "June 23, 2012" NiH +.TH "ZIP_ADD_DIR" "3" "June 23, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_add_dir \- add directory to zip archive +\fBzip_add_dir\fR +\- add directory to zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -zip_int64_t -zip_add_dir(struct zip *archive, const char *name); +\fB#include <zip.h>\fR +.sp +\fIzip_int64_t\fR +.br +\fBzip_add_dir\fR(\fIstruct zip *archive\fR,\ \fIconst char *name\fR); .SH "DESCRIPTION" The function -zip_add_dir +\fBzip_add_dir\fR() is the obsolete version of zip_dir_add(3). It is the same as calling @@ -51,7 +24,6 @@ libzip(3), zip_dir_add(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_close.man b/man/zip_close.man index 99e666f..67f07b3 100644 --- a/man/zip_close.man +++ b/man/zip_close.man
@@ -1,59 +1,32 @@ -.\" zip_close.mdoc \-- close zip archive -.\" Copyright (C) 2003-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_CLOSE 3 "February 13, 2012" NiH +.TH "ZIP_CLOSE" "3" "February 13, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_close \- close zip archive +\fBzip_close\fR +\- close zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_close(struct zip *archive); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_close\fR(\fIstruct zip *archive\fR); .SH "DESCRIPTION" The -zip_close +\fBzip_close\fR() function closes -\fBarchive\fR +\fIarchive\fR and frees the memory allocated for it. If any files within were changed, those changes are written to disk first. If writing changes fails, -zip_close +\fBzip_close\fR() fails and -\fBarchive\fR +\fIarchive\fR is left unchanged. If -\fBarchive\fR +\fIarchive\fR contains no files, the file is completely removed (no empty archive is written). .PP @@ -62,53 +35,54 @@ .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_close +\fBzip_close\fR() will fail if: -.RS -.TP 4 -[ZIP_ER_EOF] +.TP 19n +[\fRZIP_ER_EOF\fR] Unexpected end-of-file found while reading from a file. -.TP 4 -[ZIP_ER_INTERNAL] +.TP 19n +[\fRZIP_ER_INTERNAL\fR] The callback function of an added or replaced file returned an error but failed to report which. -.TP 4 -[ZIP_ER_INVAL] +.TP 19n +[\fRZIP_ER_INVAL\fR] The -\fBpath\fR +\fIpath\fR argument is -\fBNULL.\fR -.TP 4 -[ZIP_ER_MEMORY] +\fRNULL\fR. +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.TP 4 -[ZIP_ER_NOZIP] +.TP 19n +[\fRZIP_ER_NOZIP\fR] File is not a zip archive. -.TP 4 -[ZIP_ER_READ] +.TP 19n +[\fRZIP_ER_READ\fR] A file read failed. -.TP 4 -[ZIP_ER_RENAME] +.TP 19n +[\fRZIP_ER_RENAME\fR] A temporary file could not be renamed to its final name. -.TP 4 -[ZIP_ER_SEEK] +.TP 19n +[\fRZIP_ER_SEEK\fR] A file seek failed. -.TP 4 -[ZIP_ER_TMPOPEN] +.TP 19n +[\fRZIP_ER_TMPOPEN\fR] A temporary file could not be created. -.TP 4 -[ZIP_ER_WRITE] +.TP 19n +[\fRZIP_ER_WRITE\fR] A file write failed. -.TP 4 -[ZIP_ER_ZLIB] +.TP 19n +[\fRZIP_ER_ZLIB\fR] An error occurred while (de)compressing a stream with zlib(3). -.RE +.PD 0 +.PP Additionally, any errors returned by the callback function for added or replaced files will be passed back. +.PD .SH "SEE ALSO" libzip(3), zip_discard(3), @@ -117,7 +91,6 @@ zip_open(3), zip_strerror(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_delete.man b/man/zip_delete.man index 8cdd998..f894027 100644 --- a/man/zip_delete.man +++ b/man/zip_delete.man
@@ -1,70 +1,40 @@ -.\" zip_delete.mdoc \-- delete files from zip archive -.\" Copyright (C) 2003-2009 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_DELETE 3 "March 10, 2009" NiH +.TH "ZIP_DELETE" "3" "March 10, 2009" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_delete \- delete file from zip archive +\fBzip_delete\fR +\- delete file from zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_delete(struct zip *archive, zip_uint64_t index); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_delete\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR); .SH "DESCRIPTION" The file at position -\fBindex\fR +\fIindex\fR in the zip archive -\fBarchive\fR +\fIarchive\fR is marked as deleted. .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_delete +\fBzip_delete\fR() fails if: -.RS -.TP 4 -[ZIP_ER_INVAL] -\fBindex\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIindex\fR is not a valid file index in -\fBarchive.\fR -.RE +\fIarchive\fR. .SH "SEE ALSO" libzip(3), zip_unchange(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_dir_add.man b/man/zip_dir_add.man index 1d445d2..ae3cdce 100644 --- a/man/zip_dir_add.man +++ b/man/zip_dir_add.man
@@ -1,106 +1,73 @@ -.\" zip_dir_add.mdoc \-- add directory to zip archive -.\" Copyright (C) 2006-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_DIR_ADD 3 "June 23, 2012" NiH +.TH "ZIP_DIR_ADD" "3" "June 23, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_dir_add \- add directory to zip archive +\fBzip_dir_add\fR +\- add directory to zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -zip_int64_t -zip_dir_add(struct zip *archive, const char *name); \ -"zip_flags_t flags" +\fB#include <zip.h>\fR +.sp +\fIzip_int64_t\fR +.br +\fBzip_dir_add\fR(\fIstruct zip *archive\fR,\ \fIconst char *name\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The function -zip_dir_add +\fBzip_dir_add\fR() adds a directory to a zip archive. The argument -\fBarchive\fR +\fIarchive\fR specifies the zip archive to which the directory should be added. -\fBname\fR +\fIname\fR is the directory's name in the zip archive. The -\fBflags\fR +\fIflags\fR argument can be any of: -.RS -.TP 22 -\fBZIP_FL_ENC_GUESS\fR +.TP 22n +\fRZIP_FL_ENC_GUESS\fR Guess encoding of -\fBname\fR +\fIname\fR (default). -.TP 22 -\fBZIP_FL_ENC_UTF_8\fR +.TP 22n +\fRZIP_FL_ENC_UTF_8\fR Interpret -\fBname\fR +\fIname\fR as UTF-8. -.TP 22 -\fBZIP_FL_ENC_CP437\fR +.TP 22n +\fRZIP_FL_ENC_CP437\fR Interpret -\fBname\fR +\fIname\fR as code page 437 (CP-437). -.RE .SH "RETURN VALUES" Upon successful completion, the index of the new entry in the archive is returned. Otherwise, \-1 is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_dir_add +\fBzip_dir_add\fR() fails if: -.RS -.TP 4 -[ZIP_ER_EXISTS] +.TP 19n +[\fRZIP_ER_EXISTS\fR] There is already an entry called -\fBname\fR +\fIname\fR in the archive. -.TP 4 -[ZIP_ER_INVAL] -\fBarchive\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIarchive\fR or -\fBname\fR +\fIname\fR are -\fBNULL,\fR +\fRNULL\fR, or invalid UTF-8 encoded file names. -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.RE .SH "SEE ALSO" libzip(3), zip_add(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_discard.man b/man/zip_discard.man index 9e8f1c6..cf8c0ad 100644 --- a/man/zip_discard.man +++ b/man/zip_discard.man
@@ -1,56 +1,28 @@ -.\" zip_discard.mdoc \-- close zip archive and discard changes -.\" Copyright (C) 2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_DISCARD 3 "February 13, 2012" NiH +.TH "ZIP_DISCARD" "3" "February 13, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_discard \- close zip archive and discard changes +\fBzip_discard\fR +\- close zip archive and discard changes .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -void -zip_discard(struct zip *archive); +\fB#include <zip.h>\fR +.sp +\fIvoid\fR +.br +\fBzip_discard\fR(\fIstruct zip *archive\fR); .SH "DESCRIPTION" The -zip_discard +\fBzip_discard\fR() function closes -\fBarchive\fR +\fIarchive\fR and frees the memory allocated for it. Any changes to the archive are not written to disk and discarded. .SH "SEE ALSO" libzip(3), zip_close(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_clear.man b/man/zip_error_clear.man index db5ea5e..034651f 100644 --- a/man/zip_error_clear.man +++ b/man/zip_error_clear.man
@@ -1,63 +1,36 @@ -.\" zip_clear_error.mdoc \-- clear error state for archive or file -.\" Copyright (C) 2006 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_CLEAR_ERROR 3 "October 4, 2006" NiH +.TH "ZIP_CLEAR_ERROR" "3" "October 4, 2006" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_error_clear , \- .Nm zip_file_error_clear -clear error state for archive or file +\fBzip_error_clear\fR, +\fBzip_file_error_clear\fR +\- clear error state for archive or file .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -void -zip_error_clear(struct zip *archive); -.PP -void -zip_file_error_clear(struct zip_file *file); +\fB#include <zip.h>\fR +.sp +\fIvoid\fR +.br +\fBzip_error_clear\fR(\fIstruct zip *archive\fR); +.sp +\fIvoid\fR +.br +\fBzip_file_error_clear\fR(\fIstruct zip_file *file\fR); .SH "DESCRIPTION" The -zip_error_clear +\fBzip_error_clear\fR() function clears the error state for the zip archive -\fBarchive.\fR +\fIarchive\fR. .PP The -zip_file_error_clear +\fBzip_file_error_clear\fR() function does the same for the zip file -\fBfile.\fR +\fIfile\fR. .SH "SEE ALSO" libzip(3), zip_error_get(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_get.man b/man/zip_error_get.man index 23a1400..e71084b 100644 --- a/man/zip_error_get.man +++ b/man/zip_error_get.man
@@ -1,80 +1,53 @@ -.\" zip_error_get.mdoc \-- get error codes for archive or file -.\" Copyright (C) 2004, 2005 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_ERROR_GET 3 "October 4, 2006" NiH +.TH "ZIP_ERROR_GET" "3" "October 4, 2006" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_error_get , \- .Nm zip_file_error_get -get error codes for archive or file +\fBzip_error_get\fR, +\fBzip_file_error_get\fR +\- get error codes for archive or file .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -void -zip_error_get(struct zip *archive, int *zep, int *sep); -.PP -void -zip_file_error_get(struct zip_file *file, int *zep, int *sep); +\fB#include <zip.h>\fR +.sp +\fIvoid\fR +.br +\fBzip_error_get\fR(\fIstruct zip *archive\fR,\ \fIint *zep\fR,\ \fIint *sep\fR); +.sp +\fIvoid\fR +.br +\fBzip_file_error_get\fR(\fIstruct zip_file *file\fR,\ \fIint *zep\fR,\ \fIint *sep\fR); .SH "DESCRIPTION" The -zip_error_get +\fBzip_error_get\fR() function returns the error codes for the zip archive -\fBarchive.\fR +\fIarchive\fR. If -\fBzep\fR +\fIzep\fR is not -\fBNULL,\fR -\fB*zep\fR +\fRNULL\fR, +\fI*zep\fR will be filled in with the error code from libzip. Similarly, -\fB*sep\fR +\fI*sep\fR will contain the corresponding system error code, if -\fBsep\fR +\fIsep\fR is not -\fBNULL;\fR +\fRNULL\fR; use -zip_error_get_sys_type +\fBzip_error_get_sys_type\fR() to determine the type of system error code. .PP The -zip_file_error_get +\fBzip_file_error_get\fR() function does the same for the zip file -\fBfile.\fR +\fIfile\fR. .SH "SEE ALSO" libzip(3), zip_error_clear(3), zip_error_get_sys_type(3), zip_error_to_str(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_get_sys_type.man b/man/zip_error_get_sys_type.man index d0f5985..e605221 100644 --- a/man/zip_error_get_sys_type.man +++ b/man/zip_error_get_sys_type.man
@@ -1,69 +1,43 @@ -.\" zip_error_get_sys_type.mdoc \-- get type of error -.\" Copyright (C) 2004, 2005 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_ERROR_SYS_TYPE 3 "November 30, 2004" NiH +.TH "ZIP_ERROR_SYS_TYPE" "3" "November 30, 2004" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_error_get_sys_type \- get type of system error code +\fBzip_error_get_sys_type\fR +\- get type of system error code .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_error_get_sys_type(int ze); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_error_get_sys_type\fR(\fIint ze\fR); .SH "DESCRIPTION" The -zip_error_get_sys_type +\fBzip_error_get_sys_type\fR() function returns the type of the system error code for the libzip error -\fBze.\fR +\fIze\fR. Possible types are: -.RS -.TP 16 -\fBZIP_ET_NONE\fR +.RS 6n +.PD 0 +.TP 16n +\fRZIP_ET_NONE\fR System error code is unused. -.TP 16 -\fBZIP_ET_SYS\fR +.TP 16n +\fRZIP_ET_SYS\fR System error code is an errno value. -.TP 16 -\fBZIP_ET_ZLIB\fR +.TP 16n +\fRZIP_ET_ZLIB\fR System error code is from zlib(3). .RE +.PD .SH "SEE ALSO" libzip(3), zip_error_get(3), zip_error_to_str(3), zip_file_error_get(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_to_str.man b/man/zip_error_to_str.man index f8e915b..3b1f793 100644 --- a/man/zip_error_to_str.man +++ b/man/zip_error_to_str.man
@@ -1,75 +1,48 @@ -.\" zip_error_to_str.mdoc \-- get string representation of zip error code -.\" Copyright (C) 2003-2009 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_ERROR_TO_STR 3 "March 10, 2009" NiH +.TH "ZIP_ERROR_TO_STR" "3" "March 10, 2009" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_error_to_str \- get string representation of zip error +\fBzip_error_to_str\fR +\- get string representation of zip error .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_error_to_str(char *buf, zip_uint64_t len, int ze, int se); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_error_to_str\fR(\fIchar *buf\fR,\ \fIzip_uint64_t len\fR,\ \fIint ze\fR,\ \fIint se\fR); .SH "DESCRIPTION" The -zip_error_to_str +\fBzip_error_to_str\fR() function stores a string describing the libzip error code -\fBze\fR +\fIze\fR in the user-provided buffer -\fBbuf\fR +\fIbuf\fR which has size -\fBlen.\fR +\fIlen\fR. The buffer is always NUL-terminated. -\fBse\fR +\fIse\fR should be the value of the global variable -\fBerrno\fR +\fIerrno\fR at the time of the error or the zlib error code, depending on -\fBze.\fR +\fIze\fR. .PP -zip_error_to_str +\fBzip_error_to_str\fR() is especially useful if -zip_open +\fBzip_open\fR() failed, since then there is no -.Vt struct zip +\fIstruct zip\fR is available to store the error code; otherwise -zip_strerror +\fBzip_strerror\fR() or -zip_file_strerror +\fBzip_file_strerror\fR() are more convenient. .SH "RETURN VALUES" -zip_error_to_str +\fBzip_error_to_str\fR() returns the number of characters that would have been written to a sufficiently sized -\fBbuf,\fR +\fIbuf\fR, excluding the terminating NUL character. .SH "SEE ALSO" libzip(3), @@ -80,7 +53,6 @@ zip_open(3), zip_strerror(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_errors.man b/man/zip_errors.man index e582030..4591743 100644 --- a/man/zip_errors.man +++ b/man/zip_errors.man
@@ -1,134 +1,100 @@ -.\" zip_errors.mdoc \-- list of all libzip error codes -.\" Copyright (C) 2004, 2005 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" This file was generated automatically by./make_zip_errors.sh -.\" from./../lib/zip.h; make changes there. -.\" -.TH ZIP_ERRORS 3 "March 10, 2009" NiH +.TH "ZIP_ERRORS" "3" "March 10, 2009" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_errors \- list of all libzip error codes +\fBzip_errors\fR +\- list of all libzip error codes .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> +\fB#include <zip.h>\fR .SH "DESCRIPTION" The following error codes are used by libzip: -.RS -.TP 23 -[ZIP_ER_OK] +.TP 23n +[\fRZIP_ER_OK\fR] No error. -.TP 23 -[ZIP_ER_MULTIDISK] +.TP 23n +[\fRZIP_ER_MULTIDISK\fR] Multi-disk zip archives not supported. -.TP 23 -[ZIP_ER_RENAME] +.TP 23n +[\fRZIP_ER_RENAME\fR] Renaming temporary file failed. -.TP 23 -[ZIP_ER_CLOSE] +.TP 23n +[\fRZIP_ER_CLOSE\fR] Closing zip archive failed. -.TP 23 -[ZIP_ER_SEEK] +.TP 23n +[\fRZIP_ER_SEEK\fR] Seek error. -.TP 23 -[ZIP_ER_READ] +.TP 23n +[\fRZIP_ER_READ\fR] Read error. -.TP 23 -[ZIP_ER_WRITE] +.TP 23n +[\fRZIP_ER_WRITE\fR] Write error. -.TP 23 -[ZIP_ER_CRC] +.TP 23n +[\fRZIP_ER_CRC\fR] CRC error. -.TP 23 -[ZIP_ER_ZIPCLOSED] +.TP 23n +[\fRZIP_ER_ZIPCLOSED\fR] Containing zip archive was closed. -.TP 23 -[ZIP_ER_NOENT] +.TP 23n +[\fRZIP_ER_NOENT\fR] No such file. -.TP 23 -[ZIP_ER_EXISTS] +.TP 23n +[\fRZIP_ER_EXISTS\fR] File already exists. -.TP 23 -[ZIP_ER_OPEN] +.TP 23n +[\fRZIP_ER_OPEN\fR] Can't open file. -.TP 23 -[ZIP_ER_TMPOPEN] +.TP 23n +[\fRZIP_ER_TMPOPEN\fR] Failure to create temporary file. -.TP 23 -[ZIP_ER_ZLIB] +.TP 23n +[\fRZIP_ER_ZLIB\fR] Zlib error. -.TP 23 -[ZIP_ER_MEMORY] +.TP 23n +[\fRZIP_ER_MEMORY\fR] Malloc failure. -.TP 23 -[ZIP_ER_CHANGED] +.TP 23n +[\fRZIP_ER_CHANGED\fR] Entry has been changed. -.TP 23 -[ZIP_ER_COMPNOTSUPP] +.TP 23n +[\fRZIP_ER_COMPNOTSUPP\fR] Compression method not supported. -.TP 23 -[ZIP_ER_EOF] +.TP 23n +[\fRZIP_ER_EOF\fR] Premature EOF. -.TP 23 -[ZIP_ER_INVAL] +.TP 23n +[\fRZIP_ER_INVAL\fR] Invalid argument. -.TP 23 -[ZIP_ER_NOZIP] +.TP 23n +[\fRZIP_ER_NOZIP\fR] Not a zip archive. -.TP 23 -[ZIP_ER_INTERNAL] +.TP 23n +[\fRZIP_ER_INTERNAL\fR] Internal error. -.TP 23 -[ZIP_ER_INCONS] +.TP 23n +[\fRZIP_ER_INCONS\fR] Zip archive inconsistent. -.TP 23 -[ZIP_ER_REMOVE] +.TP 23n +[\fRZIP_ER_REMOVE\fR] Can't remove file. -.TP 23 -[ZIP_ER_DELETED] +.TP 23n +[\fRZIP_ER_DELETED\fR] Entry has been deleted. -.TP 23 -[ZIP_ER_ENCRNOTSUPP] +.TP 23n +[\fRZIP_ER_ENCRNOTSUPP\fR] Encryption method not supported. -.TP 23 -[ZIP_ER_RDONLY] -Read-only archive. -.TP 23 -[ZIP_ER_NOPASSWD] +.TP 23n +[\fRZIP_ER_RDONLY\fR] +Read-only archive. +.TP 23n +[\fRZIP_ER_NOPASSWD\fR] No password provided. -.TP 23 -[ZIP_ER_WRONGPASSWD] +.TP 23n +[\fRZIP_ER_WRONGPASSWD\fR] Wrong password provided. -.RE .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_fclose.man b/man/zip_fclose.man index 0eeb70b..cec83a2 100644 --- a/man/zip_fclose.man +++ b/man/zip_fclose.man
@@ -1,49 +1,22 @@ -.\" zip_fclose.mdoc \-- close file in zip archive -.\" Copyright (C) 2003, 2005 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FCLOSE 3 "October 3, 2003" NiH +.TH "ZIP_FCLOSE" "3" "October 3, 2003" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_fclose \- close file in zip archive +\fBzip_fclose\fR +\- close file in zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_fclose(struct zip_file *file); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_fclose\fR(\fIstruct zip_file *file\fR); .SH "DESCRIPTION" The -zip_fclose +\fBzip_fclose\fR() function closes -\fBfile\fR +\fIfile\fR and frees the memory allocated for it. .SH "RETURN VALUES" Upon successful completion 0 is returned. @@ -53,7 +26,6 @@ zip_fopen(3), zip_fread(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_fdopen.man b/man/zip_fdopen.man index b8ca1c8..ed087ed 100644 --- a/man/zip_fdopen.man +++ b/man/zip_fdopen.man
@@ -1,152 +1,120 @@ -.\" zip_fdopen.mdoc \-- open zip archive using existing file descriptor -.\" Copyright (C) 2009-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FDOPEN 3 "February 13, 2012" NiH +.TH "ZIP_FDOPEN" "3" "February 13, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_fdopen \- open zip archive using open file descriptor +\fBzip_fdopen\fR +\- open zip archive using open file descriptor .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -struct zip * -zip_fdopen(int fd, int flags, int *errorp); +\fB#include <zip.h>\fR +.sp +\fIstruct\ zip\ *\fR +.br +\fBzip_fdopen\fR(\fIint fd\fR,\ \fIint flags\fR,\ \fIint *errorp\fR); .SH "DESCRIPTION" The zip archive specified by the open file descriptor -\fBfd\fR +\fIfd\fR is opened and a pointer to a -.PP -struct zip, +\fIstruct zip\fR, used to manipulate the archive, is returned. In contrast to zip_open(3), using -.Nm zip_fdopen +\fBzip_fdopen\fR the archive can only be opened in read-only mode. The -\fBfd\fR +\fIfd\fR argument may not be used any longer after calling -.Nm zip_fdopen. +\fBzip_fdopen\fR. The -.Fa flags +\fIflags\fR are specified by -.I or'ing +\fIor\fR'ing the following values, or 0 for none of them. -.RS -.TP 15 -\fBZIP_CHECKCONS\fR +.RS 6n +.TP 15n +\fRZIP_CHECKCONS\fR Perform additional stricter consistency checks on the archive, and error if they fail. .RE .PP If an error occurs and -\fBerrorp\fR +\fIerrorp\fR is -.No non-\fBNULL,\fR +non-\fRNULL\fR, it will be set to the corresponding error code. .SH "RETURN VALUES" Upon successful completion -zip_fdopen +\fBzip_fdopen\fR() returns a -.PP -struct zip +\fIstruct zip\fR pointer, and -\fBfd\fR +\fIfd\fR should not be used any longer, nor passed to close(2). Otherwise, -\fBNULL\fR +\fRNULL\fR is returned and -\fB*errorp\fR +\fI*errorp\fR is set to indicate the error. In the error case, -\fBfd\fR +\fIfd\fR remains unchanged. .SH "ERRORS" The file specified by -\fBfd\fR +\fIfd\fR is prepared for use by libzip(3) unless: -.RS -.TP 4 -[ZIP_ER_INCONS] +.TP 19n +[\fRZIP_ER_INCONS\fR] Inconsistencies were found in the file specified by -\fBpath.\fR +\fIpath\fR. This error is often caused by specifying -\fBZIP_CHECKCONS\fR +\fRZIP_CHECKCONS\fR but can also happen without it. -.TP 4 -[ZIP_ER_INVAL] +.TP 19n +[\fRZIP_ER_INVAL\fR] The -\fBflags\fR +\fIflags\fR argument is invalid. Not all zip_open(3) flags are allowed for -.Nm zip_fdopen, +\fBzip_fdopen\fR, see -DESCRIPTION. -.TP 4 -[ZIP_ER_MEMORY] +\fIDESCRIPTION\fR. +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.TP 4 -[ZIP_ER_NOZIP] +.TP 19n +[\fRZIP_ER_NOZIP\fR] The file specified by -\fBfd\fR +\fIfd\fR is not a zip archive. -.TP 4 -[ZIP_ER_OPEN] +.TP 19n +[\fRZIP_ER_OPEN\fR] The file specified by -\fBfd\fR +\fIfd\fR could not be prepared for use by libzip(3). -.TP 4 -[ZIP_ER_READ] +.TP 19n +[\fRZIP_ER_READ\fR] A read error occurred; see -.Va errno +\fIerrno\fR for details. -.TP 4 -[ZIP_ER_SEEK] +.TP 19n +[\fRZIP_ER_SEEK\fR] The file specified by -\fBfd\fR +\fIfd\fR does not allow seeks. -.RE .SH "SEE ALSO" libzip(3), zip_close(3), zip_error_to_str(3), zip_open(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_add.man b/man/zip_file_add.man index 1e0d402..84ddebd 100644 --- a/man/zip_file_add.man +++ b/man/zip_file_add.man
@@ -1,155 +1,128 @@ -.\" zip_file_add.mdoc \-- add files to zip archive -.\" Copyright (C) 2004-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FILE_ADD 3 "October 6, 2012" NiH +.TH "ZIP_FILE_ADD" "3" "October 6, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_file_add , \- .Nm zip_file_replace -add file to zip archive or replace file in zip archive +\fBzip_file_add\fR, +\fBzip_file_replace\fR +\- add file to zip archive or replace file in zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -zip_int64_t -zip_file_add(struct zip *archive, const char *name); \ -"struct zip_source *source" "zip_flags_t flags" -.PP -int -zip_file_replace(struct zip *archive, zip_uint64_t index); \ -"struct zip_source *source" "zip_flags_t flags" +\fB#include <zip.h>\fR +.sp +\fIzip_int64_t\fR +.br +\fBzip_file_add\fR(\fIstruct zip *archive\fR,\ \fIconst char *name\fR,\ \fIstruct zip_source *source\fR,\ \fIzip_flags_t flags\fR); +.sp +\fIint\fR +.br +\fBzip_file_replace\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIstruct zip_source *source\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The function -zip_file_add +\fBzip_file_add\fR() adds a file to a zip archive, while -zip_file_replace +\fBzip_file_replace\fR() replaces an existing file in a zip archive. The argument -\fBarchive\fR +\fIarchive\fR specifies the zip archive to which the file should be added. -\fBname\fR +\fIname\fR is the file's name in the zip archive (for -zip_file_add ), +\fBzip_file_add\fR()), while -\fBindex\fR +\fIindex\fR specifies which file should be replaced (for -zip_file_replace ). +\fBzip_file_replace\fR()). The -\fBflags\fR +\fIflags\fR argument can be any combination of -\fBZIP_FL_OVERWRITE\fR +\fRZIP_FL_OVERWRITE\fR with one of -\fBZIP_FL_ENC_* :\fR -.RS -.TP 22 -\fBZIP_FL_OVERWRITE\fR +\fRZIP_FL_ENC_*\fR: +.TP 22n +\fRZIP_FL_OVERWRITE\fR Overwrite any existing file of the same name. For -.Nm zip_file_add +\fBzip_file_add\fR only. -.TP 22 -\fBZIP_FL_ENC_GUESS\fR +.TP 22n +\fRZIP_FL_ENC_GUESS\fR Guess encoding of -\fBname\fR +\fIname\fR (default). -.TP 22 -\fBZIP_FL_ENC_UTF_8\fR +.TP 22n +\fRZIP_FL_ENC_UTF_8\fR Interpret -\fBname\fR +\fIname\fR as UTF-8. -.TP 22 -\fBZIP_FL_ENC_CP437\fR +.TP 22n +\fRZIP_FL_ENC_CP437\fR Interpret -\fBname\fR +\fIname\fR as code page 437 (CP-437). -.RE +.PD 0 +.PP The data is obtained from the -\fBsource\fR +\fIsource\fR argument. See the -zip_source_* +\fBzip_source_*\fR() functions cited in -SEE ALSO. +\fISEE ALSO\fR. +.PD .SH "RETURN VALUES" Upon successful completion, -zip_file_add +\fBzip_file_add\fR() returns the index of the new file in the archive, and -zip_file_replace +\fBzip_file_replace\fR() returns 0. Otherwise, \-1 is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "EXAMPLES" -.Bd \-literal \-offset indent +.nf +.RS 6n struct zip_source *s; const char buf="teststring"; if ((s=zip_source_buffer(archive, buffer, sizeof(buf), 0)) == NULL || - zip_file_add(archive, name, s, ZIP_FL_ENC_UTF_8) \*[Lt] 0) { + zip_file_add(archive, name, s, ZIP_FL_ENC_UTF_8) < 0) { zip_source_free(s); printf("error adding file: %s\en", zip_strerror(archive)); } -.Ed +.RE +.fi .SH "ERRORS" -zip_file_add +\fBzip_file_add\fR() and -zip_file_replace +\fBzip_file_replace\fR() fail if: -.RS -.TP 4 -[ZIP_ER_EXISTS] +.TP 19n +[\fRZIP_ER_EXISTS\fR] There is already a file called -\fBname\fR +\fIname\fR in the archive. (Only applies to -zip_file_add, +\fBzip_file_add\fR(), and only if -\fBZIP_FL_OVERWRITE\fR +\fRZIP_FL_OVERWRITE\fR is not provided). -.TP 4 -[ZIP_ER_INVAL] -\fBsource\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIsource\fR or -\fBname\fR +\fIname\fR are -\fBNULL,\fR +\fRNULL\fR, or -\fBindex\fR +\fIindex\fR is invalid. -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.TP 4 -[ZIP_ER_RDONLY] +.TP 19n +[\fRZIP_ER_RDONLY\fR] Archive was opened in read-only mode. -.RE .SH "SEE ALSO" libzip(3), zip_source_file(3), @@ -157,7 +130,6 @@ zip_source_function(3), zip_source_zip(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_extra_field_delete.man b/man/zip_file_extra_field_delete.man index 2b5a351..3ba36da 100644 --- a/man/zip_file_extra_field_delete.man +++ b/man/zip_file_extra_field_delete.man
@@ -1,129 +1,98 @@ -.\" zip_file_extra_field_delete.mdoc \-- delete extra field for file in zip -.\" Copyright (C) 2012-2013 Dieter Baron and Thomas Klausner -.\" -.\" This file is part of libzip, a library to manipulate ZIP files. -.\" The authors can be contacted at <libzip@nih.at> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FILE_EXTRA_FIELD_DELETE 3 "July 31, 2013" NiH +.TH "ZIP_FILE_EXTRA_FIELD_DELETE" "3" "July 31, 2013" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_file_extra_field_delete , \- .Nm zip_file_extra_field_delete_by_id -delete extra field for file in zip +\fBzip_file_extra_field_delete\fR, +\fBzip_file_extra_field_delete_by_id\fR +\- delete extra field for file in zip .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_file_extra_field_delete(struct zip *archive, zip_uint64_t index); \ -"zip_uint16_t extra_field_index" "zip_flags_t flags" -.PP -int -zip_file_extra_field_delete_by_id(struct zip *archive, zip_uint64_t index); \ -"zip_uint16_t extra_field_id" "zip_uint16_t extra_field_index" "zip_flags_t flags" +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_file_extra_field_delete\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIzip_uint16_t extra_field_index\fR,\ \fIzip_flags_t flags\fR); +.sp +\fIint\fR +.br +\fBzip_file_extra_field_delete_by_id\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIzip_uint16_t extra_field_id\fR,\ \fIzip_uint16_t extra_field_index\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The -zip_file_extra_field_delete +\fBzip_file_extra_field_delete\fR() function deletes the extra field with index -\fBextra_field_index\fR +\fIextra_field_index\fR for the file at position -\fBindex\fR +\fIindex\fR in the zip archive. .PP If -\fBextra_field_index\fR +\fIextra_field_index\fR is -\fBZIP_EXTRA_FIELD_ALL,\fR +\fRZIP_EXTRA_FIELD_ALL\fR, then all extra fields will be deleted. .PP The following -\fBflags\fR +\fIflags\fR are supported: -.RS -.TP 18 -\fBZIP_FL_CENTRAL\fR +.RS 6n +.TP 18n +\fRZIP_FL_CENTRAL\fR Delete extra fields from the archive's central directory. -.TP 18 -\fBZIP_FL_LOCAL\fR +.TP 18n +\fRZIP_FL_LOCAL\fR Delete extra fields from the local file headers. .RE .PP The -zip_file_extra_field_delete_by_id +\fBzip_file_extra_field_delete_by_id\fR() function deletes the extra field with ID (two-byte signature) -\fBextra_field_id\fR +\fIextra_field_id\fR and index -\fBextra_field_index\fR +\fIextra_field_index\fR (in other words, the -\fBextra_field_index'th\fR +\fIextra_field_index\fR'th extra field with ID -\fBextra_field_id )\fR +\fIextra_field_id\fR) The other arguments are the same as for -zip_file_extra_field_delete -\fB( ZIP_EXTRA_FIELD_ALL\fR +\fBzip_file_extra_field_delete\fR() +(\fRZIP_EXTRA_FIELD_ALL\fR will delete all extra fields of the specified ID). .PP Please note that due to the library design, the index of an extra field may be different between central directory and local file headers. For this reason, it is not allowed to specify both -\fBZIP_FL_CENTRAL\fR +\fRZIP_FL_CENTRAL\fR and -\fBZIP_FL_LOCAL\fR +\fRZIP_FL_LOCAL\fR in -\fBflags,\fR +\fIflags\fR, except when deleting all extra fields (i.e., -\fBextra_field_index\fR +\fIextra_field_index\fR being -\fBZIP_EXTRA_FIELD_ALL ).\fR +\fRZIP_EXTRA_FIELD_ALL\fR). .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_file_extra_field_delete +\fBzip_file_extra_field_delete\fR() and -zip_file_extra_field_delete_by_id +\fBzip_file_extra_field_delete_by_id\fR() fail if: -.RS -.TP 4 -[ZIP_ER_NOENT] -\fBindex\fR +.TP 19n +[\fRZIP_ER_NOENT\fR] +\fIindex\fR is not a valid file index in -\fBarchive.\fR -.RE +\fIarchive\fR. .SH "SEE ALSO" libzip(3), zip_file_extra_field_get(3), zip_file_extra_field_set(3), zip_file_extra_fields_count(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_extra_field_get.man b/man/zip_file_extra_field_get.man index c2a5dc2..ab89b4d 100644 --- a/man/zip_file_extra_field_get.man +++ b/man/zip_file_extra_field_get.man
@@ -1,152 +1,118 @@ -.\" zip_file_extra_field_get.mdoc \-- get extra field for file in zip -.\" Copyright (C) 2012-2013 Dieter Baron and Thomas Klausner -.\" -.\" This file is part of libzip, a library to manipulate ZIP files. -.\" The authors can be contacted at <libzip@nih.at> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FILE_EXTRA_FIELD_GET 3 "February 20, 2013" NiH +.TH "ZIP_FILE_EXTRA_FIELD_GET" "3" "February 20, 2013" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_file_extra_field_get , \- .Nm zip_file_extra_field_get_by_id -get extra field for file in zip +\fBzip_file_extra_field_get\fR, +\fBzip_file_extra_field_get_by_id\fR +\- get extra field for file in zip .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -const zip_uint8_t * -zip_file_extra_field_get(struct zip *archive, zip_uint64_t index); \ -"zip_uint16_t extra_field_index" "zip_uint16_t *idp" "zip_uint16_t *lenp" \ -"zip_flags_t flags" -.PP -const zip_uint8_t * -zip_file_extra_field_get_by_id(struct zip *archive, zip_uint64_t index); \ -"zip_uint16_t extra_field_id" "zip_uint16_t extra_field_index" "zip_uint16_t *lenp" \ -"zip_flags_t flags" +\fB#include <zip.h>\fR +.sp +\fIconst\ zip_uint8_t\ *\fR +.br +\fBzip_file_extra_field_get\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIzip_uint16_t extra_field_index\fR,\ \fIzip_uint16_t *idp\fR,\ \fIzip_uint16_t *lenp\fR,\ \fIzip_flags_t flags\fR); +.sp +\fIconst\ zip_uint8_t\ *\fR +.br +\fBzip_file_extra_field_get_by_id\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIzip_uint16_t extra_field_id\fR,\ \fIzip_uint16_t extra_field_index\fR,\ \fIzip_uint16_t *lenp\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The -zip_file_extra_field_get +\fBzip_file_extra_field_get\fR() function returns the extra field with index -\fBextra_field_index\fR +\fIextra_field_index\fR for the file at position -\fBindex\fR +\fIindex\fR in the zip archive. This pointer should not be modified or -free(3) -Ap d, +free(3)'d, and becomes invalid when -\fBarchive\fR +\fIarchive\fR is closed. If -\fBidp\fR +\fIidp\fR is not -\fBNULL,\fR +\fRNULL\fR, the integer to which it points will be set to the ID (two-byte signature) of the selected extra field. If -\fBlenp\fR +\fIlenp\fR is not -\fBNULL,\fR +\fRNULL\fR, the integer to which it points will be set to the length of the extra field. Generally speaking, -\fBlenp\fR +\fIlenp\fR and -\fBidp\fR +\fIidp\fR should be passed since only the extra field data is returned (i.e., neither the ID nor the length, if the -\fBidp\fR +\fIidp\fR and -\fBlenp\fR +\fIlenp\fR arguments are not provided). .PP The following -\fBflags\fR +\fIflags\fR are supported: -.RS -.TP 20 -\fBZIP_FL_CENTRAL\fR +.RS 6n +.TP 20n +\fRZIP_FL_CENTRAL\fR Return extra fields from the archive's central directory. -.TP 20 -\fBZIP_FL_LOCAL\fR +.TP 20n +\fRZIP_FL_LOCAL\fR Return extra fields from the local file headers. -.TP 20 -\fBZIP_FL_UNCHANGED\fR +.TP 20n +\fRZIP_FL_UNCHANGED\fR Return the original unchanged extra fields, ignoring any changes made. .RE .PP The -zip_file_extra_field_get_by_id +\fBzip_file_extra_field_get_by_id\fR() function returns the extra field with ID (two-byte signature) -\fBextra_field_id\fR +\fIextra_field_id\fR and index -\fBextra_field_index\fR +\fIextra_field_index\fR (in other words, the -\fBextra_field_index'th\fR +\fIextra_field_index\fR'th extra field with ID -\fBextra_field_id )\fR +\fIextra_field_id\fR) The other arguments are the same as for -zip_file_extra_field_get. +\fBzip_file_extra_field_get\fR(). .SH "RETURN VALUES" Upon successful completion, a pointer to an extra field is returned, or -\fBNULL\fR +\fRNULL\fR if there is no extra field with that -\fBextra_field_index\fR +\fIextra_field_index\fR for the file with index -\fBindex.\fR +\fIindex\fR. In case of an error, -\fBNULL\fR +\fRNULL\fR is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_file_extra_field_get +\fBzip_file_extra_field_get\fR() and -zip_file_extra_field_get_by_id +\fBzip_file_extra_field_get_by_id\fR() fail if: -.RS -.TP 4 -[ZIP_ER_NOENT] -\fBindex\fR +.TP 19n +[\fRZIP_ER_NOENT\fR] +\fIindex\fR is not a valid file index in -\fBarchive,\fR +\fIarchive\fR, or -\fBextra_field_index\fR +\fIextra_field_index\fR is not a valid extra file index (for ID -\fBextra_field_id ).\fR -.RE +\fIextra_field_id\fR). .SH "SEE ALSO" libzip(3), zip_file_extra_field_delete(3), zip_file_extra_field_set(3), zip_file_extra_fields_count(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_extra_field_set.man b/man/zip_file_extra_field_set.man index 8ee03c1..afd6899 100644 --- a/man/zip_file_extra_field_set.man +++ b/man/zip_file_extra_field_set.man
@@ -1,118 +1,85 @@ -.\" zip_file_extra_field_set.mdoc \-- set extra field for file in zip -.\" Copyright (C) 2012-2013 Dieter Baron and Thomas Klausner -.\" -.\" This file is part of libzip, a library to manipulate ZIP files. -.\" The authors can be contacted at <libzip@nih.at> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FILE_EXTRA_FIELD_SET 3 "February 20, 2013" NiH +.TH "ZIP_FILE_EXTRA_FIELD_SET" "3" "February 20, 2013" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_file_extra_field_set \- set extra field for file in zip +\fBzip_file_extra_field_set\fR +\- set extra field for file in zip .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_file_extra_field_set(struct zip *archive, zip_uint64_t index); \ -"zip_uint16_t extra_field_id" "zip_uint16_t extra_field_index" \ -"const zip_uint8_t *extra_field_data" "zip_uint16_t len" \ -"zip_flags_t flags" +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_file_extra_field_set\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIzip_uint16_t extra_field_id\fR,\ \fIzip_uint16_t extra_field_index\fR,\ \fIconst zip_uint8_t *extra_field_data\fR,\ \fIzip_uint16_t len\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The -zip_file_extra_field_set +\fBzip_file_extra_field_set\fR() function sets the extra field with ID (two-byte signature) -\fBextra_field_id\fR +\fIextra_field_id\fR and index -\fBextra_field_index\fR +\fIextra_field_index\fR for the file at position -\fBindex\fR +\fIindex\fR in the zip archive. The extra field's data will be set to -\fBextra_field_data\fR +\fIextra_field_data\fR and length -\fBlen.\fR +\fIlen\fR. If a new entry shall be appended, set -\fBextra_field_index\fR +\fIextra_field_index\fR to -\fBZIP_EXTRA_FIELD_NEW.\fR +\fRZIP_EXTRA_FIELD_NEW\fR. .PP At least one of the following -\fBflags\fR +\fIflags\fR must be set: -.RS -.TP 18 -\fBZIP_FL_CENTRAL\fR +.RS 6n +.TP 18n +\fRZIP_FL_CENTRAL\fR Set extra field in the archive's central directory. -.TP 18 -\fBZIP_FL_LOCAL\fR +.TP 18n +\fRZIP_FL_LOCAL\fR Set extra field in the local file headers. .RE .PP Please note that the extra field IDs 0x0001 (ZIP64 extension), 0x6375 (Infozip UTF-8 comment), and 0x7075 (Infozip UTF-8 file name) can not be set using -zip_file_extra_field_set +\fBzip_file_extra_field_set\fR() since they are set by libzip(3) automatically when needed. .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_file_extra_field_set +\fBzip_file_extra_field_set\fR() fails if: -.RS -.TP 4 -[ZIP_ER_INVAL] +.TP 19n +[\fRZIP_ER_INVAL\fR] The extra field size is too large (ID and length need 4 bytes; the maximum length of all extra fields for one file combined is 65536 bytes). This error also occurs if -\fBextra_field_index\fR +\fIextra_field_index\fR is too large. -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.TP 4 -[ZIP_ER_NOENT] -\fBindex\fR +.TP 19n +[\fRZIP_ER_NOENT\fR] +\fIindex\fR is not a valid file index in -\fBarchive.\fR -.RE +\fIarchive\fR. .SH "SEE ALSO" libzip(3), zip_file_extra_field_delete(3), zip_file_extra_field_get(3), zip_file_extra_fields_count(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_extra_fields_count.man b/man/zip_file_extra_fields_count.man index dbda382..26397ed 100644 --- a/man/zip_file_extra_fields_count.man +++ b/man/zip_file_extra_fields_count.man
@@ -1,113 +1,81 @@ -.\" zip_file_extra_fields_count.mdoc \-- count extra field for file in zip -.\" Copyright (C) 2012-2013 Dieter Baron and Thomas Klausner -.\" -.\" This file is part of libzip, a library to manipulate ZIP files. -.\" The authors can be contacted at <libzip@nih.at> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FILE_EXTRA_FIELDS_COUNT 3 "February 20, 2013" NiH +.TH "ZIP_FILE_EXTRA_FIELDS_COUNT" "3" "February 20, 2013" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_file_extra_fields_count , \- .Nm zip_file_extra_fields_count_by_id -count extra fields for file in zip +\fBzip_file_extra_fields_count\fR, +\fBzip_file_extra_fields_count_by_id\fR +\- count extra fields for file in zip .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -zip_int16_t -zip_file_extra_fields_count(struct zip *archive, zip_uint64_t index); \ -"zip_flags_t flags" -.PP -zip_int16_t -zip_file_extra_fields_count_by_id(struct zip *archive, zip_uint64_t index); \ -"zip_uint16_t extra_field_id" "zip_flags_t flags" +\fB#include <zip.h>\fR +.sp +\fIzip_int16_t\fR +.br +\fBzip_file_extra_fields_count\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIzip_flags_t flags\fR); +.sp +\fIzip_int16_t\fR +.br +\fBzip_file_extra_fields_count_by_id\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIzip_uint16_t extra_field_id\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The -zip_file_extra_fields_count +\fBzip_file_extra_fields_count\fR() function counts the extra fields for the file at position -\fBindex\fR +\fIindex\fR in the zip archive. .PP The following -\fBflags\fR +\fIflags\fR are supported: -.RS -.TP 18 -\fBZIP_FL_CENTRAL\fR +.RS 6n +.TP 18n +\fRZIP_FL_CENTRAL\fR Count extra fields from the archive's central directory. -.TP 18 -\fBZIP_FL_LOCAL\fR +.TP 18n +\fRZIP_FL_LOCAL\fR Count extra fields from the local file headers. -.TP 18 -\fBZIP_FL_UNCHANGED\fR +.TP 18n +\fRZIP_FL_UNCHANGED\fR Count the original unchanged extra fields, ignoring any changes made. .RE .PP The -zip_file_extra_fields_count_by_id +\fBzip_file_extra_fields_count_by_id\fR() function counts the extra fields with ID (two-byte signature) -\fBextra_field_id.\fR +\fIextra_field_id\fR. The other arguments are the same as for -zip_file_extra_fields_count. +\fBzip_file_extra_fields_count\fR(). .PP Extra fields that are the same in the central directory and the local file header are merged into one. Therefore, the counts with -\fBZIP_FL_CENTRAL\fR +\fRZIP_FL_CENTRAL\fR and -\fBZIP_FL_LOCAL\fR +\fRZIP_FL_LOCAL\fR do not need to add up to the same value as when given -\fBZIP_FL_CENTRAL|ZIP_FL_LOCAL\fR +\fRZIP_FL_CENTRAL|ZIP_FL_LOCAL\fR at the same time. .SH "RETURN VALUES" Upon successful completion, the requested number of extra fields is returned. Otherwise, \-1 is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_file_extra_fields_count +\fBzip_file_extra_fields_count\fR() and -zip_file_extra_fields_count_by_id +\fBzip_file_extra_fields_count_by_id\fR() fail if: -.RS -.TP 4 -[ZIP_ER_NOENT] -\fBindex\fR +.TP 19n +[\fRZIP_ER_NOENT\fR] +\fIindex\fR is not a valid file index in -\fBarchive.\fR -.\" XXX: _zip_read_local_ef errors -.RE +\fIarchive\fR. .SH "SEE ALSO" libzip(3), zip_file_extra_field_delete(3), zip_file_extra_field_get(3), zip_file_extra_field_set(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_get_comment.man b/man/zip_file_get_comment.man index 07575e7..4f7bc8a 100644 --- a/man/zip_file_get_comment.man +++ b/man/zip_file_get_comment.man
@@ -1,119 +1,87 @@ -.\" zip_file_get_comment.mdoc \-- get comment for file in zip -.\" Copyright (C) 2006-2013 Dieter Baron and Thomas Klausner -.\" -.\" This file is part of libzip, a library to manipulate ZIP files. -.\" The authors can be contacted at <libzip@nih.at> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FILE_GET_COMMENT 3 "February 20, 2013" NiH +.TH "ZIP_FILE_GET_COMMENT" "3" "September 19, 2013" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_file_get_comment \- get comment for file in zip +\fBzip_file_get_comment\fR +\- get comment for file in zip .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -const char * -zip_file_get_comment(struct zip *archive, zip_uint64_t index, zip_uint32_t *lenp); \ -"zip_flags_t flags" +\fB#include <zip.h>\fR +.sp +\fIconst\ char\ *\fR +.br +\fBzip_file_get_comment\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIzip_uint32_t *lenp\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The -zip_file_get_comment +\fBzip_file_get_comment\fR() function returns the comment for the file at position -\fBindex\fR +\fIindex\fR in the zip archive. The name is in UTF-8 encoding unless -\fBZIP_FL_ENC_RAW\fR +\fRZIP_FL_ENC_RAW\fR was specified (see below). This pointer should not be modified or -free(3) -Ap d, +free(3)'d, and becomes invalid when -\fBarchive\fR +\fIarchive\fR is closed. If -\fBlenp\fR +\fIlenp\fR is not -\fBNULL,\fR +\fRNULL\fR, the integer to which it points will be set to the length of the comment. If -\fBflags\fR +\fIflags\fR is set to -\fBZIP_FL_UNCHANGED,\fR +\fRZIP_FL_UNCHANGED\fR, the original unchanged comment is returned. .PP Additionally, the following -\fBflags\fR +\fIflags\fR are supported: -.RS -.TP 21 -\fBZIP_FL_ENC_RAW\fR +.RS 6n +.TP 21n +\fRZIP_FL_ENC_RAW\fR Return the unmodified comment as it is in the ZIP archive. -.TP 21 -\fBZIP_FL_ENC_GUESS\fR +.TP 21n +\fRZIP_FL_ENC_GUESS\fR (Default.) Guess the encoding of the comment in the ZIP archive and convert it to UTF-8, if necessary. -.TP 21 -\fBZIP_FL_ENC_STRICT\fR +.TP 21n +\fRZIP_FL_ENC_STRICT\fR Follow the ZIP specification for file names and extend it to file comments, expecting them to be encoded in CP-437 in the ZIP archive (except if it is a UTF-8 comment from the special extra field). Convert it to UTF-8. .RE -.I Note: +\fINote:\fR ASCII is a subset of both CP-437 and UTF-8. .SH "RETURN VALUES" Upon successful completion, a pointer to the comment is returned, or -\fBNULL\fR +\fRNULL\fR if there is no comment. In case of an error, -\fBNULL\fR +\fRNULL\fR is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_get_file_comment +\fBzip_file_get_comment\fR() fails if: -.RS -.TP 4 -[ZIP_ER_INVAL] -\fBindex\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIindex\fR is not a valid file index in -\fBarchive.\fR -.RE +\fIarchive\fR. .SH "SEE ALSO" libzip(3), zip_file_set_comment(3), zip_get_archive_comment(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_rename.man b/man/zip_file_rename.man index c3b929f..1d2de69 100644 --- a/man/zip_file_rename.man +++ b/man/zip_file_rename.man
@@ -1,105 +1,72 @@ -.\" zip_file_rename.mdoc \-- rename file in zip archive -.\" Copyright (C) 2003-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FILE_RENAME 3 "June 23, 2012" NiH +.TH "ZIP_FILE_RENAME" "3" "June 23, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_file_rename \- rename file in zip archive +\fBzip_file_rename\fR +\- rename file in zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_file_rename(struct zip *archive, zip_uint64_t index, const char *name); \ -"zip_flags_t flags" +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_file_rename\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIconst char *name\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The file at position -\fBindex\fR +\fIindex\fR in the zip archive -\fBarchive\fR +\fIarchive\fR is renamed to -\fBname.\fR +\fIname\fR. The -\fBflags\fR +\fIflags\fR argument can be any of: -.RS -.TP 22 -\fBZIP_FL_ENC_GUESS\fR +.TP 22n +\fRZIP_FL_ENC_GUESS\fR Guess encoding of -\fBname\fR +\fIname\fR (default). -.TP 22 -\fBZIP_FL_ENC_UTF_8\fR +.TP 22n +\fRZIP_FL_ENC_UTF_8\fR Interpret -\fBname\fR +\fIname\fR as UTF-8. -.TP 22 -\fBZIP_FL_ENC_CP437\fR +.TP 22n +\fRZIP_FL_ENC_CP437\fR Interpret -\fBname\fR +\fIname\fR as code page 437 (CP-437). -.RE .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_rename +\fBzip_rename\fR() fails if: -.RS -.TP 4 -[ZIP_ER_DELETED] +.TP 19n +[\fRZIP_ER_DELETED\fR] The file to be renamed has been deleted from the archive. -.TP 4 -[ZIP_ER_EXISTS] +.TP 19n +[\fRZIP_ER_EXISTS\fR] There is already a file called -\fBname\fR +\fIname\fR in the archive. -.TP 4 -[ZIP_ER_INVAL] -\fBindex\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIindex\fR is not a valid file index in -\fBarchive,\fR -\fBname is\fR -\fBNULL,\fR +\fIarchive\fR, +\fIname is\fR +\fRNULL\fR, the empty string, or not a valid UTF-8 encoded string. Also a file cannot be renamed to a directory or vice versa. Directories are denoted by a trailing slash. -.RE .SH "SEE ALSO" libzip(3), zip_unchange(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_set_comment.man b/man/zip_file_set_comment.man index fc126da..ce9188c 100644 --- a/man/zip_file_set_comment.man +++ b/man/zip_file_set_comment.man
@@ -1,112 +1,84 @@ -.\" zip_file_set_comment.mdoc \-- set comment for file in zip -.\" Copyright (C) 2006-2012 Dieter Baron and Thomas Klausner -.\" -.\" This file is part of libzip, a library to manipulate ZIP files. -.\" The authors can be contacted at <libzip@nih.at> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FILE_SET_COMMENT 3 "June 23, 2012" NiH +.TH "ZIP_FILE_SET_COMMENT" "3" "September 19, 2013" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_file_set_comment \- set comment for file in zip +\fBzip_file_set_comment\fR +\- set comment for file in zip .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_set_file_comment(struct zip *archive, zip_uint64_t index); \ -"const char *comment" "zip_uint16_t len" "zip_flags_t flags" +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_set_file_comment\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIconst char *comment\fR,\ \fIzip_uint16_t len\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The -zip_file_set_comment +\fBzip_file_set_comment\fR() function sets the comment for the file at position -\fBindex\fR +\fIindex\fR in the zip archive to -\fBcomment\fR +\fIcomment\fR of length -\fBlen.\fR +\fIlen\fR. If -\fBcomment\fR +\fIcomment\fR is -\fBNULL\fR +\fRNULL\fR and -\fBlen\fR +\fIlen\fR is 0, the file comment will be removed. The -\fBflags\fR +\fIflags\fR argument can be any of: -.RS -.TP 22 -\fBZIP_FL_ENC_GUESS\fR +.TP 22n +\fRZIP_FL_ENC_GUESS\fR Guess encoding of -\fBcomment\fR +\fIcomment\fR (default). -.TP 22 -\fBZIP_FL_ENC_UTF_8\fR +.TP 22n +\fRZIP_FL_ENC_UTF_8\fR Interpret -\fBcomment\fR +\fIcomment\fR as UTF-8. -.TP 22 -\fBZIP_FL_ENC_CP437\fR +.TP 22n +\fRZIP_FL_ENC_CP437\fR Interpret -\fBcomment\fR +\fIcomment\fR as code page 437 (CP-437). -.RE .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_file_set_comment +\fBzip_file_set_comment\fR() fails if: -.RS -.TP 4 -[ZIP_ER_INVAL] -\fBindex\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIindex\fR is not a valid file index in -\fBarchive,\fR +\fIarchive\fR, or -\fBlen\fR +\fIlen\fR is less than 0 or longer than the maximum comment length in a zip file (65535), or -\fBcomment\fR +\fIcomment\fR is not a valid UTF-8 encoded string. -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.RE +.TP 19n +[\fRZIP_ER_RDONLY\fR] +The +\fIarchive\fR +was opened in read-only mode. .SH "SEE ALSO" libzip(3), zip_get_archive_comment(3), zip_file_get_comment(3), zip_set_archive_comment(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_strerror.man b/man/zip_file_strerror.man index 1fea452..ea8a484 100644 --- a/man/zip_file_strerror.man +++ b/man/zip_file_strerror.man
@@ -1,79 +1,52 @@ -.\" zip_file_strerror.mdoc \-- get string representation for a zip error -.\" Copyright (C) 2003, 2005 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FILE_STRERROR 3 "December 27, 2004" NiH +.TH "ZIP_FILE_STRERROR" "3" "December 27, 2004" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_file_strerror , \- .Nm zip_strerror -get string representation for a zip error +\fBzip_file_strerror\fR, +\fBzip_strerror\fR +\- get string representation for a zip error .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -const char * -zip_file_strerror(struct zip_file *file); -.PP -const char * -zip_strerror(struct zip *archive); +\fB#include <zip.h>\fR +.sp +\fIconst\ char\ *\fR +.br +\fBzip_file_strerror\fR(\fIstruct zip_file *file\fR); +.sp +\fIconst\ char\ *\fR +.br +\fBzip_strerror\fR(\fIstruct zip *archive\fR); .SH "DESCRIPTION" The -zip_strerror +\fBzip_strerror\fR() function returns a string describing the last error for the zip archive -\fBarchive,\fR +\fIarchive\fR, while the -zip_file_strerror +\fBzip_file_strerror\fR() function does the same for a zip file -\fBfile\fR +\fIfile\fR (one file in an archive). The returned string must not be modified or freed, and becomes invalid when -\fBarchive\fR +\fIarchive\fR or -\fBfile,\fR +\fIfile\fR, respectively, is closed or on the next call to -zip_strerror +\fBzip_strerror\fR() or -zip_file_strerror, +\fBzip_file_strerror\fR(), respectively, for the same archive. .SH "RETURN VALUES" -zip_file_strerror +\fBzip_file_strerror\fR() and -zip_strerror +\fBzip_strerror\fR() return a pointer to the error string. .SH "SEE ALSO" libzip(3), zip_error_to_str(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_fopen.man b/man/zip_fopen.man index 172e9dc..ec58b8d 100644 --- a/man/zip_fopen.man +++ b/man/zip_fopen.man
@@ -1,79 +1,53 @@ -.\" zip_fopen.mdoc \-- open file in zip archive for reading -.\" Copyright (C) 2003-2013 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FOPEN 3 "June 26, 2013" NiH +.TH "ZIP_FOPEN" "3" "June 26, 2013" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_fopen , \- .Nm zip_fopen_index -open file in zip archive for reading +\fBzip_fopen\fR, +\fBzip_fopen_index\fR +\- open file in zip archive for reading .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -struct zip_file * -zip_fopen(struct zip *archive, const char *fname, zip_flags_t flags); -.PP -struct zip_file * -zip_fopen_index(struct zip *archive, zip_uint64_t index, zip_flags_t flags); +\fB#include <zip.h>\fR +.sp +\fIstruct\ zip_file\ *\fR +.br +\fBzip_fopen\fR(\fIstruct zip *archive\fR,\ \fIconst char *fname\fR,\ \fIzip_flags_t flags\fR); +.sp +\fIstruct\ zip_file\ *\fR +.br +\fBzip_fopen_index\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The -zip_fopen +\fBzip_fopen\fR() function opens the file name -\fBfname\fR +\fIfname\fR in -\fBarchive.\fR +\fIarchive\fR. The -\fBflags\fR +\fIflags\fR argument specifies how the name lookup should be done, according to the values are described in zip_name_locate(3). Also, the following values may be -.I or'ed +\fIor\fR'ed to it. -.RS -.TP 19 -\fBZIP_FL_COMPRESSED\fR +.RS 6n +.TP 19n +\fRZIP_FL_COMPRESSED\fR Read the compressed data. Otherwise the data is uncompressed by -zip_fread. -.TP 19 -\fBZIP_FL_UNCHANGED\fR +\fBzip_fread\fR(). +.TP 19n +\fRZIP_FL_UNCHANGED\fR Read the original data from the zip archive, ignoring any changes made to the file. .RE .PP The -zip_fopen_index +\fBzip_fopen_index\fR() function opens the file at position -\fBindex.\fR +\fIindex\fR. .PP If encrypted data is encountered, the functions call zip_fopen_encrypted(3) @@ -83,60 +57,57 @@ zip_set_default_password(3). .SH "RETURN VALUES" Upon successful completion, a -.PP -struct zip_file +\fIstruct zip_file\fR pointer is returned. Otherwise, -\fBNULL\fR +\fRNULL\fR is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -.RS -.TP 4 -[ZIP_ER_CHANGED] +.TP 19n +[\fRZIP_ER_CHANGED\fR] The file data has been changed. -.TP 4 -[ZIP_ER_COMPNOTSUPP] +.TP 19n +[\fRZIP_ER_COMPNOTSUPP\fR] The compression method used is not supported. -.TP 4 -[ZIP_ER_ENCRNOTSUPP] +.TP 19n +[\fRZIP_ER_ENCRNOTSUPP\fR] The encryption method used is not supported. -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.TP 4 -[ZIP_ER_NOPASSWD] +.TP 19n +[\fRZIP_ER_NOPASSWD\fR] The file is encrypted, but no password has been provided. -.TP 4 -[ZIP_ER_READ] +.TP 19n +[\fRZIP_ER_READ\fR] A file read error occurred. -.TP 4 -[ZIP_ER_SEEK] +.TP 19n +[\fRZIP_ER_SEEK\fR] A file seek error occurred. -.TP 4 -[ZIP_ER_WRONGPASSWD] +.TP 19n +[\fRZIP_ER_WRONGPASSWD\fR] The provided password does not match the password used for encryption. Note that some incorrect passwords are not detected by the check done by -. -.TP 4 -[ZIP_ER_ZLIB] +\&. +.TP 19n +[\fRZIP_ER_ZLIB\fR] Initializing the zlib stream failed. -.RE .PP The function -zip_fopen +\fBzip_fopen\fR() may also fail and set -.Va zip_err +\fIzip_err\fR for any of the errors specified for the routine zip_name_locate(3). .PP The function -zip_fopen_index +\fBzip_fopen_index\fR() may also fail with -ZIP_ER_INVAL +\fRZIP_ER_INVAL\fR if -\fBindex\fR +\fIindex\fR is invalid. .SH "SEE ALSO" libzip(3), @@ -146,7 +117,6 @@ zip_name_locate(3), zip_set_default_password(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_fopen_encrypted.man b/man/zip_fopen_encrypted.man index 39e74e2..639e517 100644 --- a/man/zip_fopen_encrypted.man +++ b/man/zip_fopen_encrypted.man
@@ -1,103 +1,73 @@ -.\" zip_fopen_encrypted.mdoc \-- open encrypted file in zip archive for reading -.\" Copyright (C) 2011-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FOPEN_ENCRYPTED 3 "July 22, 2012" NiH +.TH "ZIP_FOPEN_ENCRYPTED" "3" "July 22, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_fopen_encrypted , \- .Nm zip_fopen_index_encrypted -open encrypted file in zip archive for reading +\fBzip_fopen_encrypted\fR, +\fBzip_fopen_index_encrypted\fR +\- open encrypted file in zip archive for reading .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -struct zip_file * -zip_fopen_encrypted(struct zip *archive, const char *fname, zip_flags_t flags, const char *password); -.PP -struct zip_file * -zip_fopen_index_encrypted(struct zip *archive, zip_uint64_t index, zip_flags_t flags, const char *password); +\fB#include <zip.h>\fR +.sp +\fIstruct\ zip_file\ *\fR +.br +\fBzip_fopen_encrypted\fR(\fIstruct zip *archive\fR,\ \fIconst char *fname\fR,\ \fIzip_flags_t flags\fR,\ \fIconst char *password\fR); +.sp +\fIstruct\ zip_file\ *\fR +.br +\fBzip_fopen_index_encrypted\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIzip_flags_t flags\fR,\ \fIconst char *password\fR); .SH "DESCRIPTION" The -zip_fopen_encrypted +\fBzip_fopen_encrypted\fR() function opens the encrypted file name -\fBfname\fR +\fIfname\fR in -\fBarchive\fR +\fIarchive\fR using the password given in the -\fBpassword\fR +\fIpassword\fR argument. The -\fBflags\fR +\fIflags\fR argument are the same as for zip_fopen(3). .PP The -zip_fopen_index_encrypted +\fBzip_fopen_index_encrypted\fR() function opens the file at position -\fBindex,\fR +\fIindex\fR, see zip_fopen_index(3). These functions are called automatically by zip_fopen(3); you only need to call them if you want to specify a non-default password (see -zip_set_default_password(3) -). +zip_set_default_password(3)). .SH "RETURN VALUES" Upon successful completion, a -.PP -struct zip_file +\fIstruct zip_file\fR pointer is returned. Otherwise, -\fBNULL\fR +\fRNULL\fR is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -.RS -.TP 22 -[ZIP_ER_NOPASSWD] +.TP 22n +[\fRZIP_ER_NOPASSWD\fR] No password was provided. -.RE .PP The function -zip_fopen_encrypted +\fBzip_fopen_encrypted\fR() may also fail and set -.Va zip_err +\fIzip_err\fR for any of the errors specified for the routine zip_fopen(3). .PP The function -zip_fopen_index_encrypted +\fBzip_fopen_index_encrypted\fR() may also fail and set -.Va zip_err +\fIzip_err\fR for any of the errors specified for the routine zip_fopen_index(3). .SH "SEE ALSO" @@ -108,7 +78,6 @@ zip_get_num_entries(3), zip_name_locate(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_fread.man b/man/zip_fread.man index c9a68ff..ca4ad01 100644 --- a/man/zip_fread.man +++ b/man/zip_fread.man
@@ -1,53 +1,26 @@ -.\" zip_fread.mdoc \-- read from file -.\" Copyright (C) 2003-2009 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_FREAD 3 "March 10, 2009" NiH +.TH "ZIP_FREAD" "3" "March 10, 2009" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_fread \- read from file +\fBzip_fread\fR +\- read from file .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_fread(struct zip_file *file, void *buf, zip_uint64_t nbytes); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_fread\fR(\fIstruct zip_file *file\fR,\ \fIvoid *buf\fR,\ \fIzip_uint64_t nbytes\fR); .SH "DESCRIPTION" The -zip_fread +\fBzip_fread\fR() function reads at most -\fBnbytes\fR +\fInbytes\fR bytes from -\fBfile\fR +\fIfile\fR into -\fBbuf.\fR +\fIbuf\fR. .SH "RETURN VALUES" If successful, the number of bytes actually read is returned. Otherwise, \-1 is returned. @@ -56,7 +29,6 @@ zip_fclose(3), zip_fopen(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_archive_comment.man b/man/zip_get_archive_comment.man index f2c6f7b..5f63c46 100644 --- a/man/zip_get_archive_comment.man +++ b/man/zip_get_archive_comment.man
@@ -1,104 +1,70 @@ -.\" zip_get_archive_comment.mdoc \-- get zip archive comment -.\" Copyright (C) 2006-2013 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_GET_ARCHIVE_COMMENT 3 "February 20, 2013" NiH +.TH "ZIP_GET_ARCHIVE_COMMENT" "3" "February 20, 2013" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_get_archive_comment \- get zip archive comment +\fBzip_get_archive_comment\fR +\- get zip archive comment .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -const char * -zip_get_archive_comment(struct zip *archive, int *lenp, zip_flags_t flags); +\fB#include <zip.h>\fR +.sp +\fIconst\ char\ *\fR +.br +\fBzip_get_archive_comment\fR(\fIstruct zip *archive\fR,\ \fIint *lenp\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The -zip_get_archive_comment +\fBzip_get_archive_comment\fR() function returns the comment for the entire zip archive. The name is in UTF-8 encoding unless -\fBZIP_FL_ENC_RAW\fR +\fRZIP_FL_ENC_RAW\fR was specified (see below). This pointer should not be modified or -free(3) -Ap d, +free(3)'d, and becomes invalid when -\fBarchive\fR +\fIarchive\fR is closed. If -\fBlenp\fR +\fIlenp\fR is not -\fBNULL,\fR +\fRNULL\fR, the integer to which it points will be set to the length of the comment. If -\fBflags\fR +\fIflags\fR is set to -\fBZIP_FL_UNCHANGED,\fR +\fRZIP_FL_UNCHANGED\fR, the original unchanged comment is returned. .PP Additionally, the following -\fBflags\fR +\fIflags\fR are supported: -.RS -.TP 21 -\fBZIP_FL_ENC_RAW\fR +.RS 6n +.TP 21n +\fRZIP_FL_ENC_RAW\fR Return the unmodified archive comment as it is in the ZIP archive. -.TP 21 -\fBZIP_FL_ENC_GUESS\fR +.TP 21n +\fRZIP_FL_ENC_GUESS\fR (Default.) Guess the encoding of the archive comment in the ZIP archive and convert it to UTF-8, if necessary. -.TP 21 -\fBZIP_FL_ENC_STRICT\fR +.TP 21n +\fRZIP_FL_ENC_STRICT\fR Follow the ZIP specification for file names and extend it to the archive comment, thus also expecting it in CP-437 encoding. Convert it to UTF-8. .RE -.I Note: +\fINote:\fR ASCII is a subset of both CP-437 and UTF-8. .SH "RETURN VALUES" Upon successful completion, a pointer to the comment is returned, or -\fBNULL\fR +\fRNULL\fR if there is no comment. -.\" In case of an error, -.\" \fBNULL\fR -.\" is returned and the error code in -.\" \fBarchive\fR -.\" is set to indicate the error. .SH "SEE ALSO" libzip(3), zip_get_file_comment(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_archive_flag.man b/man/zip_get_archive_flag.man index d877e55..a7878b8 100644 --- a/man/zip_get_archive_flag.man +++ b/man/zip_get_archive_flag.man
@@ -1,78 +1,48 @@ -.\" zip_get_archive_flag.mdoc \-- get comment for file in zip -.\" Copyright (C) 2008-2012 Dieter Baron and Thomas Klausner -.\" -.\" This file is part of libzip, a library to manipulate ZIP files. -.\" The authors can be contacted at <libzip@nih.at> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_GET_ARCHIVE_FLAG 3 "July 22, 2012" NiH +.TH "ZIP_GET_ARCHIVE_FLAG" "3" "July 22, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_get_archive_flag \- get status flags for zip +\fBzip_get_archive_flag\fR +\- get status flags for zip .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_get_archive_flag(struct zip *archive, zip_flags_t flag, zip_flags_t flags); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_get_archive_flag\fR(\fIstruct zip *archive\fR,\ \fIzip_flags_t flag\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The -zip_get_archive_flag +\fBzip_get_archive_flag\fR() function returns if the flag -\fBflag\fR +\fIflag\fR is set for the archive -\fBarchive.\fR +\fIarchive\fR. The archive flags might have been changed with -zip_set_archive_flag; +\fBzip_set_archive_flag\fR(); if -\fBflags\fR +\fIflags\fR is set to -\fBZIP_FL_UNCHANGED,\fR +\fRZIP_FL_UNCHANGED\fR, the original unchanged flags are tested. .PP Supported flags are: -.RS -.TP 21 -\fBZIP_AFL_TORRENT\fR +.TP 21n +\fRZIP_AFL_TORRENT\fR The archive is torrent-zipped. -.RE .SH "RETURN VALUES" -zip_get_archive_flag +\fBzip_get_archive_flag\fR() returns 1 if -\fBflag\fR +\fIflag\fR is set for -\fBarchive,\fR +\fIarchive\fR, 0 if not, and \-1 if an error occurred. .SH "SEE ALSO" libzip(3), zip_set_archive_flag(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_file_comment.man b/man/zip_get_file_comment.man index bf80b04..08c7e55 100644 --- a/man/zip_get_file_comment.man +++ b/man/zip_get_file_comment.man
@@ -1,59 +1,31 @@ -.\" zip_get_file_comment.mdoc \-- get comment for file in zip -.\" Copyright (C) 2006-2012 Dieter Baron and Thomas Klausner -.\" -.\" This file is part of libzip, a library to manipulate ZIP files. -.\" The authors can be contacted at <libzip@nih.at> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_GET_FILE_COMMENT 3 "June 23, 2012" NiH +.TH "ZIP_GET_FILE_COMMENT" "3" "June 23, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_get_file_comment \- get comment for file in zip +\fBzip_get_file_comment\fR +\- get comment for file in zip .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -const char * -zip_get_file_comment(struct zip *archive, zip_uint64_t index, int *lenp, int flags); +\fB#include <zip.h>\fR +.sp +\fIconst\ char\ *\fR +.br +\fBzip_get_file_comment\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIint *lenp\fR,\ \fIint flags\fR); .SH "DESCRIPTION" The -zip_get_file_comment +\fBzip_get_file_comment\fR() function is the obsolete version of zip_file_get_comment(3). The only differences are the types of the -\fBlenp\fR +\fIlenp\fR and -\fBflags\fR +\fIflags\fR arguments. .SH "SEE ALSO" libzip(3), zip_file_get_comment(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_name.man b/man/zip_get_name.man index 9cc0c38..162fced 100644 --- a/man/zip_get_name.man +++ b/man/zip_get_name.man
@@ -1,121 +1,90 @@ -.\" zip_get_name.mdoc \-- get name of file by index -.\" Copyright (C) 2003-2013 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_GET_NAME 3 "February 20, 2013" NiH +.TH "ZIP_GET_NAME" "3" "February 20, 2013" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_get_name \- get name of file by index +\fBzip_get_name\fR +\- get name of file by index .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -const char * -zip_get_name(struct zip *archive, zip_uint64_t index, zip_flags_t flags); +\fB#include <zip.h>\fR +.sp +\fIconst\ char\ *\fR +.br +\fBzip_get_name\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The -zip_get_name +\fBzip_get_name\fR() function returns the name of the file at position -\fBindex\fR +\fIindex\fR in -\fBarchive.\fR +\fIarchive\fR. The name is in UTF-8 encoding unless -\fBZIP_FL_ENC_RAW\fR +\fRZIP_FL_ENC_RAW\fR was specified (see below). .PP If -\fBflags\fR +\fIflags\fR is set to -\fBZIP_FL_UNCHANGED,\fR +\fRZIP_FL_UNCHANGED\fR, the original unchanged filename is returned. The returned string must not be modified or freed, and becomes invalid when -\fBarchive\fR +\fIarchive\fR is closed. .PP Additionally, the following -\fBflags\fR +\fIflags\fR are supported: -.RS -.TP 21 -\fBZIP_FL_ENC_RAW\fR +.RS 6n +.TP 21n +\fRZIP_FL_ENC_RAW\fR Return the unmodified names as it is in the ZIP archive. -.TP 21 -\fBZIP_FL_ENC_GUESS\fR +.TP 21n +\fRZIP_FL_ENC_GUESS\fR (Default.) Guess the encoding of the name in the ZIP archive and convert it to UTF-8, if necessary. -.TP 21 -\fBZIP_FL_ENC_STRICT\fR +.TP 21n +\fRZIP_FL_ENC_STRICT\fR Follow the ZIP specification and expect CP-437 encoded names in the ZIP archive (except if they are explicitly marked as UTF-8). Convert it to UTF-8. .RE -.I Note: +\fINote:\fR ASCII is a subset of both CP-437 and UTF-8. .SH "RETURN VALUES" Upon successful completion, a pointer to the name is returned. Otherwise, -\fBNULL\fR +\fRNULL\fR and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_get_name +\fBzip_get_name\fR() fails if: -.RS -.TP 4 -[ZIP_ER_DELETED] -\fBindex\fR +.TP 19n +[\fRZIP_ER_DELETED\fR] +\fIindex\fR refers to a file that has been deleted (see -zip_delete(3) -). -.TP 4 -[ZIP_ER_INVAL] -\fBindex\fR +zip_delete(3)). +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIindex\fR is not a valid file index in -\fBarchive,\fR +\fIarchive\fR, or -\fBindex\fR +\fIindex\fR points to an added file and -\fBZIP_FL_UNCHANGED\fR +\fRZIP_FL_UNCHANGED\fR is set. -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.RE .SH "SEE ALSO" libzip(3), zip_name_locate(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_num_entries.man b/man/zip_get_num_entries.man index 07b1296..b06ca36 100644 --- a/man/zip_get_num_entries.man +++ b/man/zip_get_num_entries.man
@@ -1,67 +1,39 @@ -.\" zip_get_num_entries.mdoc \-- get number of files in archive -.\" Copyright (C) 2011-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_GET_NUM_ENTRIES 3 "August 1, 2012" NiH +.TH "ZIP_GET_NUM_ENTRIES" "3" "August 1, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_get_num_entries \- get number of files in archive +\fBzip_get_num_entries\fR +\- get number of files in archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -zip_int64_t -zip_get_num_entries(struct zip *archive, zip_flags_t flags); +\fB#include <zip.h>\fR +.sp +\fIzip_int64_t\fR +.br +\fBzip_get_num_entries\fR(\fIstruct zip *archive\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The -zip_get_num_entries +\fBzip_get_num_entries\fR() function returns the number of files in -\fBarchive.\fR +\fIarchive\fR. If -\fBflags\fR +\fIflags\fR is set to -\fBZIP_FL_UNCHANGED,\fR +\fRZIP_FL_UNCHANGED\fR, the original number of entries is returned. .SH "RETURN VALUES" -zip_get_num_entries +\fBzip_get_num_entries\fR() returns the number of files in the zip archive, or \-1 if -\fBarchive\fR +\fIarchive\fR is -\fBNULL.\fR +\fRNULL\fR. .SH "SEE ALSO" libzip(3), zip_fopen_index(3), zip_stat_index(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_num_files.man b/man/zip_get_num_files.man index ebb733d..298b806 100644 --- a/man/zip_get_num_files.man +++ b/man/zip_get_num_files.man
@@ -1,67 +1,39 @@ -.\" zip_get_num_files.mdoc \-- get number of files in archive -.\" Copyright (C) 2003-2011 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_GET_NUM_FILES 3 "February 14, 2011" NiH +.TH "ZIP_GET_NUM_FILES" "3" "February 14, 2011" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_get_num_files \- get number of files in archive +\fBzip_get_num_files\fR +\- get number of files in archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_get_num_files(struct zip *archive); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_get_num_files\fR(\fIstruct zip *archive\fR); .SH "DESCRIPTION" -.I This function is deprecated. -.I Use +\fIThis function is deprecated.\fR +\fIUse\fR zip_get_num_entries(3) -.I instead. +\fIinstead.\fR .PP The -zip_get_num_files +\fBzip_get_num_files\fR() function returns the number of files in -\fBarchive.\fR +\fIarchive\fR. .SH "RETURN VALUES" -zip_get_num_files +\fBzip_get_num_files\fR() returns the number of files in the zip archive, or \-1 if -\fBarchive\fR +\fIarchive\fR is -\fBNULL.\fR +\fRNULL\fR. .SH "SEE ALSO" libzip(3), zip_fopen_index(3), zip_stat_index(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_name_locate.man b/man/zip_name_locate.man index 3f90dc7..3acf8c0 100644 --- a/man/zip_name_locate.man +++ b/man/zip_name_locate.man
@@ -1,111 +1,82 @@ -.\" zip_name_locate.mdoc \-- get index of file by name -.\" Copyright (C) 2003-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_NAME_LOCATE 3 "July 21, 2012" NiH +.TH "ZIP_NAME_LOCATE" "3" "July 21, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_name_locate \- get index of file by name +\fBzip_name_locate\fR +\- get index of file by name .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -zip_int64_t -zip_name_locate(struct zip *archive, const char *fname, zip_flags_t flags); +\fB#include <zip.h>\fR +.sp +\fIzip_int64_t\fR +.br +\fBzip_name_locate\fR(\fIstruct zip *archive\fR,\ \fIconst char *fname\fR,\ \fIzip_flags_t flags\fR); .SH "DESCRIPTION" The -zip_name_locate +\fBzip_name_locate\fR() function returns the index of the file named -\fBfname\fR +\fIfname\fR in -\fBarchive.\fR +\fIarchive\fR. If -\fBarchive\fR +\fIarchive\fR does not contain a file with that name, \-1 is returned. The -.Fa flags +\fIflags\fR are specified by -.I or'ing +\fIor\fR'ing the following values, or 0 for none of them. -.RS -.TP 15 -\fBZIP_FL_NOCASE\fR +.RS 6n +.TP 15n +\fRZIP_FL_NOCASE\fR Ignore case distinctions. (Will only work well if the file names are ASCII.) -.TP 15 -\fBZIP_FL_NODIR\fR +.TP 15n +\fRZIP_FL_NODIR\fR Ignore directory part of file name in archive. -.TP 15 -\fBZIP_FL_ENC_RAW\fR +.TP 15n +\fRZIP_FL_ENC_RAW\fR +.br Compare against the unmodified names as it is in the ZIP archive. -.TP 15 -\fBZIP_FL_ENC_GUESS\fR +.TP 15n +\fRZIP_FL_ENC_GUESS\fR (Default.) Guess the encoding of the name in the ZIP archive and convert it to UTF-8, if necessary, before comparing. -.TP 15 -\fBZIP_FL_ENC_STRICT\fR +.TP 15n +\fRZIP_FL_ENC_STRICT\fR Follow the ZIP specification and expect CP-437 encoded names in the ZIP archive (except if they are explicitly marked as UTF-8). Convert it to UTF-8 before comparing. .RE -.I Note: +\fINote:\fR ASCII is a subset of both CP-437 and UTF-8. .SH "RETURN VALUES" -zip_name_locate +\fBzip_name_locate\fR() returns the index of the file named -\fBfname\fR +\fIfname\fR or \-1, if -\fBarchive\fR +\fIarchive\fR does not contain an entry of that name. .SH "ERRORS" -zip_name_locate +\fBzip_name_locate\fR() fails if: -.RS -.TP 4 -[ZIP_ER_NOENT] +.TP 19n +[\fRZIP_ER_NOENT\fR] No entry of the name -\fBfname\fR +\fIfname\fR is found in the archive. -.TP 4 -[ZIP_ER_INVAL] +.TP 19n +[\fRZIP_ER_INVAL\fR] One of the arguments is invalid. -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.RE .SH "SEE ALSO" libzip(3), zip_get_name(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_open.man b/man/zip_open.man index 4cb7c8a..1033a00 100644 --- a/man/zip_open.man +++ b/man/zip_open.man
@@ -1,151 +1,119 @@ -.\" zip_open.mdoc \-- open zip archive -.\" Copyright (C) 2003-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_OPEN 3 "February 13, 2012" NiH +.TH "ZIP_OPEN" "3" "February 13, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_open \- open zip archive +\fBzip_open\fR +\- open zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -struct zip * -zip_open(const char *path, int flags, int *errorp); +\fB#include <zip.h>\fR +.sp +\fIstruct\ zip\ *\fR +.br +\fBzip_open\fR(\fIconst char *path\fR,\ \fIint flags\fR,\ \fIint *errorp\fR); .SH "DESCRIPTION" The zip archive specified by -\fBpath\fR +\fIpath\fR is opened and a pointer to a -.PP -struct zip, +\fIstruct zip\fR, used to manipulate the archive, is returned. The -.Fa flags +\fIflags\fR are specified by -.I or'ing +\fIor\fR'ing the following values, or 0 for none of them. -.RS -.TP 15 -\fBZIP_CHECKCONS\fR +.RS 6n +.TP 15n +\fRZIP_CHECKCONS\fR Perform additional stricter consistency checks on the archive, and error if they fail. -.TP 15 -\fBZIP_CREATE\fR +.TP 15n +\fRZIP_CREATE\fR Create the archive if it does not exist. -.TP 15 -\fBZIP_EXCL\fR +.TP 15n +\fRZIP_EXCL\fR Error if archive already exists. -.TP 15 -\fBZIP_TRUNCATE\fR +.TP 15n +\fRZIP_TRUNCATE\fR If archive exists, ignore its current contents. In other words, handle it the same way as an empty archive. .RE .PP If an error occurs and -\fBerrorp\fR +\fIerrorp\fR is non-NULL, it will be set to the corresponding error code. .SH "RETURN VALUES" Upon successful completion -zip_open +\fBzip_open\fR() returns a -.PP -struct zip +\fIstruct zip\fR pointer. Otherwise, -\fBNULL\fR +\fRNULL\fR is returned and -\fB*errorp\fR +\fI*errorp\fR is set to indicate the error. .SH "ERRORS" The archive specified by -\fBpath\fR +\fIpath\fR is opened unless: -.RS -.TP 4 -[ZIP_ER_EXISTS] +.TP 19n +[\fRZIP_ER_EXISTS\fR] The file specified by -\fBpath\fR +\fIpath\fR exists and -\fBZIP_EXCL\fR +\fRZIP_EXCL\fR is set. -.TP 4 -[ZIP_ER_INCONS] +.TP 19n +[\fRZIP_ER_INCONS\fR] Inconsistencies were found in the file specified by -\fBpath.\fR +\fIpath\fR. This error is often caused by specifying -\fBZIP_CHECKCONS\fR +\fRZIP_CHECKCONS\fR but can also happen without it. -.TP 4 -[ZIP_ER_INVAL] +.TP 19n +[\fRZIP_ER_INVAL\fR] The -\fBpath\fR +\fIpath\fR argument is -\fBNULL.\fR -.TP 4 -[ZIP_ER_MEMORY] +\fRNULL\fR. +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.TP 4 -[ZIP_ER_NOENT] +.TP 19n +[\fRZIP_ER_NOENT\fR] The file specified by -\fBpath\fR +\fIpath\fR does not exist and -\fBZIP_CREATE\fR +\fRZIP_CREATE\fR is not set. -.TP 4 -[ZIP_ER_NOZIP] +.TP 19n +[\fRZIP_ER_NOZIP\fR] The file specified by -\fBpath\fR +\fIpath\fR is not a zip archive. -.TP 4 -[ZIP_ER_OPEN] +.TP 19n +[\fRZIP_ER_OPEN\fR] The file specified by -\fBpath\fR +\fIpath\fR could not be opened. -.TP 4 -[ZIP_ER_READ] +.TP 19n +[\fRZIP_ER_READ\fR] A read error occurred; see -.Va errno +\fIerrno\fR for details. -.TP 4 -[ZIP_ER_SEEK] +.TP 19n +[\fRZIP_ER_SEEK\fR] The file specified by -\fBpath\fR +\fIpath\fR does not allow seeks. -.RE .SH "SEE ALSO" libzip(3), zip_close(3), zip_error_to_str(3), zip_fdopen(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_rename.man b/man/zip_rename.man index fba5eb8..ee7c482 100644 --- a/man/zip_rename.man +++ b/man/zip_rename.man
@@ -1,46 +1,19 @@ -.\" zip_rename.mdoc \-- rename file in zip archive -.\" Copyright (C) 2003-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_RENAME 3 "June 23, 2012" NiH +.TH "ZIP_RENAME" "3" "June 23, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_rename \- rename file in zip archive +\fBzip_rename\fR +\- rename file in zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_rename(struct zip *archive, zip_uint64_t index, const char *name); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_rename\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIconst char *name\fR); .SH "DESCRIPTION" -zip_rename +\fBzip_rename\fR() is the obsolete version of zip_file_rename(3). It is the same as calling @@ -50,7 +23,6 @@ libzip(3), zip_file_rename(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_set_archive_comment.man b/man/zip_set_archive_comment.man index 0c8046a..731d119 100644 --- a/man/zip_set_archive_comment.man +++ b/man/zip_set_archive_comment.man
@@ -1,85 +1,54 @@ -.\" zip_set_archive_comment.mdoc \-- set zip archive comment -.\" Copyright (C) 2006-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_SET_ARCHIVE_COMMENT 3 "July 22, 2012" NiH +.TH "ZIP_SET_ARCHIVE_COMMENT" "3" "July 22, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_set_archive_comment \- set zip archive comment +\fBzip_set_archive_comment\fR +\- set zip archive comment .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_set_archive_comment(struct zip *archive); \ -"const char *comment" "zip_uint16_t len" +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_set_archive_comment\fR(\fIstruct zip *archive\fR,\ \fIconst char *comment\fR,\ \fIzip_uint16_t len\fR); .SH "DESCRIPTION" The -zip_set_archive_comment +\fBzip_set_archive_comment\fR() function sets the comment for the entire zip archive. If -\fBcomment\fR +\fIcomment\fR is -\fBNULL\fR +\fRNULL\fR and -\fBlen\fR +\fIlen\fR is 0, the archive comment will be removed. -\fBcomment\fR +\fIcomment\fR must be encoded in ASCII or UTF-8. .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_set_archive_comment +\fBzip_set_archive_comment\fR() fails if: -.RS -.TP 4 -[ZIP_ER_INVAL] -\fBlen\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIlen\fR is less than 0 or longer than the maximum comment length in a zip file (65535), or -\fBcomment\fR +\fIcomment\fR is not a valid UTF-8 encoded string. -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.RE .SH "SEE ALSO" libzip(3), zip_get_archive_comment(3), zip_get_file_comment(3), zip_set_file_comment(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_set_archive_flag.man b/man/zip_set_archive_flag.man index da30689..bd8536d 100644 --- a/man/zip_set_archive_flag.man +++ b/man/zip_set_archive_flag.man
@@ -1,65 +1,36 @@ -.\" zip_set_archive_flag.mdoc \-- set zip archive flag -.\" Copyright (C) 2008-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_SET_ARCHIVE_FLAG 3 "July 22, 2012" NiH +.TH "ZIP_SET_ARCHIVE_FLAG" "3" "July 22, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_set_archive_flag \- set zip archive flag +\fBzip_set_archive_flag\fR +\- set zip archive flag .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_set_archive_flag(struct zip *archive, zip_flags_t flag, int value); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_set_archive_flag\fR(\fIstruct zip *archive\fR,\ \fIzip_flags_t flag\fR,\ \fIint value\fR); .SH "DESCRIPTION" The -zip_set_archive_flag +\fBzip_set_archive_flag\fR() function sets the flag -\fBflag\fR +\fIflag\fR for the archive -\fBarchive\fR +\fIarchive\fR to the value -\fBvalue.\fR +\fIvalue\fR. .PP Supported flags are: -.RS -.TP 21 -\fBZIP_AFL_TORRENT\fR +.TP 21n +\fRZIP_AFL_TORRENT\fR Create a torrent-zipped archive. This restricts the values that can be set from the application side. In particular, time stamps are not saved and the order of the files in the archive is alphabetical. No file comments or extended attributes are allowed and the archive comment can not be chosen. -.RE .SH "RETURN VALUES" Upon successful completion 0 is returned, and \-1 if an error occurred. @@ -67,7 +38,6 @@ libzip(3), zip_get_archive_flag(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_set_default_password.man b/man/zip_set_default_password.man index ad4db30..1ca9416 100644 --- a/man/zip_set_default_password.man +++ b/man/zip_set_default_password.man
@@ -1,52 +1,25 @@ -.\" zip_set_default_password.mdoc \-- set default password for zip -.\" Copyright (C) 2011 Dieter Baron and Thomas Klausner -.\" -.\" This file is part of libzip, a library to manipulate ZIP files. -.\" The authors can be contacted at <libzip@nih.at> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_SET_DEFAULT_PASSWORD 3 "January 3, 2011" NiH +.TH "ZIP_SET_DEFAULT_PASSWORD" "3" "January 3, 2011" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_set_default_password \- set default password for encrypted files in zip +\fBzip_set_default_password\fR +\- set default password for encrypted files in zip .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_set_default_password(struct zip *archive, const char *password); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_set_default_password\fR(\fIstruct zip *archive\fR,\ \fIconst char *password\fR); .SH "DESCRIPTION" The -zip_set_default_password +\fBzip_set_default_password\fR() function sets the default password used when accessing encrypted files. If -\fBpassword\fR +\fIpassword\fR is -\fBNULL,\fR +\fRNULL\fR, the default password is unset. .PP If you prefer a different password for single files, use @@ -58,22 +31,19 @@ .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_set_default_password +\fBzip_set_default_password\fR() fails if: -.RS -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.RE .SH "SEE ALSO" libzip(3), zip_fopen(3), zip_fopen_encrypted(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_set_file_comment.man b/man/zip_set_file_comment.man index 3a56420..3af0bae 100644 --- a/man/zip_set_file_comment.man +++ b/man/zip_set_file_comment.man
@@ -1,66 +1,37 @@ -.\" zip_set_file_comment.mdoc \-- set comment for file in zip -.\" Copyright (C) 2006-2012 Dieter Baron and Thomas Klausner -.\" -.\" This file is part of libzip, a library to manipulate ZIP files. -.\" The authors can be contacted at <libzip@nih.at> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_SET_FILE_COMMENT 3 "June 23, 2012" NiH +.TH "ZIP_SET_FILE_COMMENT" "3" "June 23, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_set_file_comment \- set comment for file in zip +\fBzip_set_file_comment\fR +\- set comment for file in zip .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_set_file_comment(struct zip *archive, zip_uint64_t index); \ -"const char *comment" "int len" +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_set_file_comment\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIconst char *comment\fR,\ \fIint len\fR); .SH "DESCRIPTION" The -zip_set_file_comment +\fBzip_set_file_comment\fR() function is the obsolete version of zip_file_set_comment(3). The only differences are the type of the -\fBlen\fR +\fIlen\fR argument and the additional -\fBflags\fR +\fIflags\fR argument. -zip_set_file_comment +\fBzip_set_file_comment\fR() is the same as calling zip_file_set_comment(3) with an empty -\fBflags\fR +\fIflags\fR argument. .SH "SEE ALSO" libzip(3), zip_file_set_comment(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_set_file_compression.man b/man/zip_set_file_compression.man index 9890a94..b9ad978 100644 --- a/man/zip_set_file_compression.man +++ b/man/zip_set_file_compression.man
@@ -1,85 +1,49 @@ -.\" zip_set_file_compression.mdoc \-- set compression method and its flags -.\" Copyright (C) 2012 Dieter Baron and Thomas Klausner -.\" -.\" This file is part of libzip, a library to manipulate ZIP files. -.\" The authors can be contacted at <libzip@nih.at> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_SET_FILE_COMPRESSION 3 "May 1, 2012" NiH +.TH "ZIP_SET_FILE_COMPRESSION" "3" "May 1, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_set_file_compression \- set compression method for file in zip +\fBzip_set_file_compression\fR +\- set compression method for file in zip .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_set_file_compression(struct zip *archive, zip_uint64_t index); \ -"zip_int32_t comp" "zip_uint32_t comp_flags" +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_set_file_compression\fR(\fIstruct zip *archive\fR,\ \fIzip_uint64_t index\fR,\ \fIzip_int32_t comp\fR,\ \fIzip_uint32_t comp_flags\fR); .SH "DESCRIPTION" The -zip_set_file_compression +\fBzip_set_file_compression\fR() function sets the compression method for the file at position -\fBindex\fR +\fIindex\fR in the zip archive to -\fBcomp\fR +\fIcomp\fR with the compression method specific -\fBcomp_flags.\fR +\fIcomp_flags\fR. The -\fBcomp\fR +\fIcomp\fR is the same as returned by zip_stat(3). For the -\fBcomp\fR +\fIcomp\fR argument, currently only the following values are supported: -.RS -.TP 19 -\fBZIP_CM_DEFAULT\fR +.TP 19n +\fRZIP_CM_DEFAULT\fR default compression; currently the same as -\fBZIP_CM_DEFLATE.\fR -.TP 19 -\fBZIP_CM_STORE\fR +\fRZIP_CM_DEFLATE\fR. +.TP 19n +\fRZIP_CM_STORE\fR Store the file uncompressed. -.TP 19 -\fBZIP_CM_DEFLATE\fR +.TP 19n +\fRZIP_CM_DEFLATE\fR Deflate the file with the zlib(3) algorithm and default options -.RE .PP The -\fBcomp_flags\fR +\fIcomp_flags\fR argument is currently ignored. -.\" For the comp_flags argument, the lower 4 bits define the compression -.\" level. -.\" 0 is fastest compression, 15 is highest compression -.\" \fBZIP_COMP_FL_DEFAULT\fR -.\" can be used to specify that the default shall be used. -.\" Further compression method specific flags will be added over time. .PP The current compression method for a file in a zip archive can be determined using @@ -87,30 +51,27 @@ .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_set_file_compression +\fBzip_set_file_compression\fR() fails if: -.RS -.TP 4 -[ZIP_ER_INVAL] -\fBindex\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIindex\fR is not a valid file index in -\fBarchive,\fR +\fIarchive\fR, or the argument combination is invalid. -.TP 4 -[ZIP_ER_COMPNOTSUPP] +.TP 19n +[\fRZIP_ER_COMPNOTSUPP\fR] Unsupported compression method requested. -.TP 4 -[ZIP_ER_RDONLY] +.TP 19n +[\fRZIP_ER_RDONLY\fR] Read-only zip file, no changes allowed. -.RE .SH "SEE ALSO" libzip(3), zip_stat(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_buffer.man b/man/zip_source_buffer.man index 05a141f..29c9110 100644 --- a/man/zip_source_buffer.man +++ b/man/zip_source_buffer.man
@@ -1,77 +1,47 @@ -.\" zip_source_buffer.mdoc \-- create zip data source from buffer -.\" Copyright (C) 2004-2008 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_SOURCE_DATA 3 "August 1, 2008" NiH +.TH "ZIP_SOURCE_DATA" "3" "August 1, 2008" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_source_buffer \- create zip data source from buffer +\fBzip_source_buffer\fR +\- create zip data source from buffer .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -struct zip_source * -zip_source_buffer(struct zip *archive, const void *data); \ -"zip_uint64_t len" "int freep" +\fB#include <zip.h>\fR +.sp +\fIstruct\ zip_source\ *\fR +.br +\fBzip_source_buffer\fR(\fIstruct zip *archive\fR,\ \fIconst void *data\fR,\ \fIzip_uint64_t len\fR,\ \fIint freep\fR); .SH "DESCRIPTION" The function -zip_source_buffer +\fBzip_source_buffer\fR() creates a zip source from the buffer -\fBdata\fR +\fIdata\fR of size -\fBlen.\fR +\fIlen\fR. If -\fBfreep\fR +\fIfreep\fR is non-zero, the buffer will be freed when it is no longer needed. .SH "RETURN VALUES" Upon successful completion, the created source is returned. Otherwise, -\fBNULL\fR +\fRNULL\fR is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_source_buffer +\fBzip_source_buffer\fR() fails if: -.RS -.TP 4 -[ZIP_ER_INVAL] -\fBlen\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIlen\fR is greater than zero and -\fBdata\fR +\fIdata\fR is -\fBNULL.\fR -.TP 4 -[ZIP_ER_MEMORY] +\fRNULL\fR. +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.RE .SH "SEE ALSO" libzip(3), zip_add(3), @@ -82,7 +52,6 @@ zip_source_function(3), zip_source_zip(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_file.man b/man/zip_source_file.man index 0d0f9ab..1a69767 100644 --- a/man/zip_source_file.man +++ b/man/zip_source_file.man
@@ -1,91 +1,60 @@ -.\" zip_source_file.mdoc \-- create data source from a file -.\" Copyright (C) 2004-2008 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_SOURCE_FILE 3 "August 1, 2008" NiH +.TH "ZIP_SOURCE_FILE" "3" "August 1, 2008" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_source_file \- create data source from a file +\fBzip_source_file\fR +\- create data source from a file .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -.PP -struct zip_source * -zip_source_file(struct zip *archive, const char *fname); \ -"zip_uint64_t start" "zip_int64_t len" +\fIstruct\ zip_source\ *\fR +.br +\fBzip_source_file\fR(\fIstruct zip *archive\fR,\ \fIconst char *fname\fR,\ \fIzip_uint64_t start\fR,\ \fIzip_int64_t len\fR); .SH "DESCRIPTION" The function -zip_source_file +\fBzip_source_file\fR() creates a zip source from a file. -zip_source_file +\fBzip_source_file\fR() opens -\fBfname\fR +\fIfname\fR and reads -\fBlen\fR +\fIlen\fR bytes from offset -\fBstart\fR +\fIstart\fR from it. If -\fBlen\fR +\fIlen\fR is 0 or \-1, the whole file (starting from -\fBstart )\fR +\fIstart\fR) is used. .PP The fie is opened and read when the data from the source is used, usually by -zip_close. +\fBzip_close\fR(). .SH "RETURN VALUES" Upon successful completion, the created source is returned. Otherwise, -\fBNULL\fR +\fRNULL\fR is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_source_file +\fBzip_source_file\fR() fails if: -.RS -.TP 4 -[ZIP_ER_INVAL] -\fBfname,\fR -\fBstart,\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIfname\fR, +\fIstart\fR, or -\fBlen\fR +\fIlen\fR are invalid. -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.TP 4 -[ZIP_ER_OPEN] +.TP 19n +[\fRZIP_ER_OPEN\fR] Opening -\fBfname\fR +\fIfname\fR failed. -.RE .SH "SEE ALSO" libzip(3), zip_add(3), @@ -96,7 +65,6 @@ zip_source_function(3), zip_source_zip(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_filep.man b/man/zip_source_filep.man index bec64d7..2d693c4 100644 --- a/man/zip_source_filep.man +++ b/man/zip_source_filep.man
@@ -1,82 +1,51 @@ -.\" zip_source_filep.mdoc \-- create data source from a file stream -.\" Copyright (C) 2004-2008 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_SOURCE_FILEP 3 "August 1, 2008" NiH +.TH "ZIP_SOURCE_FILEP" "3" "August 1, 2008" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_source_filep \- create data source from FILE * +\fBzip_source_filep\fR +\- create data source from FILE * .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -.PP -struct zip_source * -zip_source_filep(struct zip *archive, FILE *file); \ -"zip_uint64_t start" "zip_int64_t len" +\fIstruct\ zip_source\ *\fR +.br +\fBzip_source_filep\fR(\fIstruct zip *archive\fR,\ \fIFILE *file\fR,\ \fIzip_uint64_t start\fR,\ \fIzip_int64_t len\fR); .SH "DESCRIPTION" The function -zip_source_filep +\fBzip_source_filep\fR() creates a zip source from a file stream. -zip_source_filep +\fBzip_source_filep\fR() reads -\fBlen\fR +\fIlen\fR bytes from offset -\fBstart\fR +\fIstart\fR from the open file stream -\fBfile.\fR +\fIfile\fR. If -\fBlen\fR +\fIlen\fR is 0 or \-1, the whole file (starting from -\fBstart )\fR +\fIstart\fR) is used. .SH "RETURN VALUES" Upon successful completion, the created source is returned. Otherwise, -\fBNULL\fR +\fRNULL\fR is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_source_filep +\fBzip_source_filep\fR() fails if: -.RS -.TP 4 -[ZIP_ER_INVAL] -\fBfile,\fR -\fBstart,\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIfile\fR, +\fIstart\fR, or -\fBlen\fR +\fIlen\fR are invalid. -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.RE .SH "SEE ALSO" libzip(3), zip_add(3), @@ -87,7 +56,6 @@ zip_source_function(3), zip_source_zip(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_free.man b/man/zip_source_free.man index 93aad69..5fa3c79 100644 --- a/man/zip_source_free.man +++ b/man/zip_source_free.man
@@ -1,58 +1,31 @@ -.\" zip_source_free.mdoc \-- free zip data source -.\" Copyright (C) 2004, 2005, 2006 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_SOURCE_FREE 3 "April 23, 2006" NiH +.TH "ZIP_SOURCE_FREE" "3" "April 23, 2006" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_source_free \- free zip data source +\fBzip_source_free\fR +\- free zip data source .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -void -zip_source_free(struct zip_source *source); +\fB#include <zip.h>\fR +.sp +\fIvoid\fR +.br +\fBzip_source_free\fR(\fIstruct zip_source *source\fR); .SH "DESCRIPTION" The function -zip_source_free +\fBzip_source_free\fR() frees the zip data source -\fBsource.\fR +\fIsource\fR. If -\fBsource\fR +\fIsource\fR is -\fBNULL,\fR +\fRNULL\fR, it does nothing. .PP -.I NOTE : +\fINOTE\fR: This function should not be called on a -\fBsource\fR +\fIsource\fR after it was used successfully in a zip_add(3) or @@ -66,7 +39,6 @@ zip_source_function(3), zip_source_zip(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_function.man b/man/zip_source_function.man index 5b33557..bec9a33 100644 --- a/man/zip_source_function.man +++ b/man/zip_source_function.man
@@ -1,107 +1,83 @@ -.\" zip_source_function.mdoc \-- create data source from function -.\" Copyright (C) 2004-2013 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_SOURCE_FUNCTION 3 "September 22, 2013" NiH +.TH "ZIP_SOURCE_FUNCTION" "3" "September 22, 2013" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_source_function \- create data source from function +\fBzip_source_function\fR +\- create data source from function .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -struct zip_source * -zip_source_function(struct zip *archive, zip_source_callback fn, void *userdata); +\fB#include <zip.h>\fR +.sp +\fIstruct\ zip_source\ *\fR +.br +\fBzip_source_function\fR(\fIstruct zip *archive\fR,\ \fIzip_source_callback fn\fR,\ \fIvoid *userdata\fR); .SH "DESCRIPTION" The function -zip_source_function +\fBzip_source_function\fR() creates a zip source from the user-provided function -\fBfn,\fR +\fIfn\fR, which must be of the following type: -.Bd \-literal +.nf +.sp +.RS 0n typedef zip_int64_t (*zip_source_callback)(void *state, void *data, zip_uint64_t len, enum zip_source_cmd cmd); -.Ed +.RE +.fi .PP When called by the library, the first argument is the -\fBuserdata\fR +\fIuserdata\fR argument supplied to -zip_source_function. +\fBzip_source_function\fR(). The next two arguments are a buffer -\fBdata\fR +\fIdata\fR of size -\fBlen\fR +\fIlen\fR when data is expected to be returned, or else -\fBNULL\fR +\fRNULL\fR and 0. The last argument, -\fBcmd,\fR +\fIcmd\fR, specifies which action the function should perform: -.RS -.TP 21 -\fBZIP_SOURCE_OPEN\fR +.RS 6n +.TP 21n +\fRZIP_SOURCE_OPEN\fR Prepare for reading. Return 0 on success, \-1 on error. -.TP 21 -\fBZIP_SOURCE_READ\fR +.TP 21n +\fRZIP_SOURCE_READ\fR Read data into the buffer -\fBdata\fR +\fIdata\fR of size -\fBlen.\fR +\fIlen\fR. Return the number of bytes placed into -\fBdata\fR +\fIdata\fR on success, \-1 on error. -.TP 21 -\fBZIP_SOURCE_CLOSE\fR +.TP 21n +\fRZIP_SOURCE_CLOSE\fR Reading is done. Return 0. -.TP 21 -\fBZIP_SOURCE_STAT\fR +.TP 21n +\fRZIP_SOURCE_STAT\fR Get meta information for the input data. -\fBdata\fR +\fIdata\fR points to an allocated -.Vt struct zip_stat, +\fIstruct zip_stat\fR, which should be initialized using zip_stat_init(3) and then filled in. Information only available after the source has been read (e.g. size) can be omitted in an earlier call. Return sizeof(struct zip_stat) on success, \-1 on error. -.I NOTE : -zip_source_function +\fINOTE\fR: +\fBzip_source_function\fR() may be called with this argument even after being called with -\fBZIP_SOURCE_CLOSE.\fR -.TP 21 -\fBZIP_SOURCE_ERROR\fR +\fRZIP_SOURCE_CLOSE\fR. +.TP 21n +\fRZIP_SOURCE_ERROR\fR Get error information. -\fBdata\fR +\fIdata\fR points to an array of two ints, which should be filled with the libzip error code and the corresponding system error code for the error that occurred. @@ -109,52 +85,50 @@ zip_errors(3) for details on the error codes. Return return(2 * sizeof(int)). -.TP 21 -\fBZIP_SOURCE_FREE\fR +.TP 21n +\fRZIP_SOURCE_FREE\fR Clean up and free all resources. Return 0. .RE .PP The library will always issue -\fBZIP_SOURCE_OPEN\fR +\fRZIP_SOURCE_OPEN\fR before issuing -\fBZIP_SOURCE_READ.\fR +\fRZIP_SOURCE_READ\fR. When it no longer wishes to read from this source, it will issue -\fBZIP_SOURCE_CLOSE.\fR +\fRZIP_SOURCE_CLOSE\fR. If the library wishes to read the data again, it will issue -\fBZIP_SOURCE_OPEN\fR +\fRZIP_SOURCE_OPEN\fR a second time. If the function is unable to provide the data again, it should return \-1. .PP -\fBZIP_SOURCE_STAT\fR +\fRZIP_SOURCE_STAT\fR can be issued at any time. -\fBZIP_SOURCE_ERROR\fR +\fRZIP_SOURCE_ERROR\fR will only be issued in response to the function returning \-1. -\fBZIP_SOURCE_FREE\fR +\fRZIP_SOURCE_FREE\fR will be the last command issued; if -\fBZIP_SOURCE_OPEN\fR +\fRZIP_SOURCE_OPEN\fR was called and succeeded, -\fBZIP_SOURCE_CLOSE\fR +\fRZIP_SOURCE_CLOSE\fR will be called before -\fBZIP_SOURCE_FREE.\fR +\fRZIP_SOURCE_FREE\fR. .SH "RETURN VALUES" Upon successful completion, the created source is returned. Otherwise, -\fBNULL\fR +\fRNULL\fR is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_source_function +\fBzip_source_function\fR() fails if: -.RS -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.RE .SH "SEE ALSO" libzip(3), zip_add(3), @@ -166,7 +140,6 @@ zip_source_zip(3), zip_stat_init(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_zip.man b/man/zip_source_zip.man index bdcc350..157c07b 100644 --- a/man/zip_source_zip.man +++ b/man/zip_source_zip.man
@@ -1,114 +1,85 @@ -.\" zip_source_zip.mdoc \-- create data source from zip file -.\" Copyright (C) 2004-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_SOURCE_ZIP 3 "July 22, 2012" NiH +.TH "ZIP_SOURCE_ZIP" "3" "July 22, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_source_zip \- create data source from zip file +\fBzip_source_zip\fR +\- create data source from zip file .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -struct zip_source * -zip_source_zip(struct zip *archive, struct zip *srcarchive); \ -"zip_uint64_t srcidx" "zip_flags_t flags" "zip_uint64_t start" "zip_int64_t len" +\fB#include <zip.h>\fR +.sp +\fIstruct\ zip_source\ *\fR +.br +\fBzip_source_zip\fR(\fIstruct zip *archive\fR,\ \fIstruct zip *srcarchive\fR,\ \fIzip_uint64_t srcidx\fR,\ \fIzip_flags_t flags\fR,\ \fIzip_uint64_t start\fR,\ \fIzip_int64_t len\fR); .SH "DESCRIPTION" The function -zip_source_zip +\fBzip_source_zip\fR() creates a zip source from a file in a zip archive. The -\fBsrcarchive\fR +\fIsrcarchive\fR argument is the (open) zip archive containing the source zip file at index -\fBsrcidx.\fR -\fBlen\fR +\fIsrcidx\fR. +\fIlen\fR bytes from offset -\fBstart\fR +\fIstart\fR will be used in the zip_source. If -\fBlen\fR +\fIlen\fR is 0 or \-1, the rest of the file, starting from -\fBstart,\fR +\fIstart\fR, is used. If -\fBstart\fR +\fIstart\fR is zero and -\fBlen\fR +\fIlen\fR is \-1, the whole file will be copied without decompressing it. .PP Supported flags are: -.RS -.TP 23 -\fBZIP_FL_UNCHANGED\fR +.TP 23n +\fRZIP_FL_UNCHANGED\fR Try to get the original data without any changes that may have been made to -\fBsrcarchive\fR +\fIsrcarchive\fR after opening it. -.TP 23 -\fBZIP_FL_RECOMPRESS\fR +.TP 23n +\fRZIP_FL_RECOMPRESS\fR When adding the data from -\fBsrcarchive,\fR +\fIsrcarchive\fR, re-compress it using the current settings instead of copying the compressed data. -.RE .SH "RETURN VALUES" Upon successful completion, the created source is returned. Otherwise, -\fBNULL\fR +\fRNULL\fR is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_source_zip +\fBzip_source_zip\fR() fails if: -.RS -.TP 4 -[ZIP_ER_CHANGED] +.TP 19n +[\fRZIP_ER_CHANGED\fR] Unchanged data was requested, but it is not available. -.TP 4 -[ZIP_ER_INVAL] -\fBsrcarchive,\fR -\fBsrcidx,\fR -\fBstart,\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIsrcarchive\fR, +\fIsrcidx\fR, +\fIstart\fR, or -\fBlen\fR +\fIlen\fR are invalid. -.TP 4 -[ZIP_ER_MEMORY] +.TP 19n +[\fRZIP_ER_MEMORY\fR] Required memory could not be allocated. -.RE +.PD 0 +.PP Additionally, it can return all error codes from -zip_stat_index +\fBzip_stat_index\fR() and -zip_fopen_index. +\fBzip_fopen_index\fR(). +.PD .SH "SEE ALSO" libzip(3), zip_add(3), @@ -119,7 +90,6 @@ zip_source_free(3), zip_source_function(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_stat.man b/man/zip_stat.man index 4b3f0d1..32664e6 100644 --- a/man/zip_stat.man +++ b/man/zip_stat.man
@@ -1,79 +1,54 @@ -.\" zip_stat.mdoc \-- get information about file -.\" Copyright (C) 2003-2012 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_STAT 3 "July 22, 2012" NiH +.TH "ZIP_STAT" "3" "July 22, 2012" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_stat , \- .Nm zip_stat_index -get information about file +\fBzip_stat\fR, +\fBzip_stat_index\fR +\- get information about file .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_stat(struct zip *archive, const char *fname, zip_flags_t flags, struct zip_stat *sb); -.PP -int -zip_stat_index(struct zip *archive, int index, zip_flags_t flags, struct zip_stat *sb); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_stat\fR(\fIstruct zip *archive\fR,\ \fIconst char *fname\fR,\ \fIzip_flags_t flags\fR,\ \fIstruct zip_stat *sb\fR); +.sp +\fIint\fR +.br +\fBzip_stat_index\fR(\fIstruct zip *archive\fR,\ \fIint index\fR,\ \fIzip_flags_t flags\fR,\ \fIstruct zip_stat *sb\fR); .SH "DESCRIPTION" The -zip_stat +\fBzip_stat\fR() function obtains information about the file named -\fBfname\fR +\fIfname\fR in -\fBarchive.\fR +\fIarchive\fR. The -\fBflags\fR +\fIflags\fR argument specifies how the name lookup should be done. Its values are described in zip_name_locate(3). Also, -\fBZIP_FL_UNCHANGED\fR +\fRZIP_FL_UNCHANGED\fR may be -.I or'ed +\fIor\fR'ed to it to request information about the original file in the archive, ignoring any changes made. .PP The -zip_stat_index +\fBzip_stat_index\fR() function obtains information about the file at position -\fBindex.\fR +\fIindex\fR. .PP The -\fBsb\fR +\fIsb\fR argument is a pointer to a -.PP -struct zip_stat +\fIstruct zip_stat\fR (shown below), into which information about the file is placed. -.Bd \-literal +.nf +.sp +.RS 0n struct zip_stat { zip_uint64_t valid; /* which fields have valid values */ const char *name; /* name of the file */ @@ -86,79 +61,81 @@ zip_uint16_t encryption_method; /* encryption method used */ zip_uint32_t flags; /* reserved for future use */ }; -.Ed +.RE +.fi The structure pointed to by -\fBsb\fR +\fIsb\fR must be allocated before calling -zip_stat +\fBzip_stat\fR() or -zip_stat_index. +\fBzip_stat_index\fR(). .PP The -\fBvalid\fR +\fIvalid\fR field of the structure specifies which other fields are valid. Check if the flag defined by the following defines are in -\fBvalid\fR +\fIvalid\fR before accessing the fields: -.RS -.TP 30 -\fBZIP_STAT_NAME\fR -\fBname\fR -.TP 30 -\fBZIP_STAT_INDEX\fR -\fBindex\fR -.TP 30 -\fBZIP_STAT_SIZE\fR -\fBsize\fR -.TP 30 -\fBZIP_STAT_COMP_SIZE\fR -\fBcomp_size\fR -.TP 30 -\fBZIP_STAT_MTIME\fR -\fBmtime\fR -.TP 30 -\fBZIP_STAT_CRC\fR -\fBcrc\fR -.TP 30 -\fBZIP_STAT_COMP_METHOD\fR -\fBcomp_method\fR -.TP 30 -\fBZIP_STAT_ENCRYPTION_METHOD\fR -\fBencryption_method\fR -.TP 30 -\fBZIP_STAT_FLAGS\fR -\fBflags\fR +.RS 6n +.PD 0 +.TP 30n +\fRZIP_STAT_NAME\fR +\fIname\fR +.TP 30n +\fRZIP_STAT_INDEX\fR +\fIindex\fR +.TP 30n +\fRZIP_STAT_SIZE\fR +\fIsize\fR +.TP 30n +\fRZIP_STAT_COMP_SIZE\fR +\fIcomp_size\fR +.TP 30n +\fRZIP_STAT_MTIME\fR +\fImtime\fR +.TP 30n +\fRZIP_STAT_CRC\fR +\fIcrc\fR +.TP 30n +\fRZIP_STAT_COMP_METHOD\fR +\fIcomp_method\fR +.TP 30n +\fRZIP_STAT_ENCRYPTION_METHOD\fR +\fIencryption_method\fR +.TP 30n +\fRZIP_STAT_FLAGS\fR +\fIflags\fR .RE +.PD .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" The function -zip_stat +\fBzip_stat\fR() can fail for any of the errors specified for the routine zip_name_locate(3). .PP The function -zip_stat_index +\fBzip_stat_index\fR() fails and sets the error information to -ZIP_ER_INVAL +\fRZIP_ER_INVAL\fR if -\fBindex\fR +\fIindex\fR is invalid. If -\fBZIP_FL_UNCHANGED\fR +\fRZIP_FL_UNCHANGED\fR is not set and no information can be obtained from the source callback, the error information is set to -ZIP_ER_CHANGED. +\fRZIP_ER_CHANGED\fR. .SH "SEE ALSO" libzip(3), zip_get_num_entries(3), zip_name_locate(3), zip_stat_init(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_stat_init.man b/man/zip_stat_init.man index d4d2276..7782b61 100644 --- a/man/zip_stat_init.man +++ b/man/zip_stat_init.man
@@ -1,71 +1,43 @@ -.\" zip_stat_init.mdoc \-- init zip_stat structure -.\" Copyright (C) 2006-2013 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_STAT_INIT 3 "September 22, 2013" NiH +.TH "ZIP_STAT_INIT" "3" "September 22, 2013" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_stat_init \- initialize zip_stat structure +\fBzip_stat_init\fR +\- initialize zip_stat structure .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -void -zip_stat_init(struct zip_stat *sb); +\fB#include <zip.h>\fR +.sp +\fIvoid\fR +.br +\fBzip_stat_init\fR(\fIstruct zip_stat *sb\fR); .SH "DESCRIPTION" The -zip_stat_init +\fBzip_stat_init\fR() function initializes the members of a struct zip_stat. The current members are described in zip_stat(3), but this function should be used to initialize it to make sure none are missed. The structure pointed to by -\fBsb\fR +\fIsb\fR must be allocated before calling -zip_stat_init. +\fBzip_stat_init\fR(). .PP This function should be used by functions provided to zip_source_function(3) when returning -\fBZIP_SOURCE_STAT\fR +\fRZIP_SOURCE_STAT\fR information to make sure all fields are initialized. .SH "RETURN VALUES" If -\fBsb\fR +\fIsb\fR is valid, the function is always successful. .SH "SEE ALSO" libzip(3), zip_stat(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_unchange.man b/man/zip_unchange.man index c3a503b..4b69958 100644 --- a/man/zip_unchange.man +++ b/man/zip_unchange.man
@@ -1,72 +1,42 @@ -.\" zip_unchange.mdoc \-- undo changes to file in zip archive -.\" Copyright (C) 2003, 2005, 2006 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_UNCHANGE 3 "April 23, 2006" NiH +.TH "ZIP_UNCHANGE" "3" "April 23, 2006" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_unchange \- undo changes to file in zip archive +\fBzip_unchange\fR +\- undo changes to file in zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_unchange(struct zip *archive, int index); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_unchange\fR(\fIstruct zip *archive\fR,\ \fIint index\fR); .SH "DESCRIPTION" Changes to the file at position -\fBindex\fR +\fIindex\fR are reverted. .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "ERRORS" -zip_unchange +\fBzip_unchange\fR() fails if: -.RS -.TP 4 -[ZIP_ER_EXISTS] +.TP 19n +[\fRZIP_ER_EXISTS\fR] Unchanging the name would result in a duplicate name in the archive. -.TP 4 -[ZIP_ER_INVAL] -\fBindex\fR +.TP 19n +[\fRZIP_ER_INVAL\fR] +\fIindex\fR is not a valid file index in -\fBzip.\fR -.RE +\fIzip\fR. .SH "SEE ALSO" libzip(3), zip_unchange_all(3), zip_unchange_archive(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_unchange_all.man b/man/zip_unchange_all.man index a8603e3..9a45eca 100644 --- a/man/zip_unchange_all.man +++ b/man/zip_unchange_all.man
@@ -1,59 +1,31 @@ -.\" zip_unchange_all.mdoc \-- undo changes to all files in zip archive -.\" Copyright (C) 2003, 2005, 2006 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_UNCHANGE_ALL 3 "April 23, 2006" NiH +.TH "ZIP_UNCHANGE_ALL" "3" "April 23, 2006" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_unchange_all \- undo all changes in a zip archive +\fBzip_unchange_all\fR +\- undo all changes in a zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_unchange_all(struct zip *archive); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_unchange_all\fR(\fIstruct zip *archive\fR); .SH "DESCRIPTION" All changes to files and global information in -\fBarchive\fR +\fIarchive\fR are reverted. .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "SEE ALSO" libzip(3), zip_unchange(3), zip_unchange_archive(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_unchange_archive.man b/man/zip_unchange_archive.man index d4f8b0d..ba50cc0 100644 --- a/man/zip_unchange_archive.man +++ b/man/zip_unchange_archive.man
@@ -1,59 +1,31 @@ -.\" zip_unchange_archive.mdoc \-- undo changes to all files in zip archive -.\" Copyright (C) 2006-2008 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIP_UNCHANGE_ARCHIVE 3 "May 14, 2008" NiH +.TH "ZIP_UNCHANGE_ARCHIVE" "3" "May 14, 2008" "NiH" "Library Functions Manual" +.nh +.if n .ad l .SH "NAME" -zip_unchange_archive \- undo global changes to zip archive +\fBzip_unchange_archive\fR +\- undo global changes to zip archive .SH "LIBRARY" libzip (-lzip) .SH "SYNOPSIS" -#include <zip.h> -.PP -int -zip_unchange_archive(struct zip *archive); +\fB#include <zip.h>\fR +.sp +\fIint\fR +.br +\fBzip_unchange_archive\fR(\fIstruct zip *archive\fR); .SH "DESCRIPTION" Revert all global changes to the archive -\fBarchive.\fR +\fIarchive\fR. This reverts changes to the archive comment and global flags. .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error code in -\fBarchive\fR +\fIarchive\fR is set to indicate the error. .SH "SEE ALSO" libzip(3), zip_unchange(3), zip_unchange_all(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zipcmp.man b/man/zipcmp.man index 41addae..cae32d2 100644 --- a/man/zipcmp.man +++ b/man/zipcmp.man
@@ -1,83 +1,53 @@ -.\" zipcmp.mdoc \-- compare zip archives -.\" Copyright (C) 2003, 2005, 2008 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIPCMP 1 "June 4, 2008" NiH +.TH "ZIPCMP" "1" "June 4, 2008" "NiH" "General Commands Manual" +.nh +.if n .ad l .SH "NAME" -zipcmp \- compare contents of zip archives +\fBzipcmp\fR +\- compare contents of zip archives .SH "SYNOPSIS" -.B zipcmp -[\fB-hiqVv\fR] -\fBzip1 zip2\fR +.HP 7n +\fBzipcmp\fR +[\fB\-hiqVv\fR] +\fIzip1\ zip2\fR .SH "DESCRIPTION" -.B zipcmp +\fBzipcmp\fR compares the zip archives -\fBzip1\fR +\fIzip1\fR and -\fBzip2\fR +\fIzip2\fR and checks if they contain the same files, comparing their names, uncompressed sizes, and CRCs. File order and compressed size differences are ignored. .PP Supported options: -.RS -.TP 5 -\fB-h\fR +.TP 5n +\fB\-h\fR Display a short help message and exit. -.TP 5 -\fB-i\fR +.TP 5n +\fB\-i\fR Compare names ignoring case distinctions. -.TP 5 -\fB-q\fR +.TP 5n +\fB\-q\fR Quiet mode. Compare -\fB-v\fR. -.TP 5 -\fB-v\fR +\fB\-v\fR. +.TP 5n +\fB\-v\fR Verbose mode. Print details about differences to stdout. (This is the default.) -.TP 5 -\fB-V\fR +.TP 5n +\fB\-V\fR Display version information and exit. -.RE .SH "EXIT STATUS" -.B zipcmp +\fBzipcmp\fR exits 0 if the two zip archives contain the same files, 1 if they differ, -and \*[Gt]1 if an error occurred. +and >1 if an error occurred. .SH "SEE ALSO" zipmerge(1), ziptorrent(1), libzip(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zipmerge.man b/man/zipmerge.man index 8dd9840..08757e8 100644 --- a/man/zipmerge.man +++ b/man/zipmerge.man
@@ -1,90 +1,60 @@ -.\" zipmerge.mdoc \-- merge zip archives -.\" Copyright (C) 2004, 2005, 2008 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIPMERGE 1 "June 4, 2008" NiH +.TH "ZIPMERGE" "1" "June 4, 2008" "NiH" "General Commands Manual" +.nh +.if n .ad l .SH "NAME" -zipmerge \- merge zip archives +\fBzipmerge\fR +\- merge zip archives .SH "SYNOPSIS" -.B zipmerge -[\fB-DhIiSsV\fR] -\fBtarget-zip\fR -\fBsource-zip Op \fBsource-zip ...\fR\fR +.HP 9n +\fBzipmerge\fR +[\fB\-DhIiSsV\fR] +\fItarget-zip\fR +\fIsource-zip\fR\ [\fIsource-zip\ ...\fR] .SH "DESCRIPTION" -.B zipmerge +\fBzipmerge\fR merges the source zip archives -\fBsource-zip\fR +\fIsource-zip\fR into the target zip archive -\fBtarget-zip.\fR +\fItarget-zip\fR. By default, files in the source zip archives overwrite existing files of the same name in the target zip archive. .PP Supported options: -.RS -.TP 5 -\fB-D\fR +.TP 5n +\fB\-D\fR Ignore directory components in file name comparisons. -.TP 5 -\fB-h\fR +.TP 5n +\fB\-h\fR Display a short help message and exit. -.TP 5 -\fB-I\fR +.TP 5n +\fB\-I\fR Ignore case in file name comparisons -.TP 5 -\fB-i\fR +.TP 5n +\fB\-i\fR Ask before overwriting files. See also -\fB-s\fR. -.TP 5 -\fB-S\fR +\fB\-s\fR. +.TP 5n +\fB\-S\fR Do not overwrite files that have the same size and CRC32 in both the source and target archives. -.TP 5 -\fB-s\fR +.TP 5n +\fB\-s\fR When -\fB-i\fR +\fB\-i\fR is given, do not before overwriting files that have the same size and CRC32. -.TP 5 -\fB-V\fR +.TP 5n +\fB\-V\fR Display version information and exit. -.RE .SH "EXIT STATUS" -.B zipmerge -exits 0 on success and \*[Gt]1 if an error occurred. +\fBzipmerge\fR +exits 0 on success and >1 if an error occurred. .SH "SEE ALSO" zipcmp(1), ziptorrent(1), libzip(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/ziptorrent.man b/man/ziptorrent.man index a6b1404..2d4c516 100644 --- a/man/ziptorrent.man +++ b/man/ziptorrent.man
@@ -1,45 +1,18 @@ -.\" ziptorrent.mdoc \-- torrentzip zip archives -.\" Copyright (C) 2008 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> -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in -.\" the documentation and/or other materials provided with the -.\" distribution. -.\" 3. The names of the authors may not be used to endorse or promote -.\" products derived from this software without specific prior -.\" written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.TH ZIPTORRENT 1 "July 24, 2008" NiH +.TH "ZIPTORRENT" "1" "July 24, 2008" "NiH" "General Commands Manual" +.nh +.if n .ad l .SH "NAME" -ziptorrent \- torrentzip zip archives +\fBziptorrent\fR +\- torrentzip zip archives .SH "SYNOPSIS" -.B ziptorrent -[\fB-hnVv\fR] -\fBarchive Op \fB...\fR\fR +.HP 11n +\fBziptorrent\fR +[\fB\-hnVv\fR] +\fIarchive\fR\ [\fI...\fR] .SH "DESCRIPTION" -.B ziptorrent +\fBziptorrent\fR torrentzips -\fBarchive.\fR +\fIarchive\fR. This is a restricted file format used for using bittorrent on zip files. Please see @@ -47,30 +20,27 @@ for details on what information gets lost through this process. .PP Supported options: -.RS -.TP 5 -\fB-h\fR +.TP 5n +\fB\-h\fR Display a short help message and exit. -.TP 5 -\fB-n\fR +.TP 5n +\fB\-n\fR Don't actually change archives, just print what would be done. -.TP 5 -\fB-V\fR +.TP 5n +\fB\-V\fR Display version information and exit. -.TP 5 -\fB-v\fR +.TP 5n +\fB\-v\fR Be verbose: print which archives are already torrentzipped and which need to be rezipped. -.RE .SH "EXIT STATUS" -.B ziptorrent -exits 0 on success and \*[Gt]1 if an error occurred. +\fBziptorrent\fR +exits 0 on success and >1 if an error occurred. .SH "SEE ALSO" zipcmp(1), zipmerge(1), libzip(3) .SH "AUTHORS" - -Dieter Baron <dillo@nih.at> +Dieter Baron <\fIdillo@nih.at\fR> and -Thomas Klausner <tk@giga.or.at> +Thomas Klausner <\fItk@giga.or.at\fR>