early-access version 1255

This commit is contained in:
pineappleEA
2020-12-28 15:15:37 +00:00
parent 84b39492d1
commit 78b48028e1
6254 changed files with 1868140 additions and 0 deletions

154
externals/libzip/libzip/man/CMakeLists.txt vendored Executable file
View File

@@ -0,0 +1,154 @@
SET(MAN_PAGES
ZIP_SOURCE_GET_ARGS.3
libzip.3
zip_add.3
zip_add_dir.3
zip_close.3
zip_delete.3
zip_dir_add.3
zip_discard.3
zip_error_clear.3
zip_error_code_system.3
zip_error_code_zip.3
zip_error_fini.3
zip_error_get.3
zip_error_get_sys_type.3
zip_error_init.3
zip_error_set.3
zip_error_strerror.3
zip_error_system_type.3
zip_error_to_data.3
zip_error_to_str.3
zip_errors.3
zip_fclose.3
zip_fdopen.3
zip_file_add.3
zip_file_extra_field_delete.3
zip_file_extra_field_get.3
zip_file_extra_field_set.3
zip_file_extra_fields_count.3
zip_file_get_comment.3
zip_file_get_error.3
zip_file_get_external_attributes.3
zip_file_rename.3
zip_file_set_comment.3
zip_file_set_encryption.3
zip_file_set_external_attributes.3
zip_file_set_mtime.3
zip_file_strerror.3
zip_fopen.3
zip_fopen_encrypted.3
zip_fread.3
zip_fseek.3
zip_ftell.3
zip_get_archive_comment.3
zip_get_archive_flag.3
zip_get_error.3
zip_get_file_comment.3
zip_get_name.3
zip_get_num_entries.3
zip_get_num_files.3
zip_libzip_version.3
zip_name_locate.3
zip_open.3
zip_register_progress_callback.3
zip_register_progress_callback_with_state.3
zip_rename.3
zip_set_archive_comment.3
zip_set_archive_flag.3
zip_set_default_password.3
zip_set_file_comment.3
zip_set_file_compression.3
zip_source.3
zip_source_begin_write.3
zip_source_buffer.3
zip_source_buffer_fragment.3
zip_source_close.3
zip_source_commit_write.3
zip_source_error.3
zip_source_file.3
zip_source_filep.3
zip_source_free.3
zip_source_function.3
zip_source_is_deleted.3
zip_source_keep.3
zip_source_make_command_bitmap.3
zip_source_open.3
zip_source_read.3
zip_source_rollback_write.3
zip_source_seek.3
zip_source_seek_compute_offset.3
zip_source_seek_write.3
zip_source_stat.3
zip_source_tell.3
zip_source_tell_write.3
zip_source_win32a.3
zip_source_win32handle.3
zip_source_win32w.3
zip_source_write.3
zip_source_zip.3
zip_stat.3
zip_stat_init.3
zip_unchange.3
zip_unchange_all.3
zip_unchange_archive.3
zipcmp.1
zipmerge.1
ziptool.1
)
FOREACH(MAN_PAGE ${MAN_PAGES})
STRING(REGEX REPLACE "[1-9]$" "${DOCUMENTATION_FORMAT}" SOURCE_FILE ${MAN_PAGE})
IF (DOCUMENTATION_FORMAT MATCHES "html")
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${MAN_PAGE} DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME ${SOURCE_FILE})
ELSE()
STRING(REGEX REPLACE ".*(.)$" "man\\1" SUBDIR ${MAN_PAGE})
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${MAN_PAGE} DESTINATION ${CMAKE_INSTALL_MANDIR}/${SUBDIR})
ENDIF()
# CONFIGURE_FILE does not find out about updates to the sources, and it does not provide a target
#CONFIGURE_FILE(${SOURCE_FILE} ${MAN_PAGE} COPYONLY)
ADD_CUSTOM_COMMAND(OUTPUT ${MAN_PAGE}
DEPENDS ${SOURCE_FILE}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${MAN_PAGE}
COMMENT "Preparing ${MAN_PAGE}"
)
STRING(REGEX REPLACE "[1-9]$" "html" HTML_FILE ${MAN_PAGE})
STRING(REGEX REPLACE "[1-9]$" "man" MAN_FILE ${MAN_PAGE})
STRING(REGEX REPLACE "[1-9]$" "mdoc" MDOC_FILE ${MAN_PAGE})
# html re-generation
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${HTML_FILE}
DEPENDS ${MDOC_FILE}
COMMAND ${CMAKE_COMMAND} -DIN=${MDOC_FILE} -DOUT=${HTML_FILE} -DDIR=${CMAKE_CURRENT_SOURCE_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/update-html.cmake
)
LIST(APPEND UPDATEHTML ${CMAKE_CURRENT_SOURCE_DIR}/${HTML_FILE})
# man re-generation
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${MAN_FILE}
DEPENDS ${MDOC_FILE}
COMMAND ${CMAKE_COMMAND} -DIN=${MDOC_FILE} -DOUT=${MAN_FILE} -DDIR=${CMAKE_CURRENT_SOURCE_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/update-man.cmake
)
LIST(APPEND UPDATEMAN ${CMAKE_CURRENT_SOURCE_DIR}/${MAN_FILE})
ENDFOREACH()
ADD_CUSTOM_TARGET(man ALL DEPENDS ${MAN_PAGES})
ADD_CUSTOM_TARGET(update-man DEPENDS ${UPDATEMAN})
ADD_CUSTOM_TARGET(update-html DEPENDS ${UPDATEHTML})
FILE(STRINGS links MANPAGE_LINKS)
FOREACH(LINKS_LINE ${MANPAGE_LINKS})
IF(${LINKS_LINE} MATCHES "(.*) (.*)")
SET(SOURCE ${CMAKE_MATCH_1})
SET(TARGET ${CMAKE_MATCH_2})
IF (DOCUMENTATION_FORMAT MATCHES "html")
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SOURCE}.3 DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME ${TARGET}.html)
ELSE()
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SOURCE}.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3 RENAME ${TARGET}.3)
ENDIF()
ENDIF()
ENDFOREACH()
ADD_CUSTOM_TARGET(update_zip_errors
COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/make_zip_errors.sh ${CMAKE_SOURCE_DIR}/lib/zip.h ${CMAKE_CURRENT_SOURCE_DIR}/zip_errors.mdoc
DEPENDS ${CMAKE_SOURCE_DIR}/lib/zip.h ${CMAKE_CURRENT_SOURCE_DIR}/zip_errors.mdoc
)

View File

