add some more generated man pages

--HG--
branch : HEAD
diff --git a/man/zip_add.man b/man/zip_add.man
new file mode 100644
index 0000000..ffd3aa2
--- /dev/null
+++ b/man/zip_add.man
@@ -0,0 +1,119 @@
+.\" Converted with mdoc2man 0.2
+.\" from NiH: zip_add.mdoc,v 1.5 2004/11/30 22:21:49 wiz Exp 
+.\" $NiH: zip_add.mdoc,v 1.5 2004/11/30 22:21:49 wiz Exp $
+.\"
+.\" zip_add.mdoc \-- add files to zip archive
+.\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <nih@giga.or.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 "November 30, 2004" NiH
+.SH "NAME"
+zip_add , \- .Nm zip_replace
+add file to zip archive or replace file in zip archive
+.SH "LIBRARY"
+libzip (-lzip)
+.SH "SYNOPSIS"
+.In zip.h
+.Ft int
+.Fn zip_add "struct zip *archive" "const char *name" \
+"struct zip_source *source"
+.Ft int
+.Fn zip_replace "struct zip *archive" "int index" \
+"struct zip_source *source"
+.SH "DESCRIPTION"
+The function
+.Fn zip_add
+adds a file to a zip archive, while
+.Fn zip_replace
+replaces an existing file in a zip archive.
+The argument
+\fBarchive\fR
+specifies the zip archive to which the file should be added.
+\fBname\fR
+is the file's name in the zip archive (for
+.Fn zip_add ),
+while
+\fBindex\fR
+specifies which file should be replaced (for
+.Fn zip_replace ).
+The data is obtained from the
+\fBsource\fR
+argument.
+See the
+.Fn zip_source_*
+functions cited in
+SEE ALSO.
+.SH "RETURN VALUES"
+Upon successful completion 0 is returned.
+Otherwise, \-1 is returned and the error code in
+\fBarchive\fR
+is set to indicate the error.
+.SH "EXAMPLES"
+.Bd \-literal \-offset indent
+struct zip_source *s;
+
+if ((s=zip_source_buffer(archive, buffer, len)) == NULL ||
+    zip_add(archive, name, s) < 0) {
+    zip_source_free(s);
+    printf("error adding file: %s\n", zip_strerror(archive));
+}
+.Ed
+.SH "ERRORS"
+.Fn zip_add
+and
+.Fn zip_replace
+fail if:
+.RS
+.TP 4
+Bq Er ZIP_ER_EXISTS
+There is already a file called
+\fBname\fR
+in the archive.
+(Only applies to
+.Fn zip_add ).
+.TP 4
+Bq Er ZIP_ER_INVAL
+\fBsource\fR
+or
+\fBname\fR
+are
+\fBNULL,\fR
+or
+\fBindex\fR
+is invalid.
+.TP 4
+Bq Er ZIP_ER_MEMORY
+Required memory could not be allocated.
+.RE
+.SH "SEE ALSO"
+zip_source_file(3),
+zip_source_filep(3),
+zip_source_function(3),
+zip_source_zip(3)
diff --git a/man/zip_error_get.man b/man/zip_error_get.man
new file mode 100644
index 0000000..2518b6c
--- /dev/null
+++ b/man/zip_error_get.man
@@ -0,0 +1,75 @@
+.\" Converted with mdoc2man 0.2
+.\" from NiH: zip_error_get.mdoc,v 1.4 2004/12/22 15:49:19 wiz Exp 
+.\" $NiH: zip_error_get.mdoc,v 1.4 2004/12/22 15:49:19 wiz Exp $
+.\"
+.\" zip_error_get.mdoc \-- get error codes for archive or file
+.\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <nih@giga.or.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 "November 30, 2004" NiH
+.SH "NAME"
+zip_error_get , \- .Nm zip_file_error_get
+get error codes for archive or file
+.SH "LIBRARY"
+libzip (-lzip)
+.SH "SYNOPSIS"
+.In zip.h
+.Ft void
+.Fn zip_error_get "struct zip *archive" "int *zep" "int *sep"
+.Ft void
+.Fn zip_file_error_get "struct zip_file *zf" "int *zep" "int *sep"
+.SH "DESCRIPTION"
+The
+.Fn zip_error_get
+function returns the error codes for the zip archive
+\fBarchive.\fR
+If
+\fBzep\fR
+is not
+\fBNULL,\fR
+\fB*zep\fR
+will be filled in with the error code from libzip.
+Similarly,
+\fB*sep\fR
+will contain the corresponding system error code, if
+\fBsep\fR
+is not
+\fBNULL;\fR
+use
+.Fn zip_error_get_sys_type
+to determine the type of system error code.
+.PP
+The
+.Fn zip_file_error_get
+function does the same for the zip file
+\fBzf.\fR
+.SH "SEE ALSO"
+zip_error_get_sys_type(3),
+zip_error_to_str(3)
diff --git a/man/zip_error_get_sys_type.man b/man/zip_error_get_sys_type.man
new file mode 100644
index 0000000..ff42e97
--- /dev/null
+++ b/man/zip_error_get_sys_type.man
@@ -0,0 +1,66 @@
+.\" Converted with mdoc2man 0.2
+.\" from NiH: zip_error_get_sys_type.mdoc,v 1.1 2004/12/22 15:49:19 wiz Exp 
+.\" $NiH: zip_error_get_sys_type.mdoc,v 1.1 2004/12/22 15:49:19 wiz Exp $
+.\"
+.\" zip_error_get_sys_type.mdoc \-- get type of error
+.\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <nih@giga.or.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
+.SH "NAME"
+zip_error_get_sys_type \- get type of system error code
+.SH "LIBRARY"
+libzip (-lzip)
+.SH "SYNOPSIS"
+.In zip.h
+.Ft int
+.Fn zip_error_get_sys_type "int ze"
+.SH "DESCRIPTION"
+The
+.Fn zip_error_get_sys_type
+function returns the type of the system error code for the libzip error
+\fBze.\fR
+Possible types are:
+.RS
+.TP 16
+\fBZIP_ET_NONE\fR
+System error code is unused.
+.TP 16
+\fBZIP_ET_SYS\fR
+System error code is an errno value.
+.TP 16
+\fBZIP_ET_ZLIB\fR
+System error code is from
+zlib(3).
+.RE
+.SH "SEE ALSO"
+zip_error_get(3),
+zip_error_to_str(3),
+zip_file_error_get(3)
diff --git a/man/zip_error_to_str.man b/man/zip_error_to_str.man
new file mode 100644
index 0000000..9c21aca
--- /dev/null
+++ b/man/zip_error_to_str.man
@@ -0,0 +1,83 @@
+.\" Converted with mdoc2man 0.2
+.\" from NiH: zip_error_to_str.mdoc,v 1.4 2004/12/22 16:37:48 wiz Exp 
+.\" $NiH: zip_error_to_str.mdoc,v 1.4 2004/12/22 16:37:48 wiz Exp $
+.\"
+.\" zip_error_to_str.mdoc \-- get string representation of zip error code
+.\" Copyright (C) 2003, 2004 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <nih@giga.or.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 "November 24, 2004" NiH
+.SH "NAME"
+zip_error_to_str \- get string representation of zip error
+.SH "LIBRARY"
+libzip (-lzip)
+.SH "SYNOPSIS"
+.In zip.h
+.Ft int
+.Fn zip_error_to_str "char *buf" "int len" "int ze" "int se"
+.SH "DESCRIPTION"
+The
+.Fn zip_error_to_str
+function stores a string describing the libzip error code
+\fBze\fR
+in the user-provided buffer
+\fBbuf\fR
+which has size
+\fBlen.\fR
+The buffer is always NUL-terminated.
+\fBse\fR
+should be the value of the global variable
+\fBerrno\fR
+at the time of the error or the zlib error code, depending on
+\fBze.\fR
+.PP
+.Fn zip_error_to_str
+is especially useful if
+.Fn zip_open
+failed, since then there is no
+.Vt struct zip
+is available to store the error code; otherwise
+.Fn zip_strerror
+or
+.Fn zip_file_strerror
+are more convenient.
+.SH "RETURN VALUES"
+.Fn zip_error_to_str
+returns the number of characters that would have been written to a
+sufficiently sized
+\fBbuf,\fR
+excluding the terminating NUL character.
+.SH "SEE ALSO"
+zip_error_get(3),
+zip_error_get_sys_type(3),
+zip_file_error_get(3),
+zip_file_strerror(3),
+zip_open(3),
+zip_strerror(3)
diff --git a/man/zip_source_buffer.man b/man/zip_source_buffer.man
new file mode 100644
index 0000000..6c51fd5
--- /dev/null
+++ b/man/zip_source_buffer.man
@@ -0,0 +1,87 @@
+.\" Converted with mdoc2man 0.2
+.\" from NiH: zip_source_buffer.mdoc,v 1.1 2004/11/18 17:26:52 wiz Exp 
+.\" $NiH: zip_source_buffer.mdoc,v 1.1 2004/11/18 17:26:52 wiz Exp $
+.\"
+.\" zip_source_buffer.mdoc \-- create zip data source from buffer
+.\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <nih@giga.or.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 "November 4, 2004" NiH
+.SH "NAME"
+zip_source_buffer \- create zip data source from buffer
+.SH "LIBRARY"
+libzip (-lzip)
+.SH "SYNOPSIS"
+.In zip.h
+.Ft int
+.Fn zip_source_buffer "struct zip *archive" "const void *data" "off_t len" \
+"int freep"
+.SH "DESCRIPTION"
+The function
+.Fn zip_source_buffer
+creates a zip source from the buffer
+\fBdata\fR
+of size
+\fBlen.\fR
+If
+\fBfreep\fR
+is non-zero, the buffer will be freed when the it is no longer needed.
+.SH "RETURN VALUES"
+Upon successful completion, the created source is returned.
+Otherwise,
+\fBNULL\fR
+is returned and the error code in
+\fBarchive\fR
+is set to indicate the error.
+.SH "ERRORS"
+.Fn zip_source_buffer
+fails if:
+.RS
+.TP 4
+Bq Er ZIP_ER_INVAL
+\fBlen\fR
+is negative, or
+\fBlen\fR
+is greater than zero and
+\fBdata\fR
+is
+\fBNULL.\fR
+.TP 4
+Bq Er ZIP_ER_MEMORY
+Required memory could not be allocated.
+.RE
+.SH "SEE ALSO"
+zip_add(3),
+zip_replace(3),
+zip_source_file(3),
+zip_source_filep(3),
+zip_source_free(3),
+zip_source_function(3),
+zip_source_zip(3)
diff --git a/man/zip_source_file.man b/man/zip_source_file.man
new file mode 100644
index 0000000..0365ca6
--- /dev/null
+++ b/man/zip_source_file.man
@@ -0,0 +1,95 @@
+.\" Converted with mdoc2man 0.2
+.\" from NiH: zip_source_file.mdoc,v 1.3 2004/12/22 16:37:48 wiz Exp 
+.\" $NiH: zip_source_file.mdoc,v 1.3 2004/12/22 16:37:48 wiz Exp $
+.\"
+.\" zip_source_file.mdoc \-- create data source from a file
+.\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <nih@giga.or.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 "November 4, 2004" NiH
+.SH "NAME"
+zip_source_file \- create data source from a file
+.SH "LIBRARY"
+libzip (-lzip)
+.SH "SYNOPSIS"
+.Ft int
+.Fn zip_source_file "struct zip *archive" "const char *fname" "off_t start" "off_t len"
+.SH "DESCRIPTION"
+The function
+.Fn zip_source_file
+creates a zip source from a file.
+.Fn zip_source_filep
+opens
+\fBfname\fR
+and reads
+\fBlen\fR
+bytes from offset
+\fBstart\fR
+from it.
+If
+\fBlen\fR
+is 0 or \-1, the whole file (starting from
+\fBstart )\fR
+is used.
+.SH "RETURN VALUES"
+Upon successful completion, the created source is returned.
+Otherwise,
+\fBNULL\fR
+is returned and the error code in
+\fBarchive\fR
+is set to indicate the error.
+.SH "ERRORS"
+.Fn zip_source_file
+fails if:
+.RS
+.TP 4
+Bq Er ZIP_ER_INVAL
+\fBfname,\fR
+\fBstart,\fR
+or
+\fBlen\fR
+are invalid.
+.TP 4
+Bq Er ZIP_ER_MEMORY
+Required memory could not be allocated.
+.TP 4
+Bq Er ZIP_ER_OPEN
+Opening
+\fBfname\fR
+failed.
+.RE
+.SH "SEE ALSO"
+zip_add(3),
+zip_replace(3),
+zip_source_buffer(3),
+zip_source_filep(3),
+zip_source_free(3),
+zip_source_function(3),
+zip_source_zip(3)
diff --git a/man/zip_source_filep.man b/man/zip_source_filep.man
new file mode 100644
index 0000000..fcc1970
--- /dev/null
+++ b/man/zip_source_filep.man
@@ -0,0 +1,89 @@
+.\" Converted with mdoc2man 0.2
+.\" from NiH: zip_source_filep.mdoc,v 1.2 2004/11/18 17:26:54 wiz Exp 
+.\" $NiH: zip_source_filep.mdoc,v 1.2 2004/11/18 17:26:54 wiz Exp $
+.\"
+.\" zip_source_filep.mdoc \-- create data source from a file stream
+.\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <nih@giga.or.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 "November 4, 2004" NiH
+.SH "NAME"
+zip_source_filep \- create data source from FILE *
+.SH "LIBRARY"
+libzip (-lzip)
+.SH "SYNOPSIS"
+.Ft int
+.Fn zip_source_filep "struct zip *archive" "FILE *file" "off_t start" "off_t len"
+.SH "DESCRIPTION"
+The function
+.Fn zip_source_filep
+creates a zip source from a file stream.
+.Fn zip_source_filep
+reads
+\fBlen\fR
+bytes from offset
+\fBstart\fR
+from the open file stream
+\fBfile.\fR
+If
+\fBlen\fR
+is 0 or \-1, the whole file (starting from
+\fBstart )\fR
+is used.
+.SH "RETURN VALUES"
+Upon successful completion, the created source is returned.
+Otherwise,
+\fBNULL\fR
+is returned and the error code in
+\fBarchive\fR
+is set to indicate the error.
+.SH "ERRORS"
+.Fn zip_source_filep
+fails if:
+.RS
+.TP 4
+Bq Er ZIP_ER_INVAL
+\fBfile,\fR
+\fBstart,\fR
+or
+\fBlen\fR
+are invalid.
+.TP 4
+Bq Er ZIP_ER_MEMORY
+Required memory could not be allocated.
+.RE
+.SH "SEE ALSO"
+zip_add(3),
+zip_replace(3),
+zip_source_buffer(3),
+zip_source_file(3),
+zip_source_free(3),
+zip_source_function(3),
+zip_source_zip(3)
diff --git a/man/zip_source_free.man b/man/zip_source_free.man
new file mode 100644
index 0000000..6b4b980
--- /dev/null
+++ b/man/zip_source_free.man
@@ -0,0 +1,60 @@
+.\" Converted with mdoc2man 0.2
+.\" from NiH: zip_source_free.mdoc,v 1.2 2004/11/18 17:26:54 wiz Exp 
+.\" $NiH: zip_source_free.mdoc,v 1.2 2004/11/18 17:26:54 wiz Exp $
+.\"
+.\" zip_source_free.mdoc \-- free zip data source
+.\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <nih@giga.or.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 "November 4, 2004" NiH
+.SH "NAME"
+zip_source_free \- free zip data source
+.SH "LIBRARY"
+libzip (-lzip)
+.SH "SYNOPSIS"
+.In zip.h
+.Ft void
+.Fn zip_source_free "struct zip_source *source"
+.SH "DESCRIPTION"
+The function
+.Fn zip_source_free
+frees the zip data source
+\fBsource.\fR
+If
+\fBsource\fR
+is
+\fBNULL,\fR
+it does nothing.
+.SH "SEE ALSO"
+zip_source_buffer(3),
+zip_source_file(3),
+zip_source_filep(3),
+zip_source_function(3),
+zip_source_zip(3)
diff --git a/man/zip_source_function.man b/man/zip_source_function.man
new file mode 100644
index 0000000..b39fd85
--- /dev/null
+++ b/man/zip_source_function.man
@@ -0,0 +1,145 @@
+.\" Converted with mdoc2man 0.2
+.\" from NiH: zip_source_function.mdoc,v 1.7 2004/12/22 16:21:00 wiz Exp 
+.\" $NiH: zip_source_function.mdoc,v 1.7 2004/12/22 16:21:00 wiz Exp $
+.\"
+.\" zip_source_function.mdoc \-- create data source from function
+.\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <nih@giga.or.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 "December 22, 2004" NiH
+.SH "NAME"
+zip_source_function \- create data source from function
+.SH "LIBRARY"
+libzip (-lzip)
+.SH "SYNOPSIS"
+.In zip.h
+.Ft int
+.Fn zip_source_function "struct zip *archive" "zip_source_callback fn" "void *userdata"
+.SH "DESCRIPTION"
+The function
+.Fn zip_source_function
+creates a zip source from the user-provided function
+\fBfn,\fR
+which must be of the following type:
+.Bd \-literal
+typedef ssize_t (*zip_source_callback)(void *state,
+    void *data, size_t len, enum zip_source_cmd cmd);
+.Ed
+.PP
+When called by the library, the first argument is the
+\fBstate\fR
+argument supplied to
+.Fn zip_source_function.
+The next two arguments are a buffer
+\fBdata\fR
+of size
+\fBlen\fR
+when data is expected to be returned, or else
+\fBNULL\fR
+and 0.
+The last argument,
+\fBcmd,\fR
+specifies which action the function should perform:
+.RS
+.TP 21
+\fBZIP_SOURCE_OPEN\fR
+Prepare for reading.  Return 0 on success, \-1 on error.
+.TP 21
+\fBZIP_SOURCE_READ\fR
+Read data into the buffer
+\fBdata\fR
+of size
+\fBlen.\fR
+Return the number of bytes placed into
+\fBdata\fR
+on success, \-1 on error.
+.TP 21
+\fBZIP_SOURCE_CLOSE\fR
+Reading is done.
+.TP 21
+\fBZIP_SOURCE_STAT\fR
+Get meta information for the input data.
+\fBdata\fR
+points to a struct zip_stat, which should be filled in.  Return 0 on
+success, \-1 on error.
+.TP 21
+\fBZIP_SOURCE_ERROR\fR
+Get error information.
+\fBdata\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.  Return 0.
+.\" XXX: we should document all error codes somewhere
+.TP 21
+\fBZIP_SOURCE_FREE\fR
+Clean up and free all resources.  Return 0.
+.RE
+.PP
+The library will always issue
+\fBZIP_SOURCE_OPEN\fR
+before issuing
+\fBZIP_SOURCE_READ.\fR
+When it no longer wishes to read from this source, it will issue
+\fBZIP_SOURCE_CLOSE.\fR
+If the library wishes to read the data again, it will issue
+\fBZIP_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
+can be issued at any time.
+\fBZIP_SOURCE_ERROR\fR
+will only be issued in response to the function
+returning \-1.
+\fBZIP_SOURCE_FREE\fR
+will be the last command issued.
+.SH "RETURN VALUES"
+Upon successful completion, the created source is returned.
+Otherwise,
+\fBNULL\fR
+is returned and the error code in
+\fBarchive\fR
+is set to indicate the error.
+.SH "ERRORS"
+.Fn zip_source_function
+fails if:
+.RS
+.TP 4
+Bq Er ZIP_ER_MEMORY
+Required memory could not be allocated.
+.RE
+.SH "SEE ALSO"
+zip_add(3),
+zip_replace(3),
+zip_source_buffer(3),
+zip_source_file(3),
+zip_source_filep(3),
+zip_source_free(3),
+zip_source_zip(3)
diff --git a/man/zip_source_zip.man b/man/zip_source_zip.man
new file mode 100644
index 0000000..479ed2b
--- /dev/null
+++ b/man/zip_source_zip.man
@@ -0,0 +1,115 @@
+.\" Converted with mdoc2man 0.2
+.\" from NiH: zip_source_zip.mdoc,v 1.2 2004/11/18 17:26:54 wiz Exp 
+.\" $NiH: zip_source_zip.mdoc,v 1.2 2004/11/18 17:26:54 wiz Exp $
+.\"
+.\" zip_source_zip.mdoc \-- create data source from zip file
+.\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <nih@giga.or.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 "November 4, 2004" NiH
+.SH "NAME"
+zip_source_zip \- create data source from zip file
+.SH "LIBRARY"
+libzip (-lzip)
+.SH "SYNOPSIS"
+.In zip.h
+.Ft int
+.Fn zip_source_zip "struct zip *archive" "struct zip *srcarchive" \
+"int srcidx" "int flags" "off_t start" "off_t len"
+.SH "DESCRIPTION"
+The function
+.Fn zip_source_zip
+creates a zip source from a file in a zip archive.
+The
+\fBsrcarchive\fR
+argument is the (open) zip archive containing the source zip file
+at index
+\fBsrcidx.\fR
+\fBlen\fR
+bytes from offset
+\fBstart\fR
+will be used in the zip_source.
+If
+\fBlen\fR
+is 0 or \-1, the whole file (starting from
+\fBstart )\fR
+is used.
+If
+\fBstart\fR
+is zero and
+\fBlen\fR
+is \-1, the whole file will be copied without decompressing it.
+If
+\fBflags\fR
+is
+\fBZIP_FL_UNCHANGED,\fR
+.Fn zip_source_zip
+will try to get the original data without any changes that may
+have been made to
+\fBsrcarchive\fR
+after opening it.
+.SH "RETURN VALUES"
+Upon successful completion, the created source is returned.
+Otherwise,
+\fBNULL\fR
+is returned and the error code in
+\fBarchive\fR
+is set to indicate the error.
+.SH "ERRORS"
+.Fn zip_source_zip
+fails if:
+.RS
+.TP 4
+Bq Er ZIP_ER_CHANGED
+Unchanged data was requested, but it is not available.
+.TP 4
+Bq Er ZIP_ER_INVAL
+\fBsrcarchive,\fR
+\fBsrcidx,\fR
+\fBstart,\fR
+or
+\fBlen\fR
+are invalid.
+.TP 4
+Bq Er ZIP_ER_MEMORY
+Required memory could not be allocated.
+.RE
+Additionally, it can return all error codes from
+.Fn zip_stat_index
+and
+.Fn zip_fopen_index.
+.SH "SEE ALSO"
+zip_add(3),
+zip_replace(3),
+zip_source_buffer(3),
+zip_source_file(3),
+zip_source_filep(3),
+zip_source_free(3),
+zip_source_function(3)
diff --git a/man/zipmerge.man b/man/zipmerge.man
new file mode 100644
index 0000000..977f31f
--- /dev/null
+++ b/man/zipmerge.man
@@ -0,0 +1,87 @@
+.\" Converted with mdoc2man 0.2
+.\" from NiH: zipmerge.mdoc,v 1.1 2004/12/22 17:27:56 wiz Exp 
+.\" $NiH: zipmerge.mdoc,v 1.1 2004/12/22 17:27:56 wiz Exp $
+.\"
+.\" zipmerge.mdoc \-- merge zip archives
+.\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <nih@giga.or.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 "December 22, 2004" NiH
+.SH "NAME"
+zipmerge \- merge zip archives
+.SH "SYNOPSIS"
+.B zipmerge
+[\fB-DhIiSsV\fR]
+\fBtarget-zip\fR
+\fBsource-zip Op \fBsource-zip ...\fR\fR
+.SH "DESCRIPTION"
+.B zipmerge
+merges the source zip archives
+\fBsource-zip\fR
+into the target zip archive
+\fBtarget-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
+Ignore directory components in file name comparisons.
+.TP 5
+\fB-h\fR
+Display a short help message and exit.
+.TP 5
+\fB-I\fR
+Ignore case in file name comparisons
+.TP 5
+\fB-i\fR
+Ask before overwriting files.
+See also
+\fB-s\fR.
+.TP 5
+\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
+When
+\fB-i\fR
+is given, do not before overwriting files that have the same size
+and CRC32.
+.TP 5
+\fB-V\fR
+Display version information and exit.
+.RE
+.SH "EXIT STATUS"
+.B zipmerge
+exits 0 on success and \*[Gt]1 if an error code.
+.SH "SEE ALSO"
+zipcmp(1)