@@ -0,0 +1,114 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
ZIP_SOURCE_GET_ARGS -- validate and cast arguments to source callback
Copyright (C) 2014-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_SOURCE_GET_ARGS(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_SOURCE_GET_ARGS(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_SOURCE_GET_ARGS(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">ZIP_SOURCE_GET_ARGS</code> &#x2014;
<div class="Nd">validate and cast arguments to source callback</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">type *</var>
<br/>
<code class="Fn">ZIP_SOURCE_GET_ARGS</code>(<var class="Fa" style="white-space: nowrap;">type</var>,
<var class="Fa" style="white-space: nowrap;">void *data</var>,
<var class="Fa" style="white-space: nowrap;">zip_uint64_t len</var>,
<var class="Fa" style="white-space: nowrap;">zip_error_t *error</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">ZIP_SOURCE_GET_ARGS</code>() macro casts
<var class="Ar">data</var> to a pointer to <var class="Ar">type</var>.
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
On success, <code class="Fn">ZIP_SOURCE_GET_ARGS</code>() returns
<var class="Ar">data</var>. In case of error, it returns
<code class="Dv">NULL</code> and sets <var class="Ar">error</var>.
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<code class="Fn">ZIP_SOURCE_GET_ARGS</code>() fails if:
<dl class="Bl-tag">
<dt>[<a class="permalink" href="#ZIP_ER_INVAL"><code class="Er" id="ZIP_ER_INVAL">ZIP_ER_INVAL</code></a>]</dt>
<dd><var class="Ar">len</var> is less than the size of
<var class="Ar">type</var></dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_source_function.html">zip_source_function(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">ZIP_SOURCE_GET_ARGS</code>() was added in libzip 1.0.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,83 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" ZIP_SOURCE_GET_ARGS -- validate and cast arguments to source callback
.\" Copyright (C) 2014-2017 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_GET_ARGS" "3" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBZIP_SOURCE_GET_ARGS\fR
\- validate and cast arguments to source callback
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fItype *\fR
.br
.PD 0
.HP 4n
\fBZIP_SOURCE_GET_ARGS\fR(\fItype\fR, \fIvoid\ *data\fR, \fIzip_uint64_t\ len\fR, \fIzip_error_t\ *error\fR);
.PD
.SH "DESCRIPTION"
The
\fBZIP_SOURCE_GET_ARGS\fR()
macro casts
\fIdata\fR
to a pointer to
\fItype\fR.
.SH "RETURN VALUES"
On success,
\fBZIP_SOURCE_GET_ARGS\fR()
returns
\fIdata\fR.
In case of error, it returns
\fRNULL\fR
and sets
\fIerror\fR.
.SH "ERRORS"
\fBZIP_SOURCE_GET_ARGS\fR()
fails if:
.TP 19n
[\fRZIP_ER_INVAL\fR]
\fIlen\fR
is less than the size of
\fItype\fR
.SH "SEE ALSO"
libzip(3),
zip_source_function(3)
.SH "HISTORY"
\fBZIP_SOURCE_GET_ARGS\fR()
was added in libzip 1.0.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,79 @@
.\" ZIP_SOURCE_GET_ARGS -- validate and cast arguments to source callback
.\" Copyright (C) 2014-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_SOURCE_GET_ARGS 3
.Os
.Sh NAME
.Nm ZIP_SOURCE_GET_ARGS
.Nd validate and cast arguments to source callback
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft type *
.Fn ZIP_SOURCE_GET_ARGS "type" "void *data" "zip_uint64_t len" "zip_error_t *error"
.Sh DESCRIPTION
The
.Fn ZIP_SOURCE_GET_ARGS
macro casts
.Ar data
to a pointer to
.Ar type .
.Sh RETURN VALUES
On success,
.Fn ZIP_SOURCE_GET_ARGS
returns
.Ar data .
In case of error, it returns
.Dv NULL
and sets
.Ar error .
.Sh ERRORS
.Fn ZIP_SOURCE_GET_ARGS
fails if:
.Bl -tag -width Er
.It Bq Er ZIP_ER_INVAL
.Ar len
is less than the size of
.Ar type
.El
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_source_function 3
.Sh HISTORY
.Fn ZIP_SOURCE_GET_ARGS
was added in libzip 1.0.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,6 @@
#!/bin/sh
# <a class="link-man" href="zip_errors.html">
LINKBASE='http://pubs.opengroup.org/onlinepubs/9699919799/functions/'
sed -E -e 's,(<a class="Xr" href=")([^"]*)(">),\1'"$LINKBASE"'\2\3,g' -e "s,$LINKBASE"'(libzip|zip),\1,g'

74
externals/libzip/libzip/man/handle_links vendored Executable file
View File

@@ -0,0 +1,74 @@
#!/usr/bin/env perl
use strict;
my $operation = shift @ARGV;
if ($operation !~ m/^(install|uninstall)$/) {
print STDERR "$0: unknown operation $operation\n";
exit(1);
}
my %options = ();
for my $arg (@ARGV) {
if ($arg =~ m/([^=]*)=(.*)/) {
$options{$1} = $2;
}
else {
print STDERR "$0: can't parse option [$arg]\n";
exit(1);
}
}
for my $option (qw(command directory extension file)) {
unless (defined($options{$option})) {
print STDERR "$0: required variable $option not provided\n";
exit(1);
}
}
my $fh;
unless (open $fh, '<', $options{file}) {
print STDERR "$0: can't open links file '$options{file}': $!";
exit(1);
}
my @cmd = split /\s+/, $options{command};
while (my $line = <$fh>) {
chomp $line;
my @args = split /\s+/, $line;
process(@args);
}
sub process {
my ($source, @destinations) = @_;
my @args = (@cmd);
if ($operation eq 'install') {
push @args, "$options{directory}/$source.$options{extension}";
}
for my $destination (@destinations) {
push @args, "$options{directory}/$destination.$options{extension}";
run_command(@args);
pop @args;
}
}
sub run_command {
print (join ' ', @_);
print "\n";
my $ret = system(@_);
if ($ret != 0) {
print STDERR "$0: command failed: $?\n";
exit(1);
}
return 1;
}

248
externals/libzip/libzip/man/libzip.html vendored Executable file
View File

@@ -0,0 +1,248 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
libzip.mdoc -- general overview of available functions
Copyright (C) 2005-2018 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>LIBZIP(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">LIBZIP(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">LIBZIP(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">libzip</code> &#x2014;
<div class="Nd">library for manipulating zip archives</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<code class="Nm">libzip</code> is a library for reading, creating, and modifying
zip archives.
<p class="Pp">The main design criteria for <code class="Nm">libzip</code>
were:</p>
<ul class="Bl-bullet Bl-compact">
<li>Do not create corrupt files, even in case of errors.</li>
<li>Do not delete data.</li>
<li>Be efficient.</li>
</ul>
<p class="Pp">For this reason, when modifying zip archives,
<code class="Nm">libzip</code> writes to a temporary file and replaces the
original zip archive atomically.</p>
<p class="Pp">Below there are two sections listing functions: one for how to
read from zip archives and one for how to create/modify them.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="READING_ZIP_ARCHIVES"><a class="permalink" href="#READING_ZIP_ARCHIVES">READING
ZIP ARCHIVES</a></h1>
<section class="Ss">
<h2 class="Ss" id="open_archive"><a class="permalink" href="#open_archive">open
archive</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_open.html">zip_open(3)</a></li>
<li><a class="Xr" href="zip_fdopen.html">zip_fdopen(3)</a></li>
</ul>
</section>
<section class="Ss">
<h2 class="Ss" id="find_files"><a class="permalink" href="#find_files">find
files</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_name_locate.html">zip_name_locate(3)</a></li>
</ul>
</section>
<section class="Ss">
<h2 class="Ss" id="read_files"><a class="permalink" href="#read_files">read
files</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_fopen.html">zip_fopen(3)</a></li>
<li><a class="Xr" href="zip_fopen_encrypted.html">zip_fopen_encrypted(3)</a></li>
<li><a class="Xr" href="zip_fopen_index.html">zip_fopen_index(3)</a></li>
<li><a class="Xr" href="zip_fopen_index_encrypted.html">zip_fopen_index_encrypted(3)</a></li>
<li><a class="Xr" href="zip_fread.html">zip_fread(3)</a></li>
<li><a class="Xr" href="zip_fseek.html">zip_fseek(3)</a> (uncompressed files
only)</li>
<li><a class="Xr" href="zip_ftell.html">zip_ftell(3)</a> (uncompressed files
only)</li>
<li><a class="Xr" href="zip_fclose.html">zip_fclose(3)</a></li>
</ul>
</section>
<section class="Ss">
<h2 class="Ss" id="close_archive"><a class="permalink" href="#close_archive">close
archive</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_close.html">zip_close(3)</a></li>
</ul>
</section>
<section class="Ss">
<h2 class="Ss" id="miscellaneous"><a class="permalink" href="#miscellaneous">miscellaneous</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_stat.html">zip_stat(3)</a></li>
<li><a class="Xr" href="zip_file_get_comment.html">zip_file_get_comment(3)</a></li>
<li><a class="Xr" href="zip_file_get_external_attributes.html">zip_file_get_external_attributes(3)</a></li>
<li><a class="Xr" href="zip_get_archive_comment.html">zip_get_archive_comment(3)</a></li>
<li><a class="Xr" href="zip_get_archive_flag.html">zip_get_archive_flag(3)</a></li>
<li><a class="Xr" href="zip_get_name.html">zip_get_name(3)</a></li>
<li><a class="Xr" href="zip_get_num_entries.html">zip_get_num_entries(3)</a></li>
<li><a class="Xr" href="zip_set_default_password.html">zip_set_default_password(3)</a></li>
</ul>
</section>
</section>
<section class="Sh">
<h1 class="Sh" id="CREATING/MODIFYING_ZIP_ARCHIVES"><a class="permalink" href="#CREATING/MODIFYING_ZIP_ARCHIVES">CREATING/MODIFYING
ZIP ARCHIVES</a></h1>
<section class="Ss">
<h2 class="Ss" id="create/open_archive"><a class="permalink" href="#create/open_archive">create/open
archive</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_open.html">zip_open(3)</a></li>
</ul>
</section>
<section class="Ss">
<h2 class="Ss" id="add/change_files_and_directories"><a class="permalink" href="#add/change_files_and_directories">add/change
files and directories</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_dir_add.html">zip_dir_add(3)</a></li>
<li><a class="Xr" href="zip_file_add.html">zip_file_add(3)</a></li>
<li><a class="Xr" href="zip_file_replace.html">zip_file_replace(3)</a></li>
<li><a class="Xr" href="zip_file_set_comment.html">zip_file_set_comment(3)</a></li>
<li><a class="Xr" href="zip_file_set_external_attributes.html">zip_file_set_external_attributes(3)</a></li>
<li><a class="Xr" href="zip_file_set_encryption.html">zip_file_set_encryption(3)</a></li>
<li><a class="Xr" href="zip_file_set_mtime.html">zip_file_set_mtime(3)</a></li>
<li><a class="Xr" href="zip_set_file_compression.html">zip_set_file_compression(3)</a></li>
<li><a class="Xr" href="zip_source_buffer.html">zip_source_buffer(3)</a></li>
<li><a class="Xr" href="zip_source_file.html">zip_source_file(3)</a></li>
<li><a class="Xr" href="zip_source_filep.html">zip_source_filep(3)</a></li>
<li><a class="Xr" href="zip_source_free.html">zip_source_free(3)</a></li>
<li><a class="Xr" href="zip_source_function.html">zip_source_function(3)</a></li>
<li><a class="Xr" href="zip_source_zip.html">zip_source_zip(3)</a></li>
</ul>
</section>
<section class="Ss">
<h2 class="Ss" id="rename_files"><a class="permalink" href="#rename_files">rename
files</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_rename.html">zip_rename(3)</a></li>
</ul>
</section>
<section class="Ss">
<h2 class="Ss" id="delete_files"><a class="permalink" href="#delete_files">delete
files</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_delete.html">zip_delete(3)</a></li>
</ul>
</section>
<section class="Ss">
<h2 class="Ss" id="revert_changes"><a class="permalink" href="#revert_changes">revert
changes</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_unchange.html">zip_unchange(3)</a></li>
<li><a class="Xr" href="zip_unchange_all.html">zip_unchange_all(3)</a></li>
<li><a class="Xr" href="zip_unchange_archive.html">zip_unchange_archive(3)</a></li>
</ul>
</section>
<section class="Ss">
<h2 class="Ss" id="read/modify_extra_fields"><a class="permalink" href="#read/modify_extra_fields">read/modify
extra fields</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_file_extra_field_by_id.html">zip_file_extra_field_by_id(3)</a></li>
<li><a class="Xr" href="zip_file_extra_field_delete.html">zip_file_extra_field_delete(3)</a></li>
<li><a class="Xr" href="zip_file_extra_field_delete_by_id.html">zip_file_extra_field_delete_by_id(3)</a></li>
<li><a class="Xr" href="zip_file_extra_field_get.html">zip_file_extra_field_get(3)</a></li>
<li><a class="Xr" href="zip_file_extra_field_set.html">zip_file_extra_field_set(3)</a></li>
<li><a class="Xr" href="zip_file_extra_fields_count.html">zip_file_extra_fields_count(3)</a></li>
<li><a class="Xr" href="zip_file_extra_fields_count_by_id.html">zip_file_extra_fields_count_by_id(3)</a></li>
</ul>
</section>
<section class="Ss">
<h2 class="Ss" id="close_archive_(writing)"><a class="permalink" href="#close_archive_(writing)">close
archive (writing)</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_close.html">zip_close(3)</a></li>
<li><a class="Xr" href="zip_discard.html">zip_discard(3)</a></li>
</ul>
</section>
<section class="Ss">
<h2 class="Ss" id="miscellaneous_(writing)"><a class="permalink" href="#miscellaneous_(writing)">miscellaneous
(writing)</a></h2>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_libzip_version.html">zip_libzip_version(3)</a></li>
<li><a class="Xr" href="zip_register_progress_callback_with_state.html">zip_register_progress_callback_with_state(3)</a></li>
<li><a class="Xr" href="zip_set_archive_comment.html">zip_set_archive_comment(3)</a></li>
<li><a class="Xr" href="zip_set_archive_flag.html">zip_set_archive_flag(3)</a></li>
<li><a class="Xr" href="zip_source.html">zip_source(3)</a></li>
</ul>
</section>
</section>
<section class="Sh">
<h1 class="Sh" id="ERROR_HANDLING"><a class="permalink" href="#ERROR_HANDLING">ERROR
HANDLING</a></h1>
<ul class="Bl-bullet Bl-compact">
<li><a class="Xr" href="zip_error_strerror.html">zip_error_strerror(3)</a></li>
<li><a class="Xr" href="zip_strerror.html">zip_strerror(3)</a></li>
<li><a class="Xr" href="zip_file_strerror.html">zip_file_strerror(3)</a></li>
<li><a class="Xr" href="zip_get_error.html">zip_get_error(3)</a></li>
<li><a class="Xr" href="zip_error_init_with_code.html">zip_error_init_with_code(3)</a></li>
<li><a class="Xr" href="zip_error_system_type.html">zip_error_system_type(3)</a></li>
<li><a class="Xr" href="zip_errors.html">zip_errors(3)</a></li>
</ul>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">September 29, 2018</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

291
externals/libzip/libzip/man/libzip.man vendored Executable file
View File

@@ -0,0 +1,291 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" libzip.mdoc -- general overview of available functions
.\" Copyright (C) 2005-2018 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" "September 29, 2018" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBlibzip\fR
\- library for manipulating zip archives
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.SH "DESCRIPTION"
\fBlibzip\fR
is a library for reading, creating, and modifying zip archives.
.PP
The main design criteria for
\fBlibzip\fR
were:
.PD 0
.TP 4n
\fB\(bu\fR
Do not create corrupt files, even in case of errors.
.TP 4n
\fB\(bu\fR
Do not delete data.
.TP 4n
\fB\(bu\fR
Be efficient.
.PD
.PP
For this reason, when modifying zip archives,
\fBlibzip\fR
writes to a temporary file and replaces the original
zip archive atomically.
.PP
Below there are two sections listing functions: one for how to read
from zip archives and one for how to create/modify them.
.SH "READING ZIP ARCHIVES"
.SS "open archive"
.TP 4n
\fB\(bu\fR
zip_open(3)
.PD 0
.TP 4n
\fB\(bu\fR
zip_fdopen(3)
.PD
.SS "find files"
.TP 4n
\fB\(bu\fR
zip_name_locate(3)
.SS "read files"
.TP 4n
\fB\(bu\fR
zip_fopen(3)
.PD 0
.TP 4n
\fB\(bu\fR
zip_fopen_encrypted(3)
.TP 4n
\fB\(bu\fR
zip_fopen_index(3)
.TP 4n
\fB\(bu\fR
zip_fopen_index_encrypted(3)
.TP 4n
\fB\(bu\fR
zip_fread(3)
.TP 4n
\fB\(bu\fR
zip_fseek(3)
(uncompressed files only)
.TP 4n
\fB\(bu\fR
zip_ftell(3)
(uncompressed files only)
.TP 4n
\fB\(bu\fR
zip_fclose(3)
.PD
.SS "close archive"
.TP 4n
\fB\(bu\fR
zip_close(3)
.SS "miscellaneous"
.TP 4n
\fB\(bu\fR
zip_stat(3)
.PD 0
.TP 4n
\fB\(bu\fR
zip_file_get_comment(3)
.TP 4n
\fB\(bu\fR
zip_file_get_external_attributes(3)
.TP 4n
\fB\(bu\fR
zip_get_archive_comment(3)
.TP 4n
\fB\(bu\fR
zip_get_archive_flag(3)
.TP 4n
\fB\(bu\fR
zip_get_name(3)
.TP 4n
\fB\(bu\fR
zip_get_num_entries(3)
.TP 4n
\fB\(bu\fR
zip_set_default_password(3)
.PD
.SH "CREATING/MODIFYING ZIP ARCHIVES"
.SS "create/open archive"
.TP 4n
\fB\(bu\fR
zip_open(3)
.SS "add/change files and directories"
.TP 4n
\fB\(bu\fR
zip_dir_add(3)
.PD 0
.TP 4n
\fB\(bu\fR
zip_file_add(3)
.TP 4n
\fB\(bu\fR
zip_file_replace(3)
.TP 4n
\fB\(bu\fR
zip_file_set_comment(3)
.TP 4n
\fB\(bu\fR
zip_file_set_external_attributes(3)
.TP 4n
\fB\(bu\fR
zip_file_set_encryption(3)
.TP 4n
\fB\(bu\fR
zip_file_set_mtime(3)
.TP 4n
\fB\(bu\fR
zip_set_file_compression(3)
.TP 4n
\fB\(bu\fR
zip_source_buffer(3)
.TP 4n
\fB\(bu\fR
zip_source_file(3)
.TP 4n
\fB\(bu\fR
zip_source_filep(3)
.TP 4n
\fB\(bu\fR
zip_source_free(3)
.TP 4n
\fB\(bu\fR
zip_source_function(3)
.TP 4n
\fB\(bu\fR
zip_source_zip(3)
.PD
.SS "rename files"
.TP 4n
\fB\(bu\fR
zip_rename(3)
.SS "delete files"
.TP 4n
\fB\(bu\fR
zip_delete(3)
.SS "revert changes"
.TP 4n
\fB\(bu\fR
zip_unchange(3)
.PD 0
.TP 4n
\fB\(bu\fR
zip_unchange_all(3)
.TP 4n
\fB\(bu\fR
zip_unchange_archive(3)
.PD
.SS "read/modify extra fields"
.TP 4n
\fB\(bu\fR
zip_file_extra_field_by_id(3)
.PD 0
.TP 4n
\fB\(bu\fR
zip_file_extra_field_delete(3)
.TP 4n
\fB\(bu\fR
zip_file_extra_field_delete_by_id(3)
.TP 4n
\fB\(bu\fR
zip_file_extra_field_get(3)
.TP 4n
\fB\(bu\fR
zip_file_extra_field_set(3)
.TP 4n
\fB\(bu\fR
zip_file_extra_fields_count(3)
.TP 4n
\fB\(bu\fR
zip_file_extra_fields_count_by_id(3)
.PD
.SS "close archive (writing)"
.TP 4n
\fB\(bu\fR
zip_close(3)
.PD 0
.TP 4n
\fB\(bu\fR
zip_discard(3)
.PD
.SS "miscellaneous (writing)"
.TP 4n
\fB\(bu\fR
zip_libzip_version(3)
.PD 0
.TP 4n
\fB\(bu\fR
zip_register_progress_callback_with_state(3)
.TP 4n
\fB\(bu\fR
zip_set_archive_comment(3)
.TP 4n
\fB\(bu\fR
zip_set_archive_flag(3)
.TP 4n
\fB\(bu\fR
zip_source(3)
.PD
.SH "ERROR HANDLING"
.TP 4n
\fB\(bu\fR
zip_error_strerror(3)
.PD 0
.TP 4n
\fB\(bu\fR
zip_strerror(3)
.TP 4n
\fB\(bu\fR
zip_file_strerror(3)
.TP 4n
\fB\(bu\fR
zip_get_error(3)
.TP 4n
\fB\(bu\fR
zip_error_init_with_code(3)
.TP 4n
\fB\(bu\fR
zip_error_system_type(3)
.TP 4n
\fB\(bu\fR
zip_errors(3)
.PD
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

237
externals/libzip/libzip/man/libzip.mdoc vendored Executable file
View File

@@ -0,0 +1,237 @@
.\" libzip.mdoc -- general overview of available functions
.\" Copyright (C) 2005-2018 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.
.\"
.Dd September 29, 2018
.Dt LIBZIP 3
.Os
.Sh NAME
.Nm libzip
.Nd library for manipulating zip archives
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Sh DESCRIPTION
.Nm
is a library for reading, creating, and modifying zip archives.
.Pp
The main design criteria for
.Nm
were:
.Bl -bullet -compact
.It
Do not create corrupt files, even in case of errors.
.It
Do not delete data.
.It
Be efficient.
.El
.Pp
For this reason, when modifying zip archives,
.Nm
writes to a temporary file and replaces the original
zip archive atomically.
.Pp
Below there are two sections listing functions: one for how to read
from zip archives and one for how to create/modify them.
.Sh READING ZIP ARCHIVES
.Ss open archive
.Bl -bullet -compact
.It
.Xr zip_open 3
.It
.Xr zip_fdopen 3
.El
.Ss find files
.Bl -bullet -compact
.It
.Xr zip_name_locate 3
.El
.Ss read files
.Bl -bullet -compact
.It
.Xr zip_fopen 3
.It
.Xr zip_fopen_encrypted 3
.It
.Xr zip_fopen_index 3
.It
.Xr zip_fopen_index_encrypted 3
.It
.Xr zip_fread 3
.It
.Xr zip_fseek 3
(uncompressed files only)
.It
.Xr zip_ftell 3
(uncompressed files only)
.It
.Xr zip_fclose 3
.El
.Ss close archive
.Bl -bullet -compact
.It
.Xr zip_close 3
.El
.Ss miscellaneous
.Bl -bullet -compact
.It
.Xr zip_stat 3
.It
.Xr zip_file_get_comment 3
.It
.Xr zip_file_get_external_attributes 3
.It
.Xr zip_get_archive_comment 3
.It
.Xr zip_get_archive_flag 3
.It
.Xr zip_get_name 3
.It
.Xr zip_get_num_entries 3
.It
.Xr zip_set_default_password 3
.El
.Sh CREATING/MODIFYING ZIP ARCHIVES
.Ss create/open archive
.Bl -bullet -compact
.It
.Xr zip_open 3
.El
.Ss add/change files and directories
.Bl -bullet -compact
.It
.Xr zip_dir_add 3
.It
.Xr zip_file_add 3
.It
.Xr zip_file_replace 3
.It
.Xr zip_file_set_comment 3
.It
.Xr zip_file_set_external_attributes 3
.It
.Xr zip_file_set_encryption 3
.It
.Xr zip_file_set_mtime 3
.It
.Xr zip_set_file_compression 3
.It
.Xr zip_source_buffer 3
.It
.Xr zip_source_file 3
.It
.Xr zip_source_filep 3
.It
.Xr zip_source_free 3
.It
.Xr zip_source_function 3
.It
.Xr zip_source_zip 3
.El
.Ss rename files
.Bl -bullet -compact
.It
.Xr zip_rename 3
.El
.Ss delete files
.Bl -bullet -compact
.It
.Xr zip_delete 3
.El
.Ss revert changes
.Bl -bullet -compact
.It
.Xr zip_unchange 3
.It
.Xr zip_unchange_all 3
.It
.Xr zip_unchange_archive 3
.El
.Ss read/modify extra fields
.Bl -bullet -compact
.It
.Xr zip_file_extra_field_by_id 3
.It
.Xr zip_file_extra_field_delete 3
.It
.Xr zip_file_extra_field_delete_by_id 3
.It
.Xr zip_file_extra_field_get 3
.It
.Xr zip_file_extra_field_set 3
.It
.Xr zip_file_extra_fields_count 3
.It
.Xr zip_file_extra_fields_count_by_id 3
.El
.Ss close archive (writing)
.Bl -bullet -compact
.It
.Xr zip_close 3
.It
.Xr zip_discard 3
.El
.Ss miscellaneous (writing)
.Bl -bullet -compact
.It
.Xr zip_libzip_version 3
.It
.Xr zip_register_progress_callback_with_state 3
.It
.Xr zip_set_archive_comment 3
.It
.Xr zip_set_archive_flag 3
.It
.Xr zip_source 3
.El
.Sh ERROR HANDLING
.Bl -bullet -compact
.It
.Xr zip_error_strerror 3
.It
.Xr zip_strerror 3
.It
.Xr zip_file_strerror 3
.It
.Xr zip_get_error 3
.It
.Xr zip_error_init_with_code 3
.It
.Xr zip_error_system_type 3
.It
.Xr zip_errors 3
.El
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

22
externals/libzip/libzip/man/links vendored Executable file
View File

@@ -0,0 +1,22 @@
zip_add zip_replace
zip_error_clear zip_file_error_clear
zip_error_get zip_file_error_get
zip_error_init zip_error_init_with_code
zip_file_add zip_file_replace
zip_file_extra_field_delete zip_file_extra_field_delete_by_id
zip_file_extra_field_get zip_file_extra_field_get_by_id
zip_file_extra_fields_count zip_file_extra_fields_count_by_id
zip_file_strerror zip_strerror
zip_fopen zip_fopen_index
zip_fopen_encrypted zip_fopen_index_encrypted
zip_open zip_open_from_source
zip_source_begin_write zip_source_begin_write_cloning
zip_source_buffer zip_source_buffer_create
zip_source_buffer_fragment zip_source_buffer_fragment_create
zip_source_file zip_source_file_create
zip_source_filep zip_source_filep_create
zip_source_function zip_source_function_create
zip_source_win32a zip_source_win32a_create
zip_source_win32handle zip_source_win32handle_create
zip_source_win32w zip_source_win32w_create
zip_stat zip_stat_index

114
externals/libzip/libzip/man/make_zip_errors.sh vendored Executable file
View File

@@ -0,0 +1,114 @@
#!/bin/sh
# make_zip_errrors.sh: create zip_errors.mdoc from zip.h
# Copyright (C) 1999-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.
if [ "$#" -ne 2 ]
then
echo "Usage: $0 in_file out_file" >&2
echo " e.g. $0 zip.h zip_errors.mdoc" >&2
exit 1
fi
if [ "$1" = "$2" ]
then
echo "$0: error: output file = input file" >&2
exit 1
fi
date=`LC_TIME=en_US date '+%B %e, %Y' | sed 's/ / /'`
cat <<EOF >> "$2.$$" || exit 1
.\" zip_errors.mdoc -- list of all libzip error codes
.\" Copyright (C) 1999-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.
.\"
.\" This file was generated automatically by $0
.\" from $1; make changes there.
.\"
.Dd $date
.Dt ZIP_ERRORS 3
.Os
.Sh NAME
.Nm zip_errors
.Nd list of all libzip error codes
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Sh DESCRIPTION
The following error codes are used by libzip:
.Bl -tag -width XZIPXERXCOMPNOTSUPPXX
EOF
sed -n 's/^#define \(ZIP_ER_[A-Z_0-9]*\).*\/\* \(.\) \([^*]*\) \*\//.It Bq Er \1@\3./p' "$1" \
| sort\
| tr @ '\012' \
>> "$2.$$" || exit 1
cat <<EOF >> "$2.$$" || exit 1
.El
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at
EOF
mv "$2.$$" "$2" || exit 1

216
externals/libzip/libzip/man/mkdocset.pl vendored Executable file
View File

@@ -0,0 +1,216 @@
#!/usr/bin/env perl
use strict;
my $DOCSETUTIL = '/Applications/Xcode.app/Contents/Developer/usr/bin/docsetutil';
my $BASE_URL = 'http://nih.at/libzip';
my $BUNDLE_ID = 'at.nih.libzip';
my $SRCDIR = $ENV{SRCDIR} // '.';
my @files = @ARGV;
my $docset = 'at.nih.libzip.docset';
my @sh_nodes = qw(zipcmp zipmerge ziptool);
(system('rm', '-rf', $docset) == 0) or die "can't remove old version of docset: $!";
mkdir($docset) or die "can't create docset directory: $!";
mkdir("$docset/Contents") or die "can't create docset directory: $!";
mkdir("$docset/Contents/Resources") or die "can't create docset directory: $!";
mkdir("$docset/Contents/Resources/Documents") or die "can't create docset directory: $!";
my $version = `sed -n 's/#define PACKAGE_VERSION "\\(.*\\)"/\\1/p' ../config.h`;
chomp $version;
my $suffix = '';
$suffix = '-hg' if ($version =~ /[a-z]$/);
my $package_file = "$BUNDLE_ID-$version.xar";
my $download_url = "$BASE_URL/$package_file";
my $feed_url = "$BASE_URL/at.nih.libzip$suffix.atom";
open I, "> $docset/Contents/Info.plist" or die "can't create Info.plist: $!";
print I <<EOF;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>$BUNDLE_ID.docset</string>
<key>CFBundleName</key>
<string>libzip</string>
<key>DocSetPublisherIdentifier</key>
<string>at.nih</string>
<key>DocSetPublisherName</key>
<string>NiH</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2016 Dieter Baron and Thomas Klausner</string>
<key>CFBundleVersion</key>
<string>$version</string>
<key>DocSetFeedURL</key>
<string>$feed_url</string>
<key>DocSetFeedName</key>
<string>libzip</string>
</dict>
</plist>
EOF
close I;
open N, "> $docset/Contents/Resources/Nodes.xml" or die "can't create Nodes.xml: $!";
my %tl_nodes = (libzip => 1);
for (@sh_nodes) {
$tl_nodes{$_} = 1;
}
my @tokens = ();
print N <<EOF;
<?xml version="1.0" encoding="UTF-8"?>
<DocSetNodes version="1.0">
<TOC>
<Node noindex="1" type="folder">
<Name>libzip package</Name>
<Subnodes>
<Node noindex="1" type="folder">
<Name>Library</Name>
<Path>libzip.html</Path>
<Subnodes>
EOF
my $id = 1001;
for my $html (@files) {
my $name = $html;
$name =~ s/.html//;
if ($tl_nodes{$name}) {
next;
}
process_file($html, 'c', $id++);
}
print N " </Subnodes>\n";
print N " </Node>\n";
print N " <Node noindex=\"1\" type=\"folder\">\n";
print N " <Name>Commands</Name>\n";
print N " <Subnodes>\n";
$id = 2;
for my $name (@sh_nodes) {
process_file("$name.html", 'c', $id++);
}
print N " </Subnodes>\n";
print N " </Node>\n";
print N " </Subnodes>\n";
print N " </Node>\n";
print N " </TOC>\n";
print N "</DocSetNodes>\n";
close N;
link("$SRCDIR/nih-man.css", "$docset/Contents/Resources/Documents/nih-man.css") or die "can't link css file: $!";
copy_html('libzip.html', "$docset/Contents/Resources/Documents/libzip.html");
write_tokens();
system($DOCSETUTIL, 'index', $docset) == 0 or die "can't index docset: $!";
system($DOCSETUTIL, 'validate', $docset) == 0 or die "can't validate docset: $!";
unlink("$docset/Contents/Resources/Nodes.xml");
unlink("$docset/Contents/Resources/Tokens.xml");
system($DOCSETUTIL, 'package', '-output', "at.nih.libzip-$version.xar", '-atom', "at.nih.libzip$suffix.atom", '-download-url', "$BASE_URL/at.nih.libzip-$version.xar", $docset);
sub copy_html {
my ($src, $dst) = @_;
my $content = `cat $src`;
$content =~ s,</head>,<meta name="viewport" content="width=device-width"></head>,;
$content =~ s,../nih-man.css,nih-man.css,;
# remove header and footer
$content =~ s,<table[^>]*class="(heade?r?|foote?r?)".*?</table>,,sg;
$content =~ s,(<div class="sec-body") style="margin-left: 5.00ex;",$1,g;
$content =~ s,(<div class="ssec-head") style="margin-left: -2.00ex;",$1,g;
open X, "> $dst" or die "can't create $dst: $!";
print X $content;
close X;
}
sub process_file {
my ($html, $lang, $id) = @_;
my $name = $html;
$name =~ s/.html//;
my $mdoc = "$SRCDIR/$name.mdoc";
my $description;
my @names = ();
open MD, "< $mdoc" or die "can't open $mdoc: $!";
while (my $line = <MD>) {
if ($line =~ m/^.Nm (.*?)( ,)?$/) {
push @names, $1;
}
elsif ($line =~ m/^.Nd (.*)/) {
$description = $1;
}
elsif ($line =~ m/^.Sh SYNOPSIS/) {
last;
}
}
close MD;
print N " <Node id=\"$id\">\n";
print N " <Name>$name</Name>\n";
print N " <Path>$html</Path>\n";
print N " </Node>\n";
for my $name (@names) {
push @tokens, { type => "//apple_ref/$lang/func",
path => $html,
name => $name,
description => $description,
id => $id };
}
copy_html($html, "$docset/Contents/Resources/Documents/$html");
}
sub write_token {
my ($T, $token) = @_;
print $T " <Token>\n";
print $T " <TokenIdentifier>$token->{type}/$token->{name}</TokenIdentifier>\n";
print $T " <Path>$token->{path}</Path>\n";
print $T " <Abstract>$token->{description}</Abstract>\n";
print $T " <NodeRef refid=\"$token->{id}\" />\n";
print $T " </Token>\n";
}
sub write_tokens {
open my $T, "> $docset/Contents/Resources/Tokens.xml" or die "can't create Tokens.xml: $!";
print $T "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
print $T "<Tokens version=\"1.0\">\n";
for my $token (sort { $a->{name} cmp $b->{name} } @tokens) {
write_token($T, $token);
}
print $T "</Tokens>\n";
close $T;
}

61
externals/libzip/libzip/man/nih-man.css vendored Executable file
View File

@@ -0,0 +1,61 @@
div.lit {
font-family: monospace;
}
div.sec-head, div.ssec-head, h1, h2 {
padding: 4pt;
border: solid;
border-width: 1px;
border-color: #555555;
background: #aaaaaa;
font-weight: bold;
}
div.sec-head, h1 {
font-size: large;
}
h2 {
font-size: medium;
}
div.sec-body, div.ssec-body {
margin-top: 1em;
}
span.arg {
font-style: italic;
}
span.define {
}
span.emph {
}
span.errno {
}
span.farg {
font-style: italic;
}
span.fname {
font-weight: bold;
}
span.ftype {
font-style: italic;
}
span.includes {
font-weight: bold;
}
span.name {
font-weight: bold;
}
/* copied from nih's style.css */
body {
background: #cccccc;
}
a {
text-decoration: none;
}
a:link {
color: #555555;
}
a:visited {
color: #666666;
}
a:hover {
color: #777777;
}

11
externals/libzip/libzip/man/update-html.cmake vendored Executable file
View File

@@ -0,0 +1,11 @@
# expect variables IN, OUT, and DIR
EXECUTE_PROCESS(COMMAND mandoc -T html -Oman=%N.html,style=../nih-man.css ${DIR}/${IN}
OUTPUT_VARIABLE HTML)
SET(LINKBASE "http://pubs.opengroup.org/onlinepubs/9699919799/functions/")
STRING(REGEX REPLACE "(<a class=\"Xr\" href=\")([^\"]*)(\">)" "\\1${LINKBASE}\\2\\3" HTML "${HTML}")
STRING(REGEX REPLACE "${LINKBASE}(libzip|zip)" "\\1" HTML "${HTML}")
FILE(WRITE ${DIR}/${OUT}.new "${HTML}")
CONFIGURE_FILE(${DIR}/${OUT}.new ${DIR}/${OUT} COPYONLY)
FILE(REMOVE ${DIR}/${OUT}.new)

View File

@@ -0,0 +1,7 @@
# expect variables IN, OUT, and DIR
EXECUTE_PROCESS(COMMAND mandoc -T man ${DIR}/${IN} OUTPUT_VARIABLE MAN)
STRING(REGEX REPLACE "NetBSD [0-9.]*" "NiH" MAN "${MAN}")
FILE(WRITE ${DIR}/${OUT}.new "${MAN}")
CONFIGURE_FILE(${DIR}/${OUT}.new ${DIR}/${OUT} COPYONLY)
FILE(REMOVE ${DIR}/${OUT}.new)

121
externals/libzip/libzip/man/zip_add.html vendored Executable file
View File

@@ -0,0 +1,121 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_add.mdoc -- add files to zip archive
Copyright (C) 2004-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ADD(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ADD(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ADD(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_add</code>, <code class="Nm">zip_replace</code> &#x2014;
<div class="Nd">add file to zip archive or replace file in zip archive (obsolete
interface)</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">zip_int64_t</var>
<br/>
<code class="Fn">zip_add</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">const char
*name</var>, <var class="Fa" style="white-space: nowrap;">zip_source_t
*source</var>);</p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_replace</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
index</var>, <var class="Fa" style="white-space: nowrap;">zip_source_t
*source</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The function <code class="Fn">zip_add</code>() is the obsolete version of
<a class="Xr" href="zip_file_add.html">zip_file_add(3)</a>. It is the same as
calling <a class="Xr" href="zip_file_add.html">zip_file_add(3)</a> with an
empty <var class="Ar">flags</var> argument. Similarly, the
<code class="Fn">zip_replace</code>() function is the obsolete version of
<a class="Xr" href="zip_file_replace.html">zip_file_replace(3)</a>. It is the
same as calling
<a class="Xr" href="zip_file_replace.html">zip_file_replace(3)</a> with an
empty <var class="Ar">flags</var> argument.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_file_add.html">zip_file_add(3)</a>,
<a class="Xr" href="zip_file_replace.html">zip_file_replace(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_add</code>() was added in libzip 0.6. In libzip 0.10 the
return type was changed from <var class="Vt">int</var> to
<var class="Vt">zip_int64_t</var>. It was deprecated in libzip 0.11, use
<code class="Fn">zip_file_add</code>() instead.
<p class="Pp"><code class="Fn">zip_replace</code>() was added in libzip 0.6. In
libzip 0.10 the type of <var class="Ar">index</var> was changed from
<var class="Vt">int</var> to <var class="Vt">zip_uint64_t</var>. It was
deprecated in libzip 0.11, use <code class="Fn">zip_file_replace</code>()
instead.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

106
externals/libzip/libzip/man/zip_add.man vendored Executable file
View File

@@ -0,0 +1,106 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_add.mdoc -- add files to zip archive
.\" Copyright (C) 2004-2017 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_add\fR,
\fBzip_replace\fR
\- add file to zip archive or replace file in zip archive (obsolete interface)
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIzip_int64_t\fR
.br
.PD 0
.HP 4n
\fBzip_add\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *name\fR, \fIzip_source_t\ *source\fR);
.PD
.PP
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_replace\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_source_t\ *source\fR);
.PD
.SH "DESCRIPTION"
The function
\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
\fIflags\fR
argument.
Similarly, the
\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
\fIflags\fR
argument.
.SH "SEE ALSO"
libzip(3),
zip_file_add(3),
zip_file_replace(3)
.SH "HISTORY"
\fBzip_add\fR()
was added in libzip 0.6.
In libzip 0.10 the return type was changed from
\fIint\fR
to
\fIzip_int64_t\fR.
It was deprecated in libzip 0.11, use
\fBzip_file_add\fR()
instead.
.PP
\fBzip_replace\fR()
was added in libzip 0.6.
In libzip 0.10 the type of
\fIindex\fR
was changed from
\fIint\fR
to
\fIzip_uint64_t\fR.
It was deprecated in libzip 0.11, use
\fBzip_file_replace\fR()
instead.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

96
externals/libzip/libzip/man/zip_add.mdoc vendored Executable file
View File

@@ -0,0 +1,96 @@
.\" zip_add.mdoc -- add files to zip archive
.\" Copyright (C) 2004-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ADD 3
.Os
.Sh NAME
.Nm zip_add ,
.Nm zip_replace
.Nd add file to zip archive or replace file in zip archive (obsolete interface)
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft zip_int64_t
.Fn zip_add "zip_t *archive" "const char *name" "zip_source_t *source"
.Ft int
.Fn zip_replace "zip_t *archive" "zip_uint64_t index" "zip_source_t *source"
.Sh DESCRIPTION
The function
.Fn zip_add
is the obsolete version of
.Xr zip_file_add 3 .
It is the same as calling
.Xr zip_file_add 3
with an empty
.Ar flags
argument.
Similarly, the
.Fn zip_replace
function is the obsolete version of
.Xr zip_file_replace 3 .
It is the same as calling
.Xr zip_file_replace 3
with an empty
.Ar flags
argument.
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_file_add 3 ,
.Xr zip_file_replace 3
.Sh HISTORY
.Fn zip_add
was added in libzip 0.6.
In libzip 0.10 the return type was changed from
.Vt int
to
.Vt zip_int64_t .
It was deprecated in libzip 0.11, use
.Fn zip_file_add
instead.
.Pp
.Fn zip_replace
was added in libzip 0.6.
In libzip 0.10 the type of
.Ar index
was changed from
.Vt int
to
.Vt zip_uint64_t .
It was deprecated in libzip 0.11, use
.Fn zip_file_replace
instead.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

102
externals/libzip/libzip/man/zip_add_dir.html vendored Executable file
View File

@@ -0,0 +1,102 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_add_dir.mdoc -- add directory to zip archive
Copyright (C) 2006-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ADD_DIR(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ADD_DIR(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ADD_DIR(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_add_dir</code> &#x2014;
<div class="Nd">add directory to zip archive (obsolete interface)</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">zip_int64_t</var>
<br/>
<code class="Fn">zip_add_dir</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">const char
*name</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The function <code class="Fn">zip_add_dir</code>() is the obsolete version of
<a class="Xr" href="zip_dir_add.html">zip_dir_add(3)</a>. It is the same as
calling <a class="Xr" href="zip_dir_add.html">zip_dir_add(3)</a> with an empty
flags argument.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_dir_add.html">zip_dir_add(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_add_dir</code>() was added in libzip 0.8. In libzip 0.10
the return type was changed from <var class="Vt">int</var> to
<var class="Vt">zip_int64_t</var>. It was deprecated in libzip 0.11, use
<code class="Fn">zip_dir_add</code>() instead.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

74
externals/libzip/libzip/man/zip_add_dir.man vendored Executable file
View File

@@ -0,0 +1,74 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_add_dir.mdoc -- add directory to zip archive
.\" Copyright (C) 2006-2017 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_add_dir\fR
\- add directory to zip archive (obsolete interface)
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIzip_int64_t\fR
.br
.PD 0
.HP 4n
\fBzip_add_dir\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *name\fR);
.PD
.SH "DESCRIPTION"
The function
\fBzip_add_dir\fR()
is the obsolete version of
zip_dir_add(3).
It is the same as calling
zip_dir_add(3)
with an empty flags argument.
.SH "SEE ALSO"
libzip(3),
zip_dir_add(3)
.SH "HISTORY"
\fBzip_add_dir\fR()
was added in libzip 0.8.
In libzip 0.10 the return type was changed from
\fIint\fR
to
\fIzip_int64_t\fR.
It was deprecated in libzip 0.11, use
\fBzip_dir_add\fR()
instead.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

69
externals/libzip/libzip/man/zip_add_dir.mdoc vendored Executable file
View File

@@ -0,0 +1,69 @@
.\" zip_add_dir.mdoc -- add directory to zip archive
.\" Copyright (C) 2006-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ADD_DIR 3
.Os
.Sh NAME
.Nm zip_add_dir
.Nd add directory to zip archive (obsolete interface)
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft zip_int64_t
.Fn zip_add_dir "zip_t *archive" "const char *name"
.Sh DESCRIPTION
The function
.Fn zip_add_dir
is the obsolete version of
.Xr zip_dir_add 3 .
It is the same as calling
.Xr zip_dir_add 3
with an empty flags argument.
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_dir_add 3
.Sh HISTORY
.Fn zip_add_dir
was added in libzip 0.8.
In libzip 0.10 the return type was changed from
.Vt int
to
.Vt zip_int64_t .
It was deprecated in libzip 0.11, use
.Fn zip_dir_add
instead.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

146
externals/libzip/libzip/man/zip_close.html vendored Executable file
View File

@@ -0,0 +1,146 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_close.mdoc -- close zip archive
Copyright (C) 2003-2018 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_CLOSE(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_CLOSE(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_CLOSE(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_close</code> &#x2014;
<div class="Nd">close zip archive</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_close</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_close</code>() function writes any changes made to
<var class="Ar">archive</var> to disk. If <var class="Ar">archive</var>
contains no files, the file is completely removed (no empty archive is
written). If successful, <var class="Ar">archive</var> is freed. If writing
fails, <code class="Fn">zip_close</code>() fails;
<var class="Ar">archive</var> is left unchanged and must still be freed.
<p class="Pp">To close and free a zip archive without saving changes, use
<a class="Xr" href="zip_discard.html">zip_discard(3)</a>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
Upon successful completion 0 is returned. Otherwise, -1 is returned and the
error code in <var class="Ar">archive</var> is set to indicate the error.
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<code class="Fn">zip_close</code>() will fail if:
<dl class="Bl-tag">
<dt>[<a class="permalink" href="#ZIP_ER_EOF"><code class="Er" id="ZIP_ER_EOF">ZIP_ER_EOF</code></a>]</dt>
<dd>Unexpected end-of-file found while reading from a file.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_INTERNAL"><code class="Er" id="ZIP_ER_INTERNAL">ZIP_ER_INTERNAL</code></a>]</dt>
<dd>The callback function of an added or replaced file returned an error but
failed to report which.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_INVAL"><code class="Er" id="ZIP_ER_INVAL">ZIP_ER_INVAL</code></a>]</dt>
<dd>The <var class="Ar">path</var> argument is
<code class="Dv">NULL</code>.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_MEMORY"><code class="Er" id="ZIP_ER_MEMORY">ZIP_ER_MEMORY</code></a>]</dt>
<dd>Required memory could not be allocated.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_NOZIP"><code class="Er" id="ZIP_ER_NOZIP">ZIP_ER_NOZIP</code></a>]</dt>
<dd>File is not a zip archive.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_READ"><code class="Er" id="ZIP_ER_READ">ZIP_ER_READ</code></a>]</dt>
<dd>A file read failed.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_RENAME"><code class="Er" id="ZIP_ER_RENAME">ZIP_ER_RENAME</code></a>]</dt>
<dd>A temporary file could not be renamed to its final name.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_SEEK"><code class="Er" id="ZIP_ER_SEEK">ZIP_ER_SEEK</code></a>]</dt>
<dd>A file seek failed.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_TMPOPEN"><code class="Er" id="ZIP_ER_TMPOPEN">ZIP_ER_TMPOPEN</code></a>]</dt>
<dd>A temporary file could not be created.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_WRITE"><code class="Er" id="ZIP_ER_WRITE">ZIP_ER_WRITE</code></a>]</dt>
<dd>A file write failed.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_ZLIB"><code class="Er" id="ZIP_ER_ZLIB">ZIP_ER_ZLIB</code></a>]</dt>
<dd>An error occurred while (de)compressing a stream with
<a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/zlib.html">zlib(3)</a>.</dd>
</dl>
Additionally, any errors returned by the callback function for added or replaced
files will be passed back.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_discard.html">zip_discard(3)</a>,
<a class="Xr" href="zip_fdopen.html">zip_fdopen(3)</a>,
<a class="Xr" href="zip_get_error.html">zip_get_error(3)</a>,
<a class="Xr" href="zip_open.html">zip_open(3)</a>,
<a class="Xr" href="zip_register_progress_callback_with_state.html">zip_register_progress_callback_with_state(3)</a>,
<a class="Xr" href="zip_strerror.html">zip_strerror(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_close</code>() was added in libzip 0.6.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

136
externals/libzip/libzip/man/zip_close.man vendored Executable file
View File

@@ -0,0 +1,136 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_close.mdoc -- close zip archive
.\" Copyright (C) 2003-2018 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_close\fR
\- close zip archive
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_close\fR(\fIzip_t\ *archive\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_close\fR()
function writes any changes made to
\fIarchive\fR
to disk.
If
\fIarchive\fR
contains no files, the file is completely removed (no empty archive is
written).
If successful,
\fIarchive\fR
is freed.
If writing fails,
\fBzip_close\fR()
fails;
\fIarchive\fR
is left unchanged and must still be freed.
.PP
To close and free a zip archive without saving changes, use
zip_discard(3).
.SH "RETURN VALUES"
Upon successful completion 0 is returned.
Otherwise, \-1 is returned and the error code in
\fIarchive\fR
is set to indicate the error.
.SH "ERRORS"
\fBzip_close\fR()
will fail if:
.TP 19n
[\fRZIP_ER_EOF\fR]
Unexpected end-of-file found while reading from a file.
.TP 19n
[\fRZIP_ER_INTERNAL\fR]
The callback function of an added or replaced file returned an
error but failed to report which.
.TP 19n
[\fRZIP_ER_INVAL\fR]
The
\fIpath\fR
argument is
\fRNULL\fR.
.TP 19n
[\fRZIP_ER_MEMORY\fR]
Required memory could not be allocated.
.TP 19n
[\fRZIP_ER_NOZIP\fR]
File is not a zip archive.
.TP 19n
[\fRZIP_ER_READ\fR]
A file read failed.
.TP 19n
[\fRZIP_ER_RENAME\fR]
A temporary file could not be renamed to its final name.
.TP 19n
[\fRZIP_ER_SEEK\fR]
A file seek failed.
.TP 19n
[\fRZIP_ER_TMPOPEN\fR]
A temporary file could not be created.
.TP 19n
[\fRZIP_ER_WRITE\fR]
A file write failed.
.TP 19n
[\fRZIP_ER_ZLIB\fR]
An error occurred while (de)compressing a stream with
zlib(3).
.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),
zip_fdopen(3),
zip_get_error(3),
zip_open(3),
zip_register_progress_callback_with_state(3),
zip_strerror(3)
.SH "HISTORY"
\fBzip_close\fR()
was added in libzip 0.6.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

117
externals/libzip/libzip/man/zip_close.mdoc vendored Executable file
View File

@@ -0,0 +1,117 @@
.\" zip_close.mdoc -- close zip archive
.\" Copyright (C) 2003-2019 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.
.\"
.Dd September 17, 2019
.Dt ZIP_CLOSE 3
.Os
.Sh NAME
.Nm zip_close
.Nd close zip archive
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft int
.Fn zip_close "zip_t *archive"
.Sh DESCRIPTION
The
.Fn zip_close
function writes any changes made to
.Ar archive
to disk.
If
.Ar archive
contains no files, the file is completely removed (no empty archive is
written).
If successful,
.Ar archive
is freed.
Otherwise
.Ar archive
is left unchanged and must still be freed.
.Pp
To close and free a zip archive without saving changes, use
.Xr zip_discard 3 .
.Sh RETURN VALUES
Upon successful completion 0 is returned.
Otherwise, \-1 is returned and the error code in
.Ar archive
is set to indicate the error.
.Sh ERRORS
.Fn zip_close
will fail if:
.Bl -tag -width Er
.It Bq Er ZIP_ER_EOF
Unexpected end-of-file found while reading from a file.
.It Bq Er ZIP_ER_INTERNAL
The callback function of an added or replaced file returned an
error but failed to report which.
.It Bq Er ZIP_ER_INVAL
The
.Ar path
argument is
.Dv NULL .
.It Bq Er ZIP_ER_MEMORY
Required memory could not be allocated.
.It Bq Er ZIP_ER_NOZIP
File is not a zip archive.
.It Bq Er ZIP_ER_READ
A file read failed.
.It Bq Er ZIP_ER_RENAME
A temporary file could not be renamed to its final name.
.It Bq Er ZIP_ER_SEEK
A file seek failed.
.It Bq Er ZIP_ER_TMPOPEN
A temporary file could not be created.
.It Bq Er ZIP_ER_WRITE
A file write failed.
.It Bq Er ZIP_ER_ZLIB
An error occurred while (de)compressing a stream with
.Xr zlib 3 .
.El
Additionally, any errors returned by the callback function
for added or replaced files will be passed back.
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_discard 3 ,
.Xr zip_fdopen 3 ,
.Xr zip_get_error 3 ,
.Xr zip_open 3 ,
.Xr zip_register_progress_callback_with_state 3 ,
.Xr zip_strerror 3
.Sh HISTORY
.Fn zip_close
was added in libzip 0.6.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

114
externals/libzip/libzip/man/zip_delete.html vendored Executable file
View File

@@ -0,0 +1,114 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_delete.mdoc -- delete files from zip archive
Copyright (C) 2003-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_DELETE(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_DELETE(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_DELETE(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_delete</code> &#x2014;
<div class="Nd">delete file from zip archive</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_delete</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
index</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The file at position <var class="Ar">index</var> in the zip archive
<var class="Ar">archive</var> is marked as deleted.
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
Upon successful completion 0 is returned. Otherwise, -1 is returned and the
error code in <var class="Ar">archive</var> is set to indicate the error.
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<code class="Fn">zip_delete</code>() fails if:
<dl class="Bl-tag">
<dt>[<a class="permalink" href="#ZIP_ER_INVAL"><code class="Er" id="ZIP_ER_INVAL">ZIP_ER_INVAL</code></a>]</dt>
<dd><var class="Ar">index</var> is not a valid file index in
<var class="Ar">archive</var>.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_unchange.html">zip_unchange(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_delete</code>() was added in libzip 0.6. In libzip 0.10 the
type of <var class="Ar">index</var> was changed from <var class="Vt">int</var>
to <var class="Vt">zip_uint64_t</var>.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

84
externals/libzip/libzip/man/zip_delete.man vendored Executable file
View File

@@ -0,0 +1,84 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_delete.mdoc -- delete files from zip archive
.\" Copyright (C) 2003-2017 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_delete\fR
\- delete file from zip archive
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_delete\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR);
.PD
.SH "DESCRIPTION"
The file at position
\fIindex\fR
in the zip archive
\fIarchive\fR
is marked as deleted.
.SH "RETURN VALUES"
Upon successful completion 0 is returned.
Otherwise, \-1 is returned and the error code in
\fIarchive\fR
is set to indicate the error.
.SH "ERRORS"
\fBzip_delete\fR()
fails if:
.TP 19n
[\fRZIP_ER_INVAL\fR]
\fIindex\fR
is not a valid file index in
\fIarchive\fR.
.SH "SEE ALSO"
libzip(3),
zip_unchange(3)
.SH "HISTORY"
\fBzip_delete\fR()
was added in libzip 0.6.
In libzip 0.10 the type of
\fIindex\fR
was changed from
\fIint\fR
to
\fIzip_uint64_t\fR.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

80
externals/libzip/libzip/man/zip_delete.mdoc vendored Executable file
View File

@@ -0,0 +1,80 @@
.\" zip_delete.mdoc -- delete files from zip archive
.\" Copyright (C) 2003-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_DELETE 3
.Os
.Sh NAME
.Nm zip_delete
.Nd delete file from zip archive
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft int
.Fn zip_delete "zip_t *archive" "zip_uint64_t index"
.Sh DESCRIPTION
The file at position
.Ar index
in the zip archive
.Ar archive
is marked as deleted.
.Sh RETURN VALUES
Upon successful completion 0 is returned.
Otherwise, \-1 is returned and the error code in
.Ar archive
is set to indicate the error.
.Sh ERRORS
.Fn zip_delete
fails if:
.Bl -tag -width Er
.It Bq Er ZIP_ER_INVAL
.Ar index
is not a valid file index in
.Ar archive .
.El
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_unchange 3
.Sh HISTORY
.Fn zip_delete
was added in libzip 0.6.
In libzip 0.10 the type of
.Ar index
was changed from
.Vt int
to
.Vt zip_uint64_t .
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

135
externals/libzip/libzip/man/zip_dir_add.html vendored Executable file
View File

@@ -0,0 +1,135 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_dir_add.mdoc -- add directory to zip archive
Copyright (C) 2006-2018 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_DIR_ADD(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_DIR_ADD(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_DIR_ADD(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_dir_add</code> &#x2014;
<div class="Nd">add directory to zip archive</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">zip_int64_t</var>
<br/>
<code class="Fn">zip_dir_add</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">const char
*name</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t
flags</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The function <code class="Fn">zip_dir_add</code>() adds a directory to a zip
archive. The argument <var class="Ar">archive</var> specifies the zip archive
to which the directory should be added. <var class="Ar">name</var> is the
directory's name in the zip archive. The <var class="Ar">flags</var> argument
can be any of:
<dl class="Bl-tag">
<dt><a class="permalink" href="#ZIP_FL_ENC_GUESS"><code class="Dv" id="ZIP_FL_ENC_GUESS">ZIP_FL_ENC_GUESS</code></a></dt>
<dd>Guess encoding of <var class="Ar">name</var> (default).</dd>
<dt><a class="permalink" href="#ZIP_FL_ENC_UTF_8"><code class="Dv" id="ZIP_FL_ENC_UTF_8">ZIP_FL_ENC_UTF_8</code></a></dt>
<dd>Interpret <var class="Ar">name</var> as UTF-8.</dd>
<dt><a class="permalink" href="#ZIP_FL_ENC_CP437"><code class="Dv" id="ZIP_FL_ENC_CP437">ZIP_FL_ENC_CP437</code></a></dt>
<dd>Interpret <var class="Ar">name</var> as code page 437 (CP-437).</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
Upon successful completion, the index of the new entry in the archive is
returned. Otherwise, -1 is returned and the error code in
<var class="Ar">archive</var> is set to indicate the error.
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<code class="Fn">zip_dir_add</code>() fails if:
<dl class="Bl-tag">
<dt>[<a class="permalink" href="#ZIP_ER_EXISTS"><code class="Er" id="ZIP_ER_EXISTS">ZIP_ER_EXISTS</code></a>]</dt>
<dd>There is already an entry called <var class="Ar">name</var> in the
archive.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_INVAL"><code class="Er" id="ZIP_ER_INVAL">ZIP_ER_INVAL</code></a>]</dt>
<dd><var class="Ar">archive</var> or <var class="Ar">name</var> are
<code class="Dv">NULL</code>, or invalid UTF-8 encoded file names.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_MEMORY"><code class="Er" id="ZIP_ER_MEMORY">ZIP_ER_MEMORY</code></a>]</dt>
<dd>Required memory could not be allocated.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_file_add.html">zip_file_add(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_dir_add</code>() was added in libzip 0.11.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
<section class="Sh">
<h1 class="Sh" id="CAVEATS"><a class="permalink" href="#CAVEATS">CAVEATS</a></h1>
<code class="Fn">zip_dir_add</code>() does not look in the file system, it just
creates one entry in the archive for the provided name.
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

115
externals/libzip/libzip/man/zip_dir_add.man vendored Executable file
View File

@@ -0,0 +1,115 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_dir_add.mdoc -- add directory to zip archive
.\" Copyright (C) 2006-2018 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_dir_add\fR
\- add directory to zip archive
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIzip_int64_t\fR
.br
.PD 0
.HP 4n
\fBzip_dir_add\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *name\fR, \fIzip_flags_t\ flags\fR);
.PD
.SH "DESCRIPTION"
The function
\fBzip_dir_add\fR()
adds a directory to a zip archive.
The argument
\fIarchive\fR
specifies the zip archive to which the directory should be added.
\fIname\fR
is the directory's name in the zip archive.
The
\fIflags\fR
argument can be any of:
.TP 22n
\fRZIP_FL_ENC_GUESS\fR
Guess encoding of
\fIname\fR
(default).
.TP 22n
\fRZIP_FL_ENC_UTF_8\fR
Interpret
\fIname\fR
as UTF-8.
.TP 22n
\fRZIP_FL_ENC_CP437\fR
Interpret
\fIname\fR
as code page 437 (CP-437).
.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
\fIarchive\fR
is set to indicate the error.
.SH "ERRORS"
\fBzip_dir_add\fR()
fails if:
.TP 19n
[\fRZIP_ER_EXISTS\fR]
There is already an entry called
\fIname\fR
in the archive.
.TP 19n
[\fRZIP_ER_INVAL\fR]
\fIarchive\fR
or
\fIname\fR
are
\fRNULL\fR,
or invalid UTF-8 encoded file names.
.TP 19n
[\fRZIP_ER_MEMORY\fR]
Required memory could not be allocated.
.SH "SEE ALSO"
libzip(3),
zip_file_add(3)
.SH "HISTORY"
\fBzip_dir_add\fR()
was added in libzip 0.11.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>
.SH "CAVEATS"
\fBzip_dir_add\fR()
does not look in the file system, it just creates one entry in the
archive for the provided name.

108
externals/libzip/libzip/man/zip_dir_add.mdoc vendored Executable file
View File

@@ -0,0 +1,108 @@
.\" zip_dir_add.mdoc -- add directory to zip archive
.\" Copyright (C) 2006-2018 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.
.\"
.Dd December 18, 2017
.Dt ZIP_DIR_ADD 3
.Os
.Sh NAME
.Nm zip_dir_add
.Nd add directory to zip archive
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft zip_int64_t
.Fn zip_dir_add "zip_t *archive" "const char *name" "zip_flags_t flags"
.Sh DESCRIPTION
The function
.Fn zip_dir_add
adds a directory to a zip archive.
The argument
.Ar archive
specifies the zip archive to which the directory should be added.
.Ar name
is the directory's name in the zip archive.
The
.Ar flags
argument can be any of:
.Bl -tag -width XZIPXFLXENCXSTRICTXX
.It Dv ZIP_FL_ENC_GUESS
Guess encoding of
.Ar name
(default).
.It Dv ZIP_FL_ENC_UTF_8
Interpret
.Ar name
as UTF-8.
.It Dv ZIP_FL_ENC_CP437
Interpret
.Ar name
as code page 437 (CP-437).
.El
.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
.Ar archive
is set to indicate the error.
.Sh ERRORS
.Fn zip_dir_add
fails if:
.Bl -tag -width Er
.It Bq Er ZIP_ER_EXISTS
There is already an entry called
.Ar name
in the archive.
.It Bq Er ZIP_ER_INVAL
.Ar archive
or
.Ar name
are
.Dv NULL ,
or invalid UTF-8 encoded file names.
.It Bq Er ZIP_ER_MEMORY
Required memory could not be allocated.
.El
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_file_add 3
.Sh HISTORY
.Fn zip_dir_add
was added in libzip 0.11.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at
.Sh CAVEATS
.Fn zip_dir_add
does not look in the file system, it just creates one entry in the
archive for the provided name.

97
externals/libzip/libzip/man/zip_discard.html vendored Executable file
View File

@@ -0,0 +1,97 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_discard.mdoc -- close zip archive and discard changes
Copyright (C) 2012-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_DISCARD(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_DISCARD(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_DISCARD(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_discard</code> &#x2014;
<div class="Nd">close zip archive and discard changes</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">zip_discard</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_discard</code>() function closes
<var class="Ar">archive</var> and frees the memory allocated for it. Any
changes to the archive are not written to disk and discarded.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_close.html">zip_close(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_discard</code>() was added in libzip 0.11.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

66
externals/libzip/libzip/man/zip_discard.man vendored Executable file
View File

@@ -0,0 +1,66 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_discard.mdoc -- close zip archive and discard changes
.\" Copyright (C) 2012-2017 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_discard\fR
\- close zip archive and discard changes
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIvoid\fR
.br
.PD 0
.HP 4n
\fBzip_discard\fR(\fIzip_t\ *archive\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_discard\fR()
function closes
\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 "HISTORY"
\fBzip_discard\fR()
was added in libzip 0.11.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

61
externals/libzip/libzip/man/zip_discard.mdoc vendored Executable file
View File

@@ -0,0 +1,61 @@
.\" zip_discard.mdoc -- close zip archive and discard changes
.\" Copyright (C) 2012-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_DISCARD 3
.Os
.Sh NAME
.Nm zip_discard
.Nd close zip archive and discard changes
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft void
.Fn zip_discard "zip_t *archive"
.Sh DESCRIPTION
The
.Fn zip_discard
function closes
.Ar archive
and frees the memory allocated for it.
Any changes to the archive are not written to disk and discarded.
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_close 3
.Sh HISTORY
.Fn zip_discard
was added in libzip 0.11.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,104 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_error_clear.mdoc -- clear error state for archive or file
Copyright (C) 2006-2018 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERROR_CLEAR(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERROR_CLEAR(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERROR_CLEAR(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_error_clear</code>,
<code class="Nm">zip_file_error_clear</code> &#x2014;
<div class="Nd">clear error state for archive or file</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">zip_error_clear</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>);</p>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">zip_file_error_clear</code>(<var class="Fa" style="white-space: nowrap;">zip_file_t
*file</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_error_clear</code>() function clears the error state
for the zip archive <var class="Ar">archive</var>.
<p class="Pp">The <code class="Fn">zip_file_error_clear</code>() function does
the same for the zip file <var class="Ar">file</var>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_get_error.html">zip_get_error(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_error_clear</code>() and
<code class="Fn">zip_file_error_clear</code>() were added in libzip 0.8.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,79 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_error_clear.mdoc -- clear error state for archive or file
.\" Copyright (C) 2006-2018 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_CLEAR" "3" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_error_clear\fR,
\fBzip_file_error_clear\fR
\- clear error state for archive or file
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIvoid\fR
.br
.PD 0
.HP 4n
\fBzip_error_clear\fR(\fIzip_t\ *archive\fR);
.PD
.PP
\fIvoid\fR
.br
.PD 0
.HP 4n
\fBzip_file_error_clear\fR(\fIzip_file_t\ *file\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_error_clear\fR()
function clears the error state for the zip archive
\fIarchive\fR.
.PP
The
\fBzip_file_error_clear\fR()
function does the same for the zip file
\fIfile\fR.
.SH "SEE ALSO"
libzip(3),
zip_get_error(3)
.SH "HISTORY"
\fBzip_error_clear\fR()
and
\fBzip_file_error_clear\fR()
were added in libzip 0.8.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,69 @@
.\" zip_error_clear.mdoc -- clear error state for archive or file
.\" Copyright (C) 2006-2018 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERROR_CLEAR 3
.Os
.Sh NAME
.Nm zip_error_clear ,
.Nm zip_file_error_clear
.Nd clear error state for archive or file
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft void
.Fn zip_error_clear "zip_t *archive"
.Ft void
.Fn zip_file_error_clear "zip_file_t *file"
.Sh DESCRIPTION
The
.Fn zip_error_clear
function clears the error state for the zip archive
.Ar archive .
.Pp
The
.Fn zip_file_error_clear
function does the same for the zip file
.Ar file .
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_get_error 3
.Sh HISTORY
.Fn zip_error_clear
and
.Fn zip_file_error_clear
were added in libzip 0.8.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,99 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_error_code_system.mdoc -- get system error part of zip_error
Copyright (C) 2014-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERROR_CODE_SYSTEM(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERROR_CODE_SYSTEM(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERROR_CODE_SYSTEM(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_error_code_system</code> &#x2014;
<div class="Nd">get operating system error part of zip_error</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_error_code_system</code>(<var class="Fa" style="white-space: nowrap;">const
zip_error_t *ze</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_error_code_system</code>() function returns the system
specific part of the error from the zip_error error <var class="Ar">ze</var>.
For finding out what system reported the error, use
<a class="Xr" href="zip_error_system_type.html">zip_error_system_type(3)</a>.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_error_code_zip.html">zip_error_code_zip(3)</a>,
<a class="Xr" href="zip_error_system_type.html">zip_error_system_type(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_error_code_system</code>() was added in libzip 1.0.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,68 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_error_code_system.mdoc -- get system error part of zip_error
.\" Copyright (C) 2014-2017 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_CODE_SYSTEM" "3" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_error_code_system\fR
\- get operating system error part of zip_error
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_error_code_system\fR(\fIconst\ zip_error_t\ *ze\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_error_code_system\fR()
function returns the system specific part of the error from the
zip_error error
\fIze\fR.
For finding out what system reported the error, use
zip_error_system_type(3).
.SH "SEE ALSO"
libzip(3),
zip_error_code_zip(3),
zip_error_system_type(3)
.SH "HISTORY"
\fBzip_error_code_system\fR()
was added in libzip 1.0.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,63 @@
.\" zip_error_code_system.mdoc -- get system error part of zip_error
.\" Copyright (C) 2014-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERROR_CODE_SYSTEM 3
.Os
.Sh NAME
.Nm zip_error_code_system
.Nd get operating system error part of zip_error
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft int
.Fn zip_error_code_system "const zip_error_t *ze"
.Sh DESCRIPTION
The
.Fn zip_error_code_system
function returns the system specific part of the error from the
zip_error error
.Ar ze .
For finding out what system reported the error, use
.Xr zip_error_system_type 3 .
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_error_code_zip 3 ,
.Xr zip_error_system_type 3
.Sh HISTORY
.Fn zip_error_code_system
was added in libzip 1.0.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,96 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_error_code_zip.mdoc -- get libzip error part of zip_error
Copyright (C) 2014-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERROR_CODE_ZIP(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERROR_CODE_ZIP(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERROR_CODE_ZIP(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_error_code_zip</code> &#x2014;
<div class="Nd">get libzip error part of zip_error</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_error_code_zip</code>(<var class="Fa" style="white-space: nowrap;">const
zip_error_t *ze</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_error_code_zip</code>() function returns the libzip
specific part of the error from the zip_error error <var class="Ar">ze</var>.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_error_code_system.html">zip_error_code_system(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_error_code_zip</code>() was added in libzip 1.0.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,65 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_error_code_zip.mdoc -- get libzip error part of zip_error
.\" Copyright (C) 2014-2017 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_CODE_ZIP" "3" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_error_code_zip\fR
\- get libzip error part of zip_error
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_error_code_zip\fR(\fIconst\ zip_error_t\ *ze\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_error_code_zip\fR()
function returns the libzip specific part of the error from the
zip_error error
\fIze\fR.
.SH "SEE ALSO"
libzip(3),
zip_error_code_system(3)
.SH "HISTORY"
\fBzip_error_code_zip\fR()
was added in libzip 1.0.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,60 @@
.\" zip_error_code_zip.mdoc -- get libzip error part of zip_error
.\" Copyright (C) 2014-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERROR_CODE_ZIP 3
.Os
.Sh NAME
.Nm zip_error_code_zip
.Nd get libzip error part of zip_error
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft int
.Fn zip_error_code_zip "const zip_error_t *ze"
.Sh DESCRIPTION
The
.Fn zip_error_code_zip
function returns the libzip specific part of the error from the
zip_error error
.Ar ze .
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_error_code_system 3
.Sh HISTORY
.Fn zip_error_code_zip
was added in libzip 1.0.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,97 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_error_fini.mdoc -- clean up zip_error
Copyright (C) 2014-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERROR_FINI(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERROR_FINI(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERROR_FINI(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_error_fini</code> &#x2014;
<div class="Nd">clean up zip_error structure</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">zip_error_fini</code>(<var class="Fa" style="white-space: nowrap;">zip_error_t
*ze</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_error_fini</code>() function cleans up and frees
internally allocated memory of the zip_error pointed to by
<var class="Ar">ze</var>.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_error_init.html">zip_error_init(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_error_fini</code>() was added in libzip 1.0.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,65 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_error_fini.mdoc -- clean up zip_error
.\" Copyright (C) 2014-2017 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_FINI" "3" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_error_fini\fR
\- clean up zip_error structure
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIvoid\fR
.br
.PD 0
.HP 4n
\fBzip_error_fini\fR(\fIzip_error_t\ *ze\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_error_fini\fR()
function cleans up and frees internally allocated memory of the
zip_error pointed to by
\fIze\fR.
.SH "SEE ALSO"
libzip(3),
zip_error_init(3)
.SH "HISTORY"
\fBzip_error_fini\fR()
was added in libzip 1.0.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,60 @@
.\" zip_error_fini.mdoc -- clean up zip_error
.\" Copyright (C) 2014-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERROR_FINI 3
.Os
.Sh NAME
.Nm zip_error_fini
.Nd clean up zip_error structure
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft void
.Fn zip_error_fini "zip_error_t *ze"
.Sh DESCRIPTION
The
.Fn zip_error_fini
function cleans up and frees internally allocated memory of the
zip_error pointed to by
.Ar ze .
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_error_init 3
.Sh HISTORY
.Fn zip_error_fini
was added in libzip 1.0.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

150
externals/libzip/libzip/man/zip_error_get.html vendored Executable file
View File

@@ -0,0 +1,150 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_error_get.mdoc -- get error codes for archive or file
Copyright (C) 2004-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERROR_GET(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERROR_GET(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERROR_GET(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_error_get</code>,
<code class="Nm">zip_file_error_get</code> &#x2014;
<div class="Nd">get error codes for archive or file (obsolete interface)</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">zip_error_get</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">int *zep</var>,
<var class="Fa" style="white-space: nowrap;">int *sep</var>);</p>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">zip_file_error_get</code>(<var class="Fa" style="white-space: nowrap;">zip_file_t
*file</var>, <var class="Fa" style="white-space: nowrap;">int *zep</var>,
<var class="Fa" style="white-space: nowrap;">int *sep</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The functions <code class="Fn">zip_error_get</code>() and
<code class="Fn">zip_file_error_get</code>() are deprecated. Use
<a class="Xr" href="zip_error_code_system.html">zip_error_code_system(3)</a>,
<a class="Xr" href="zip_error_code_zip.html">zip_error_code_zip(3)</a>,
<a class="Xr" href="zip_file_get_error.html">zip_file_get_error(3)</a>, and
<a class="Xr" href="zip_get_error.html">zip_get_error(3)</a> instead.
<p class="Pp">For <code class="Fn">zip_error_get</code>(), replace</p>
<div class="Bd Pp Bd-indent">
<pre>
int ze, se;
zip_error_get(za, &amp;ze, &amp;se);
</pre>
</div>
with
<div class="Bd Pp Bd-indent">
<pre>
int ze, se;
zip_error_t *error = zip_get_error(za);
ze = zip_error_code_zip(error);
se = zip_error_code_system(error);
</pre>
</div>
For <code class="Fn">zip_file_error_get</code>(), replace
<div class="Bd Pp Bd-indent">
<pre>
int ze, se;
zip_file_error_get(zf, &amp;ze, &amp;se);
</pre>
</div>
with
<div class="Bd Pp Bd-indent">
<pre>
int ze, se;
zip_error_t *error = zip_file_get_error(zf);
ze = zip_error_code_zip(error);
se = zip_error_code_system(error);
</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_error_code_system.html">zip_error_code_system(3)</a>,
<a class="Xr" href="zip_error_code_zip.html">zip_error_code_zip(3)</a>,
<a class="Xr" href="zip_file_get_error.html">zip_file_get_error(3)</a>,
<a class="Xr" href="zip_get_error.html">zip_get_error(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_error_get</code>() was added in libzip 0.6. It was
deprecated in libzip 1.0, use <code class="Fn">zip_get_error</code>(),
<code class="Fn">zip_error_code_zip</code>(), /
<code class="Fn">zip_error_code_system</code>() instead.
<p class="Pp"><code class="Fn">zip_file_error_get</code>() was added in libzip
0.6. It was deprecated in libzip 1.0, use
<code class="Fn">zip_file_get_error</code>(),
<code class="Fn">zip_error_code_zip</code>(), /
<code class="Fn">zip_error_code_system</code>() instead.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

139
externals/libzip/libzip/man/zip_error_get.man vendored Executable file
View File

@@ -0,0 +1,139 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_error_get.mdoc -- get error codes for archive or file
.\" Copyright (C) 2004-2017 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_error_get\fR,
\fBzip_file_error_get\fR
\- get error codes for archive or file (obsolete interface)
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIvoid\fR
.br
.PD 0
.HP 4n
\fBzip_error_get\fR(\fIzip_t\ *archive\fR, \fIint\ *zep\fR, \fIint\ *sep\fR);
.PD
.PP
\fIvoid\fR
.br
.PD 0
.HP 4n
\fBzip_file_error_get\fR(\fIzip_file_t\ *file\fR, \fIint\ *zep\fR, \fIint\ *sep\fR);
.PD
.SH "DESCRIPTION"
The functions
\fBzip_error_get\fR()
and
\fBzip_file_error_get\fR()
are deprecated.
Use
zip_error_code_system(3),
zip_error_code_zip(3),
zip_file_get_error(3),
and
zip_get_error(3)
instead.
.PP
For
\fBzip_error_get\fR(),
replace
.nf
.sp
.RS 6n
int ze, se;
zip_error_get(za, &ze, &se);
.RE
.fi
with
.nf
.sp
.RS 6n
int ze, se;
zip_error_t *error = zip_get_error(za);
ze = zip_error_code_zip(error);
se = zip_error_code_system(error);
.RE
.fi
For
\fBzip_file_error_get\fR(),
replace
.nf
.sp
.RS 6n
int ze, se;
zip_file_error_get(zf, &ze, &se);
.RE
.fi
with
.nf
.sp
.RS 6n
int ze, se;
zip_error_t *error = zip_file_get_error(zf);
ze = zip_error_code_zip(error);
se = zip_error_code_system(error);
.RE
.fi
.SH "SEE ALSO"
libzip(3),
zip_error_code_system(3),
zip_error_code_zip(3),
zip_file_get_error(3),
zip_get_error(3)
.SH "HISTORY"
\fBzip_error_get\fR()
was added in libzip 0.6.
It was deprecated in libzip 1.0, use
\fBzip_get_error\fR(),
\fBzip_error_code_zip\fR(),
/
\fBzip_error_code_system\fR()
instead.
.PP
\fBzip_file_error_get\fR()
was added in libzip 0.6.
It was deprecated in libzip 1.0, use
\fBzip_file_get_error\fR(),
\fBzip_error_code_zip\fR(),
/
\fBzip_error_code_system\fR()
instead.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

117
externals/libzip/libzip/man/zip_error_get.mdoc vendored Executable file
View File

@@ -0,0 +1,117 @@
.\" zip_error_get.mdoc -- get error codes for archive or file
.\" Copyright (C) 2004-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERROR_GET 3
.Os
.Sh NAME
.Nm zip_error_get ,
.Nm zip_file_error_get
.Nd get error codes for archive or file (obsolete interface)
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft void
.Fn zip_error_get "zip_t *archive" "int *zep" "int *sep"
.Ft void
.Fn zip_file_error_get "zip_file_t *file" "int *zep" "int *sep"
.Sh DESCRIPTION
The functions
.Fn zip_error_get
and
.Fn zip_file_error_get
are deprecated.
Use
.Xr zip_error_code_system 3 ,
.Xr zip_error_code_zip 3 ,
.Xr zip_file_get_error 3 ,
and
.Xr zip_get_error 3
instead.
.Pp
For
.Fn zip_error_get ,
replace
.Bd -literal -offset indent
int ze, se;
zip_error_get(za, &ze, &se);
.Ed
with
.Bd -literal -offset indent
int ze, se;
zip_error_t *error = zip_get_error(za);
ze = zip_error_code_zip(error);
se = zip_error_code_system(error);
.Ed
For
.Fn zip_file_error_get ,
replace
.Bd -literal -offset indent
int ze, se;
zip_file_error_get(zf, &ze, &se);
.Ed
with
.Bd -literal -offset indent
int ze, se;
zip_error_t *error = zip_file_get_error(zf);
ze = zip_error_code_zip(error);
se = zip_error_code_system(error);
.Ed
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_error_code_system 3 ,
.Xr zip_error_code_zip 3 ,
.Xr zip_file_get_error 3 ,
.Xr zip_get_error 3
.Sh HISTORY
.Fn zip_error_get
was added in libzip 0.6.
It was deprecated in libzip 1.0, use
.Fn zip_get_error ,
.Fn zip_error_code_zip ,
/
.Fn zip_error_code_system
instead.
.Pp
.Fn zip_file_error_get
was added in libzip 0.6.
It was deprecated in libzip 1.0, use
.Fn zip_file_get_error ,
.Fn zip_error_code_zip ,
/
.Fn zip_error_code_system
instead.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,116 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_error_get_sys_type.mdoc -- get type of error
Copyright (C) 2004-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERROR_GET_SYS_TYPE(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERROR_GET_SYS_TYPE(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERROR_GET_SYS_TYPE(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_error_get_sys_type</code> &#x2014;
<div class="Nd">get type of system error code (obsolete interface)</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_error_get_sys_type</code>(<var class="Fa" style="white-space: nowrap;">int
ze</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The function <code class="Fn">zip_error_get_sys_type</code>() is deprecated; use
<a class="Xr" href="zip_error_init_with_code.html">zip_error_init_with_code(3)</a>
and
<a class="Xr" href="zip_error_system_type.html">zip_error_system_type(3)</a>
instead.
<p class="Pp">Replace</p>
<div class="Bd Pp Bd-indent">
<pre>
int i = zip_error_get_sys_type(ze);
</pre>
</div>
with
<div class="Bd Pp Bd-indent">
<pre>
zip_error_t error;
zip_error_init_with_code(&amp;error, ze);
int i = zip_error_system_type(&amp;error);
</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_error_init_with_code.html">zip_error_init_with_code(3)</a>,
<a class="Xr" href="zip_error_system_type.html">zip_error_system_type(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_error_get_sys_type</code>() was added in libzip 0.6. It was
deprecated in libzip 1.0, use <code class="Fn">zip_error_system_type</code>()
instead.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,88 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_error_get_sys_type.mdoc -- get type of error
.\" Copyright (C) 2004-2017 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_SYS_TYPE" "3" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_error_get_sys_type\fR
\- get type of system error code (obsolete interface)
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_error_get_sys_type\fR(\fIint\ ze\fR);
.PD
.SH "DESCRIPTION"
The function
\fBzip_error_get_sys_type\fR()
is deprecated; use
zip_error_init_with_code(3)
and
zip_error_system_type(3)
instead.
.PP
Replace
.nf
.sp
.RS 6n
int i = zip_error_get_sys_type(ze);
.RE
.fi
with
.nf
.sp
.RS 6n
zip_error_t error;
zip_error_init_with_code(&error, ze);
int i = zip_error_system_type(&error);
.RE
.fi
.SH "SEE ALSO"
libzip(3),
zip_error_init_with_code(3),
zip_error_system_type(3)
.SH "HISTORY"
\fBzip_error_get_sys_type\fR()
was added in libzip 0.6.
It was deprecated in libzip 1.0, use
\fBzip_error_system_type\fR()
instead.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,77 @@
.\" zip_error_get_sys_type.mdoc -- get type of error
.\" Copyright (C) 2004-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERROR_GET_SYS_TYPE 3
.Os
.Sh NAME
.Nm zip_error_get_sys_type
.Nd get type of system error code (obsolete interface)
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft int
.Fn zip_error_get_sys_type "int ze"
.Sh DESCRIPTION
The function
.Fn zip_error_get_sys_type
is deprecated; use
.Xr zip_error_init_with_code 3
and
.Xr zip_error_system_type 3
instead.
.Pp
Replace
.Bd -literal -offset indent
int i = zip_error_get_sys_type(ze);
.Ed
with
.Bd -literal -offset indent
zip_error_t error;
zip_error_init_with_code(&error, ze);
int i = zip_error_system_type(&error);
.Ed
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_error_init_with_code 3 ,
.Xr zip_error_system_type 3
.Sh HISTORY
.Fn zip_error_get_sys_type
was added in libzip 0.6.
It was deprecated in libzip 1.0, use
.Fn zip_error_system_type
instead.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,108 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_error_init.mdoc -- initialize zip_error
Copyright (C) 2014-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERROR_INIT(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERROR_INIT(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERROR_INIT(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_error_init</code>,
<code class="Nm">zip_error_init_with_code</code> &#x2014;
<div class="Nd">initialize zip_error structure</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">zip_error_init</code>(<var class="Fa" style="white-space: nowrap;">zip_error_t
*error</var>);</p>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">zip_error_init_with_code</code>(<var class="Fa" style="white-space: nowrap;">zip_error_t
*error</var>, <var class="Fa" style="white-space: nowrap;">int
ze</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_error_init</code>() function initializes the zip_error
pointed to by <var class="Ar">error</var>. <var class="Ar">*error</var> must
be allocated before calling <code class="Fn">zip_error_init</code>().
<p class="Pp">The <code class="Fn">zip_error_init_with_code</code>() function
does the same, but additionally sets the zip error code to
<var class="Ar">ze</var> and sets the system error code to the current
<a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/errno.html">errno(3)</a> value, if appropriate.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_error_fini.html">zip_error_fini(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_error_init</code>() and
<code class="Fn">zip_error_init_with_code</code>() were added in libzip 1.0.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,85 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_error_init.mdoc -- initialize zip_error
.\" Copyright (C) 2014-2017 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_INIT" "3" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_error_init\fR,
\fBzip_error_init_with_code\fR
\- initialize zip_error structure
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIvoid\fR
.br
.PD 0
.HP 4n
\fBzip_error_init\fR(\fIzip_error_t\ *error\fR);
.PD
.PP
\fIvoid\fR
.br
.PD 0
.HP 4n
\fBzip_error_init_with_code\fR(\fIzip_error_t\ *error\fR, \fIint\ ze\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_error_init\fR()
function initializes the zip_error pointed to by
\fIerror\fR.
\fI*error\fR
must be allocated before calling
\fBzip_error_init\fR().
.PP
The
\fBzip_error_init_with_code\fR()
function does the same, but additionally sets the zip error code to
\fIze\fR
and sets the system error code to the current
errno(3)
value, if appropriate.
.SH "SEE ALSO"
libzip(3),
zip_error_fini(3)
.SH "HISTORY"
\fBzip_error_init\fR()
and
\fBzip_error_init_with_code\fR()
were added in libzip 1.0.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,76 @@
.\" zip_error_init.mdoc -- initialize zip_error
.\" Copyright (C) 2014-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERROR_INIT 3
.Os
.Sh NAME
.Nm zip_error_init ,
.Nm zip_error_init_with_code
.Nd initialize zip_error structure
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft void
.Fn zip_error_init "zip_error_t *error"
.Ft void
.Fn zip_error_init_with_code "zip_error_t *error" "int ze"
.Sh DESCRIPTION
The
.Fn zip_error_init
function initializes the zip_error pointed to by
.Ar error .
.Ar *error
must be allocated before calling
.Fn zip_error_init .
.Pp
The
.Fn zip_error_init_with_code
function does the same, but additionally sets the zip error code to
.Ar ze
and sets the system error code to the current
.Xr errno 3
value, if appropriate.
.\" TODO: describe when you would need to call this at all
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_error_fini 3
.Sh HISTORY
.Fn zip_error_init
and
.Fn zip_error_init_with_code
were added in libzip 1.0.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

101
externals/libzip/libzip/man/zip_error_set.html vendored Executable file
View File

@@ -0,0 +1,101 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_error_set.mdoc -- set zip_error
Copyright (C) 2014-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERROR_SET(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERROR_SET(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERROR_SET(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_error_set</code> &#x2014;
<div class="Nd">fill in zip_error structure</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">zip_error_set</code>(<var class="Fa" style="white-space: nowrap;">zip_error_t
*ze</var>, <var class="Fa" style="white-space: nowrap;">int le</var>,
<var class="Fa" style="white-space: nowrap;">int se</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_error_set</code>() function sets the zip_error pointed
to by <var class="Ar">ze</var> to the libzip error code
<var class="Ar">le</var> and the system error code <var class="Ar">se</var>.
<p class="Pp"><var class="Ar">ze</var> must be allocated and initialized with
<a class="Xr" href="zip_error_fini.html">zip_error_fini(3)</a> before
calling <code class="Fn">zip_error</code>(<var class="Fa">set</var>).</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_error_init.html">zip_error_init(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_error_set</code>() was added in libzip 1.0.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

74
externals/libzip/libzip/man/zip_error_set.man vendored Executable file
View File

@@ -0,0 +1,74 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_error_set.mdoc -- set zip_error
.\" Copyright (C) 2014-2017 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_SET" "3" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_error_set\fR
\- fill in zip_error structure
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIvoid\fR
.br
.PD 0
.HP 4n
\fBzip_error_set\fR(\fIzip_error_t\ *ze\fR, \fIint\ le\fR, \fIint\ se\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_error_set\fR()
function sets the zip_error pointed to by
\fIze\fR
to the libzip error code
\fIle\fR
and the system error code
\fIse\fR.
.PP
\fIze\fR
must be allocated and initialized with
zip_error_fini(3)
before calling
\fBzip_error\fR(\fIset\fR).
.SH "SEE ALSO"
libzip(3),
zip_error_init(3)
.SH "HISTORY"
\fBzip_error_set\fR()
was added in libzip 1.0.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,69 @@
.\" zip_error_set.mdoc -- set zip_error
.\" Copyright (C) 2014-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERROR_SET 3
.Os
.Sh NAME
.Nm zip_error_set
.Nd fill in zip_error structure
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft void
.Fn zip_error_set "zip_error_t *ze" "int le" "int se"
.Sh DESCRIPTION
The
.Fn zip_error_set
function sets the zip_error pointed to by
.Ar ze
to the libzip error code
.Ar le
and the system error code
.Ar se .
.Pp
.Ar ze
must be allocated and initialized with
.Xr zip_error_fini 3
before calling
.Fn zip_error set .
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_error_init 3
.Sh HISTORY
.Fn zip_error_set
was added in libzip 1.0.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,101 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_error_strerror.mdoc -- create human-readable version of zip_error
Copyright (C) 2014-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERROR_STRERROR(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERROR_STRERROR(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERROR_STRERROR(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_error_strerror</code> &#x2014;
<div class="Nd">create human-readable string for zip_error</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">const char *</var>
<br/>
<code class="Fn">zip_error_strerror</code>(<var class="Fa" style="white-space: nowrap;">zip_error_t
*ze</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_error_strerror</code>() function returns an error
message string corresponding to <var class="Ar">ze</var> like
<a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/strerror.html">strerror(3)</a>. This string will stay
valid until the next call to <code class="Fn">zip_error_strerror</code>() or
until <a class="Xr" href="zip_error_fini.html">zip_error_fini(3)</a> is
called.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/strerror.html">strerror(3)</a>,
<a class="Xr" href="zip_error_fini.html">zip_error_fini(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_error_strerror</code>() was added in libzip 1.0.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,72 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_error_strerror.mdoc -- create human-readable version of zip_error
.\" Copyright (C) 2014-2017 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_STRERROR" "3" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_error_strerror\fR
\- create human-readable string for zip_error
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIconst char *\fR
.br
.PD 0
.HP 4n
\fBzip_error_strerror\fR(\fIzip_error_t\ *ze\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_error_strerror\fR()
function returns an error message string corresponding to
\fIze\fR
like
strerror(3).
This string will stay valid until the next call to
\fBzip_error_strerror\fR()
or until
zip_error_fini(3)
is called.
.SH "SEE ALSO"
libzip(3),
strerror(3),
zip_error_fini(3)
.SH "HISTORY"
\fBzip_error_strerror\fR()
was added in libzip 1.0.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,67 @@
.\" zip_error_strerror.mdoc -- create human-readable version of zip_error
.\" Copyright (C) 2014-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERROR_STRERROR 3
.Os
.Sh NAME
.Nm zip_error_strerror
.Nd create human-readable string for zip_error
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft const char *
.Fn zip_error_strerror "zip_error_t *ze"
.Sh DESCRIPTION
The
.Fn zip_error_strerror
function returns an error message string corresponding to
.Ar ze
like
.Xr strerror 3 .
This string will stay valid until the next call to
.Fn zip_error_strerror
or until
.Xr zip_error_fini 3
is called.
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr strerror 3 ,
.Xr zip_error_fini 3
.Sh HISTORY
.Fn zip_error_strerror
was added in libzip 1.0.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,107 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_error_system_type.mdoc -- return system type for error
Copyright (C) 2014-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERROR_SYSTEM_TYPE(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERROR_SYSTEM_TYPE(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERROR_SYSTEM_TYPE(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_error_system_type</code> &#x2014;
<div class="Nd">return type of system error</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_error_system_type</code>(<var class="Fa" style="white-space: nowrap;">const
zip_error_t *ze</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_error_system_type</code>() function returns the type of
the system specific part for the zip_error <var class="Ar">ze</var>.
Currently, the following system types are defined:
<dl class="Bl-tag">
<dt><a class="permalink" href="#ZIP_ET_NONE"><code class="Dv" id="ZIP_ET_NONE">ZIP_ET_NONE</code></a></dt>
<dd>System specific part of <var class="Ar">ze</var> is unused.</dd>
<dt><a class="permalink" href="#ZIP_ET_SYS"><code class="Dv" id="ZIP_ET_SYS">ZIP_ET_SYS</code></a></dt>
<dd>System specific part of <var class="Ar">ze</var> is an
<a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/errno.html">errno(2)</a>.</dd>
<dt><a class="permalink" href="#ZIP_ET_ZLIB"><code class="Dv" id="ZIP_ET_ZLIB">ZIP_ET_ZLIB</code></a></dt>
<dd>System specific part of <var class="Ar">ze</var> is a
<a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/zlib.html">zlib(3)</a> error.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_error_code_system.html">zip_error_code_system(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_error_system_type</code>() was added in libzip 1.0.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,83 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_error_system_type.mdoc -- return system type for error
.\" Copyright (C) 2014-2017 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_SYSTEM_TYPE" "3" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_error_system_type\fR
\- return type of system error
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_error_system_type\fR(\fIconst\ zip_error_t\ *ze\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_error_system_type\fR()
function returns the type of the system specific part for the zip_error
\fIze\fR.
Currently, the following system types are defined:
.TP 13n
\fRZIP_ET_NONE\fR
System specific part of
\fIze\fR
is unused.
.TP 13n
\fRZIP_ET_SYS\fR
System specific part of
\fIze\fR
is an
errno(2).
.TP 13n
\fRZIP_ET_ZLIB\fR
System specific part of
\fIze\fR
is a
zlib(3)
error.
.SH "SEE ALSO"
libzip(3),
zip_error_code_system(3)
.SH "HISTORY"
\fBzip_error_system_type\fR()
was added in libzip 1.0.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,77 @@
.\" zip_error_system_type.mdoc -- return system type for error
.\" Copyright (C) 2014-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERROR_SYSTEM_TYPE 3
.Os
.Sh NAME
.Nm zip_error_system_type
.Nd return type of system error
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft int
.Fn zip_error_system_type "const zip_error_t *ze"
.Sh DESCRIPTION
The
.Fn zip_error_system_type
function returns the type of the system specific part for the zip_error
.Ar ze .
Currently, the following system types are defined:
.Bl -tag -width ZIP_ET_NONE
.It Dv ZIP_ET_NONE
System specific part of
.Ar ze
is unused.
.It Dv ZIP_ET_SYS
System specific part of
.Ar ze
is an
.Xr errno 2 .
.It Dv ZIP_ET_ZLIB
System specific part of
.Ar ze
is a
.Xr zlib 3
error.
.El
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_error_code_system 3
.Sh HISTORY
.Fn zip_error_system_type
was added in libzip 1.0.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,108 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_error_to_data.mdoc -- create error data for ZIP_SOURCE_ERROR
Copyright (C) 2014-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERROR_TO_DATA(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERROR_TO_DATA(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERROR_TO_DATA(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_error_to_data</code> &#x2014;
<div class="Nd">convert zip_error to return value suitable for
ZIP_SOURCE_ERROR</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">zip_int64_t</var>
<br/>
<code class="Fn">zip_error_to_data</code>(<var class="Fa" style="white-space: nowrap;">const
zip_error_t *ze</var>, <var class="Fa" style="white-space: nowrap;">void
*data</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
len</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<code class="Fn">zip_error_to_data</code>() function converts the zip_error
<var class="Ar">ze</var> into data suitable as return value for
<code class="Dv">ZIP_SOURCE_ERROR</code>. The data is written into the buffer
<var class="Ar">data</var> of size <var class="Ar">len</var>. If the buffer is
not large enough to hold 2 ints, an error is returned.
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
<code class="Fn">zip_error_to_data</code>() returns 2*(sizeof int) on success,
and -1 on error.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_source_function.html">zip_source_function(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_error_to_data</code>() was added in libzip 1.0.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,74 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_error_to_data.mdoc -- create error data for ZIP_SOURCE_ERROR
.\" Copyright (C) 2014-2017 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_DATA" "3" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_error_to_data\fR
\- convert zip_error to return value suitable for ZIP_SOURCE_ERROR
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIzip_int64_t\fR
.br
.PD 0
.HP 4n
\fBzip_error_to_data\fR(\fIconst\ zip_error_t\ *ze\fR, \fIvoid\ *data\fR, \fIzip_uint64_t\ len\fR);
.PD
.SH "DESCRIPTION"
\fBzip_error_to_data\fR()
function converts the zip_error
\fIze\fR
into data suitable as return value for
\fRZIP_SOURCE_ERROR\fR.
The data is written into the buffer
\fIdata\fR
of size
\fIlen\fR.
If the buffer is not large enough to hold 2 ints, an error is
returned.
.SH "RETURN VALUES"
\fBzip_error_to_data\fR()
returns 2*(sizeof int) on success, and \-1 on error.
.SH "SEE ALSO"
libzip(3),
zip_source_function(3)
.SH "HISTORY"
\fBzip_error_to_data\fR()
was added in libzip 1.0.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,69 @@
.\" zip_error_to_data.mdoc -- create error data for ZIP_SOURCE_ERROR
.\" Copyright (C) 2014-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERROR_TO_DATA 3
.Os
.Sh NAME
.Nm zip_error_to_data
.Nd convert zip_error to return value suitable for ZIP_SOURCE_ERROR
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft zip_int64_t
.Fn zip_error_to_data "const zip_error_t *ze" "void *data" "zip_uint64_t len"
.Sh DESCRIPTION
.Fn zip_error_to_data
function converts the zip_error
.Ar ze
into data suitable as return value for
.Dv ZIP_SOURCE_ERROR .
The data is written into the buffer
.Ar data
of size
.Ar len .
If the buffer is not large enough to hold 2 ints, an error is
returned.
.Sh RETURN VALUES
.Fn zip_error_to_data
returns 2*(sizeof int) on success, and \-1 on error.
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_source_function 3
.Sh HISTORY
.Fn zip_error_to_data
was added in libzip 1.0.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,124 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_error_to_str.mdoc -- get string representation of zip error code
Copyright (C) 2003-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERROR_TO_STR(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERROR_TO_STR(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERROR_TO_STR(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_error_to_str</code> &#x2014;
<div class="Nd">get string representation of zip error (obsolete
interface)</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_error_to_str</code>(<var class="Fa" style="white-space: nowrap;">char
*buf</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
len</var>, <var class="Fa" style="white-space: nowrap;">int ze</var>,
<var class="Fa" style="white-space: nowrap;">int se</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The function <code class="Fn">zip_error_to_str</code>() is deprecated; use
<a class="Xr" href="zip_error_init_with_code.html">zip_error_init_with_code(3)</a>
and <a class="Xr" href="zip_error_strerror.html">zip_error_strerror(3)</a>
instead.
<p class="Pp">Replace</p>
<div class="Bd Pp Bd-indent">
<pre>
char buf[BUFSIZE];
zip_error_to_str(buf, sizeof(buf), ze, se);
printf(&quot;%s&quot;, buf);
</pre>
</div>
with
<div class="Bd Pp Bd-indent">
<pre>
zip_error_t error;
zip_error_init_with_code(&amp;error, ze);
printf(&quot;%s&quot;, zip_error_strerror(&amp;error));
zip_error_fini(&amp;error);
</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_error_init_with_code.html">zip_error_init_with_code(3)</a>,
<a class="Xr" href="zip_error_strerror.html">zip_error_strerror(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_error_to_str</code>() was added in libzip 0.6. In libzip
0.10 the type of <var class="Ar">len</var> was changed from
<var class="Vt">size_t</var> to <var class="Vt">zip_uint64_t</var>. It was
deprecated in libzip 1.0, use
<code class="Fn">zip_error_init_with_code</code>() and
<code class="Fn">zip_error_strerror</code>() instead.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,99 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_error_to_str.mdoc -- get string representation of zip error code
.\" Copyright (C) 2003-2017 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_error_to_str\fR
\- get string representation of zip error (obsolete interface)
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_error_to_str\fR(\fIchar\ *buf\fR, \fIzip_uint64_t\ len\fR, \fIint\ ze\fR, \fIint\ se\fR);
.PD
.SH "DESCRIPTION"
The function
\fBzip_error_to_str\fR()
is deprecated; use
zip_error_init_with_code(3)
and
zip_error_strerror(3)
instead.
.PP
Replace
.nf
.sp
.RS 6n
char buf[BUFSIZE];
zip_error_to_str(buf, sizeof(buf), ze, se);
printf("%s", buf);
.RE
.fi
with
.nf
.sp
.RS 6n
zip_error_t error;
zip_error_init_with_code(&error, ze);
printf("%s", zip_error_strerror(&error));
zip_error_fini(&error);
.RE
.fi
.SH "SEE ALSO"
libzip(3),
zip_error_init_with_code(3),
zip_error_strerror(3)
.SH "HISTORY"
\fBzip_error_to_str\fR()
was added in libzip 0.6.
In libzip 0.10 the type of
\fIlen\fR
was changed from
\fIsize_t\fR
to
\fIzip_uint64_t\fR.
It was deprecated in libzip 1.0, use
\fBzip_error_init_with_code\fR()
and
\fBzip_error_strerror\fR()
instead.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,88 @@
.\" zip_error_to_str.mdoc -- get string representation of zip error code
.\" Copyright (C) 2003-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERROR_TO_STR 3
.Os
.Sh NAME
.Nm zip_error_to_str
.Nd get string representation of zip error (obsolete interface)
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft int
.Fn zip_error_to_str "char *buf" "zip_uint64_t len" "int ze" "int se"
.Sh DESCRIPTION
The function
.Fn zip_error_to_str
is deprecated; use
.Xr zip_error_init_with_code 3
and
.Xr zip_error_strerror 3
instead.
.Pp
Replace
.Bd -literal -offset indent
char buf[BUFSIZE];
zip_error_to_str(buf, sizeof(buf), ze, se);
printf("%s", buf);
.Ed
with
.Bd -literal -offset indent
zip_error_t error;
zip_error_init_with_code(&error, ze);
printf("%s", zip_error_strerror(&error));
zip_error_fini(&error);
.Ed
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_error_init_with_code 3 ,
.Xr zip_error_strerror 3
.Sh HISTORY
.Fn zip_error_to_str
was added in libzip 0.6.
In libzip 0.10 the type of
.Ar len
was changed from
.Vt size_t
to
.Vt zip_uint64_t .
It was deprecated in libzip 1.0, use
.Fn zip_error_init_with_code
and
.Fn zip_error_strerror
instead.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

150
externals/libzip/libzip/man/zip_errors.html vendored Executable file
View File

@@ -0,0 +1,150 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_errors.mdoc -- list of all libzip error codes
Copyright (C) 1999-2018 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_ERRORS(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_ERRORS(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_ERRORS(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_errors</code> &#x2014;
<div class="Nd">list of all libzip error codes</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The following error codes are used by libzip:
<dl class="Bl-tag">
<dt>[<code class="Er">ZIP_ER_CHANGED</code>]</dt>
<dd>Entry has been changed.</dd>
<dt>[<code class="Er">ZIP_ER_CLOSE</code>]</dt>
<dd>Closing zip archive failed.</dd>
<dt>[<code class="Er">ZIP_ER_COMPNOTSUPP</code>]</dt>
<dd>Compression method not supported.</dd>
<dt>[<code class="Er">ZIP_ER_COMPRESSED_DATA</code>]</dt>
<dd>Compressed data invalid.</dd>
<dt>[<code class="Er">ZIP_ER_CRC</code>]</dt>
<dd>CRC error.</dd>
<dt>[<code class="Er">ZIP_ER_DELETED</code>]</dt>
<dd>Entry has been deleted.</dd>
<dt>[<code class="Er">ZIP_ER_ENCRNOTSUPP</code>]</dt>
<dd>Encryption method not supported.</dd>
<dt>[<code class="Er">ZIP_ER_EOF</code>]</dt>
<dd>Premature end of file.</dd>
<dt>[<code class="Er">ZIP_ER_EXISTS</code>]</dt>
<dd>File already exists.</dd>
<dt>[<code class="Er">ZIP_ER_INCONS</code>]</dt>
<dd>Zip archive inconsistent.</dd>
<dt>[<code class="Er">ZIP_ER_INTERNAL</code>]</dt>
<dd>Internal error.</dd>
<dt>[<code class="Er">ZIP_ER_INUSE</code>]</dt>
<dd>Resource still in use.</dd>
<dt>[<code class="Er">ZIP_ER_INVAL</code>]</dt>
<dd>Invalid argument.</dd>
<dt>[<code class="Er">ZIP_ER_MEMORY</code>]</dt>
<dd>Malloc failure.</dd>
<dt>[<code class="Er">ZIP_ER_MULTIDISK</code>]</dt>
<dd>Multi-disk zip archives not supported.</dd>
<dt>[<code class="Er">ZIP_ER_NOENT</code>]</dt>
<dd>No such file.</dd>
<dt>[<code class="Er">ZIP_ER_NOPASSWD</code>]</dt>
<dd>No password provided.</dd>
<dt>[<code class="Er">ZIP_ER_NOZIP</code>]</dt>
<dd>Not a zip archive.</dd>
<dt>[<code class="Er">ZIP_ER_OK</code>]</dt>
<dd>No error.</dd>
<dt>[<code class="Er">ZIP_ER_OPEN</code>]</dt>
<dd>Can't open file.</dd>
<dt>[<code class="Er">ZIP_ER_OPNOTSUPP</code>]</dt>
<dd>Operation not supported.</dd>
<dt>[<code class="Er">ZIP_ER_RDONLY</code>]</dt>
<dd>Read-only archive.</dd>
<dt>[<code class="Er">ZIP_ER_READ</code>]</dt>
<dd>Read error.</dd>
<dt>[<code class="Er">ZIP_ER_REMOVE</code>]</dt>
<dd>Can't remove file.</dd>
<dt>[<code class="Er">ZIP_ER_RENAME</code>]</dt>
<dd>Renaming temporary file failed.</dd>
<dt>[<code class="Er">ZIP_ER_SEEK</code>]</dt>
<dd>Seek error.</dd>
<dt>[<code class="Er">ZIP_ER_TELL</code>]</dt>
<dd>Tell error.</dd>
<dt>[<code class="Er">ZIP_ER_TMPOPEN</code>]</dt>
<dd>Failure to create temporary file.</dd>
<dt>[<code class="Er">ZIP_ER_WRITE</code>]</dt>
<dd>Write error.</dd>
<dt>[<code class="Er">ZIP_ER_WRONGPASSWD</code>]</dt>
<dd>Wrong password provided.</dd>
<dt>[<code class="Er">ZIP_ER_ZIPCLOSED</code>]</dt>
<dd>Containing zip archive was closed.</dd>
<dt>[<code class="Er">ZIP_ER_ZLIB</code>]</dt>
<dd>Zlib error.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

147
externals/libzip/libzip/man/zip_errors.man vendored Executable file
View File

@@ -0,0 +1,147 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_errors.mdoc -- list of all libzip error codes
.\" Copyright (C) 1999-2018 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_errors\fR
\- list of all libzip error codes
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.SH "DESCRIPTION"
The following error codes are used by libzip:
.TP 26n
[\fRZIP_ER_CHANGED\fR]
Entry has been changed.
.TP 26n
[\fRZIP_ER_CLOSE\fR]
Closing zip archive failed.
.TP 26n
[\fRZIP_ER_COMPNOTSUPP\fR]
Compression method not supported.
.TP 26n
[\fRZIP_ER_COMPRESSED_DATA\fR]
Compressed data invalid.
.TP 26n
[\fRZIP_ER_CRC\fR]
CRC error.
.TP 26n
[\fRZIP_ER_DELETED\fR]
Entry has been deleted.
.TP 26n
[\fRZIP_ER_ENCRNOTSUPP\fR]
Encryption method not supported.
.TP 26n
[\fRZIP_ER_EOF\fR]
Premature end of file.
.TP 26n
[\fRZIP_ER_EXISTS\fR]
File already exists.
.TP 26n
[\fRZIP_ER_INCONS\fR]
Zip archive inconsistent.
.TP 26n
[\fRZIP_ER_INTERNAL\fR]
Internal error.
.TP 26n
[\fRZIP_ER_INUSE\fR]
Resource still in use.
.TP 26n
[\fRZIP_ER_INVAL\fR]
Invalid argument.
.TP 26n
[\fRZIP_ER_MEMORY\fR]
Malloc failure.
.TP 26n
[\fRZIP_ER_MULTIDISK\fR]
Multi-disk zip archives not supported.
.TP 26n
[\fRZIP_ER_NOENT\fR]
No such file.
.TP 26n
[\fRZIP_ER_NOPASSWD\fR]
No password provided.
.TP 26n
[\fRZIP_ER_NOZIP\fR]
Not a zip archive.
.TP 26n
[\fRZIP_ER_OK\fR]
No error.
.TP 26n
[\fRZIP_ER_OPEN\fR]
Can't open file.
.TP 26n
[\fRZIP_ER_OPNOTSUPP\fR]
Operation not supported.
.TP 26n
[\fRZIP_ER_RDONLY\fR]
Read-only archive.
.TP 26n
[\fRZIP_ER_READ\fR]
Read error.
.TP 26n
[\fRZIP_ER_REMOVE\fR]
Can't remove file.
.TP 26n
[\fRZIP_ER_RENAME\fR]
Renaming temporary file failed.
.TP 26n
[\fRZIP_ER_SEEK\fR]
Seek error.
.TP 26n
[\fRZIP_ER_TELL\fR]
Tell error.
.TP 26n
[\fRZIP_ER_TMPOPEN\fR]
Failure to create temporary file.
.TP 26n
[\fRZIP_ER_WRITE\fR]
Write error.
.TP 26n
[\fRZIP_ER_WRONGPASSWD\fR]
Wrong password provided.
.TP 26n
[\fRZIP_ER_ZIPCLOSED\fR]
Containing zip archive was closed.
.TP 26n
[\fRZIP_ER_ZLIB\fR]
Zlib error.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

117
externals/libzip/libzip/man/zip_errors.mdoc vendored Executable file
View File

@@ -0,0 +1,117 @@
.\" zip_errors.mdoc -- list of all libzip error codes
.\" Copyright (C) 1999-2018 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.
.\"
.Dd December 18, 2017
.Dt ZIP_ERRORS 3
.Os
.Sh NAME
.Nm zip_errors
.Nd list of all libzip error codes
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Sh DESCRIPTION
The following error codes are used by libzip:
.Bl -tag -width XZIP_ER_COMPRESSED_DATAX
.It Bq Er ZIP_ER_CHANGED
Entry has been changed.
.It Bq Er ZIP_ER_CLOSE
Closing zip archive failed.
.It Bq Er ZIP_ER_COMPNOTSUPP
Compression method not supported.
.It Bq Er ZIP_ER_COMPRESSED_DATA
Compressed data invalid.
.It Bq Er ZIP_ER_CRC
CRC error.
.It Bq Er ZIP_ER_DELETED
Entry has been deleted.
.It Bq Er ZIP_ER_ENCRNOTSUPP
Encryption method not supported.
.It Bq Er ZIP_ER_EOF
Premature end of file.
.It Bq Er ZIP_ER_EXISTS
File already exists.
.It Bq Er ZIP_ER_INCONS
Zip archive inconsistent.
.It Bq Er ZIP_ER_INTERNAL
Internal error.
.It Bq Er ZIP_ER_INUSE
Resource still in use.
.It Bq Er ZIP_ER_INVAL
Invalid argument.
.It Bq Er ZIP_ER_MEMORY
Malloc failure.
.It Bq Er ZIP_ER_MULTIDISK
Multi-disk zip archives not supported.
.It Bq Er ZIP_ER_NOENT
No such file.
.It Bq Er ZIP_ER_NOPASSWD
No password provided.
.It Bq Er ZIP_ER_NOZIP
Not a zip archive.
.It Bq Er ZIP_ER_OK
No error.
.It Bq Er ZIP_ER_OPEN
Can't open file.
.It Bq Er ZIP_ER_OPNOTSUPP
Operation not supported.
.It Bq Er ZIP_ER_RDONLY
Read-only archive.
.It Bq Er ZIP_ER_READ
Read error.
.It Bq Er ZIP_ER_REMOVE
Can't remove file.
.It Bq Er ZIP_ER_RENAME
Renaming temporary file failed.
.It Bq Er ZIP_ER_SEEK
Seek error.
.It Bq Er ZIP_ER_TELL
Tell error.
.It Bq Er ZIP_ER_TMPOPEN
Failure to create temporary file.
.It Bq Er ZIP_ER_WRITE
Write error.
.It Bq Er ZIP_ER_WRONGPASSWD
Wrong password provided.
.It Bq Er ZIP_ER_ZIPCLOSED
Containing zip archive was closed.
.It Bq Er ZIP_ER_ZLIB
Zlib error.
.El
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

103
externals/libzip/libzip/man/zip_fclose.html vendored Executable file
View File

@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_fclose.mdoc -- close file in zip archive
Copyright (C) 2003-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_FCLOSE(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_FCLOSE(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_FCLOSE(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_fclose</code> &#x2014;
<div class="Nd">close file in zip archive</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_fclose</code>(<var class="Fa" style="white-space: nowrap;">zip_file_t
*file</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_fclose</code>() function closes
<var class="Ar">file</var> and frees the memory allocated for it.
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
Upon successful completion 0 is returned. Otherwise, the error code is returned.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_fopen.html">zip_fopen(3)</a>,
<a class="Xr" href="zip_fread.html">zip_fread(3)</a>,
<a class="Xr" href="zip_fseek.html">zip_fseek(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_fclose</code>() was added in libzip 0.6.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

70
externals/libzip/libzip/man/zip_fclose.man vendored Executable file
View File

@@ -0,0 +1,70 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_fclose.mdoc -- close file in zip archive
.\" Copyright (C) 2003-2017 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_fclose\fR
\- close file in zip archive
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_fclose\fR(\fIzip_file_t\ *file\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_fclose\fR()
function closes
\fIfile\fR
and frees the memory allocated for it.
.SH "RETURN VALUES"
Upon successful completion 0 is returned.
Otherwise, the error code is returned.
.SH "SEE ALSO"
libzip(3),
zip_fopen(3),
zip_fread(3),
zip_fseek(3)
.SH "HISTORY"
\fBzip_fclose\fR()
was added in libzip 0.6.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

65
externals/libzip/libzip/man/zip_fclose.mdoc vendored Executable file
View File

@@ -0,0 +1,65 @@
.\" zip_fclose.mdoc -- close file in zip archive
.\" Copyright (C) 2003-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_FCLOSE 3
.Os
.Sh NAME
.Nm zip_fclose
.Nd close file in zip archive
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft int
.Fn zip_fclose "zip_file_t *file"
.Sh DESCRIPTION
The
.Fn zip_fclose
function closes
.Ar file
and frees the memory allocated for it.
.Sh RETURN VALUES
Upon successful completion 0 is returned.
Otherwise, the error code is returned.
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_fopen 3 ,
.Xr zip_fread 3 ,
.Xr zip_fseek 3
.Sh HISTORY
.Fn zip_fclose
was added in libzip 0.6.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

154
externals/libzip/libzip/man/zip_fdopen.html vendored Executable file
View File

@@ -0,0 +1,154 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_fdopen.mdoc -- open zip archive using existing file descriptor
Copyright (C) 2009-2018 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_FDOPEN(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_FDOPEN(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_FDOPEN(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_fdopen</code> &#x2014;
<div class="Nd">open zip archive using open file descriptor</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">zip_t *</var>
<br/>
<code class="Fn">zip_fdopen</code>(<var class="Fa" style="white-space: nowrap;">int
fd</var>, <var class="Fa" style="white-space: nowrap;">int flags</var>,
<var class="Fa" style="white-space: nowrap;">int *errorp</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The zip archive specified by the open file descriptor <var class="Ar">fd</var>
is opened and a pointer to a <var class="Ft">struct zip</var>, used to
manipulate the archive, is returned. In contrast to
<a class="Xr" href="zip_open.html">zip_open(3)</a>, using
<code class="Nm">zip_fdopen</code> the archive can only be opened in read-only
mode. The <var class="Ar">fd</var> argument may not be used any longer after
calling <code class="Nm">zip_fdopen</code>. The <var class="Fa">flags</var>
are specified by <i class="Em">or</i><span class="No">'ing</span> the
following values, or 0 for none of them.
<div class="Bd-indent">
<dl class="Bl-tag">
<dt><a class="permalink" href="#ZIP_CHECKCONS"><code class="Dv" id="ZIP_CHECKCONS">ZIP_CHECKCONS</code></a></dt>
<dd>Perform additional stricter consistency checks on the archive, and error
if they fail.</dd>
</dl>
</div>
<p class="Pp">If an error occurs and <var class="Ar">errorp</var> is
<span class="No">non-</span><code class="Dv">NULL</code>, it will be set to
the corresponding error code.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
Upon successful completion <code class="Fn">zip_fdopen</code>() returns a
<var class="Ft">struct zip</var> pointer, and <var class="Ar">fd</var> should
not be used any longer, nor passed to
<a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/close.html">close(2)</a>. Otherwise,
<code class="Dv">NULL</code> is returned and <var class="Ar">*errorp</var> is
set to indicate the error. In the error case, <var class="Ar">fd</var> remains
unchanged.
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
The file specified by <var class="Ar">fd</var> is prepared for use by
<a class="Xr" href="libzip.html">libzip(3)</a> unless:
<dl class="Bl-tag">
<dt>[<a class="permalink" href="#ZIP_ER_INCONS"><code class="Er" id="ZIP_ER_INCONS">ZIP_ER_INCONS</code></a>]</dt>
<dd>Inconsistencies were found in the file specified by
<var class="Ar">path</var>. This error is often caused by specifying
<code class="Dv">ZIP_CHECKCONS</code> but can also happen without it.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_INVAL"><code class="Er" id="ZIP_ER_INVAL">ZIP_ER_INVAL</code></a>]</dt>
<dd>The <var class="Ar">flags</var> argument is invalid. Not all
<a class="Xr" href="zip_open.html">zip_open(3)</a> flags are allowed for
<code class="Nm">zip_fdopen</code>, see
<a class="Sx" href="#DESCRIPTION">DESCRIPTION</a>.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_MEMORY"><code class="Er" id="ZIP_ER_MEMORY">ZIP_ER_MEMORY</code></a>]</dt>
<dd>Required memory could not be allocated.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_NOZIP"><code class="Er" id="ZIP_ER_NOZIP">ZIP_ER_NOZIP</code></a>]</dt>
<dd>The file specified by <var class="Ar">fd</var> is not a zip archive.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_OPEN"><code class="Er" id="ZIP_ER_OPEN">ZIP_ER_OPEN</code></a>]</dt>
<dd>The file specified by <var class="Ar">fd</var> could not be prepared for
use by <a class="Xr" href="libzip.html">libzip(3)</a>.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_READ"><code class="Er" id="ZIP_ER_READ">ZIP_ER_READ</code></a>]</dt>
<dd>A read error occurred; see <var class="Va">errno</var> for details.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_SEEK"><code class="Er" id="ZIP_ER_SEEK">ZIP_ER_SEEK</code></a>]</dt>
<dd>The file specified by <var class="Ar">fd</var> does not allow seeks.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_close.html">zip_close(3)</a>,
<a class="Xr" href="zip_error_strerror.html">zip_error_strerror(3)</a>,
<a class="Xr" href="zip_open.html">zip_open(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_fdopen</code>() was added in libzip 1.0.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

158
externals/libzip/libzip/man/zip_fdopen.man vendored Executable file
View File

@@ -0,0 +1,158 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_fdopen.mdoc -- open zip archive using existing file descriptor
.\" Copyright (C) 2009-2018 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_fdopen\fR
\- open zip archive using open file descriptor
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIzip_t *\fR
.br
.PD 0
.HP 4n
\fBzip_fdopen\fR(\fIint\ fd\fR, \fIint\ flags\fR, \fIint\ *errorp\fR);
.PD
.SH "DESCRIPTION"
The zip archive specified by the open file descriptor
\fIfd\fR
is opened and a pointer to a
\fIstruct zip\fR,
used to manipulate the archive, is returned.
In contrast to
zip_open(3),
using
\fBzip_fdopen\fR
the archive can only be opened in read-only mode.
The
\fIfd\fR
argument may not be used any longer after calling
\fBzip_fdopen\fR.
The
\fIflags\fR
are specified by
\fIor\fR'ing
the following values, or 0 for none of them.
.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
\fIerrorp\fR
is
non-\fRNULL\fR,
it will be set to the corresponding error code.
.SH "RETURN VALUES"
Upon successful completion
\fBzip_fdopen\fR()
returns a
\fIstruct zip\fR
pointer, and
\fIfd\fR
should not be used any longer, nor passed to
close(2).
Otherwise,
\fRNULL\fR
is returned and
\fI*errorp\fR
is set to indicate the error.
In the error case,
\fIfd\fR
remains unchanged.
.SH "ERRORS"
The file specified by
\fIfd\fR
is prepared for use by
libzip(3)
unless:
.TP 19n
[\fRZIP_ER_INCONS\fR]
Inconsistencies were found in the file specified by
\fIpath\fR.
This error is often caused by specifying
\fRZIP_CHECKCONS\fR
but can also happen without it.
.TP 19n
[\fRZIP_ER_INVAL\fR]
The
\fIflags\fR
argument is invalid.
Not all
zip_open(3)
flags are allowed for
\fBzip_fdopen\fR,
see
\fIDESCRIPTION\fR.
.TP 19n
[\fRZIP_ER_MEMORY\fR]
Required memory could not be allocated.
.TP 19n
[\fRZIP_ER_NOZIP\fR]
The file specified by
\fIfd\fR
is not a zip archive.
.TP 19n
[\fRZIP_ER_OPEN\fR]
The file specified by
\fIfd\fR
could not be prepared for use by
libzip(3).
.TP 19n
[\fRZIP_ER_READ\fR]
A read error occurred; see
\fIerrno\fR
for details.
.TP 19n
[\fRZIP_ER_SEEK\fR]
The file specified by
\fIfd\fR
does not allow seeks.
.SH "SEE ALSO"
libzip(3),
zip_close(3),
zip_error_strerror(3),
zip_open(3)
.SH "HISTORY"
\fBzip_fdopen\fR()
was added in libzip 1.0.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

147
externals/libzip/libzip/man/zip_fdopen.mdoc vendored Executable file
View File

@@ -0,0 +1,147 @@
.\" zip_fdopen.mdoc -- open zip archive using existing file descriptor
.\" Copyright (C) 2009-2018 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.
.\"
.Dd December 18, 2017
.Dt ZIP_FDOPEN 3
.Os
.Sh NAME
.Nm zip_fdopen
.Nd open zip archive using open file descriptor
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft zip_t *
.Fn zip_fdopen "int fd" "int flags" "int *errorp"
.Sh DESCRIPTION
The zip archive specified by the open file descriptor
.Ar fd
is opened and a pointer to a
.Ft struct zip ,
used to manipulate the archive, is returned.
In contrast to
.Xr zip_open 3 ,
using
.Nm zip_fdopen
the archive can only be opened in read-only mode.
The
.Ar fd
argument may not be used any longer after calling
.Nm zip_fdopen .
The
.Fa flags
are specified by
.Em or Ns No 'ing
the following values, or 0 for none of them.
.Bl -tag -offset indent -width ZIP_CHECKCONS
.It Dv ZIP_CHECKCONS
Perform additional stricter consistency checks on the archive, and
error if they fail.
.El
.Pp
If an error occurs and
.Ar errorp
is
.No non- Ns Dv NULL ,
it will be set to the corresponding error code.
.Sh RETURN VALUES
Upon successful completion
.Fn zip_fdopen
returns a
.Ft struct zip
pointer, and
.Ar fd
should not be used any longer, nor passed to
.Xr close 2 .
Otherwise,
.Dv NULL
is returned and
.Ar *errorp
is set to indicate the error.
In the error case,
.Ar fd
remains unchanged.
.Sh ERRORS
The file specified by
.Ar fd
is prepared for use by
.Xr libzip 3
unless:
.Bl -tag -width Er
.It Bq Er ZIP_ER_INCONS
Inconsistencies were found in the file specified by
.Ar path .
This error is often caused by specifying
.Dv ZIP_CHECKCONS
but can also happen without it.
.It Bq Er ZIP_ER_INVAL
The
.Ar flags
argument is invalid.
Not all
.Xr zip_open 3
flags are allowed for
.Nm zip_fdopen ,
see
.Sx DESCRIPTION .
.It Bq Er ZIP_ER_MEMORY
Required memory could not be allocated.
.It Bq Er ZIP_ER_NOZIP
The file specified by
.Ar fd
is not a zip archive.
.It Bq Er ZIP_ER_OPEN
The file specified by
.Ar fd
could not be prepared for use by
.Xr libzip 3 .
.It Bq Er ZIP_ER_READ
A read error occurred; see
.Va errno
for details.
.It Bq Er ZIP_ER_SEEK
The file specified by
.Ar fd
does not allow seeks.
.El
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_close 3 ,
.Xr zip_error_strerror 3 ,
.Xr zip_open 3
.Sh HISTORY
.Fn zip_fdopen
was added in libzip 1.0.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

177
externals/libzip/libzip/man/zip_file_add.html vendored Executable file
View File

@@ -0,0 +1,177 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_file_add.mdoc -- add files to zip archive
Copyright (C) 2004-2018 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_FILE_ADD(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_FILE_ADD(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_FILE_ADD(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_file_add</code>, <code class="Nm">zip_file_replace</code>
&#x2014;
<div class="Nd">add file to zip archive or replace file in zip archive</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">zip_int64_t</var>
<br/>
<code class="Fn">zip_file_add</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">const char
*name</var>, <var class="Fa" style="white-space: nowrap;">zip_source_t
*source</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t
flags</var>);</p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_file_replace</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
index</var>, <var class="Fa" style="white-space: nowrap;">zip_source_t
*source</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t
flags</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The function <code class="Fn">zip_file_add</code>() adds a file to a zip
archive, while <code class="Fn">zip_file_replace</code>() replaces an existing
file in a zip archive. The argument <var class="Ar">archive</var> specifies
the zip archive to which the file should be added. <var class="Ar">name</var>
is the file's name in the zip archive (for
<code class="Fn">zip_file_add</code>()), while <var class="Ar">index</var>
specifies which file should be replaced (for
<code class="Fn">zip_file_replace</code>()). The <var class="Ar">flags</var>
argument can be any combination of <code class="Dv">ZIP_FL_OVERWRITE</code>
with one of <code class="Dv">ZIP_FL_ENC_*</code>:
<dl class="Bl-tag">
<dt><a class="permalink" href="#ZIP_FL_OVERWRITE"><code class="Dv" id="ZIP_FL_OVERWRITE">ZIP_FL_OVERWRITE</code></a></dt>
<dd>Overwrite any existing file of the same name. For
<code class="Nm">zip_file_add</code> only.</dd>
<dt><a class="permalink" href="#ZIP_FL_ENC_GUESS"><code class="Dv" id="ZIP_FL_ENC_GUESS">ZIP_FL_ENC_GUESS</code></a></dt>
<dd>Guess encoding of <var class="Ar">name</var> (default).</dd>
<dt><a class="permalink" href="#ZIP_FL_ENC_UTF_8"><code class="Dv" id="ZIP_FL_ENC_UTF_8">ZIP_FL_ENC_UTF_8</code></a></dt>
<dd>Interpret <var class="Ar">name</var> as UTF-8.</dd>
<dt><a class="permalink" href="#ZIP_FL_ENC_CP437"><code class="Dv" id="ZIP_FL_ENC_CP437">ZIP_FL_ENC_CP437</code></a></dt>
<dd>Interpret <var class="Ar">name</var> as code page 437 (CP-437).</dd>
</dl>
The data is obtained from the <var class="Ar">source</var> argument, see
<a class="Xr" href="zip_source.html">zip_source(3)</a>.
<p class="Pp"><i class="Em">NOTE</i>:
<a class="Xr" href="zip_source_free.html">zip_source_free(3)</a> should not
be called on a <var class="Ar">source</var> after it was used successfully
in a <code class="Nm">zip_file_add</code> or
<code class="Nm">zip_file_replace</code> call.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
Upon successful completion, <code class="Fn">zip_file_add</code>() returns the
index of the new file in the archive, and
<code class="Fn">zip_file_replace</code>() returns 0. Otherwise, -1 is
returned and the error code in <var class="Ar">archive</var> is set to
indicate the error.
</section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
<div class="Bd Bd-indent">
<pre>
zip_source_t *s;
const char *buf=&quot;teststring&quot;;
if ((s=zip_source_buffer(archive, buf, sizeof(buf), 0)) == NULL ||
zip_file_add(archive, name, s, ZIP_FL_ENC_UTF_8) &lt; 0) {
zip_source_free(s);
printf(&quot;error adding file: %s\n&quot;, zip_strerror(archive));
}
</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<code class="Fn">zip_file_add</code>() and
<code class="Fn">zip_file_replace</code>() fail if:
<dl class="Bl-tag">
<dt>[<a class="permalink" href="#ZIP_ER_EXISTS"><code class="Er" id="ZIP_ER_EXISTS">ZIP_ER_EXISTS</code></a>]</dt>
<dd>There is already a file called <var class="Ar">name</var> in the archive.
(Only applies to <code class="Fn">zip_file_add</code>(), and only if
<code class="Dv">ZIP_FL_OVERWRITE</code> is not provided).</dd>
<dt>[<a class="permalink" href="#ZIP_ER_INVAL"><code class="Er" id="ZIP_ER_INVAL">ZIP_ER_INVAL</code></a>]</dt>
<dd><var class="Ar">source</var> or <var class="Ar">name</var> are
<code class="Dv">NULL</code>, or <var class="Ar">index</var> is
invalid.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_MEMORY"><code class="Er" id="ZIP_ER_MEMORY">ZIP_ER_MEMORY</code></a>]</dt>
<dd>Required memory could not be allocated.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_RDONLY"><code class="Er" id="ZIP_ER_RDONLY">ZIP_ER_RDONLY</code></a>]</dt>
<dd>Archive was opened in read-only mode.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_source.html">zip_source(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_file_add</code>() and
<code class="Fn">zip_file_replace</code>() were added in libzip 0.11.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

182
externals/libzip/libzip/man/zip_file_add.man vendored Executable file
View File

@@ -0,0 +1,182 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_file_add.mdoc -- add files to zip archive
.\" Copyright (C) 2004-2018 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\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"
\fB#include <zip.h>\fR
.sp
\fIzip_int64_t\fR
.br
.PD 0
.HP 4n
\fBzip_file_add\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *name\fR, \fIzip_source_t\ *source\fR, \fIzip_flags_t\ flags\fR);
.PD
.PP
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_file_replace\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_source_t\ *source\fR, \fIzip_flags_t\ flags\fR);
.PD
.SH "DESCRIPTION"
The function
\fBzip_file_add\fR()
adds a file to a zip archive, while
\fBzip_file_replace\fR()
replaces an existing file in a zip archive.
The argument
\fIarchive\fR
specifies the zip archive to which the file should be added.
\fIname\fR
is the file's name in the zip archive (for
\fBzip_file_add\fR()),
while
\fIindex\fR
specifies which file should be replaced (for
\fBzip_file_replace\fR()).
The
\fIflags\fR
argument can be any combination of
\fRZIP_FL_OVERWRITE\fR
with one of
\fRZIP_FL_ENC_*\fR:
.TP 22n
\fRZIP_FL_OVERWRITE\fR
Overwrite any existing file of the same name.
For
\fBzip_file_add\fR
only.
.TP 22n
\fRZIP_FL_ENC_GUESS\fR
Guess encoding of
\fIname\fR
(default).
.TP 22n
\fRZIP_FL_ENC_UTF_8\fR
Interpret
\fIname\fR
as UTF-8.
.TP 22n
\fRZIP_FL_ENC_CP437\fR
Interpret
\fIname\fR
as code page 437 (CP-437).
.PD 0
.PP
The data is obtained from the
\fIsource\fR
argument, see
zip_source(3).
.PD
.PP
\fINOTE\fR:
zip_source_free(3)
should not be called on a
\fIsource\fR
after it was used successfully in a
\fBzip_file_add\fR
or
\fBzip_file_replace\fR
call.
.SH "RETURN VALUES"
Upon successful completion,
\fBzip_file_add\fR()
returns the index of the new file in the archive, and
\fBzip_file_replace\fR()
returns 0.
Otherwise, \-1 is returned and the error code in
\fIarchive\fR
is set to indicate the error.
.SH "EXAMPLES"
.nf
.RS 6n
zip_source_t *s;
const char *buf="teststring";
if ((s=zip_source_buffer(archive, buf, sizeof(buf), 0)) == NULL ||
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));
}
.RE
.fi
.SH "ERRORS"
\fBzip_file_add\fR()
and
\fBzip_file_replace\fR()
fail if:
.TP 19n
[\fRZIP_ER_EXISTS\fR]
There is already a file called
\fIname\fR
in the archive.
(Only applies to
\fBzip_file_add\fR(),
and only if
\fRZIP_FL_OVERWRITE\fR
is not provided).
.TP 19n
[\fRZIP_ER_INVAL\fR]
\fIsource\fR
or
\fIname\fR
are
\fRNULL\fR,
or
\fIindex\fR
is invalid.
.TP 19n
[\fRZIP_ER_MEMORY\fR]
Required memory could not be allocated.
.TP 19n
[\fRZIP_ER_RDONLY\fR]
Archive was opened in read-only mode.
.SH "SEE ALSO"
libzip(3),
zip_source(3)
.SH "HISTORY"
\fBzip_file_add\fR()
and
\fBzip_file_replace\fR()
were added in libzip 0.11.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

163
externals/libzip/libzip/man/zip_file_add.mdoc vendored Executable file
View File

@@ -0,0 +1,163 @@
.\" zip_file_add.mdoc -- add files to zip archive
.\" Copyright (C) 2004-2018 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.
.\"
.Dd December 18, 2017
.Dt ZIP_FILE_ADD 3
.Os
.Sh NAME
.Nm zip_file_add ,
.Nm zip_file_replace
.Nd add file to zip archive or replace file in zip archive
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft zip_int64_t
.Fn zip_file_add "zip_t *archive" "const char *name" "zip_source_t *source" "zip_flags_t flags"
.Ft int
.Fn zip_file_replace "zip_t *archive" "zip_uint64_t index" "zip_source_t *source" "zip_flags_t flags"
.Sh DESCRIPTION
The function
.Fn zip_file_add
adds a file to a zip archive, while
.Fn zip_file_replace
replaces an existing file in a zip archive.
The argument
.Ar archive
specifies the zip archive to which the file should be added.
.Ar name
is the file's name in the zip archive (for
.Fn zip_file_add ) ,
while
.Ar index
specifies which file should be replaced (for
.Fn zip_file_replace ) .
The
.Ar flags
argument can be any combination of
.Dv ZIP_FL_OVERWRITE
with one of
.Dv ZIP_FL_ENC_* :
.Bl -tag -width XZIPXFLXENCXSTRICTXX
.It Dv ZIP_FL_OVERWRITE
Overwrite any existing file of the same name.
For
.Nm zip_file_add
only.
.It Dv ZIP_FL_ENC_GUESS
Guess encoding of
.Ar name
(default).
.It Dv ZIP_FL_ENC_UTF_8
Interpret
.Ar name
as UTF-8.
.It Dv ZIP_FL_ENC_CP437
Interpret
.Ar name
as code page 437 (CP-437).
.El
The data is obtained from the
.Ar source
argument, see
.Xr zip_source 3 .
.Pp
.Em NOTE :
.Xr zip_source_free 3
should not be called on a
.Ar source
after it was used successfully in a
.Nm zip_file_add
or
.Nm zip_file_replace
call.
.Sh RETURN VALUES
Upon successful completion,
.Fn zip_file_add
returns the index of the new file in the archive, and
.Fn zip_file_replace
returns 0.
Otherwise, \-1 is returned and the error code in
.Ar archive
is set to indicate the error.
.Sh EXAMPLES
.Bd -literal -offset indent
zip_source_t *s;
const char *buf="teststring";
if ((s=zip_source_buffer(archive, buf, sizeof(buf), 0)) == NULL ||
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
.Sh ERRORS
.Fn zip_file_add
and
.Fn zip_file_replace
fail if:
.Bl -tag -width Er
.It Bq Er ZIP_ER_EXISTS
There is already a file called
.Ar name
in the archive.
(Only applies to
.Fn zip_file_add ,
and only if
.Dv ZIP_FL_OVERWRITE
is not provided).
.It Bq Er ZIP_ER_INVAL
.Ar source
or
.Ar name
are
.Dv NULL ,
or
.Ar index
is invalid.
.It Bq Er ZIP_ER_MEMORY
Required memory could not be allocated.
.It Bq Er ZIP_ER_RDONLY
Archive was opened in read-only mode.
.El
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_source 3
.Sh HISTORY
.Fn zip_file_add
and
.Fn zip_file_replace
were added in libzip 0.11.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,159 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_file_extra_field_delete.mdoc -- delete extra field for file in zip
Copyright (C) 2012-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_FILE_EXTRA_FIELD_DELETE(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_FILE_EXTRA_FIELD_DELETE(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_FILE_EXTRA_FIELD_DELETE(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_file_extra_field_delete</code>,
<code class="Nm">zip_file_extra_field_delete_by_id</code> &#x2014;
<div class="Nd">delete extra field for file in zip</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_file_extra_field_delete</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
index</var>, <var class="Fa" style="white-space: nowrap;">zip_uint16_t
extra_field_index</var>,
<var class="Fa" style="white-space: nowrap;">zip_flags_t flags</var>);</p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_file_extra_field_delete_by_id</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
index</var>, <var class="Fa" style="white-space: nowrap;">zip_uint16_t
extra_field_id</var>,
<var class="Fa" style="white-space: nowrap;">zip_uint16_t
extra_field_index</var>,
<var class="Fa" style="white-space: nowrap;">zip_flags_t flags</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_file_extra_field_delete</code>() function deletes the
extra field with index <var class="Ar">extra_field_index</var> for the file at
position <var class="Ar">index</var> in the zip archive.
<p class="Pp">If <var class="Ar">extra_field_index</var> is
<code class="Dv">ZIP_EXTRA_FIELD_ALL</code>, then all extra fields will be
deleted.</p>
<p class="Pp">The following <var class="Ar">flags</var> are supported:</p>
<div class="Bd-indent">
<dl class="Bl-tag">
<dt><a class="permalink" href="#ZIP_FL_CENTRAL"><code class="Dv" id="ZIP_FL_CENTRAL">ZIP_FL_CENTRAL</code></a></dt>
<dd>Delete extra fields from the archive's central directory.</dd>
<dt><a class="permalink" href="#ZIP_FL_LOCAL"><code class="Dv" id="ZIP_FL_LOCAL">ZIP_FL_LOCAL</code></a></dt>
<dd>Delete extra fields from the local file headers.</dd>
</dl>
</div>
<p class="Pp">The <code class="Fn">zip_file_extra_field_delete_by_id</code>()
function deletes the extra field with ID (two-byte signature)
<var class="Ar">extra_field_id</var> and index
<var class="Ar">extra_field_index</var> (in other words, the
<var class="Ar">extra_field_index</var><span class="No">'th</span> extra
field with ID <var class="Ar">extra_field_id</var>) The other arguments are
the same as for <code class="Fn">zip_file_extra_field_delete</code>()
(<code class="Dv">ZIP_EXTRA_FIELD_ALL</code> will delete all extra fields of
the specified ID).</p>
<p class="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
<code class="Dv">ZIP_FL_CENTRAL</code> and
<code class="Dv">ZIP_FL_LOCAL</code> in <var class="Ar">flags</var>, except
when deleting all extra fields (i.e.,
<var class="Ar">extra_field_index</var> being
<code class="Dv">ZIP_EXTRA_FIELD_ALL</code>).</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
Upon successful completion 0 is returned. Otherwise, -1 is returned and the
error code in <var class="Ar">archive</var> is set to indicate the error.
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<code class="Fn">zip_file_extra_field_delete</code>() and
<code class="Fn">zip_file_extra_field_delete_by_id</code>() fail if:
<dl class="Bl-tag">
<dt>[<a class="permalink" href="#ZIP_ER_NOENT"><code class="Er" id="ZIP_ER_NOENT">ZIP_ER_NOENT</code></a>]</dt>
<dd><var class="Ar">index</var> is not a valid file index in
<var class="Ar">archive</var>.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_file_extra_field_get.html">zip_file_extra_field_get(3)</a>,
<a class="Xr" href="zip_file_extra_field_set.html">zip_file_extra_field_set(3)</a>,
<a class="Xr" href="zip_file_extra_fields_count.html">zip_file_extra_fields_count(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_file_extra_field_delete</code>() and
<code class="Fn">zip_file_extra_field_delete_by_id</code>() were added in
libzip 0.11.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,141 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_file_extra_field_delete.mdoc -- delete extra field for file in zip
.\" Copyright (C) 2012-2017 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\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"
\fB#include <zip.h>\fR
.sp
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_file_extra_field_delete\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_uint16_t\ extra_field_index\fR, \fIzip_flags_t\ flags\fR);
.PD
.PP
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_file_extra_field_delete_by_id\fR(\fIzip_t\ *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);
.PD
.SH "DESCRIPTION"
The
\fBzip_file_extra_field_delete\fR()
function deletes the extra field with index
\fIextra_field_index\fR
for the file at position
\fIindex\fR
in the zip archive.
.PP
If
\fIextra_field_index\fR
is
\fRZIP_EXTRA_FIELD_ALL\fR,
then all extra fields will be deleted.
.PP
The following
\fIflags\fR
are supported:
.RS 6n
.TP 18n
\fRZIP_FL_CENTRAL\fR
Delete extra fields from the archive's central directory.
.TP 18n
\fRZIP_FL_LOCAL\fR
Delete extra fields from the local file headers.
.RE
.PP
The
\fBzip_file_extra_field_delete_by_id\fR()
function deletes the extra field with ID (two-byte signature)
\fIextra_field_id\fR
and index
\fIextra_field_index\fR
(in other words, the
\fIextra_field_index\fR'th
extra field with ID
\fIextra_field_id\fR)
The other arguments are the same as for
\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
\fRZIP_FL_CENTRAL\fR
and
\fRZIP_FL_LOCAL\fR
in
\fIflags\fR,
except when deleting all extra fields (i.e.,
\fIextra_field_index\fR
being
\fRZIP_EXTRA_FIELD_ALL\fR).
.SH "RETURN VALUES"
Upon successful completion 0 is returned.
Otherwise, \-1 is returned and the error code in
\fIarchive\fR
is set to indicate the error.
.SH "ERRORS"
\fBzip_file_extra_field_delete\fR()
and
\fBzip_file_extra_field_delete_by_id\fR()
fail if:
.TP 19n
[\fRZIP_ER_NOENT\fR]
\fIindex\fR
is not a valid file index in
\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 "HISTORY"
\fBzip_file_extra_field_delete\fR()
and
\fBzip_file_extra_field_delete_by_id\fR()
were added in libzip 0.11.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,130 @@
.\" zip_file_extra_field_delete.mdoc -- delete extra field for file in zip
.\" Copyright (C) 2012-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_FILE_EXTRA_FIELD_DELETE 3
.Os
.Sh NAME
.Nm zip_file_extra_field_delete ,
.Nm zip_file_extra_field_delete_by_id
.Nd delete extra field for file in zip
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft int
.Fn zip_file_extra_field_delete "zip_t *archive" "zip_uint64_t index" "zip_uint16_t extra_field_index" "zip_flags_t flags"
.Ft int
.Fn zip_file_extra_field_delete_by_id "zip_t *archive" "zip_uint64_t index" "zip_uint16_t extra_field_id" "zip_uint16_t extra_field_index" "zip_flags_t flags"
.Sh DESCRIPTION
The
.Fn zip_file_extra_field_delete
function deletes the extra field with index
.Ar extra_field_index
for the file at position
.Ar index
in the zip archive.
.Pp
If
.Ar extra_field_index
is
.Dv ZIP_EXTRA_FIELD_ALL ,
then all extra fields will be deleted.
.Pp
The following
.Ar flags
are supported:
.Bl -tag -width ZIP_FL_CENTRALXX -offset indent
.It Dv ZIP_FL_CENTRAL
Delete extra fields from the archive's central directory.
.It Dv ZIP_FL_LOCAL
Delete extra fields from the local file headers.
.El
.Pp
The
.Fn zip_file_extra_field_delete_by_id
function deletes the extra field with ID (two-byte signature)
.Ar extra_field_id
and index
.Ar extra_field_index
(in other words, the
.Ar extra_field_index Ns No 'th
extra field with ID
.Ar extra_field_id )
The other arguments are the same as for
.Fn zip_file_extra_field_delete
.Dv ( ZIP_EXTRA_FIELD_ALL
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
.Dv ZIP_FL_CENTRAL
and
.Dv ZIP_FL_LOCAL
in
.Ar flags ,
except when deleting all extra fields (i.e.,
.Ar extra_field_index
being
.Dv ZIP_EXTRA_FIELD_ALL ) .
.Sh RETURN VALUES
Upon successful completion 0 is returned.
Otherwise, \-1 is returned and the error code in
.Ar archive
is set to indicate the error.
.Sh ERRORS
.Fn zip_file_extra_field_delete
and
.Fn zip_file_extra_field_delete_by_id
fail if:
.Bl -tag -width Er
.It Bq Er ZIP_ER_NOENT
.Ar index
is not a valid file index in
.Ar archive .
.El
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_file_extra_field_get 3 ,
.Xr zip_file_extra_field_set 3 ,
.Xr zip_file_extra_fields_count 3
.Sh HISTORY
.Fn zip_file_extra_field_delete
and
.Fn zip_file_extra_field_delete_by_id
were added in libzip 0.11.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,176 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_file_extra_field_get.mdoc -- get extra field for file in zip
Copyright (C) 2012-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_FILE_EXTRA_FIELD_GET(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_FILE_EXTRA_FIELD_GET(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_FILE_EXTRA_FIELD_GET(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_file_extra_field_get</code>,
<code class="Nm">zip_file_extra_field_get_by_id</code> &#x2014;
<div class="Nd">get extra field for file in zip</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">const zip_uint8_t *</var>
<br/>
<code class="Fn">zip_file_extra_field_get</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
index</var>, <var class="Fa" style="white-space: nowrap;">zip_uint16_t
extra_field_index</var>,
<var class="Fa" style="white-space: nowrap;">zip_uint16_t *idp</var>,
<var class="Fa" style="white-space: nowrap;">zip_uint16_t *lenp</var>,
<var class="Fa" style="white-space: nowrap;">zip_flags_t flags</var>);</p>
<p class="Pp"><var class="Ft">const zip_uint8_t *</var>
<br/>
<code class="Fn">zip_file_extra_field_get_by_id</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
index</var>, <var class="Fa" style="white-space: nowrap;">zip_uint16_t
extra_field_id</var>,
<var class="Fa" style="white-space: nowrap;">zip_uint16_t
extra_field_index</var>,
<var class="Fa" style="white-space: nowrap;">zip_uint16_t *lenp</var>,
<var class="Fa" style="white-space: nowrap;">zip_flags_t flags</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_file_extra_field_get</code>() function returns the
extra field with index <var class="Ar">extra_field_index</var> for the file at
position <var class="Ar">index</var> in the zip archive. This pointer should
not be modified or <a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/free.html">free(3)</a>'d, and becomes
invalid when <var class="Ar">archive</var> is closed. If
<var class="Ar">idp</var> is not <code class="Dv">NULL</code>, the integer to
which it points will be set to the ID (two-byte signature) of the selected
extra field. If <var class="Ar">lenp</var> is not
<code class="Dv">NULL</code>, the integer to which it points will be set to
the length of the extra field. Generally speaking, <var class="Ar">lenp</var>
and <var class="Ar">idp</var> should be passed since only the extra field data
is returned (i.e., neither the ID nor the length, if the
<var class="Ar">idp</var> and <var class="Ar">lenp</var> arguments are not
provided).
<p class="Pp">The following <var class="Ar">flags</var> are supported:</p>
<div class="Bd-indent">
<dl class="Bl-tag">
<dt><a class="permalink" href="#ZIP_FL_CENTRAL"><code class="Dv" id="ZIP_FL_CENTRAL">ZIP_FL_CENTRAL</code></a></dt>
<dd>Return extra fields from the archive's central directory.</dd>
<dt><a class="permalink" href="#ZIP_FL_LOCAL"><code class="Dv" id="ZIP_FL_LOCAL">ZIP_FL_LOCAL</code></a></dt>
<dd>Return extra fields from the local file headers.</dd>
<dt><a class="permalink" href="#ZIP_FL_UNCHANGED"><code class="Dv" id="ZIP_FL_UNCHANGED">ZIP_FL_UNCHANGED</code></a></dt>
<dd>Return the original unchanged extra fields, ignoring any changes
made.</dd>
</dl>
</div>
<p class="Pp">The <code class="Fn">zip_file_extra_field_get_by_id</code>()
function returns the extra field with ID (two-byte signature)
<var class="Ar">extra_field_id</var> and index
<var class="Ar">extra_field_index</var> (in other words, the
<var class="Ar">extra_field_index</var><span class="No">'th</span> extra
field with ID <var class="Ar">extra_field_id</var>) The other arguments are
the same as for <code class="Fn">zip_file_extra_field_get</code>().</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
Upon successful completion, a pointer to an extra field is returned, or
<code class="Dv">NULL</code> if there is no extra field with that
<var class="Ar">extra_field_index</var> for the file with index
<var class="Ar">index</var>. In case of an error, <code class="Dv">NULL</code>
is returned and the error code in <var class="Ar">archive</var> is set to
indicate the error.
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<code class="Fn">zip_file_extra_field_get</code>() and
<code class="Fn">zip_file_extra_field_get_by_id</code>() fail if:
<dl class="Bl-tag">
<dt>[<a class="permalink" href="#ZIP_ER_NOENT"><code class="Er" id="ZIP_ER_NOENT">ZIP_ER_NOENT</code></a>]</dt>
<dd><var class="Ar">index</var> is not a valid file index in
<var class="Ar">archive</var>, or <var class="Ar">extra_field_index</var>
is not a valid extra file index (for ID
<var class="Ar">extra_field_id</var>).</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_file_extra_field_delete.html">zip_file_extra_field_delete(3)</a>,
<a class="Xr" href="zip_file_extra_field_set.html">zip_file_extra_field_set(3)</a>,
<a class="Xr" href="zip_file_extra_fields_count.html">zip_file_extra_fields_count(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_file_extra_field_get</code>() and
<code class="Fn">zip_file_extra_field_get_by_id</code>() were added in libzip
0.11.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
<section class="Sh">
<h1 class="Sh" id="CAVEATS"><a class="permalink" href="#CAVEATS">CAVEATS</a></h1>
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 read using
<code class="Fn">zip_file_extra_field_get</code>() since they are used by
<a class="Xr" href="libzip.html">libzip(3)</a> internally.
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,169 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_file_extra_field_get.mdoc -- get extra field for file in zip
.\" Copyright (C) 2012-2017 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\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"
\fB#include <zip.h>\fR
.sp
\fIconst zip_uint8_t *\fR
.br
.PD 0
.HP 4n
\fBzip_file_extra_field_get\fR(\fIzip_t\ *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);
.PD
.PP
\fIconst zip_uint8_t *\fR
.br
.PD 0
.HP 4n
\fBzip_file_extra_field_get_by_id\fR(\fIzip_t\ *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);
.PD
.SH "DESCRIPTION"
The
\fBzip_file_extra_field_get\fR()
function returns the extra field with index
\fIextra_field_index\fR
for the file at position
\fIindex\fR
in the zip archive.
This pointer should not be modified or
free(3)'d,
and becomes invalid when
\fIarchive\fR
is closed.
If
\fIidp\fR
is not
\fRNULL\fR,
the integer to which it points will be set to the ID (two-byte
signature) of the selected extra field.
If
\fIlenp\fR
is not
\fRNULL\fR,
the integer to which it points will be set to the length of the
extra field.
Generally speaking,
\fIlenp\fR
and
\fIidp\fR
should be passed since only the extra field data is returned (i.e.,
neither the ID nor the length, if the
\fIidp\fR
and
\fIlenp\fR
arguments are not provided).
.PP
The following
\fIflags\fR
are supported:
.RS 6n
.TP 20n
\fRZIP_FL_CENTRAL\fR
Return extra fields from the archive's central directory.
.TP 20n
\fRZIP_FL_LOCAL\fR
Return extra fields from the local file headers.
.TP 20n
\fRZIP_FL_UNCHANGED\fR
Return the original unchanged extra fields, ignoring any changes made.
.RE
.PP
The
\fBzip_file_extra_field_get_by_id\fR()
function returns the extra field with ID (two-byte signature)
\fIextra_field_id\fR
and index
\fIextra_field_index\fR
(in other words, the
\fIextra_field_index\fR'th
extra field with ID
\fIextra_field_id\fR)
The other arguments are the same as for
\fBzip_file_extra_field_get\fR().
.SH "RETURN VALUES"
Upon successful completion, a pointer to an extra field is returned,
or
\fRNULL\fR
if there is no extra field with that
\fIextra_field_index\fR
for the file with index
\fIindex\fR.
In case of an error,
\fRNULL\fR
is returned and the error code in
\fIarchive\fR
is set to indicate the error.
.SH "ERRORS"
\fBzip_file_extra_field_get\fR()
and
\fBzip_file_extra_field_get_by_id\fR()
fail if:
.TP 19n
[\fRZIP_ER_NOENT\fR]
\fIindex\fR
is not a valid file index in
\fIarchive\fR,
or
\fIextra_field_index\fR
is not a valid extra file index (for ID
\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 "HISTORY"
\fBzip_file_extra_field_get\fR()
and
\fBzip_file_extra_field_get_by_id\fR()
were added in libzip 0.11.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>
.SH "CAVEATS"
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 read using
\fBzip_file_extra_field_get\fR()
since they are used by
libzip(3)
internally.

View File

@@ -0,0 +1,157 @@
.\" zip_file_extra_field_get.mdoc -- get extra field for file in zip
.\" Copyright (C) 2012-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_FILE_EXTRA_FIELD_GET 3
.Os
.Sh NAME
.Nm zip_file_extra_field_get ,
.Nm zip_file_extra_field_get_by_id
.Nd get extra field for file in zip
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft const zip_uint8_t *
.Fn zip_file_extra_field_get "zip_t *archive" "zip_uint64_t index" "zip_uint16_t extra_field_index" "zip_uint16_t *idp" "zip_uint16_t *lenp" "zip_flags_t flags"
.Ft const zip_uint8_t *
.Fn zip_file_extra_field_get_by_id "zip_t *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"
.Sh DESCRIPTION
The
.Fn zip_file_extra_field_get
function returns the extra field with index
.Ar extra_field_index
for the file at position
.Ar index
in the zip archive.
This pointer should not be modified or
.Xr free 3 Ap d ,
and becomes invalid when
.Ar archive
is closed.
If
.Ar idp
is not
.Dv NULL ,
the integer to which it points will be set to the ID (two-byte
signature) of the selected extra field.
If
.Ar lenp
is not
.Dv NULL ,
the integer to which it points will be set to the length of the
extra field.
Generally speaking,
.Ar lenp
and
.Ar idp
should be passed since only the extra field data is returned (i.e.,
neither the ID nor the length, if the
.Ar idp
and
.Ar lenp
arguments are not provided).
.Pp
The following
.Ar flags
are supported:
.Bl -tag -width ZIP_FL_UNCHANGEDXX -offset indent
.It Dv ZIP_FL_CENTRAL
Return extra fields from the archive's central directory.
.It Dv ZIP_FL_LOCAL
Return extra fields from the local file headers.
.It Dv ZIP_FL_UNCHANGED
Return the original unchanged extra fields, ignoring any changes made.
.El
.Pp
The
.Fn zip_file_extra_field_get_by_id
function returns the extra field with ID (two-byte signature)
.Ar extra_field_id
and index
.Ar extra_field_index
(in other words, the
.Ar extra_field_index Ns No 'th
extra field with ID
.Ar extra_field_id )
The other arguments are the same as for
.Fn zip_file_extra_field_get .
.Sh RETURN VALUES
Upon successful completion, a pointer to an extra field is returned,
or
.Dv NULL
if there is no extra field with that
.Ar extra_field_index
for the file with index
.Ar index .
In case of an error,
.Dv NULL
is returned and the error code in
.Ar archive
is set to indicate the error.
.Sh ERRORS
.Fn zip_file_extra_field_get
and
.Fn zip_file_extra_field_get_by_id
fail if:
.Bl -tag -width Er
.It Bq Er ZIP_ER_NOENT
.Ar index
is not a valid file index in
.Ar archive ,
or
.Ar extra_field_index
is not a valid extra file index (for ID
.Ar extra_field_id ) .
.El
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_file_extra_field_delete 3 ,
.Xr zip_file_extra_field_set 3 ,
.Xr zip_file_extra_fields_count 3
.Sh HISTORY
.Fn zip_file_extra_field_get
and
.Fn zip_file_extra_field_get_by_id
were added in libzip 0.11.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at
.Sh CAVEATS
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 read using
.Fn zip_file_extra_field_get
since they are used by
.Xr libzip 3
internally.

View File

@@ -0,0 +1,148 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_file_extra_field_set.mdoc -- set extra field for file in zip
Copyright (C) 2012-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_FILE_EXTRA_FIELD_SET(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_FILE_EXTRA_FIELD_SET(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_FILE_EXTRA_FIELD_SET(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_file_extra_field_set</code> &#x2014;
<div class="Nd">set extra field for file in zip</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_file_extra_field_set</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
index</var>, <var class="Fa" style="white-space: nowrap;">zip_uint16_t
extra_field_id</var>,
<var class="Fa" style="white-space: nowrap;">zip_uint16_t
extra_field_index</var>, <var class="Fa" style="white-space: nowrap;">const
zip_uint8_t *extra_field_data</var>,
<var class="Fa" style="white-space: nowrap;">zip_uint16_t len</var>,
<var class="Fa" style="white-space: nowrap;">zip_flags_t flags</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_file_extra_field_set</code>() function sets the extra
field with ID (two-byte signature) <var class="Ar">extra_field_id</var> and
index <var class="Ar">extra_field_index</var> for the file at position
<var class="Ar">index</var> in the zip archive. The extra field's data will be
set to <var class="Ar">extra_field_data</var> and length
<var class="Ar">len</var>. If a new entry shall be appended, set
<var class="Ar">extra_field_index</var> to
<code class="Dv">ZIP_EXTRA_FIELD_NEW</code>.
<p class="Pp">At least one of the following <var class="Ar">flags</var> must be
set:</p>
<div class="Bd-indent">
<dl class="Bl-tag">
<dt><a class="permalink" href="#ZIP_FL_CENTRAL"><code class="Dv" id="ZIP_FL_CENTRAL">ZIP_FL_CENTRAL</code></a></dt>
<dd>Set extra field in the archive's central directory.</dd>
<dt><a class="permalink" href="#ZIP_FL_LOCAL"><code class="Dv" id="ZIP_FL_LOCAL">ZIP_FL_LOCAL</code></a></dt>
<dd>Set extra field in the local file headers.</dd>
</dl>
</div>
<p class="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 <code class="Fn">zip_file_extra_field_set</code>() since they
are set by <a class="Xr" href="libzip.html">libzip(3)</a> automatically when
needed.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
Upon successful completion 0 is returned. Otherwise, -1 is returned and the
error code in <var class="Ar">archive</var> is set to indicate the error.
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<code class="Fn">zip_file_extra_field_set</code>() fails if:
<dl class="Bl-tag">
<dt>[<a class="permalink" href="#ZIP_ER_INVAL"><code class="Er" id="ZIP_ER_INVAL">ZIP_ER_INVAL</code></a>]</dt>
<dd>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 <var class="Ar">extra_field_index</var> is too
large.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_MEMORY"><code class="Er" id="ZIP_ER_MEMORY">ZIP_ER_MEMORY</code></a>]</dt>
<dd>Required memory could not be allocated.</dd>
<dt>[<a class="permalink" href="#ZIP_ER_NOENT"><code class="Er" id="ZIP_ER_NOENT">ZIP_ER_NOENT</code></a>]</dt>
<dd><var class="Ar">index</var> is not a valid file index in
<var class="Ar">archive</var>.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_file_extra_field_delete.html">zip_file_extra_field_delete(3)</a>,
<a class="Xr" href="zip_file_extra_field_get.html">zip_file_extra_field_get(3)</a>,
<a class="Xr" href="zip_file_extra_fields_count.html">zip_file_extra_fields_count(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_file_extra_field_set</code>() was added in libzip 0.11.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,123 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_file_extra_field_set.mdoc -- set extra field for file in zip
.\" Copyright (C) 2012-2017 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_file_extra_field_set\fR
\- set extra field for file in zip
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIint\fR
.br
.PD 0
.HP 4n
\fBzip_file_extra_field_set\fR(\fIzip_t\ *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);
.PD
.SH "DESCRIPTION"
The
\fBzip_file_extra_field_set\fR()
function sets the extra field with ID (two-byte signature)
\fIextra_field_id\fR
and index
\fIextra_field_index\fR
for the file at position
\fIindex\fR
in the zip archive.
The extra field's data will be set to
\fIextra_field_data\fR
and length
\fIlen\fR.
If a new entry shall be appended, set
\fIextra_field_index\fR
to
\fRZIP_EXTRA_FIELD_NEW\fR.
.PP
At least one of the following
\fIflags\fR
must be set:
.RS 6n
.TP 18n
\fRZIP_FL_CENTRAL\fR
Set extra field in the archive's central directory.
.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
\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
\fIarchive\fR
is set to indicate the error.
.SH "ERRORS"
\fBzip_file_extra_field_set\fR()
fails if:
.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
\fIextra_field_index\fR
is too large.
.TP 19n
[\fRZIP_ER_MEMORY\fR]
Required memory could not be allocated.
.TP 19n
[\fRZIP_ER_NOENT\fR]
\fIindex\fR
is not a valid file index in
\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 "HISTORY"
\fBzip_file_extra_field_set\fR()
was added in libzip 0.11.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,115 @@
.\" zip_file_extra_field_set.mdoc -- set extra field for file in zip
.\" Copyright (C) 2012-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_FILE_EXTRA_FIELD_SET 3
.Os
.Sh NAME
.Nm zip_file_extra_field_set
.Nd set extra field for file in zip
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft int
.Fn zip_file_extra_field_set "zip_t *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"
.Sh DESCRIPTION
The
.Fn zip_file_extra_field_set
function sets the extra field with ID (two-byte signature)
.Ar extra_field_id
and index
.Ar extra_field_index
for the file at position
.Ar index
in the zip archive.
The extra field's data will be set to
.Ar extra_field_data
and length
.Ar len .
If a new entry shall be appended, set
.Ar extra_field_index
to
.Dv ZIP_EXTRA_FIELD_NEW .
.Pp
At least one of the following
.Ar flags
must be set:
.Bl -tag -width ZIP_FL_CENTRALXX -offset indent
.It Dv ZIP_FL_CENTRAL
Set extra field in the archive's central directory.
.It Dv ZIP_FL_LOCAL
Set extra field in the local file headers.
.El
.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
.Fn zip_file_extra_field_set
since they are set by
.Xr libzip 3
automatically when needed.
.Sh RETURN VALUES
Upon successful completion 0 is returned.
Otherwise, \-1 is returned and the error code in
.Ar archive
is set to indicate the error.
.Sh ERRORS
.Fn zip_file_extra_field_set
fails if:
.Bl -tag -width Er
.It Bq Er ZIP_ER_INVAL
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
.Ar extra_field_index
is too large.
.It Bq Er ZIP_ER_MEMORY
Required memory could not be allocated.
.It Bq Er ZIP_ER_NOENT
.Ar index
is not a valid file index in
.Ar archive .
.El
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_file_extra_field_delete 3 ,
.Xr zip_file_extra_field_get 3 ,
.Xr zip_file_extra_fields_count 3
.Sh HISTORY
.Fn zip_file_extra_field_set
was added in libzip 0.11.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,149 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_file_extra_fields_count.mdoc -- count extra field for file in zip
Copyright (C) 2012-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_FILE_EXTRA_FIELDS_COUNT(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_FILE_EXTRA_FIELDS_COUNT(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_FILE_EXTRA_FIELDS_COUNT(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_file_extra_fields_count</code>,
<code class="Nm">zip_file_extra_fields_count_by_id</code> &#x2014;
<div class="Nd">count extra fields for file in zip</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">zip_int16_t</var>
<br/>
<code class="Fn">zip_file_extra_fields_count</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
index</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t
flags</var>);</p>
<p class="Pp"><var class="Ft">zip_int16_t</var>
<br/>
<code class="Fn">zip_file_extra_fields_count_by_id</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
index</var>, <var class="Fa" style="white-space: nowrap;">zip_uint16_t
extra_field_id</var>,
<var class="Fa" style="white-space: nowrap;">zip_flags_t flags</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_file_extra_fields_count</code>() function counts the
extra fields for the file at position <var class="Ar">index</var> in the zip
archive.
<p class="Pp">The following <var class="Ar">flags</var> are supported:</p>
<div class="Bd-indent">
<dl class="Bl-tag">
<dt><a class="permalink" href="#ZIP_FL_CENTRAL"><code class="Dv" id="ZIP_FL_CENTRAL">ZIP_FL_CENTRAL</code></a></dt>
<dd>Count extra fields from the archive's central directory.</dd>
<dt><a class="permalink" href="#ZIP_FL_LOCAL"><code class="Dv" id="ZIP_FL_LOCAL">ZIP_FL_LOCAL</code></a></dt>
<dd>Count extra fields from the local file headers.</dd>
<dt><a class="permalink" href="#ZIP_FL_UNCHANGED"><code class="Dv" id="ZIP_FL_UNCHANGED">ZIP_FL_UNCHANGED</code></a></dt>
<dd>Count the original unchanged extra fields, ignoring any changes made.</dd>
</dl>
</div>
<p class="Pp">The <code class="Fn">zip_file_extra_fields_count_by_id</code>()
function counts the extra fields with ID (two-byte signature)
<var class="Ar">extra_field_id</var>. The other arguments are the same as
for <code class="Fn">zip_file_extra_fields_count</code>().</p>
<p class="Pp">Extra fields that are the same in the central directory and the
local file header are merged into one. Therefore, the counts with
<code class="Dv">ZIP_FL_CENTRAL</code> and
<code class="Dv">ZIP_FL_LOCAL</code> do not need to add up to the same value
as when given <code class="Dv">ZIP_FL_CENTRAL|ZIP_FL_LOCAL</code> at the
same time.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
Upon successful completion, the requested number of extra fields is returned.
Otherwise, -1 is returned and the error code in <var class="Ar">archive</var>
is set to indicate the error.
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<code class="Fn">zip_file_extra_fields_count</code>() and
<code class="Fn">zip_file_extra_fields_count_by_id</code>() fail if:
<dl class="Bl-tag">
<dt>[<a class="permalink" href="#ZIP_ER_NOENT"><code class="Er" id="ZIP_ER_NOENT">ZIP_ER_NOENT</code></a>]</dt>
<dd><var class="Ar">index</var> is not a valid file index in
<var class="Ar">archive</var>.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_file_extra_field_delete.html">zip_file_extra_field_delete(3)</a>,
<a class="Xr" href="zip_file_extra_field_get.html">zip_file_extra_field_get(3)</a>,
<a class="Xr" href="zip_file_extra_field_set.html">zip_file_extra_field_set(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_file_extra_fields_count</code>() and
<code class="Fn">zip_file_extra_fields_count_by_id</code>() were added in
libzip 0.11.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,124 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_file_extra_fields_count.mdoc -- count extra field for file in zip
.\" Copyright (C) 2012-2017 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\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"
\fB#include <zip.h>\fR
.sp
\fIzip_int16_t\fR
.br
.PD 0
.HP 4n
\fBzip_file_extra_fields_count\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_flags_t\ flags\fR);
.PD
.PP
\fIzip_int16_t\fR
.br
.PD 0
.HP 4n
\fBzip_file_extra_fields_count_by_id\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_uint16_t\ extra_field_id\fR, \fIzip_flags_t\ flags\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_file_extra_fields_count\fR()
function counts the extra fields for the file at position
\fIindex\fR
in the zip archive.
.PP
The following
\fIflags\fR
are supported:
.RS 6n
.TP 18n
\fRZIP_FL_CENTRAL\fR
Count extra fields from the archive's central directory.
.TP 18n
\fRZIP_FL_LOCAL\fR
Count extra fields from the local file headers.
.TP 18n
\fRZIP_FL_UNCHANGED\fR
Count the original unchanged extra fields, ignoring any changes made.
.RE
.PP
The
\fBzip_file_extra_fields_count_by_id\fR()
function counts the extra fields with ID (two-byte signature)
\fIextra_field_id\fR.
The other arguments are the same as for
\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
\fRZIP_FL_CENTRAL\fR
and
\fRZIP_FL_LOCAL\fR
do not need to add up to the same value as when given
\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
\fIarchive\fR
is set to indicate the error.
.SH "ERRORS"
\fBzip_file_extra_fields_count\fR()
and
\fBzip_file_extra_fields_count_by_id\fR()
fail if:
.TP 19n
[\fRZIP_ER_NOENT\fR]
\fIindex\fR
is not a valid file index in
\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 "HISTORY"
\fBzip_file_extra_fields_count\fR()
and
\fBzip_file_extra_fields_count_by_id\fR()
were added in libzip 0.11.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,113 @@
.\" zip_file_extra_fields_count.mdoc -- count extra field for file in zip
.\" Copyright (C) 2012-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_FILE_EXTRA_FIELDS_COUNT 3
.Os
.Sh NAME
.Nm zip_file_extra_fields_count ,
.Nm zip_file_extra_fields_count_by_id
.Nd count extra fields for file in zip
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft zip_int16_t
.Fn zip_file_extra_fields_count "zip_t *archive" "zip_uint64_t index" "zip_flags_t flags"
.Ft zip_int16_t
.Fn zip_file_extra_fields_count_by_id "zip_t *archive" "zip_uint64_t index" "zip_uint16_t extra_field_id" "zip_flags_t flags"
.Sh DESCRIPTION
The
.Fn zip_file_extra_fields_count
function counts the extra fields for the file at position
.Ar index
in the zip archive.
.Pp
The following
.Ar flags
are supported:
.Bl -tag -width ZIP_FL_CENTRALXX -offset indent
.It Dv ZIP_FL_CENTRAL
Count extra fields from the archive's central directory.
.It Dv ZIP_FL_LOCAL
Count extra fields from the local file headers.
.It Dv ZIP_FL_UNCHANGED
Count the original unchanged extra fields, ignoring any changes made.
.El
.Pp
The
.Fn zip_file_extra_fields_count_by_id
function counts the extra fields with ID (two-byte signature)
.Ar extra_field_id .
The other arguments are the same as for
.Fn zip_file_extra_fields_count .
.Pp
Extra fields that are the same in the central directory and the local file
header are merged into one.
Therefore, the counts with
.Dv ZIP_FL_CENTRAL
and
.Dv ZIP_FL_LOCAL
do not need to add up to the same value as when given
.Dv ZIP_FL_CENTRAL|ZIP_FL_LOCAL
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
.Ar archive
is set to indicate the error.
.Sh ERRORS
.Fn zip_file_extra_fields_count
and
.Fn zip_file_extra_fields_count_by_id
fail if:
.Bl -tag -width Er
.It Bq Er ZIP_ER_NOENT
.Ar index
is not a valid file index in
.Ar archive .
.\" TODO: _zip_read_local_ef errors
.El
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_file_extra_field_delete 3 ,
.Xr zip_file_extra_field_get 3 ,
.Xr zip_file_extra_field_set 3
.Sh HISTORY
.Fn zip_file_extra_fields_count
and
.Fn zip_file_extra_fields_count_by_id
were added in libzip 0.11.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,142 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_file_get_comment.mdoc -- get comment for file in zip
Copyright (C) 2006-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_FILE_GET_COMMENT(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_FILE_GET_COMMENT(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_FILE_GET_COMMENT(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_file_get_comment</code> &#x2014;
<div class="Nd">get comment for file in zip</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">const char *</var>
<br/>
<code class="Fn">zip_file_get_comment</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
index</var>, <var class="Fa" style="white-space: nowrap;">zip_uint32_t
*lenp</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t
flags</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_file_get_comment</code>() function returns the comment
for the file at position <var class="Ar">index</var> in the zip archive. The
name is in UTF-8 encoding unless <code class="Dv">ZIP_FL_ENC_RAW</code> was
specified (see below). This pointer should not be modified or
<a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/free.html">free(3)</a>'d, and becomes invalid when
<var class="Ar">archive</var> is closed. If <var class="Ar">lenp</var> is not
<code class="Dv">NULL</code>, the integer to which it points will be set to
the length of the comment. If <var class="Ar">flags</var> is set to
<code class="Dv">ZIP_FL_UNCHANGED</code>, the original unchanged comment is
returned.
<p class="Pp">Additionally, the following <var class="Ar">flags</var> are
supported:</p>
<div class="Bd-indent">
<dl class="Bl-tag">
<dt><a class="permalink" href="#ZIP_FL_ENC_RAW"><code class="Dv" id="ZIP_FL_ENC_RAW">ZIP_FL_ENC_RAW</code></a></dt>
<dd>Return the unmodified comment as it is in the ZIP archive.</dd>
<dt><a class="permalink" href="#ZIP_FL_ENC_GUESS"><code class="Dv" id="ZIP_FL_ENC_GUESS">ZIP_FL_ENC_GUESS</code></a></dt>
<dd>(Default.) Guess the encoding of the comment in the ZIP archive and
convert it to UTF-8, if necessary.</dd>
<dt><a class="permalink" href="#ZIP_FL_ENC_STRICT"><code class="Dv" id="ZIP_FL_ENC_STRICT">ZIP_FL_ENC_STRICT</code></a></dt>
<dd>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.</dd>
</dl>
</div>
<i class="Em">Note</i>: ASCII is a subset of both CP-437 and UTF-8.
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
Upon successful completion, a pointer to the comment is returned, or
<code class="Dv">NULL</code> if there is no comment. In case of an error,
<code class="Dv">NULL</code> is returned and the error code in
<var class="Ar">archive</var> is set to indicate the error.
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<code class="Fn">zip_file_get_comment</code>() fails if:
<dl class="Bl-tag">
<dt>[<a class="permalink" href="#ZIP_ER_INVAL"><code class="Er" id="ZIP_ER_INVAL">ZIP_ER_INVAL</code></a>]</dt>
<dd><var class="Ar">index</var> is not a valid file index in
<var class="Ar">archive</var>.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_file_set_comment.html">zip_file_set_comment(3)</a>,
<a class="Xr" href="zip_get_archive_comment.html">zip_get_archive_comment(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_file_get_comment</code>() was added in libzip 0.11.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,125 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_file_get_comment.mdoc -- get comment for file in zip
.\" Copyright (C) 2006-2017 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" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_file_get_comment\fR
\- get comment for file in zip
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIconst char *\fR
.br
.PD 0
.HP 4n
\fBzip_file_get_comment\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_uint32_t\ *lenp\fR, \fIzip_flags_t\ flags\fR);
.PD
.SH "DESCRIPTION"
The
\fBzip_file_get_comment\fR()
function returns the comment for the file at position
\fIindex\fR
in the zip archive.
The name is in UTF-8 encoding unless
\fRZIP_FL_ENC_RAW\fR
was specified (see below).
This pointer should not be modified or
free(3)'d,
and becomes invalid when
\fIarchive\fR
is closed.
If
\fIlenp\fR
is not
\fRNULL\fR,
the integer to which it points will be set to the length of the
comment.
If
\fIflags\fR
is set to
\fRZIP_FL_UNCHANGED\fR,
the original unchanged comment is returned.
.PP
Additionally, the following
\fIflags\fR
are supported:
.RS 6n
.TP 21n
\fRZIP_FL_ENC_RAW\fR
Return the unmodified comment as it is in the ZIP archive.
.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 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
\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
\fRNULL\fR
if there is no comment.
In case of an error,
\fRNULL\fR
is returned and the error code in
\fIarchive\fR
is set to indicate the error.
.SH "ERRORS"
\fBzip_file_get_comment\fR()
fails if:
.TP 19n
[\fRZIP_ER_INVAL\fR]
\fIindex\fR
is not a valid file index in
\fIarchive\fR.
.SH "SEE ALSO"
libzip(3),
zip_file_set_comment(3),
zip_get_archive_comment(3)
.SH "HISTORY"
\fBzip_file_get_comment\fR()
was added in libzip 0.11.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,118 @@
.\" zip_file_get_comment.mdoc -- get comment for file in zip
.\" Copyright (C) 2006-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_FILE_GET_COMMENT 3
.Os
.Sh NAME
.Nm zip_file_get_comment
.Nd get comment for file in zip
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft const char *
.Fn zip_file_get_comment "zip_t *archive" "zip_uint64_t index" "zip_uint32_t *lenp" "zip_flags_t flags"
.Sh DESCRIPTION
The
.Fn zip_file_get_comment
function returns the comment for the file at position
.Ar index
in the zip archive.
The name is in UTF-8 encoding unless
.Dv ZIP_FL_ENC_RAW
was specified (see below).
This pointer should not be modified or
.Xr free 3 Ap d ,
and becomes invalid when
.Ar archive
is closed.
If
.Ar lenp
is not
.Dv NULL ,
the integer to which it points will be set to the length of the
comment.
If
.Ar flags
is set to
.Dv ZIP_FL_UNCHANGED ,
the original unchanged comment is returned.
.Pp
Additionally, the following
.Ar flags
are supported:
.Bl -tag -width ZIP_FL_ENC_STRICTXX -offset indent
.It Dv ZIP_FL_ENC_RAW
Return the unmodified comment as it is in the ZIP archive.
.It Dv ZIP_FL_ENC_GUESS
(Default.)
Guess the encoding of the comment in the ZIP archive and convert it
to UTF-8, if necessary.
.It Dv ZIP_FL_ENC_STRICT
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.
.El
.Em Note :
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
.Dv NULL
if there is no comment.
In case of an error,
.Dv NULL
is returned and the error code in
.Ar archive
is set to indicate the error.
.Sh ERRORS
.Fn zip_file_get_comment
fails if:
.Bl -tag -width Er
.It Bq Er ZIP_ER_INVAL
.Ar index
is not a valid file index in
.Ar archive .
.El
.Sh SEE ALSO
.Xr libzip 3 ,
.Xr zip_file_set_comment 3 ,
.Xr zip_get_archive_comment 3
.Sh HISTORY
.Fn zip_file_get_comment
was added in libzip 0.11.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,95 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_file_get_error.mdoc -- extract zip_error from zip_file
Copyright (C) 2014-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_FILE_GET_ERROR(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_FILE_GET_ERROR(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_FILE_GET_ERROR(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_file_get_error</code> &#x2014;
<div class="Nd">extract zip_error from zip_file</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">zip_error_t *</var>
<br/>
<code class="Fn">zip_file_get_error</code>(<var class="Fa" style="white-space: nowrap;">zip_file_t
*zf</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<code class="Fn">zip_file_get_error</code>() function returns the zip_error
associated with the zip_file <var class="Ar">zf</var>.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_file_get_error</code>() was added in libzip 1.0.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,62 @@
.\" Automatically generated from an mdoc input file. Do not edit.
.\" zip_file_get_error.mdoc -- extract zip_error from zip_file
.\" Copyright (C) 2014-2017 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_GET_ERROR" "3" "December 18, 2017" "NiH" "Library Functions Manual"
.nh
.if n .ad l
.SH "NAME"
\fBzip_file_get_error\fR
\- extract zip_error from zip_file
.SH "LIBRARY"
libzip (-lzip)
.SH "SYNOPSIS"
\fB#include <zip.h>\fR
.sp
\fIzip_error_t *\fR
.br
.PD 0
.HP 4n
\fBzip_file_get_error\fR(\fIzip_file_t\ *zf\fR);
.PD
.SH "DESCRIPTION"
\fBzip_file_get_error\fR()
function returns the zip_error associated with the zip_file
\fIzf\fR.
.SH "SEE ALSO"
libzip(3)
.SH "HISTORY"
\fBzip_file_get_error\fR()
was added in libzip 1.0.
.SH "AUTHORS"
Dieter Baron <\fIdillo@nih.at\fR>
and
Thomas Klausner <\fItk@giga.or.at\fR>

View File

@@ -0,0 +1,57 @@
.\" zip_file_get_error.mdoc -- extract zip_error from zip_file
.\" Copyright (C) 2014-2017 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.
.\"
.Dd December 18, 2017
.Dt ZIP_FILE_GET_ERROR 3
.Os
.Sh NAME
.Nm zip_file_get_error
.Nd extract zip_error from zip_file
.Sh LIBRARY
libzip (-lzip)
.Sh SYNOPSIS
.In zip.h
.Ft zip_error_t *
.Fn zip_file_get_error "zip_file_t *zf"
.Sh DESCRIPTION
.Fn zip_file_get_error
function returns the zip_error associated with the zip_file
.Ar zf .
.Sh SEE ALSO
.Xr libzip 3
.Sh HISTORY
.Fn zip_file_get_error
was added in libzip 1.0.
.Sh AUTHORS
.An -nosplit
.An Dieter Baron Aq Mt dillo@nih.at
and
.An Thomas Klausner Aq Mt tk@giga.or.at

View File

@@ -0,0 +1,176 @@
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
zip_file_get_external_attributes.mdoc -- get external attributes for file in zip
Copyright (C) 2013-2017 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.
-->
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/>
<title>ZIP_FILE_GET_EXTERNAL_ATTRIBUTES(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">ZIP_FILE_GET_EXTERNAL_ATTRIBUTES(3)</td>
<td class="head-vol">Library Functions Manual</td>
<td class="head-rtitle">ZIP_FILE_GET_EXTERNAL_ATTRIBUTES(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">zip_file_get_external_attributes</code> &#x2014;
<div class="Nd">get external attributes for file in zip</div>
</section>
<section class="Sh">
<h1 class="Sh" id="LIBRARY"><a class="permalink" href="#LIBRARY">LIBRARY</a></h1>
libzip (-lzip)
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">zip.h</a>&gt;</code>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">zip_file_get_external_attributes</code>(<var class="Fa" style="white-space: nowrap;">zip_t
*archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t
index</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t
flags</var>, <var class="Fa" style="white-space: nowrap;">zip_uint8_t
*opsys</var>, <var class="Fa" style="white-space: nowrap;">zip_uint32_t
*attributes</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
The <code class="Fn">zip_file_get_external_attributes</code>() function returns
the operating system and external attributes for the file at position
<var class="Ar">index</var> in the zip archive. The external attributes
usually contain the operating system-specific file permissions. If
<var class="Ar">flags</var> is set to
<code class="Dv">ZIP_FL_UNCHANGED</code>, the original unchanged values are
returned. If <var class="Ar">opsys</var> or <var class="Ar">attributes</var>
are <code class="Dv">NULL</code>, they are not filled in.
<p class="Pp">The following operating systems are defined by the zip
specification:</p>
<ul class="Bl-item Bd-indent Bl-compact">
<li><a class="permalink" href="#ZIP_OPSYS_ACORN_RISC"><code class="Dv" id="ZIP_OPSYS_ACORN_RISC">ZIP_OPSYS_ACORN_RISC</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_ALTERNATE_MVS"><code class="Dv" id="ZIP_OPSYS_ALTERNATE_MVS">ZIP_OPSYS_ALTERNATE_MVS</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_AMIGA"><code class="Dv" id="ZIP_OPSYS_AMIGA">ZIP_OPSYS_AMIGA</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_ATARI_ST"><code class="Dv" id="ZIP_OPSYS_ATARI_ST">ZIP_OPSYS_ATARI_ST</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_BEOS"><code class="Dv" id="ZIP_OPSYS_BEOS">ZIP_OPSYS_BEOS</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_CPM"><code class="Dv" id="ZIP_OPSYS_CPM">ZIP_OPSYS_CPM</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_DOS"><code class="Dv" id="ZIP_OPSYS_DOS">ZIP_OPSYS_DOS</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_MACINTOSH"><code class="Dv" id="ZIP_OPSYS_MACINTOSH">ZIP_OPSYS_MACINTOSH</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_MVS"><code class="Dv" id="ZIP_OPSYS_MVS">ZIP_OPSYS_MVS</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_OPENVMS"><code class="Dv" id="ZIP_OPSYS_OPENVMS">ZIP_OPSYS_OPENVMS</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_OS_2"><code class="Dv" id="ZIP_OPSYS_OS_2">ZIP_OPSYS_OS_2</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_OS_400"><code class="Dv" id="ZIP_OPSYS_OS_400">ZIP_OPSYS_OS_400</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_OS_X"><code class="Dv" id="ZIP_OPSYS_OS_X">ZIP_OPSYS_OS_X</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_TANDEM"><code class="Dv" id="ZIP_OPSYS_TANDEM">ZIP_OPSYS_TANDEM</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_UNIX"><code class="Dv" id="ZIP_OPSYS_UNIX">ZIP_OPSYS_UNIX</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_VFAT"><code class="Dv" id="ZIP_OPSYS_VFAT">ZIP_OPSYS_VFAT</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_VM_CMS"><code class="Dv" id="ZIP_OPSYS_VM_CMS">ZIP_OPSYS_VM_CMS</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_VSE"><code class="Dv" id="ZIP_OPSYS_VSE">ZIP_OPSYS_VSE</code></a></li>
<li><a class="permalink" href="#ZIP_OPSYS_WINDOWS_NTFS"><code class="Dv" id="ZIP_OPSYS_WINDOWS_NTFS">ZIP_OPSYS_WINDOWS_NTFS</code></a>
(uncommon, use <code class="Dv">ZIP_OPSYS_DOS</code> instead)</li>
<li><a class="permalink" href="#ZIP_OPSYS_Z_SYSTEM"><code class="Dv" id="ZIP_OPSYS_Z_SYSTEM">ZIP_OPSYS_Z_SYSTEM</code></a></li>
</ul>
<p class="Pp">The defines above follow the PKWARE Inc. Appnote; please note that
the InfoZIP Appnote has a slightly different mapping.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
Upon successful completion, 0 is returned. In case of an error,
<code class="Dv">-1</code> is returned and the error code in
<var class="Ar">archive</var> is set to indicate the error.
</section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
The following code can be used to expand <var class="Ar">attributes</var> if the
operating system is <code class="Dv">ZIP_OPSYS_DOS</code>.
<div class="Bd Pp">
<pre>
#include &lt;sys/stat.h&gt;
#define FA_RDONLY 0x01 // FILE_ATTRIBUTE_READONLY
#define FA_DIREC 0x10 // FILE_ATTRIBUTE_DIRECTORY
static mode_t
_zip_dos_attr2mode(zip_uint32_t attr)
{
mode_t m = S_IRUSR | S_IRGRP | S_IROTH;
if (0 == (attr &amp; FA_RDONLY))
m |= S_IWUSR | S_IWGRP | S_IWOTH;
if (attr &amp; FA_DIREC)
m = (S_IFDIR | (m &amp; ~S_IFMT)) | S_IXUSR | S_IXGRP | S_IXOTH;
return m;
}
</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<code class="Fn">zip_file_get_external_attributes</code>() fails if:
<dl class="Bl-tag">
<dt>[<a class="permalink" href="#ZIP_ER_INVAL"><code class="Er" id="ZIP_ER_INVAL">ZIP_ER_INVAL</code></a>]</dt>
<dd><var class="Ar">index</var> is not a valid file index in
<var class="Ar">archive</var>.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" href="libzip.html">libzip(3)</a>,
<a class="Xr" href="zip_file_set_external_attributes.html">zip_file_set_external_attributes(3)</a>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<code class="Fn">zip_file_get_external_attributes</code>() was added in libzip
0.11.2.
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<span class="An">Dieter Baron</span>
&lt;<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>&gt; and
<span class="An">Thomas Klausner</span>
&lt;<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>&gt;
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">December 18, 2017</td>
<td class="foot-os">NetBSD 8.99.35</td>
</tr>
</table>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More