Add generated HTML man pages.
diff --git a/man/ZIP_SOURCE_GET_ARGS.html b/man/ZIP_SOURCE_GET_ARGS.html new file mode 100644 index 0000000..3a26273 --- /dev/null +++ b/man/ZIP_SOURCE_GET_ARGS.html
@@ -0,0 +1,70 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">ZIP_SOURCE_GET_ARGS</b> — <span class="Nd">validate and cast + arguments to source callback</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">type *</var> +<br/> +<b class="Fn">ZIP_SOURCE_GET_ARGS</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">ZIP_SOURCE_GET_ARGS</b>() macro casts + <var class="Ar">data</var> to a pointer to <var class="Ar">type</var>. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +On success, <b class="Fn">ZIP_SOURCE_GET_ARGS</b>() returns + <var class="Ar">data</var>. In case of error, it returns + <code class="Dv">NULL</code> and sets <var class="Ar">error</var>. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">ZIP_SOURCE_GET_ARGS</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">len</var> is less than the size of + <var class="Ar">type</var></dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source_function.html">zip_source_function(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">ZIP_SOURCE_GET_ARGS</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/libzip.html b/man/libzip.html new file mode 100644 index 0000000..a0be8a0 --- /dev/null +++ b/man/libzip.html
@@ -0,0 +1,167 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">libzip</b> — <span class="Nd">library for manipulating zip + archives</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +<b class="Nm">libzip</b> is a library for reading, creating, and modifying zip + archives. +<div class="Pp"></div> +The main design criteria for <b class="Nm">libzip</b> were: +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;">Do not create corrupt files, + even in case of errors.</li> + <li class="It-bullet" style="margin-top: 0.00em;">Do not delete data.</li> + <li class="It-bullet" style="margin-top: 0.00em;">Be efficient.</li> +</ul> +<div class="Pp"></div> +For this reason, when modifying zip archives, <b class="Nm">libzip</b> writes to + a temporary file and replaces the original zip archive atomically. +<div class="Pp"></div> +Below there are two sections listing functions: one for how to read from zip + archives and one for how to create/modify them. +<h1 class="Sh" id="READING_ZIP_ARCHIVES">READING ZIP ARCHIVES</h1> +<h2 class="Ss" id="open_archive">open archive</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_open.html">zip_open(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_fdopen.html">zip_fdopen(3)</a></li> +</ul> +<h2 class="Ss" id="find_files">find files</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_name_locate.html">zip_name_locate(3)</a></li> +</ul> +<h2 class="Ss" id="read_files">read files</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_fopen.html">zip_fopen(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_fopen_encrypted.html">zip_fopen_encrypted(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_fopen_index.html">zip_fopen_index(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_fopen_index_encrypted.html">zip_fopen_index_encrypted(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_fread.html">zip_fread(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_fseek.html">zip_fseek(3)</a> + (uncompressed files only)</li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_ftell.html">zip_ftell(3)</a> + (uncompressed files only)</li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_fclose.html">zip_fclose(3)</a></li> +</ul> +<h2 class="Ss" id="close_archive">close archive</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_close.html">zip_close(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_discard.html">zip_discard(3)</a></li> +</ul> +<h2 class="Ss" id="miscellaneous">miscellaneous</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_stat.html">zip_stat(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_get_comment.html">zip_file_get_comment(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_get_external_attributes.html">zip_file_get_external_attributes(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_get_archive_comment.html">zip_get_archive_comment(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_get_archive_flag.html">zip_get_archive_flag(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_get_name.html">zip_get_name(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_get_num_entries.html">zip_get_num_entries(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_set_default_password.html">zip_set_default_password(3)</a></li> +</ul> +<h1 class="Sh" id="CREATING/MODIFYING_ZIP_ARCHIVES">CREATING/MODIFYING ZIP + ARCHIVES</h1> +<h2 class="Ss" id="create/open_archive">create/open archive</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_open.html">zip_open(3)</a></li> +</ul> +<h2 class="Ss" id="add/change_files_and_directories">add/change files and + directories</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_dir_add.html">zip_dir_add(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_add.html">zip_file_add(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_replace.html">zip_file_replace(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_set_comment.html">zip_file_set_comment(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_set_external_attributes.html">zip_file_set_external_attributes(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_set_encryption.html">zip_file_set_encryption(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_set_mtime.html">zip_file_set_mtime(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_set_file_compression.html">zip_set_file_compression(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_source_buffer.html">zip_source_buffer(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_source_file.html">zip_source_file(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_source_filep.html">zip_source_filep(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_source_free.html">zip_source_free(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_source_function.html">zip_source_function(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_source_zip.html">zip_source_zip(3)</a></li> +</ul> +<h2 class="Ss" id="rename_files">rename files</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_rename.html">zip_rename(3)</a></li> +</ul> +<h2 class="Ss" id="delete_files">delete files</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_delete.html">zip_delete(3)</a></li> +</ul> +<h2 class="Ss" id="revert_changes">revert changes</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_unchange.html">zip_unchange(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_unchange_all.html">zip_unchange_all(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_unchange_archive.html">zip_unchange_archive(3)</a></li> +</ul> +<h2 class="Ss" id="read/modify_extra_fields">read/modify extra fields</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_extra_field_by_id.html">zip_file_extra_field_by_id(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_extra_field_delete.html">zip_file_extra_field_delete(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_extra_field_delete_by_id.html">zip_file_extra_field_delete_by_id(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_extra_field_get.html">zip_file_extra_field_get(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_extra_field_set.html">zip_file_extra_field_set(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_extra_fields_count.html">zip_file_extra_fields_count(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_extra_fields_count_by_id.html">zip_file_extra_fields_count_by_id(3)</a></li> +</ul> +<h2 class="Ss" id="close_archive">close archive</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_close.html">zip_close(3)</a></li> +</ul> +<h2 class="Ss" id="miscellaneous">miscellaneous</h2> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_libzip_version.html">zip_libzip_version(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_register_progress_callback_with_state.html">zip_register_progress_callback_with_state(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_set_archive_comment.html">zip_set_archive_comment(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_set_archive_flag.html">zip_set_archive_flag(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_source.html">zip_source(3)</a></li> +</ul> +<h1 class="Sh" id="ERROR_HANDLING">ERROR HANDLING</h1> +<ul class="Bl-bullet"> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_error_to_str.html">zip_error_to_str(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_strerror.html">zip_strerror(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_file_strerror.html">zip_file_strerror(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_error_get.html">zip_error_get(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_error_get_sys_type.html">zip_error_get_sys_type(3)</a></li> + <li class="It-bullet" style="margin-top: 0.00em;"><a class="Xr" href="zip_errors.html">zip_errors(3)</a></li> +</ul> +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_add.html b/man/zip_add.html new file mode 100644 index 0000000..085c0cf --- /dev/null +++ b/man/zip_add.html
@@ -0,0 +1,81 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_add</b>, <b class="Nm">zip_replace</b> — + <span class="Nd">add file to zip archive or replace file in zip archive + (obsolete interface)</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_add</b>(<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>); +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_replace</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_add</b>() 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 + <b class="Fn">zip_replace</b>() 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. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_add</b>() 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 + <b class="Fn">zip_file_add</b>() instead. +<div class="Pp"></div> +<b class="Fn">zip_replace</b>() 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 + <b class="Fn">zip_file_replace</b>() instead. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_add_dir.html b/man/zip_add_dir.html new file mode 100644 index 0000000..da0fb8c --- /dev/null +++ b/man/zip_add_dir.html
@@ -0,0 +1,61 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_add_dir</b> — <span class="Nd">add directory to zip + archive (obsolete interface)</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_add_dir</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">const char + *name</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_add_dir</b>() 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. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_dir_add.html">zip_dir_add(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_add_dir</b>() 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 + <b class="Fn">zip_dir_add</b>() instead. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_close.html b/man/zip_close.html new file mode 100644 index 0000000..7b9f05a --- /dev/null +++ b/man/zip_close.html
@@ -0,0 +1,124 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_close</b> — <span class="Nd">close zip archive</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_close</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_close</b>() 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, <b class="Fn">zip_close</b>() fails; <var class="Ar">archive</var> is + left unchanged and must still be freed. +<div class="Pp"></div> +To close and free a zip archive without saving changes, use + <a class="Xr" href="zip_discard.html">zip_discard(3)</a>. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_close</b>() will fail if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_EOF</code>]</dt> + <dd class="It-tag">Unexpected end-of-file found while reading from a + file.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INTERNAL</code>]</dt> + <dd class="It-tag">The callback function of an added or replaced file returned + an error but failed to report which.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag">The <var class="Ar">path</var> argument is + <code class="Dv">NULL</code>.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_NOZIP</code>]</dt> + <dd class="It-tag">File is not a zip archive.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_READ</code>]</dt> + <dd class="It-tag">A file read failed.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_RENAME</code>]</dt> + <dd class="It-tag">A temporary file could not be renamed to its final + name.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_SEEK</code>]</dt> + <dd class="It-tag">A file seek failed.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_TMPOPEN</code>]</dt> + <dd class="It-tag">A temporary file could not be created.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_WRITE</code>]</dt> + <dd class="It-tag">A file write failed.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_ZLIB</code>]</dt> + <dd class="It-tag">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. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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_error_get.html">zip_error_get(3)</a>, + <a class="Xr" href="zip_fdopen.html">zip_fdopen(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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_close</b>() was added in libzip 0.6. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_delete.html b/man/zip_delete.html new file mode 100644 index 0000000..74b537f --- /dev/null +++ b/man/zip_delete.html
@@ -0,0 +1,70 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_delete</b> — <span class="Nd">delete file from zip + archive</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_delete</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + index</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The file at position <var class="Ar">index</var> in the zip archive + <var class="Ar">archive</var> is marked as deleted. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_delete</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_unchange.html">zip_unchange(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_delete</b>() 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>. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_dir_add.html b/man/zip_dir_add.html new file mode 100644 index 0000000..885e4c2 --- /dev/null +++ b/man/zip_dir_add.html
@@ -0,0 +1,102 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_dir_add</b> — <span class="Nd">add directory to zip + archive</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_dir_add</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_dir_add</b>() 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" style="margin-left: 20.00ex;"> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_ENC_GUESS</code></dt> + <dd class="It-tag">Guess encoding of <var class="Ar">name</var> + (default).</dd> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_ENC_UTF_8</code></dt> + <dd class="It-tag">Interpret <var class="Ar">name</var> as UTF-8.</dd> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_ENC_CP437</code></dt> + <dd class="It-tag">Interpret <var class="Ar">name</var> as code page 437 + (CP-437).</dd> +</dl> +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_dir_add</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_EXISTS</code>]</dt> + <dd class="It-tag">There is already an entry called <var class="Ar">name</var> + in the archive.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><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 class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_add.html">zip_add(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_dir_add</b>() was added in libzip 0.11. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>> +<h1 class="Sh" id="CAVEATS">CAVEATS</h1> +<b class="Fn">zip_dir_add</b>() does not look in the file system, it just + creates one entry in the archive for the provided name.</div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_discard.html b/man/zip_discard.html new file mode 100644 index 0000000..36d34d9 --- /dev/null +++ b/man/zip_discard.html
@@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_discard</b> — <span class="Nd">close zip archive and + discard changes</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_discard</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_discard</b>() 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. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_close.html">zip_close(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_discard</b>() was added in libzip 0.11. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_error_clear.html b/man/zip_error_clear.html new file mode 100644 index 0000000..1b42f12 --- /dev/null +++ b/man/zip_error_clear.html
@@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_error_clear</b>, <b class="Nm">zip_file_error_clear</b> + — <span class="Nd">clear error state for archive or file</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_error_clear</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>); +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_file_error_clear</b>(<var class="Fa" style="white-space: nowrap;">zip_file_t + *file</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_error_clear</b>() function clears the error state for the + zip archive <var class="Ar">archive</var>. +<div class="Pp"></div> +The <b class="Fn">zip_file_error_clear</b>() function does the same for the zip + file <var class="Ar">file</var>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_error_get.html">zip_error_get(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_error_clear</b>() and <b class="Fn">zip_file_error_clear</b>() + were added in libzip 0.8. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_error_code_system.html b/man/zip_error_code_system.html new file mode 100644 index 0000000..63d40fe --- /dev/null +++ b/man/zip_error_code_system.html
@@ -0,0 +1,58 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_error_code_system</b> — <span class="Nd">get operating + system error part of zip_error</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_error_code_system</b>(<var class="Fa" style="white-space: nowrap;">const + zip_error_t *ze</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_error_code_system</b>() 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>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_error_code_system</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_error_code_zip.html b/man/zip_error_code_zip.html new file mode 100644 index 0000000..71ea78a --- /dev/null +++ b/man/zip_error_code_zip.html
@@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_error_code_zip</b> — <span class="Nd">get libzip error + part of zip_error</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_error_code_zip</b>(<var class="Fa" style="white-space: nowrap;">const + zip_error_t *ze</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_error_code_zip</b>() function returns the libzip specific + part of the error from the zip_error error <var class="Ar">ze</var>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_error_code_zip</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_error_fini.html b/man/zip_error_fini.html new file mode 100644 index 0000000..36e1ce1 --- /dev/null +++ b/man/zip_error_fini.html
@@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_error_fini</b> — <span class="Nd">clean up zip_error + structure</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_error_fini</b>(<var class="Fa" style="white-space: nowrap;">zip_error_t + *ze</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_error_fini</b>() function cleans up and frees internally + allocated memory of the zip_error pointed to by <var class="Ar">ze</var>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_error_init.html">zip_error_init(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_error_fini</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_error_get.html b/man/zip_error_get.html new file mode 100644 index 0000000..a061235 --- /dev/null +++ b/man/zip_error_get.html
@@ -0,0 +1,115 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_error_get</b>, <b class="Nm">zip_file_error_get</b> — + <span class="Nd">get error codes for archive or file (obsolete + interface)</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_error_get</b>(<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>); +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_file_error_get</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The functions <b class="Fn">zip_error_get</b>() and + <b class="Fn">zip_file_error_get</b>() 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. +<div class="Pp"></div> +For <b class="Fn">zip_error_get</b>(), replace +<div class="Pp"></div> +<div class="Bd" style="margin-left: 5.00ex;"> +<pre class="Li"> +int ze, se; +zip_error_get(za, &ze, &se); +</pre> +</div> +with +<div class="Pp"></div> +<div class="Bd" style="margin-left: 5.00ex;"> +<pre class="Li"> +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 <b class="Fn">zip_file_error_get</b>(), replace +<div class="Pp"></div> +<div class="Bd" style="margin-left: 5.00ex;"> +<pre class="Li"> +int ze, se; +zip_file_error_get(zf, &ze, &se); +</pre> +</div> +with +<div class="Pp"></div> +<div class="Bd" style="margin-left: 5.00ex;"> +<pre class="Li"> +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> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_error_get</b>() was added in libzip 0.6. It was deprecated in + libzip 1.0, use <b class="Fn">zip_get_error</b>(), + <b class="Fn">zip_error_code_zip</b>(), / + <b class="Fn">zip_error_code_system</b>() instead. +<div class="Pp"></div> +<b class="Fn">zip_file_error_get</b>() was added in libzip 0.6. It was + deprecated in libzip 1.0, use <b class="Fn">zip_file_get_error</b>(), + <b class="Fn">zip_error_code_zip</b>(), / + <b class="Fn">zip_error_code_system</b>() instead. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_error_get_sys_type.html b/man/zip_error_get_sys_type.html new file mode 100644 index 0000000..78c5ea2 --- /dev/null +++ b/man/zip_error_get_sys_type.html
@@ -0,0 +1,78 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_error_get_sys_type</b> — <span class="Nd">get type of + system error code (obsolete interface)</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_error_get_sys_type</b>(<var class="Fa" style="white-space: nowrap;">int + ze</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_error_get_sys_type</b>() 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. +<div class="Pp"></div> +Replace +<div class="Pp"></div> +<div class="Bd" style="margin-left: 5.00ex;"> +<pre class="Li"> +int i = zip_error_get_sys_type(ze); +</pre> +</div> +with +<div class="Pp"></div> +<div class="Bd" style="margin-left: 5.00ex;"> +<pre class="Li"> +zip_error_t error; +zip_error_init_with_code(&error, ze); +int i = zip_error_system_type(&error); +</pre> +</div> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_error_get_sys_type</b>() was added in libzip 0.6. It was + deprecated in libzip 1.0, use <b class="Fn">zip_error_system_type</b>() + instead. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_error_init.html b/man/zip_error_init.html new file mode 100644 index 0000000..021ff85 --- /dev/null +++ b/man/zip_error_init.html
@@ -0,0 +1,67 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_error_init</b>, <b class="Nm">zip_error_init_with_code</b> + — <span class="Nd">initialize zip_error structure</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_error_init</b>(<var class="Fa" style="white-space: nowrap;">zip_error_t + *error</var>); +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_error_init_with_code</b>(<var class="Fa" style="white-space: nowrap;">zip_error_t + *error</var>, <var class="Fa" style="white-space: nowrap;">int ze</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_error_init</b>() function initializes the zip_error + pointed to by <var class="Ar">error</var>. <var class="Ar">*error</var> must + be allocated before calling <b class="Fn">zip_error_init</b>(). +<div class="Pp"></div> +The <b class="Fn">zip_error_init_with_code</b>() 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. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_error_fini.html">zip_error_fini(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_error_init</b>() and + <b class="Fn">zip_error_init_with_code</b>() were added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_error_set.html b/man/zip_error_set.html new file mode 100644 index 0000000..d7ec9c2 --- /dev/null +++ b/man/zip_error_set.html
@@ -0,0 +1,61 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_error_set</b> — <span class="Nd">fill in zip_error + structure</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_error_set</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_error_set</b>() 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>. +<div class="Pp"></div> +<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 + <b class="Fn">zip_error</b>(<var class="Fa">set</var>). +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_error_init.html">zip_error_init(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_error_set</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_error_strerror.html b/man/zip_error_strerror.html new file mode 100644 index 0000000..fab4b36 --- /dev/null +++ b/man/zip_error_strerror.html
@@ -0,0 +1,59 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_error_strerror</b> — <span class="Nd">create + human-readable string for zip_error</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">const char *</var> +<br/> +<b class="Fn">zip_error_strerror</b>(<var class="Fa" style="white-space: nowrap;">zip_error_t + *ze</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_error_strerror</b>() 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 <b class="Fn">zip_error_strerror</b>() or until + <a class="Xr" href="zip_error_fini.html">zip_error_fini(3)</a> is called. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_error_strerror</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_error_system_type.html b/man/zip_error_system_type.html new file mode 100644 index 0000000..11be9f9 --- /dev/null +++ b/man/zip_error_system_type.html
@@ -0,0 +1,73 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_error_system_type</b> — <span class="Nd">return type of + system error</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_error_system_type</b>(<var class="Fa" style="white-space: nowrap;">const + zip_error_t *ze</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_error_system_type</b>() 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" style="margin-left: 11.00ex;"> + <dt class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><code class="Dv">ZIP_ET_NONE</code></dt> + <dd class="It-tag">System specific part of <var class="Ar">ze</var> is + unused.</dd> + <dt class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><code class="Dv">ZIP_ET_SYS</code></dt> + <dd class="It-tag">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 class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><code class="Dv">ZIP_ET_ZLIB</code></dt> + <dd class="It-tag">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> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_error_system_type</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_error_to_data.html b/man/zip_error_to_data.html new file mode 100644 index 0000000..8a6a0bb --- /dev/null +++ b/man/zip_error_to_data.html
@@ -0,0 +1,63 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_error_to_data</b> — <span class="Nd">convert zip_error + to return value suitable for ZIP_SOURCE_ERROR</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_error_to_data</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +<b class="Fn">zip_error_to_data</b>() 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. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +<b class="Fn">zip_error_to_data</b>() returns 2*(sizeof int) on success, and -1 + on error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source_function.html">zip_source_function(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_error_to_data</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_error_to_str.html b/man/zip_error_to_str.html new file mode 100644 index 0000000..c247295 --- /dev/null +++ b/man/zip_error_to_str.html
@@ -0,0 +1,84 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_error_to_str</b> — <span class="Nd">get string + representation of zip error (obsolete interface)</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_error_to_str</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_error_to_str</b>() 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. +<div class="Pp"></div> +Replace +<div class="Pp"></div> +<div class="Bd" style="margin-left: 5.00ex;"> +<pre class="Li"> +char buf[BUFSIZE]; +zip_error_to_str(buf, sizeof(buf), ze, se); +printf("%s", buf); +</pre> +</div> +with +<div class="Pp"></div> +<div class="Bd" style="margin-left: 5.00ex;"> +<pre class="Li"> +zip_error_t error; +zip_error_init_with_code(&error, ze); +printf("%s", zip_error_strerror(&error)); +zip_error_fini(&error); +</pre> +</div> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_error_to_str</b>() 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 <b class="Fn">zip_error_init_with_code</b>() and + <b class="Fn">zip_error_strerror</b>() instead. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_errors.html b/man/zip_errors.html new file mode 100644 index 0000000..f6240d5 --- /dev/null +++ b/man/zip_errors.html
@@ -0,0 +1,174 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_errors</b> — <span class="Nd">list of all libzip error + codes</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The following error codes are used by libzip: +<dl class="Bl-tag" style="margin-left: 24.00ex;"> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_CHANGED</code>]</dt> + <dd class="It-tag">Entry has been changed.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_CLOSE</code>]</dt> + <dd class="It-tag">Closing zip archive failed.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_COMPNOTSUPP</code>]</dt> + <dd class="It-tag">Compression method not supported.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_COMPRESSED_DATA</code>]</dt> + <dd class="It-tag">Compressed data invalid.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_CRC</code>]</dt> + <dd class="It-tag">CRC error.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_DELETED</code>]</dt> + <dd class="It-tag">Entry has been deleted.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_ENCRNOTSUPP</code>]</dt> + <dd class="It-tag">Encryption method not supported.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_EOF</code>]</dt> + <dd class="It-tag">Premature end of file.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_EXISTS</code>]</dt> + <dd class="It-tag">File already exists.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_INCONS</code>]</dt> + <dd class="It-tag">Zip archive inconsistent.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_INTERNAL</code>]</dt> + <dd class="It-tag">Internal error.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_INUSE</code>]</dt> + <dd class="It-tag">Resource still in use.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag">Invalid argument.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Malloc failure.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_MULTIDISK</code>]</dt> + <dd class="It-tag">Multi-disk zip archives not supported.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_NOENT</code>]</dt> + <dd class="It-tag">No such file.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_NOPASSWD</code>]</dt> + <dd class="It-tag">No password provided.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_NOZIP</code>]</dt> + <dd class="It-tag">Not a zip archive.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_OK</code>]</dt> + <dd class="It-tag">No error.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_OPEN</code>]</dt> + <dd class="It-tag">Can't open file.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_OPNOTSUPP</code>]</dt> + <dd class="It-tag">Operation not supported.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_RDONLY</code>]</dt> + <dd class="It-tag">Read-only archive.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_READ</code>]</dt> + <dd class="It-tag">Read error.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_REMOVE</code>]</dt> + <dd class="It-tag">Can't remove file.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_RENAME</code>]</dt> + <dd class="It-tag">Renaming temporary file failed.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_SEEK</code>]</dt> + <dd class="It-tag">Seek error.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_TELL</code>]</dt> + <dd class="It-tag">Tell error.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_TMPOPEN</code>]</dt> + <dd class="It-tag">Failure to create temporary file.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_WRITE</code>]</dt> + <dd class="It-tag">Write error.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_WRONGPASSWD</code>]</dt> + <dd class="It-tag">Wrong password provided.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_ZIPCLOSED</code>]</dt> + <dd class="It-tag">Containing zip archive was closed.</dd> + <dt class="It-tag" style="margin-left: -24.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -24.00ex;">[<code class="Er">ZIP_ER_ZLIB</code>]</dt> + <dd class="It-tag">Zlib error.</dd> +</dl> +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_fclose.html b/man/zip_fclose.html new file mode 100644 index 0000000..201338a --- /dev/null +++ b/man/zip_fclose.html
@@ -0,0 +1,59 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_fclose</b> — <span class="Nd">close file in zip + archive</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_fclose</b>(<var class="Fa" style="white-space: nowrap;">zip_file_t + *file</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_fclose</b>() function closes <var class="Ar">file</var> + and frees the memory allocated for it. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, the error code is returned. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_fclose</b>() was added in libzip 0.6. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_fdopen.html b/man/zip_fdopen.html new file mode 100644 index 0000000..eb534a9 --- /dev/null +++ b/man/zip_fdopen.html
@@ -0,0 +1,128 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_fdopen</b> — <span class="Nd">open zip archive using + open file descriptor</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_t *</var> +<br/> +<b class="Fn">zip_fdopen</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</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 + <b class="Nm">zip_fdopen</b> 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 + <b class="Nm">zip_fdopen</b>. 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="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 13.00ex;"> + <dt class="It-tag" style="margin-left: -13.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -13.00ex;"><code class="Dv">ZIP_CHECKCONS</code></dt> + <dd class="It-tag">Perform additional stricter consistency checks on the + archive, and error if they fail.</dd> +</dl> +</div> +<div class="Pp"></div> +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. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion <b class="Fn">zip_fdopen</b>() 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. +<h1 class="Sh" id="ERRORS">ERRORS</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" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INCONS</code>]</dt> + <dd class="It-tag">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 class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag">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 <b class="Nm">zip_fdopen</b>, see + <a class="Sx" href="#DESCRIPTION">DESCRIPTION</a>.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_NOZIP</code>]</dt> + <dd class="It-tag">The file specified by <var class="Ar">fd</var> is not a zip + archive.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_OPEN</code>]</dt> + <dd class="It-tag">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 class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_READ</code>]</dt> + <dd class="It-tag">A read error occurred; see <var class="Va">errno</var> for + details.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_SEEK</code>]</dt> + <dd class="It-tag">The file specified by <var class="Ar">fd</var> does not + allow seeks.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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_to_str.html">zip_error_to_str(3)</a>, + <a class="Xr" href="zip_open.html">zip_open(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_fdopen</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_add.html b/man/zip_file_add.html new file mode 100644 index 0000000..c780083 --- /dev/null +++ b/man/zip_file_add.html
@@ -0,0 +1,145 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_add</b>, <b class="Nm">zip_file_replace</b> — + <span class="Nd">add file to zip archive or replace file in zip archive</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_file_add</b>(<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>); +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_file_replace</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_file_add</b>() adds a file to a zip archive, + while <b class="Fn">zip_file_replace</b>() 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 <b class="Fn">zip_file_add</b>()), while + <var class="Ar">index</var> specifies which file should be replaced (for + <b class="Fn">zip_file_replace</b>()). 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" style="margin-left: 20.00ex;"> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_OVERWRITE</code></dt> + <dd class="It-tag">Overwrite any existing file of the same name. For + <b class="Nm">zip_file_add</b> only.</dd> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_ENC_GUESS</code></dt> + <dd class="It-tag">Guess encoding of <var class="Ar">name</var> + (default).</dd> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_ENC_UTF_8</code></dt> + <dd class="It-tag">Interpret <var class="Ar">name</var> as UTF-8.</dd> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_ENC_CP437</code></dt> + <dd class="It-tag">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>. +<div class="Pp"></div> +<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 + <b class="Nm">zip_file_add</b> or <b class="Nm">zip_file_replace</b> call. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, <b class="Fn">zip_file_add</b>() returns the index + of the new file in the archive, and <b class="Fn">zip_file_replace</b>() + returns 0. Otherwise, -1 is returned and the error code in + <var class="Ar">archive</var> is set to indicate the error. +<h1 class="Sh" id="EXAMPLES">EXAMPLES</h1> +<div class="Bd" style="margin-left: 5.00ex;"> +<pre class="Li"> +zip_source_t *s; +const char buf="teststring"; + +if ((s=zip_source_buffer(archive, buffer, sizeof(buf), 0)) == NULL || + zip_file_add(archive, name, s, ZIP_FL_ENC_UTF_8) < 0) { + zip_source_free(s); + printf("error adding file: %s\n", zip_strerror(archive)); +} +</pre> +</div> +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_file_add</b>() and <b class="Fn">zip_file_replace</b>() fail + if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_EXISTS</code>]</dt> + <dd class="It-tag">There is already a file called <var class="Ar">name</var> + in the archive. (Only applies to <b class="Fn">zip_file_add</b>(), and + only if <code class="Dv">ZIP_FL_OVERWRITE</code> is not provided).</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><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 class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_RDONLY</code>]</dt> + <dd class="It-tag">Archive was opened in read-only mode.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_add</b>() and <b class="Fn">zip_file_replace</b>() were + added in libzip 0.11. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_extra_field_delete.html b/man/zip_file_extra_field_delete.html new file mode 100644 index 0000000..f5ee307 --- /dev/null +++ b/man/zip_file_extra_field_delete.html
@@ -0,0 +1,122 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_extra_field_delete</b>, + <b class="Nm">zip_file_extra_field_delete_by_id</b> — + <span class="Nd">delete extra field for file in zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_file_extra_field_delete</b>(<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>); +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_file_extra_field_delete_by_id</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_file_extra_field_delete</b>() 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. +<div class="Pp"></div> +If <var class="Ar">extra_field_index</var> is + <code class="Dv">ZIP_EXTRA_FIELD_ALL</code>, then all extra fields will be + deleted. +<div class="Pp"></div> +The following <var class="Ar">flags</var> are supported: +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 16.00ex;"> + <dt class="It-tag" style="margin-left: -16.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -16.00ex;"><code class="Dv">ZIP_FL_CENTRAL</code></dt> + <dd class="It-tag">Delete extra fields from the archive's central + directory.</dd> + <dt class="It-tag" style="margin-left: -16.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -16.00ex;"><code class="Dv">ZIP_FL_LOCAL</code></dt> + <dd class="It-tag">Delete extra fields from the local file headers.</dd> +</dl> +</div> +<div class="Pp"></div> +The <b class="Fn">zip_file_extra_field_delete_by_id</b>() 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 <b class="Fn">zip_file_extra_field_delete</b>() + (<code class="Dv">ZIP_EXTRA_FIELD_ALL</code> will delete all extra fields of + the specified ID). +<div class="Pp"></div> +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>). +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_file_extra_field_delete</b>() and + <b class="Fn">zip_file_extra_field_delete_by_id</b>() fail if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_NOENT</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_extra_field_delete</b>() and + <b class="Fn">zip_file_extra_field_delete_by_id</b>() were added in libzip + 0.11. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_extra_field_get.html b/man/zip_file_extra_field_get.html new file mode 100644 index 0000000..01fbb22 --- /dev/null +++ b/man/zip_file_extra_field_get.html
@@ -0,0 +1,138 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_extra_field_get</b>, + <b class="Nm">zip_file_extra_field_get_by_id</b> — <span class="Nd">get + extra field for file in zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">const zip_uint8_t *</var> +<br/> +<b class="Fn">zip_file_extra_field_get</b>(<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>); +<div class="Pp"></div> +<var class="Ft">const zip_uint8_t *</var> +<br/> +<b class="Fn">zip_file_extra_field_get_by_id</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_file_extra_field_get</b>() 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). +<div class="Pp"></div> +The following <var class="Ar">flags</var> are supported: +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 18.00ex;"> + <dt class="It-tag" style="margin-left: -18.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -18.00ex;"><code class="Dv">ZIP_FL_CENTRAL</code></dt> + <dd class="It-tag">Return extra fields from the archive's central + directory.</dd> + <dt class="It-tag" style="margin-left: -18.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -18.00ex;"><code class="Dv">ZIP_FL_LOCAL</code></dt> + <dd class="It-tag">Return extra fields from the local file headers.</dd> + <dt class="It-tag" style="margin-left: -18.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -18.00ex;"><code class="Dv">ZIP_FL_UNCHANGED</code></dt> + <dd class="It-tag">Return the original unchanged extra fields, ignoring any + changes made.</dd> +</dl> +</div> +<div class="Pp"></div> +The <b class="Fn">zip_file_extra_field_get_by_id</b>() 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 <b class="Fn">zip_file_extra_field_get</b>(). +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_file_extra_field_get</b>() and + <b class="Fn">zip_file_extra_field_get_by_id</b>() fail if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_NOENT</code>]</dt> + <dd class="It-tag"><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> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_extra_field_get</b>() and + <b class="Fn">zip_file_extra_field_get_by_id</b>() were added in libzip 0.11. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>> +<h1 class="Sh" id="CAVEATS">CAVEATS</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 + <b class="Fn">zip_file_extra_field_get</b>() since they are used by + <a class="Xr" href="libzip.html">libzip(3)</a> internally.</div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_extra_field_set.html b/man/zip_file_extra_field_set.html new file mode 100644 index 0000000..cb43b49 --- /dev/null +++ b/man/zip_file_extra_field_set.html
@@ -0,0 +1,112 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_extra_field_set</b> — <span class="Nd">set extra + field for file in zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_file_extra_field_set</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_file_extra_field_set</b>() 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>. +<div class="Pp"></div> +At least one of the following <var class="Ar">flags</var> must be set: +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 16.00ex;"> + <dt class="It-tag" style="margin-left: -16.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -16.00ex;"><code class="Dv">ZIP_FL_CENTRAL</code></dt> + <dd class="It-tag">Set extra field in the archive's central directory.</dd> + <dt class="It-tag" style="margin-left: -16.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -16.00ex;"><code class="Dv">ZIP_FL_LOCAL</code></dt> + <dd class="It-tag">Set extra field in the local file headers.</dd> +</dl> +</div> +<div class="Pp"></div> +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 + <b class="Fn">zip_file_extra_field_set</b>() since they are set by + <a class="Xr" href="libzip.html">libzip(3)</a> automatically when needed. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_file_extra_field_set</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag">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 class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_NOENT</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_extra_field_set</b>() was added in libzip 0.11. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_extra_fields_count.html b/man/zip_file_extra_fields_count.html new file mode 100644 index 0000000..d37b7e8 --- /dev/null +++ b/man/zip_file_extra_fields_count.html
@@ -0,0 +1,117 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_extra_fields_count</b>, + <b class="Nm">zip_file_extra_fields_count_by_id</b> — + <span class="Nd">count extra fields for file in zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int16_t</var> +<br/> +<b class="Fn">zip_file_extra_fields_count</b>(<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>); +<div class="Pp"></div> +<var class="Ft">zip_int16_t</var> +<br/> +<b class="Fn">zip_file_extra_fields_count_by_id</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_file_extra_fields_count</b>() function counts the extra + fields for the file at position <var class="Ar">index</var> in the zip + archive. +<div class="Pp"></div> +The following <var class="Ar">flags</var> are supported: +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 16.00ex;"> + <dt class="It-tag" style="margin-left: -16.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -16.00ex;"><code class="Dv">ZIP_FL_CENTRAL</code></dt> + <dd class="It-tag">Count extra fields from the archive's central + directory.</dd> + <dt class="It-tag" style="margin-left: -16.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -16.00ex;"><code class="Dv">ZIP_FL_LOCAL</code></dt> + <dd class="It-tag">Count extra fields from the local file headers.</dd> + <dt class="It-tag" style="margin-left: -16.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -16.00ex;"><code class="Dv">ZIP_FL_UNCHANGED</code></dt> + <dd class="It-tag">Count the original unchanged extra fields, ignoring any + changes made.</dd> +</dl> +</div> +<div class="Pp"></div> +The <b class="Fn">zip_file_extra_fields_count_by_id</b>() 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 + <b class="Fn">zip_file_extra_fields_count</b>(). +<div class="Pp"></div> +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. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_file_extra_fields_count</b>() and + <b class="Fn">zip_file_extra_fields_count_by_id</b>() fail if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_NOENT</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_extra_fields_count</b>() and + <b class="Fn">zip_file_extra_fields_count_by_id</b>() were added in libzip + 0.11. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_get_comment.html b/man/zip_file_get_comment.html new file mode 100644 index 0000000..643647a --- /dev/null +++ b/man/zip_file_get_comment.html
@@ -0,0 +1,105 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_get_comment</b> — <span class="Nd">get comment for + file in zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">const char *</var> +<br/> +<b class="Fn">zip_file_get_comment</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_file_get_comment</b>() 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. +<div class="Pp"></div> +Additionally, the following <var class="Ar">flags</var> are supported: +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 19.00ex;"> + <dt class="It-tag" style="margin-left: -19.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -19.00ex;"><code class="Dv">ZIP_FL_ENC_RAW</code></dt> + <dd class="It-tag">Return the unmodified comment as it is in the ZIP + archive.</dd> + <dt class="It-tag" style="margin-left: -19.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -19.00ex;"><code class="Dv">ZIP_FL_ENC_GUESS</code></dt> + <dd class="It-tag">(Default.) Guess the encoding of the comment in the ZIP + archive and convert it to UTF-8, if necessary.</dd> + <dt class="It-tag" style="margin-left: -19.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -19.00ex;"><code class="Dv">ZIP_FL_ENC_STRICT</code></dt> + <dd class="It-tag">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. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_file_get_comment</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_get_comment</b>() was added in libzip 0.11. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_get_error.html b/man/zip_file_get_error.html new file mode 100644 index 0000000..1df71f8 --- /dev/null +++ b/man/zip_file_get_error.html
@@ -0,0 +1,54 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_get_error</b> — <span class="Nd">extract zip_error + from zip_file</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_error_t *</var> +<br/> +<b class="Fn">zip_file_get_error</b>(<var class="Fa" style="white-space: nowrap;">zip_file_t + *zf</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +<b class="Fn">zip_file_get_error</b>() function returns the zip_error associated + with the zip_file <var class="Ar">zf</var>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_get_error</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_get_external_attributes.html b/man/zip_file_get_external_attributes.html new file mode 100644 index 0000000..8843c83 --- /dev/null +++ b/man/zip_file_get_external_attributes.html
@@ -0,0 +1,131 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <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"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_get_external_attributes</b> — <span class="Nd">get + external attributes for file in zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_file_get_external_attributes</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_file_get_external_attributes</b>() 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. +<div class="Pp"></div> +The following operating systems are defined by the zip specification: +<ul class="Bl-item" style="margin-left: 6.00ex;"> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_ACORN_RISC</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_ALTERNATE_MVS</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_AMIGA</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_ATARI_ST</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_BEOS</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_CPM</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_DOS</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_MACINTOSH</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_MVS</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_OPENVMS</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_OS_2</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_OS_400</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_OS_X</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_TANDEM</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_UNIX</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_VFAT</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_VM_CMS</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_VSE</code></li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_WINDOWS_NTFS</code> + (uncommon, use <code class="Dv">ZIP_OPSYS_DOS</code> instead)</li> + <li class="It-item" style="margin-top: 0.00em;"><code class="Dv">ZIP_OPSYS_Z_SYSTEM</code></li> +</ul> +<div class="Pp"></div> +The defines above follow the PKWARE Inc. Appnote; please note that the InfoZIP + Appnote has a slightly different mapping. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="EXAMPLES">EXAMPLES</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="Pp"></div> +<div class="Bd" style="margin-left: 0.00ex;"> +<pre class="Li"> +#include <sys/stat.h> + +#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 & FA_RDONLY)) + m |= S_IWUSR | S_IWGRP | S_IWOTH; + + if (attr & FA_DIREC) + m = (S_IFDIR | (m & ~S_IFMT)) | S_IXUSR | S_IXGRP | S_IXOTH; + + return m; +} +</pre> +</div> +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_file_get_external_attributes</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_get_external_attributes</b>() was added in libzip 0.11.2. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_rename.html b/man/zip_file_rename.html new file mode 100644 index 0000000..e836c05 --- /dev/null +++ b/man/zip_file_rename.html
@@ -0,0 +1,100 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_FILE_RENAME(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_FILE_RENAME(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_FILE_RENAME(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_rename</b> — <span class="Nd">rename file in zip + archive</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_file_rename</b>(<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;">const char + *name</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t + flags</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The file at position <var class="Ar">index</var> in the zip archive + <var class="Ar">archive</var> is renamed to <var class="Ar">name</var>. The + <var class="Ar">flags</var> argument can be any of: +<dl class="Bl-tag" style="margin-left: 20.00ex;"> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_ENC_GUESS</code></dt> + <dd class="It-tag">Guess encoding of <var class="Ar">name</var> + (default).</dd> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_ENC_UTF_8</code></dt> + <dd class="It-tag">Interpret <var class="Ar">name</var> as UTF-8.</dd> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_ENC_CP437</code></dt> + <dd class="It-tag">Interpret <var class="Ar">name</var> as code page 437 + (CP-437).</dd> +</dl> +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_rename</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_DELETED</code>]</dt> + <dd class="It-tag">The file to be renamed has been deleted from the + archive.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_EXISTS</code>]</dt> + <dd class="It-tag">There is already a file called <var class="Ar">name</var> + in the archive.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>, <var class="Ar">name is</var> + <code class="Dv">NULL</code>, the empty string, or not a valid UTF-8 + encoded string. Also a file cannot be renamed to a directory or vice + versa. Directories are denoted by a trailing slash.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_unchange.html">zip_unchange(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_rename</b>() was added in libzip 0.11. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_set_comment.html b/man/zip_file_set_comment.html new file mode 100644 index 0000000..e68ddea --- /dev/null +++ b/man/zip_file_set_comment.html
@@ -0,0 +1,105 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_FILE_SET_COMMENT(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_FILE_SET_COMMENT(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_FILE_SET_COMMENT(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_set_comment</b> — <span class="Nd">set comment for + file in zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_file_set_comment</b>(<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;">const char + *comment</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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_file_set_comment</b>() function sets the comment for the + file at position <var class="Ar">index</var> in the zip archive to + <var class="Ar">comment</var> of length <var class="Ar">len</var>. If + <var class="Ar">comment</var> is <code class="Dv">NULL</code> and + <var class="Ar">len</var> is 0, the file comment will be removed. The + <var class="Ar">flags</var> argument can be any of: +<dl class="Bl-tag" style="margin-left: 20.00ex;"> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_ENC_GUESS</code></dt> + <dd class="It-tag">Guess encoding of <var class="Ar">comment</var> + (default).</dd> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_ENC_UTF_8</code></dt> + <dd class="It-tag">Interpret <var class="Ar">comment</var> as UTF-8.</dd> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;"><code class="Dv">ZIP_FL_ENC_CP437</code></dt> + <dd class="It-tag">Interpret <var class="Ar">comment</var> as code page 437 + (CP-437).</dd> +</dl> +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">archive</var> is set to indicate the + error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_file_set_comment</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>, or <var class="Ar">len</var> is less than 0 + or longer than the maximum comment length in a zip file (65535), or + <var class="Ar">comment</var> is not a valid UTF-8 encoded string.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_RDONLY</code>]</dt> + <dd class="It-tag">The <var class="Ar">archive</var> was opened in read-only + mode.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_file_get_comment.html">zip_file_get_comment(3)</a>, + <a class="Xr" href="zip_get_archive_comment.html">zip_get_archive_comment(3)</a>, + <a class="Xr" href="zip_set_archive_comment.html">zip_set_archive_comment(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_set_comment</b>() was added in libzip 0.11. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_set_encryption.html b/man/zip_file_set_encryption.html new file mode 100644 index 0000000..922923c --- /dev/null +++ b/man/zip_file_set_encryption.html
@@ -0,0 +1,116 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_FILE_SET_ENCRYPTION(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_FILE_SET_ENCRYPTION(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_FILE_SET_ENCRYPTION(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_set_encryption</b> — <span class="Nd">set + encryption method for file in zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_file_set_encryption</b>(<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 + method</var>, <var class="Fa" style="white-space: nowrap;">const char + *password</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_file_set_encryption</b>() function sets the encryption + method for the file at position <var class="Ar">index</var> in the zip archive + to <var class="Ar">method</var> using the password + <var class="Ar">password</var>. The <var class="Ar">method</var> is the same + as returned by <a class="Xr" href="zip_stat.html">zip_stat(3)</a>. For the + <var class="Ar">method</var> argument, currently only the following values are + supported: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;"><code class="Dv">ZIP_EM_NONE</code></dt> + <dd class="It-tag">No encryption.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;"><code class="Dv">ZIP_EM_AES_128</code></dt> + <dd class="It-tag">Winzip AES-128 encryption.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;"><code class="Dv">ZIP_EM_AES_192</code></dt> + <dd class="It-tag">Winzip AES-192 encryption.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;"><code class="Dv">ZIP_EM_AES_256</code></dt> + <dd class="It-tag">Winzip AES-256 encryption.</dd> +</dl> +<div class="Pp"></div> +If <var class="Ar">password</var> is <code class="Dv">NULL</code>, the default + password provided by + <a class="Xr" href="zip_set_default_password.html">zip_set_default_password(3)</a> + is used. +<div class="Pp"></div> +The current encryption method for a file in a zip archive can be determined + using <a class="Xr" href="zip_stat.html">zip_stat(3)</a>. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">archive</var> is set to indicate the + error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_file_set_encryption</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_ENCRNOTSUPP</code>]</dt> + <dd class="It-tag">Unsupported compression method requested.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>, or the argument combination is + invalid.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_RDONLY</code>]</dt> + <dd class="It-tag">Read-only zip file, no changes allowed.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_set_default_password.html">zip_set_default_password(3)</a>, + <a class="Xr" href="zip_stat.html">zip_stat(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_set_encryption</b>() was added in libzip 1.2.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_set_external_attributes.html b/man/zip_file_set_external_attributes.html new file mode 100644 index 0000000..97c721d --- /dev/null +++ b/man/zip_file_set_external_attributes.html
@@ -0,0 +1,86 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_FILE_SET_EXTERNAL_ATTRIBUTES(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_FILE_SET_EXTERNAL_ATTRIBUTES(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_FILE_SET_EXTERNAL_ATTRIBUTES(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_set_external_attributes</b> — <span class="Nd">set + external attributes for file in zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_file_set_external_attributes</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_file_set_external_attributes</b>() function sets the + operating system and external attributes for the file at position + <var class="Ar">index</var> in the zip archive. Currently, no + <var class="Ar">flags</var> are supported. +<div class="Pp"></div> +For a list of known <var class="Ar">opsys</var> values, see + <a class="Xr" href="zip_file_get_external_attributes.html">zip_file_get_external_attributes(3)</a>. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">archive</var> is set to indicate the + error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_file_set_external_attributes</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_RDONLY</code>]</dt> + <dd class="It-tag">The <var class="Ar">archive</var> was opened in read-only + mode.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_file_get_external_attributes.html">zip_file_get_external_attributes(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_set_external_attributes</b>() was added in libzip 0.11.2. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_set_mtime.html b/man/zip_file_set_mtime.html new file mode 100644 index 0000000..fa9a247 --- /dev/null +++ b/man/zip_file_set_mtime.html
@@ -0,0 +1,81 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_FILE_SET_MTIME(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_FILE_SET_MTIME(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_FILE_SET_MTIME(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_set_mtime</b> — <span class="Nd">set last + modification time (mtime) for file in zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_file_set_mtime</b>(<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;">time_t mtime</var>, + <var class="Fa" style="white-space: nowrap;">zip_flags_t flags</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_file_set_mtime</b>() function sets the last modification + time (mtime) for the file at position <var class="Ar">index</var> in the zip + archive to <var class="Ar">mtime</var>. Currently, no support for any + <var class="Ar">flags</var> is implemented. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">archive</var> is set to indicate the + error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_file_set_mtime</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_RDONLY</code>]</dt> + <dd class="It-tag">The <var class="Ar">archive</var> was opened in read-only + mode.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_stat.html">zip_stat(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_set_mtime</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_file_strerror.html b/man/zip_file_strerror.html new file mode 100644 index 0000000..ed5930c --- /dev/null +++ b/man/zip_file_strerror.html
@@ -0,0 +1,70 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_FILE_STRERROR(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_FILE_STRERROR(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_FILE_STRERROR(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_file_strerror</b>, <b class="Nm">zip_strerror</b> — + <span class="Nd">get string representation for a zip error</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">const char *</var> +<br/> +<b class="Fn">zip_file_strerror</b>(<var class="Fa" style="white-space: nowrap;">zip_file_t + *file</var>); +<div class="Pp"></div> +<var class="Ft">const char *</var> +<br/> +<b class="Fn">zip_strerror</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_strerror</b>() function returns a string describing the + last error for the zip archive <var class="Ar">archive</var>, while the + <b class="Fn">zip_file_strerror</b>() function does the same for a zip file + <var class="Ar">file</var> (one file in an archive). The returned string must + not be modified or freed, and becomes invalid when + <var class="Ar">archive</var> or <var class="Ar">file</var>, respectively, is + closed or on the next call to <b class="Fn">zip_strerror</b>() or + <b class="Fn">zip_file_strerror</b>(), respectively, for the same archive. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +<b class="Fn">zip_file_strerror</b>() and <b class="Fn">zip_strerror</b>() + return a pointer to the error string. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_error_to_str.html">zip_error_to_str(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_file_strerror</b>() and <b class="Fn">zip_strerror</b>() were + added in libzip 0.6. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_fopen.html b/man/zip_fopen.html new file mode 100644 index 0000000..ec0daf3 --- /dev/null +++ b/man/zip_fopen.html
@@ -0,0 +1,151 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_FOPEN(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_FOPEN(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_FOPEN(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_fopen</b>, <b class="Nm">zip_fopen_index</b> — + <span class="Nd">open file in zip archive for reading</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_file_t *</var> +<br/> +<b class="Fn">zip_fopen</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">const char + *fname</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t + flags</var>); +<div class="Pp"></div> +<var class="Ft">zip_file_t *</var> +<br/> +<b class="Fn">zip_fopen_index</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_fopen</b>() function opens the file name + <var class="Ar">fname</var> in <var class="Ar">archive</var>. The + <var class="Ar">flags</var> argument specifies how the name lookup should be + done, according to the values are described in + <a class="Xr" href="zip_name_locate.html">zip_name_locate(3)</a>. Also, the + following values may be <i class="Em">or</i><span class="No">'ed</span> to it. +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;"><code class="Dv">ZIP_FL_COMPRESSED</code></dt> + <dd class="It-tag">Read the compressed data. Otherwise the data is + uncompressed by <b class="Fn">zip_fread</b>().</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;"><code class="Dv">ZIP_FL_UNCHANGED</code></dt> + <dd class="It-tag">Read the original data from the zip archive, ignoring any + changes made to the file.</dd> +</dl> +</div> +<div class="Pp"></div> +The <b class="Fn">zip_fopen_index</b>() function opens the file at position + <var class="Ar">index</var>. +<div class="Pp"></div> +If encrypted data is encountered, the functions call + <a class="Xr" href="zip_fopen_encrypted.html">zip_fopen_encrypted(3)</a> or + <a class="Xr" href="zip_fopen_index_encrypted.html">zip_fopen_index_encrypted(3)</a> + respectively, using the default password set with + <a class="Xr" href="zip_set_default_password.html">zip_set_default_password(3)</a>. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, a <var class="Ft">struct zip_file</var> pointer is + returned. Otherwise, <code class="Dv">NULL</code> is returned and the error + code in <var class="Ar">archive</var> is set to indicate the error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_CHANGED</code>]</dt> + <dd class="It-tag">The file data has been changed.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_COMPNOTSUPP</code>]</dt> + <dd class="It-tag">The compression method used is not supported.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_ENCRNOTSUPP</code>]</dt> + <dd class="It-tag">The encryption method used is not supported.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_NOPASSWD</code>]</dt> + <dd class="It-tag">The file is encrypted, but no password has been + provided.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_READ</code>]</dt> + <dd class="It-tag">A file read error occurred.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_SEEK</code>]</dt> + <dd class="It-tag">A file seek error occurred.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_WRONGPASSWD</code>]</dt> + <dd class="It-tag">The provided password does not match the password used for + encryption. Note that some incorrect passwords are not detected by the + check done by <b class="Fn">zip_fopen</b>().</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_ZLIB</code>]</dt> + <dd class="It-tag">Initializing the zlib stream failed.</dd> +</dl> +<div class="Pp"></div> +The function <b class="Fn">zip_fopen</b>() may also fail and set + <var class="Va">zip_err</var> for any of the errors specified for the routine + <a class="Xr" href="zip_name_locate.html">zip_name_locate(3)</a>. +<div class="Pp"></div> +The function <b class="Fn">zip_fopen_index</b>() may also fail with + <code class="Er">ZIP_ER_INVAL</code> if <var class="Ar">index</var> is + invalid. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_fclose.html">zip_fclose(3)</a>, + <a class="Xr" href="zip_fread.html">zip_fread(3)</a>, + <a class="Xr" href="zip_fseek.html">zip_fseek(3)</a>, + <a class="Xr" href="zip_get_num_entries.html">zip_get_num_entries(3)</a>, + <a class="Xr" href="zip_name_locate.html">zip_name_locate(3)</a>, + <a class="Xr" href="zip_set_default_password.html">zip_set_default_password(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_fopen</b>() and <b class="Fn">zip_fopen_index</b>() were added + in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_fopen_encrypted.html b/man/zip_fopen_encrypted.html new file mode 100644 index 0000000..5663376 --- /dev/null +++ b/man/zip_fopen_encrypted.html
@@ -0,0 +1,102 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_FOPEN_ENCRYPTED(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_FOPEN_ENCRYPTED(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_FOPEN_ENCRYPTED(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_fopen_encrypted</b>, + <b class="Nm">zip_fopen_index_encrypted</b> — <span class="Nd">open + encrypted file in zip archive for reading</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_file_t *</var> +<br/> +<b class="Fn">zip_fopen_encrypted</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">const char + *fname</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t + flags</var>, <var class="Fa" style="white-space: nowrap;">const char + *password</var>); +<div class="Pp"></div> +<var class="Ft">zip_file_t *</var> +<br/> +<b class="Fn">zip_fopen_index_encrypted</b>(<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;">const char + *password</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_fopen_encrypted</b>() function opens the encrypted file + name <var class="Ar">fname</var> in <var class="Ar">archive</var> using the + password given in the <var class="Ar">password</var> argument. The + <var class="Ar">flags</var> argument are the same as for + <a class="Xr" href="zip_fopen.html">zip_fopen(3)</a>. +<div class="Pp"></div> +The <b class="Fn">zip_fopen_index_encrypted</b>() function opens the file at + position <var class="Ar">index</var>, see + <a class="Xr" href="zip_fopen_index.html">zip_fopen_index(3)</a>. These + functions are called automatically by + <a class="Xr" href="zip_fopen.html">zip_fopen(3)</a>; you only need to call + them if you want to specify a non-default password (see + <a class="Xr" href="zip_set_default_password.html">zip_set_default_password(3)</a>). +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, a <var class="Ft">struct zip_file</var> pointer is + returned. Otherwise, <code class="Dv">NULL</code> is returned and the error + code in <var class="Ar">archive</var> is set to indicate the error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<dl class="Bl-tag" style="margin-left: 20.00ex;"> + <dt class="It-tag" style="margin-left: -20.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -20.00ex;">[<code class="Er">ZIP_ER_NOPASSWD</code>]</dt> + <dd class="It-tag">No password was provided.</dd> +</dl> +<div class="Pp"></div> +The function <b class="Fn">zip_fopen_encrypted</b>() may also fail and set + <var class="Va">zip_err</var> for any of the errors specified for the routine + <a class="Xr" href="zip_fopen.html">zip_fopen(3)</a>. +<div class="Pp"></div> +The function <b class="Fn">zip_fopen_index_encrypted</b>() may also fail and set + <var class="Va">zip_err</var> for any of the errors specified for the routine + <a class="Xr" href="zip_fopen_index.html">zip_fopen_index(3)</a>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_fclose.html">zip_fclose(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_get_num_entries.html">zip_get_num_entries(3)</a>, + <a class="Xr" href="zip_name_locate.html">zip_name_locate(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_fopen_encrypted</b>() and + <b class="Fn">zip_fopen_index_encrypted</b>() were added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_fread.html b/man/zip_fread.html new file mode 100644 index 0000000..2fe42fb --- /dev/null +++ b/man/zip_fread.html
@@ -0,0 +1,65 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_FREAD(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_FREAD(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_FREAD(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_fread</b> — <span class="Nd">read from file</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_fread</b>(<var class="Fa" style="white-space: nowrap;">zip_file_t + *file</var>, <var class="Fa" style="white-space: nowrap;">void *buf</var>, + <var class="Fa" style="white-space: nowrap;">zip_uint64_t nbytes</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_fread</b>() function reads at most + <var class="Ar">nbytes</var> bytes from <var class="Ar">file</var> into + <var class="Ar">buf</var>. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +If successful, the number of bytes actually read is returned. Otherwise, -1 is + returned. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_fclose.html">zip_fclose(3)</a>, + <a class="Xr" href="zip_fopen.html">zip_fopen(3)</a>, + <a class="Xr" href="zip_fseek.html">zip_fseek(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_fread</b>() was added in libzip 0.6. In libzip 0.10 the return + type was changed from <var class="Vt">ssize_t</var> to + <var class="Vt">zip_int64_t</var>. In libzip 0.10 the type of + <var class="Ar">nbytes</var> was changed from <var class="Vt">size_t</var> to + <var class="Vt">zip_uint64_t</var>. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_fseek.html b/man/zip_fseek.html new file mode 100644 index 0000000..efa3d1e --- /dev/null +++ b/man/zip_fseek.html
@@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_FSEEK(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_FSEEK(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_FSEEK(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_fseek</b> — <span class="Nd">seek in file</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int8_t</var> +<br/> +<b class="Fn">zip_fseek</b>(<var class="Fa" style="white-space: nowrap;">zip_file_t + *file</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t + offset</var>, <var class="Fa" style="white-space: nowrap;">int whence</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_fseek</b>() function seeks to the specified + <var class="Ar">offset</var> relative to <var class="Ar">whence</var>, just + like <a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/fseek.html">fseek(3)</a>. +<div class="Pp"></div> +<b class="Nm">zip_fseek</b> only works on uncompressed (stored) data. When + called on compressed data it will return an error. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +If successful, <b class="Nm">zip_fseek</b> returns 0. Otherwise, -1 is returned. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_fclose.html">zip_fclose(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_ftell.html">zip_ftell(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_fseek</b>() was added in libzip 1.2.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_ftell.html b/man/zip_ftell.html new file mode 100644 index 0000000..09ed325 --- /dev/null +++ b/man/zip_ftell.html
@@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_FTELL(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_FTELL(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_FTELL(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_ftell</b> — <span class="Nd">tell position in + file</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_ftell</b>(<var class="Fa" style="white-space: nowrap;">zip_file_t + *file</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_ftell</b>() function reports the current offset in the + file. +<div class="Pp"></div> +<b class="Nm">zip_ftell</b> only works on uncompressed (stored) data. When + called on compressed data it will return an error. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +If successful, <b class="Nm">zip_ftell</b> returns the current file position. + Otherwise, -1 is returned. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_fclose.html">zip_fclose(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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_ftell</b>() was added in libzip 1.2.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_get_archive_comment.html b/man/zip_get_archive_comment.html new file mode 100644 index 0000000..aca7e63 --- /dev/null +++ b/man/zip_get_archive_comment.html
@@ -0,0 +1,92 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_GET_ARCHIVE_COMMENT(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_GET_ARCHIVE_COMMENT(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_GET_ARCHIVE_COMMENT(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_get_archive_comment</b> — <span class="Nd">get zip + archive comment</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">const char *</var> +<br/> +<b class="Fn">zip_get_archive_comment</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">int *lenp</var>, + <var class="Fa" style="white-space: nowrap;">zip_flags_t flags</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_get_archive_comment</b>() function returns the comment for + the entire 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. +<div class="Pp"></div> +Additionally, the following <var class="Ar">flags</var> are supported: +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 19.00ex;"> + <dt class="It-tag" style="margin-left: -19.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -19.00ex;"><code class="Dv">ZIP_FL_ENC_RAW</code></dt> + <dd class="It-tag">Return the unmodified archive comment as it is in the ZIP + archive.</dd> + <dt class="It-tag" style="margin-left: -19.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -19.00ex;"><code class="Dv">ZIP_FL_ENC_GUESS</code></dt> + <dd class="It-tag">(Default.) Guess the encoding of the archive comment in the + ZIP archive and convert it to UTF-8, if necessary.</dd> + <dt class="It-tag" style="margin-left: -19.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -19.00ex;"><code class="Dv">ZIP_FL_ENC_STRICT</code></dt> + <dd class="It-tag">Follow the ZIP specification for file names and extend it + to the archive comment, thus also expecting it in CP-437 encoding. Convert + it to UTF-8.</dd> +</dl> +</div> +<i class="Em">Note</i>: ASCII is a subset of both CP-437 and UTF-8. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, a pointer to the comment is returned, or + <code class="Dv">NULL</code> if there is no comment. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_get_file_comment.html">zip_get_file_comment(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_get_archive_comment</b>() was added in libzip 0.7. In libzip + 0.11 the type of <var class="Ar">flags</var> was changed from + <var class="Vt">int</var> to <var class="Vt">zip_flags_t</var>. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_get_archive_flag.html b/man/zip_get_archive_flag.html new file mode 100644 index 0000000..d70f754 --- /dev/null +++ b/man/zip_get_archive_flag.html
@@ -0,0 +1,77 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_GET_ARCHIVE_FLAG(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_GET_ARCHIVE_FLAG(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_GET_ARCHIVE_FLAG(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_get_archive_flag</b> — <span class="Nd">get status flags + for zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_get_archive_flag</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t + flag</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t + flags</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_get_archive_flag</b>() function returns if the flag + <var class="Ar">flag</var> is set for the archive + <var class="Ar">archive</var>. The archive flags might have been changed with + <b class="Fn">zip_set_archive_flag</b>(); if <var class="Ar">flags</var> is + set to <code class="Dv">ZIP_FL_UNCHANGED</code>, the original unchanged flags + are tested. +<div class="Pp"></div> +Supported flags are: +<dl class="Bl-tag" style="margin-left: 18.00ex;"> + <dt class="It-tag" style="margin-left: -18.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -18.00ex;"><code class="Dv">ZIP_AFL_RDONLY</code></dt> + <dd class="It-tag">The archive is read-only.</dd> +</dl> +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +<b class="Fn">zip_get_archive_flag</b>() returns 1 if <var class="Ar">flag</var> + is set for <var class="Ar">archive</var>, 0 if not, and -1 if an error + occurred. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_set_archive_flag.html">zip_set_archive_flag(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_get_archive_flag</b>() was added in libzip 0.9. In libzip 0.11 + the type of <var class="Ar">flag</var> was changed from + <var class="Vt">int</var> to <var class="Vt">zip_flags_t m</var> and the type + of <var class="Ar">flags</var> was changed from <var class="Vt">int</var> to + <var class="Vt">zip_flags_t</var>. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_get_error.html b/man/zip_get_error.html new file mode 100644 index 0000000..b9c941b --- /dev/null +++ b/man/zip_get_error.html
@@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_GET_ERROR(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_GET_ERROR(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_GET_ERROR(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_get_error</b> — <span class="Nd">get zip error for + archive</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_error_t *</var> +<br/> +<b class="Fn">zip_get_error</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_get_error</b>() function returns the zip error for the zip + archive <var class="Ar">archive</var>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_get_error</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_get_file_comment.html b/man/zip_get_file_comment.html new file mode 100644 index 0000000..1fa85a4 --- /dev/null +++ b/man/zip_get_file_comment.html
@@ -0,0 +1,63 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_GET_FILE_COMMENT(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_GET_FILE_COMMENT(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_GET_FILE_COMMENT(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_get_file_comment</b> — <span class="Nd">get comment for + file in zip (obsolete interface)</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">const char *</var> +<br/> +<b class="Fn">zip_get_file_comment</b>(<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;">int *lenp</var>, + <var class="Fa" style="white-space: nowrap;">int flags</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_get_file_comment</b>() function is the obsolete version of + <a class="Xr" href="zip_file_get_comment.html">zip_file_get_comment(3)</a>. + The only differences are the types of the <var class="Ar">lenp</var> and + <var class="Ar">flags</var> arguments. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_file_get_comment.html">zip_file_get_comment(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_get_file_comment</b>() was added in libzip 0.7. 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 <b class="Fn">zip_file_get_comment</b>() + instead. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_get_name.html b/man/zip_get_name.html new file mode 100644 index 0000000..0786b65 --- /dev/null +++ b/man/zip_get_name.html
@@ -0,0 +1,114 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_GET_NAME(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_GET_NAME(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_GET_NAME(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_get_name</b> — <span class="Nd">get name of file by + index</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">const char *</var> +<br/> +<b class="Fn">zip_get_name</b>(<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>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_get_name</b>() function returns the name of the file at + position <var class="Ar">index</var> in <var class="Ar">archive</var>. The + name is in UTF-8 encoding unless <code class="Dv">ZIP_FL_ENC_RAW</code> was + specified (see below). +<div class="Pp"></div> +If <var class="Ar">flags</var> is set to + <code class="Dv">ZIP_FL_UNCHANGED</code>, the original unchanged filename is + returned. The returned string must not be modified or freed, and becomes + invalid when <var class="Ar">archive</var> is closed. +<div class="Pp"></div> +Additionally, the following <var class="Ar">flags</var> are supported: +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 19.00ex;"> + <dt class="It-tag" style="margin-left: -19.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -19.00ex;"><code class="Dv">ZIP_FL_ENC_RAW</code></dt> + <dd class="It-tag">Return the unmodified names as it is in the ZIP + archive.</dd> + <dt class="It-tag" style="margin-left: -19.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -19.00ex;"><code class="Dv">ZIP_FL_ENC_GUESS</code></dt> + <dd class="It-tag">(Default.) Guess the encoding of the name in the ZIP + archive and convert it to UTF-8, if necessary.</dd> + <dt class="It-tag" style="margin-left: -19.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -19.00ex;"><code class="Dv">ZIP_FL_ENC_STRICT</code></dt> + <dd class="It-tag">Follow the ZIP specification and expect CP-437 encoded + names in the ZIP archive (except if they are explicitly marked as UTF-8). + Convert it to UTF-8.</dd> +</dl> +</div> +<i class="Em">Note</i>: ASCII is a subset of both CP-437 and UTF-8. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, a pointer to the name is returned. Otherwise, + <code class="Dv">NULL</code> and the error code in + <var class="Ar">archive</var> is set to indicate the error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_get_name</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_DELETED</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> refers to a file that has been + deleted (see <a class="Xr" href="zip_delete.html">zip_delete(3)</a>).</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>, or <var class="Ar">index</var> points to an + added file and <code class="Dv">ZIP_FL_UNCHANGED</code> is set.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_name_locate.html">zip_name_locate(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_get_name</b>() 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>. In libzip 0.11 the type of + <var class="Ar">flags</var> was changed from <var class="Vt">int</var> to + <var class="Vt">zip_flags_t</var>. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_get_num_entries.html b/man/zip_get_num_entries.html new file mode 100644 index 0000000..93e5101 --- /dev/null +++ b/man/zip_get_num_entries.html
@@ -0,0 +1,67 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_GET_NUM_ENTRIES(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_GET_NUM_ENTRIES(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_GET_NUM_ENTRIES(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_get_num_entries</b> — <span class="Nd">get number of + files in archive</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_get_num_entries</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t + flags</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_get_num_entries</b>() function returns the number of files + in <var class="Ar">archive</var>. If <var class="Ar">flags</var> is set to + <code class="Dv">ZIP_FL_UNCHANGED</code>, the original number of entries is + returned. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +<b class="Fn">zip_get_num_entries</b>() returns the number of files in the zip + archive, or -1 if <var class="Ar">archive</var> is + <code class="Dv">NULL</code>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_fopen_index.html">zip_fopen_index(3)</a>, + <a class="Xr" href="zip_stat_index.html">zip_stat_index(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_get_num_entries</b>() was added in libzip 0.10. In libzip 0.11 + the return type was changed from <var class="Vt">zip_uint64_t</var> to + <var class="Vt">zip_int64_t</var>. In libzip 0.11 the type of + <var class="Ar">flags</var> was changed from <var class="Vt">int</var> to + <var class="Vt">zip_flags_t</var>. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_get_num_files.html b/man/zip_get_num_files.html new file mode 100644 index 0000000..2775331 --- /dev/null +++ b/man/zip_get_num_files.html
@@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_GET_NUM_FILES(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_GET_NUM_FILES(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_GET_NUM_FILES(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_get_num_files</b> — <span class="Nd">get number of files + in archive (obsolete interface)</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_get_num_files</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +<i class="Em">This function is deprecated</i>. <i class="Em">Use</i> + <a class="Xr" href="zip_get_num_entries.html">zip_get_num_entries(3)</a> + <i class="Em">instead</i>. +<div class="Pp"></div> +The <b class="Fn">zip_get_num_files</b>() function returns the number of files + in <var class="Ar">archive</var>. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +<b class="Fn">zip_get_num_files</b>() returns the number of files in the zip + archive, or -1 if <var class="Ar">archive</var> is + <code class="Dv">NULL</code>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_fopen_index.html">zip_fopen_index(3)</a>, + <a class="Xr" href="zip_stat_index.html">zip_stat_index(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_get_num_files</b>() was added in libzip 0.6. It was deprecated + in libzip 0.11, use + <b class="Fn">zip_get_num_entries</b>(<var class="Fa">instead</var>) instead. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_libzip_version.html b/man/zip_libzip_version.html new file mode 100644 index 0000000..93de93f --- /dev/null +++ b/man/zip_libzip_version.html
@@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_LIBZIP_VERSION(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_LIBZIP_VERSION(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_LIBZIP_VERSION(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_libzip_version</b> — <span class="Nd">return run-time + version of library</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">const char *</var> +<br/> +<b class="Fn">zip_libzip_version</b>(<var class="Fa" style="white-space: nowrap;">void</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +<b class="Nm">zip_libzip_version</b> returns the version number of the library + as string in the format “$MAJOR.$MINOR.$MICRO$SUFFIX” where + <var class="Ar">$MAJOR</var> is the major version, + <var class="Ar">$MINOR</var> the minor, <var class="Ar">$MICRO</var> the + micro, and <var class="Ar">$SUFFIX</var> a suffix that's only set for + development versions. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_libzip_version</b>() was added in libzip 1.3.1. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_name_locate.html b/man/zip_name_locate.html new file mode 100644 index 0000000..c89c7fe --- /dev/null +++ b/man/zip_name_locate.html
@@ -0,0 +1,119 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_NAME_LOCATE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_NAME_LOCATE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_NAME_LOCATE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_name_locate</b> — <span class="Nd">get index of file by + name</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_name_locate</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">const char + *fname</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t + flags</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_name_locate</b>() function returns the index of the file + named <var class="Ar">fname</var> in <var class="Ar">archive</var>. If + <var class="Ar">archive</var> does not contain a file with that name, -1 is + returned. 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="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 13.00ex;"> + <dt class="It-tag" style="margin-left: -13.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -13.00ex;"><code class="Dv">ZIP_FL_NOCASE</code></dt> + <dd class="It-tag">Ignore case distinctions. (Will only work well if the file + names are ASCII.) With this flag, <b class="Fn">zip_name_locate</b>() will + be slow for archives with many files.</dd> + <dt class="It-tag" style="margin-left: -13.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -13.00ex;"><code class="Dv">ZIP_FL_NODIR</code></dt> + <dd class="It-tag">Ignore directory part of file name in archive. With this + flag, <b class="Fn">zip_name_locate</b>() will be slow for archives with + many files.</dd> + <dt class="It-tag" style="margin-left: -13.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -13.00ex;"><code class="Dv">ZIP_FL_ENC_RAW</code></dt> + <dd class="It-tag">Compare against the unmodified names as it is in the ZIP + archive.</dd> + <dt class="It-tag" style="margin-left: -13.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -13.00ex;"><code class="Dv">ZIP_FL_ENC_GUESS</code></dt> + <dd class="It-tag">(Default.) Guess the encoding of the name in the ZIP + archive and convert it to UTF-8, if necessary, before comparing.</dd> + <dt class="It-tag" style="margin-left: -13.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -13.00ex;"><code class="Dv">ZIP_FL_ENC_STRICT</code></dt> + <dd class="It-tag">Follow the ZIP specification and expect CP-437 encoded + names in the ZIP archive (except if they are explicitly marked as UTF-8). + Convert it to UTF-8 before comparing.</dd> +</dl> +</div> +<i class="Em">Note</i>: ASCII is a subset of both CP-437 and UTF-8. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +<b class="Fn">zip_name_locate</b>() returns the index of the file named + <var class="Ar">fname</var> or -1, if <var class="Ar">archive</var> does not + contain an entry of that name. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_name_locate</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag">One of the arguments is invalid.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_NOENT</code>]</dt> + <dd class="It-tag">No entry of the name <var class="Ar">fname</var> is found + in the archive.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_get_name.html">zip_get_name(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_name_locate</b>() was added in libzip 0.6. In libzip 0.11 the + return type was changed from <var class="Vt">int</var> to + <var class="Vt">zip_int64_t</var>. In libzip 0.11 the type of + <var class="Ar">flags</var> was changed from <var class="Vt">int</var> to + <var class="Vt">zip_flags_t</var>. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_open.html b/man/zip_open.html new file mode 100644 index 0000000..639c2a4 --- /dev/null +++ b/man/zip_open.html
@@ -0,0 +1,159 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_OPEN(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_OPEN(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_OPEN(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_open</b>, <b class="Nm">zip_open_from_source</b> — + <span class="Nd">open zip archive</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_t *</var> +<br/> +<b class="Fn">zip_open</b>(<var class="Fa" style="white-space: nowrap;">const + char *path</var>, <var class="Fa" style="white-space: nowrap;">int + flags</var>, <var class="Fa" style="white-space: nowrap;">int *errorp</var>); +<div class="Pp"></div> +<var class="Ft">zip_t *</var> +<br/> +<b class="Fn">zip_open_from_source</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *zs</var>, <var class="Fa" style="white-space: nowrap;">int flags</var>, + <var class="Fa" style="white-space: nowrap;">zip_error_t *ze</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_open</b>() function opens the zip archive specified by + <var class="Ar">path</var> and returns a pointer to a <var class="Ft">struct + zip</var>, used to manipulate the archive. 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="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 13.00ex;"> + <dt class="It-tag" style="margin-left: -13.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -13.00ex;"><code class="Dv">ZIP_CHECKCONS</code></dt> + <dd class="It-tag">Perform additional stricter consistency checks on the + archive, and error if they fail.</dd> + <dt class="It-tag" style="margin-left: -13.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -13.00ex;"><code class="Dv">ZIP_CREATE</code></dt> + <dd class="It-tag">Create the archive if it does not exist.</dd> + <dt class="It-tag" style="margin-left: -13.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -13.00ex;"><code class="Dv">ZIP_EXCL</code></dt> + <dd class="It-tag">Error if archive already exists.</dd> + <dt class="It-tag" style="margin-left: -13.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -13.00ex;"><code class="Dv">ZIP_TRUNCATE</code></dt> + <dd class="It-tag">If archive exists, ignore its current contents. In other + words, handle it the same way as an empty archive.</dd> + <dt class="It-tag" style="margin-left: -13.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -13.00ex;"><code class="Dv">ZIP_RDONLY</code></dt> + <dd class="It-tag">Open archive in read-only mode.</dd> +</dl> +</div> +<div class="Pp"></div> +If an error occurs and <var class="Ar">errorp</var> is + non-<code class="Dv">NULL</code>, it will be set to the corresponding error + code. +<div class="Pp"></div> +The <b class="Fn">zip_open_from_source</b>() function opens a zip archive + encapsulated by the zip_source <var class="Fa">zs</var> using the provided + <var class="Fa">flags</var>. In case of error, the zip_error + <var class="Fa">ze</var> is filled in. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion <b class="Fn">zip_open</b>() and + <b class="Fn">zip_open_from_source</b>() return a <var class="Ft">struct + zip</var> pointer. Otherwise, <code class="Dv">NULL</code> is returned and + <b class="Fn">zip_open</b>() sets <var class="Ar">*errorp</var> to indicate + the error, while <b class="Fn">zip_open_from</b>(<var class="Fa">source</var>) + sets <var class="Ar">ze</var> to indicate the error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +The archive specified by <var class="Ar">path</var> is opened unless: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_EXISTS</code>]</dt> + <dd class="It-tag">The file specified by <var class="Ar">path</var> exists and + <code class="Dv">ZIP_EXCL</code> is set.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INCONS</code>]</dt> + <dd class="It-tag">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 class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag">The <var class="Ar">path</var> argument is + <code class="Dv">NULL</code>.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_NOENT</code>]</dt> + <dd class="It-tag">The file specified by <var class="Ar">path</var> does not + exist and <code class="Dv">ZIP_CREATE</code> is not set.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_NOZIP</code>]</dt> + <dd class="It-tag">The file specified by <var class="Ar">path</var> is not a + zip archive.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_OPEN</code>]</dt> + <dd class="It-tag">The file specified by <var class="Ar">path</var> could not + be opened.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_READ</code>]</dt> + <dd class="It-tag">A read error occurred; see <var class="Va">errno</var> for + details.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_SEEK</code>]</dt> + <dd class="It-tag">The file specified by <var class="Ar">path</var> does not + allow seeks.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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_to_str.html">zip_error_to_str(3)</a>, + <a class="Xr" href="zip_fdopen.html">zip_fdopen(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_open</b>() and <b class="Fn">zip_open_from_source</b>() were + added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_register_progress_callback.html b/man/zip_register_progress_callback.html new file mode 100644 index 0000000..5b7cc7c --- /dev/null +++ b/man/zip_register_progress_callback.html
@@ -0,0 +1,70 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_REGISTER_PROGRESS_CALLBACK(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_REGISTER_PROGRESS_CALLBACK(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_REGISTER_PROGRESS_CALLBACK(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_register_progress_callback</b> — + <span class="Nd">provide updates during zip_close (obsolete interface)</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Vt">typedef void (*zip_progress_callback_t)(double);</var> +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_register_progress_callback</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, + <var class="Fa" style="white-space: nowrap;">zip_progress_callback_t + progress_callback</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_register_progress_callback</b>() is the obsolete + version of + <a class="Xr" href="zip_register_progress_callback_with_state.html">zip_register_progress_callback_with_state(3)</a>. +<div class="Pp"></div> +The <b class="Fn">zip_register_progress_callback</b>() function registers a + callback function <var class="Ar">progress_callback</var> for the zip archive + <var class="Ar">archive</var>. This function is called during + <a class="Xr" href="zip_close.html">zip_close(3)</a> after every zip archive + entry that's completely written to disk. The value is a + <var class="Vt">double</var> in the range from 0.0 to 1.0. This can be used to + provide progress indicators for user interfaces. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_close.html">zip_close(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_register_progress_callback</b>() was added in libzip 1.2.0. It + was deprecated in libzip 1.3.0, use + <b class="Fn">zip_register_progress_callback_with_state</b>() instead. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_register_progress_callback_with_state.html b/man/zip_register_progress_callback_with_state.html new file mode 100644 index 0000000..a3ff7f5 --- /dev/null +++ b/man/zip_register_progress_callback_with_state.html
@@ -0,0 +1,78 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_REGISTER_PROGRESS_CALLBACK_WITH_STATE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_REGISTER_PROGRESS_CALLBACK_WITH_STATE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_REGISTER_PROGRESS_CALLBACK_WITH_STATE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_register_progress_callback_with_state</b> — + <span class="Nd">provide updates during zip_close</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Vt">typedef void (*zip_progress_callback)(zip_t *, double, void + *);</var> +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_register_progress_callback_with_state</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">double + precision</var>, + <var class="Fa" style="white-space: nowrap;">zip_progress_callback + callback</var>, <var class="Fa" style="white-space: nowrap;">void + (*ud_free)(void *)</var>, <var class="Fa" style="white-space: nowrap;">void + *ud</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_register_progress_callback_with_state</b>() function + registers a callback function <var class="Ar">callback</var> for the zip + archive <var class="Ar">archive</var>. The <var class="Ar">precision</var> + argument is a double in the range from 0.00 to 1.0 that defines the smallest + change for which the callback should be called (to avoid too frequent calls). + The <var class="Ar">ud_free</var> function is called during cleanup for + deleting the userdata supplied in <var class="Ar">ud</var>. +<div class="Pp"></div> +The callback function is called during + <a class="Xr" href="zip_close.html">zip_close(3)</a> in regular intervals + (after every zip archive entry that's completely written to disk, and while + writing data for entries) with zip archive <var class="Ar">archive</var>, the + current progression state as a <var class="Vt">double</var>, and the + user-provided user-data <var class="Ar">ud</var> as arguments. The progression + state is a <var class="Vt">double</var> in the range from 0.0 to 1.0. This can + be used to provide progress indicators for user interfaces. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_close.html">zip_close(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_register_progress_callback_with_state</b>() was added in + libzip 1.3.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_rename.html b/man/zip_rename.html new file mode 100644 index 0000000..7143ef6 --- /dev/null +++ b/man/zip_rename.html
@@ -0,0 +1,63 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_RENAME(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_RENAME(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_RENAME(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_rename</b> — <span class="Nd">rename file in zip archive + (obsolete interface)</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_rename</b>(<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;">const char + *name</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +<b class="Fn">zip_rename</b>() is the obsolete version of + <a class="Xr" href="zip_file_rename.html">zip_file_rename(3)</a>. It is the + same as calling + <a class="Xr" href="zip_file_rename.html">zip_file_rename(3)</a> with an empty + flags argument. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_file_rename.html">zip_file_rename(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_rename</b>() 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 + <b class="Fn">zip_file_rename</b>() instead. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_set_archive_comment.html b/man/zip_set_archive_comment.html new file mode 100644 index 0000000..412f3e3 --- /dev/null +++ b/man/zip_set_archive_comment.html
@@ -0,0 +1,82 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SET_ARCHIVE_COMMENT(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SET_ARCHIVE_COMMENT(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SET_ARCHIVE_COMMENT(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_set_archive_comment</b> — <span class="Nd">set zip + archive comment</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_set_archive_comment</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">const char + *comment</var>, <var class="Fa" style="white-space: nowrap;">zip_uint16_t + len</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_set_archive_comment</b>() function sets the comment for + the entire zip archive. If <var class="Ar">comment</var> is + <code class="Dv">NULL</code> and <var class="Ar">len</var> is 0, the archive + comment will be removed. <var class="Ar">comment</var> must be encoded in + ASCII or UTF-8. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">archive</var> is set to indicate the + error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_set_archive_comment</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">len</var> is less than 0 or longer than the + maximum comment length in a zip file (65535), or + <var class="Ar">comment</var> is not a valid UTF-8 encoded string.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_get_archive_comment.html">zip_get_archive_comment(3)</a>, + <a class="Xr" href="zip_get_file_comment.html">zip_get_file_comment(3)</a>, + <a class="Xr" href="zip_set_file_comment.html">zip_set_file_comment(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_set_archive_comment</b>() was added in libzip 0.7. In libzip + 0.11 the type of <var class="Ar">len</var> was changed from + <var class="Vt">int</var> to <var class="Vt">zip_uint16_t</var>. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_set_archive_flag.html b/man/zip_set_archive_flag.html new file mode 100644 index 0000000..aaefc65 --- /dev/null +++ b/man/zip_set_archive_flag.html
@@ -0,0 +1,63 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SET_ARCHIVE_FLAG(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SET_ARCHIVE_FLAG(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SET_ARCHIVE_FLAG(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_set_archive_flag</b> — <span class="Nd">set zip archive + flag</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_set_archive_flag</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t + flag</var>, <var class="Fa" style="white-space: nowrap;">int value</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_set_archive_flag</b>() function sets the flag + <var class="Ar">flag</var> for the archive <var class="Ar">archive</var> to + the value <var class="Ar">value</var>. +<div class="Pp"></div> +Currently there are no supported flags. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned, and -1 if an error occurred. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_get_archive_flag.html">zip_get_archive_flag(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_set_archive_flag</b>() was added in libzip 0.9. In libzip 0.11 + the type of <var class="Ar">flag</var> was changed from + <var class="Vt">int</var> to <var class="Vt">zip_flags_t</var>. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_set_default_password.html b/man/zip_set_default_password.html new file mode 100644 index 0000000..cfe93b0 --- /dev/null +++ b/man/zip_set_default_password.html
@@ -0,0 +1,76 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SET_DEFAULT_PASSWORD(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SET_DEFAULT_PASSWORD(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SET_DEFAULT_PASSWORD(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_set_default_password</b> — <span class="Nd">set default + password for encrypted files in zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_set_default_password</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">const char + *password</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_set_default_password</b>() function sets the default + password used when accessing encrypted files. If + <var class="Ar">password</var> is <code class="Dv">NULL</code>, the default + password is unset. +<div class="Pp"></div> +If you prefer a different password for single files, use + <a class="Xr" href="zip_fopen_encrypted.html">zip_fopen_encrypted(3)</a> + instead of <a class="Xr" href="zip_fopen.html">zip_fopen(3)</a>. Usually, + however, the same password is used for every file in an zip archive. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">archive</var> is set to indicate the + error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_set_default_password</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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_fopen_encrypted.html">zip_fopen_encrypted(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_set_default_password</b>() was added in libzip 0.10. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_set_file_comment.html b/man/zip_set_file_comment.html new file mode 100644 index 0000000..bd04753 --- /dev/null +++ b/man/zip_set_file_comment.html
@@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SET_FILE_COMMENT(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SET_FILE_COMMENT(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SET_FILE_COMMENT(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_set_file_comment</b> — <span class="Nd">set comment for + file in zip (obsolete interface)</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_set_file_comment</b>(<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;">const char + *comment</var>, <var class="Fa" style="white-space: nowrap;">int len</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_set_file_comment</b>() function is the obsolete version of + <a class="Xr" href="zip_file_set_comment.html">zip_file_set_comment(3)</a>. + The only differences are the type of the <var class="Ar">len</var> argument + and the additional <var class="Ar">flags</var> argument. + <b class="Fn">zip_set_file_comment</b>() is the same as calling + <a class="Xr" href="zip_file_set_comment.html">zip_file_set_comment(3)</a> + with an empty <var class="Ar">flags</var> argument. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_set_file_comment</b>() was added in libzip 0.7. 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 <b class="Fn">zip_file_set_comment</b>() + instead. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_set_file_compression.html b/man/zip_set_file_compression.html new file mode 100644 index 0000000..f1d6232 --- /dev/null +++ b/man/zip_set_file_compression.html
@@ -0,0 +1,118 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SET_FILE_COMPRESSION(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SET_FILE_COMPRESSION(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SET_FILE_COMPRESSION(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_set_file_compression</b> — <span class="Nd">set + compression method for file in zip</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_set_file_compression</b>(<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_int32_t + comp</var>, <var class="Fa" style="white-space: nowrap;">zip_uint32_t + comp_flags</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_set_file_compression</b>() function sets the compression + method for the file at position <var class="Ar">index</var> in the zip archive + to <var class="Ar">comp</var> with the compression method specific + <var class="Ar">comp_flags</var>. The <var class="Ar">comp</var> is the same + as returned by <a class="Xr" href="zip_stat.html">zip_stat(3)</a>. For the + <var class="Ar">comp</var> argument, currently only the following values are + supported: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;"><code class="Dv">ZIP_CM_DEFAULT</code></dt> + <dd class="It-tag">default compression; currently the same as + <code class="Dv">ZIP_CM_DEFLATE</code>.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;"><code class="Dv">ZIP_CM_STORE</code></dt> + <dd class="It-tag">Store the file uncompressed.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;"><code class="Dv">ZIP_CM_BZIP2</code></dt> + <dd class="It-tag">Compress the file using the + <a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/bzip2.html">bzip2(1)</a> algorithm.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;"><code class="Dv">ZIP_CM_DEFLATE</code></dt> + <dd class="It-tag">Deflate the file with the + <a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/zlib.html">zlib(3)</a> algorithm and default + options</dd> +</dl> +<div class="Pp"></div> +<i class="Em">NOTE</i>: Only the deflate and store methods can be assumed to be + universally supported. +<div class="Pp"></div> +The <var class="Ar">comp_flags</var> argument defines the compression level, 1 + being fastest compression and 9 highest. Allowed values are 0 (which uses the + default compression for the algorithm) and 1-9, other values are undefined. + Further compression method specific flags might be added over time. +<div class="Pp"></div> +The current compression method for a file in a zip archive can be determined + using <a class="Xr" href="zip_stat.html">zip_stat(3)</a>. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">archive</var> is set to indicate the + error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_set_file_compression</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_COMPNOTSUPP</code>]</dt> + <dd class="It-tag">Unsupported compression method requested.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">archive</var>, or the argument combination is + invalid.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_RDONLY</code>]</dt> + <dd class="It-tag">Read-only zip file, no changes allowed.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_stat.html">zip_stat(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_set_file_compression</b>() was added in libzip 0.11. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source.html b/man/zip_source.html new file mode 100644 index 0000000..ee47581 --- /dev/null +++ b/man/zip_source.html
@@ -0,0 +1,78 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source</b> — <span class="Nd">zip data source + structure</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Vt">zip_source_t *zs</var>; +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +A <var class="Vt">struct zip_source</var> is a data source used by + <a class="Xr" href="libzip.html">libzip(3)</a> for adding or replacing file + contents for a file in a zip archive. If the source supports seeking, it can + also be used to open zip archives from. It is created by calling one of + <a class="Xr" href="zip_source_buffer.html">zip_source_buffer(3)</a>, + <a class="Xr" href="zip_source_buffer_create.html">zip_source_buffer_create(3)</a>, + <a class="Xr" href="zip_source_file.html">zip_source_file(3)</a>, + <a class="Xr" href="zip_source_file_create.html">zip_source_file_create(3)</a>, + <a class="Xr" href="zip_source_filep.html">zip_source_filep(3)</a>, + <a class="Xr" href="zip_source_filep_create.html">zip_source_filep_create(3)</a>, + <a class="Xr" href="zip_source_function.html">zip_source_function(3)</a>, + <a class="Xr" href="zip_source_function_create.html">zip_source_function_create(3)</a>, + or <a class="Xr" href="zip_source_zip.html">zip_source_zip(3)</a>. + <var class="Vt">zip_source_t</var> is reference counted, and created with a + reference count of 1. + <a class="Xr" href="zip_open_from_source.html">zip_open_from_source(3)</a>, + <a class="Xr" href="zip_file_add.html">zip_file_add(3)</a>, and + <a class="Xr" href="zip_file_replace.html">zip_file_replace(3)</a> will + decrement the reference count of the <var class="Vt">zip_source_t</var> when + they are done using it, so + <a class="Xr" href="zip_source_free.html">zip_source_free(3)</a> only needs to + be called when these functions return an error. Use + <a class="Xr" href="zip_source_keep.html">zip_source_keep(3)</a> to increase + the reference count, for example if you need the source after + <a class="Xr" href="zip_close.html">zip_close(3)</a>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source_buffer.html">zip_source_buffer(3)</a>, + <a class="Xr" href="zip_source_file.html">zip_source_file(3)</a>, + <a class="Xr" href="zip_source_filep.html">zip_source_filep(3)</a>, + <a class="Xr" href="zip_source_free.html">zip_source_free(3)</a>, + <a class="Xr" href="zip_source_function.html">zip_source_function(3)</a>, + <a class="Xr" href="zip_source_zip.html">zip_source_zip(3)</a> +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_begin_write.html b/man/zip_source_begin_write.html new file mode 100644 index 0000000..26c539d --- /dev/null +++ b/man/zip_source_begin_write.html
@@ -0,0 +1,80 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_BEGIN_WRITE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_BEGIN_WRITE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_BEGIN_WRITE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_begin_write</b>, + <b class="Nm">zip_source_begin_write_cloning</b> — + <span class="Nd">prepare zip source for writing</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_source_begin_write</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>); +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_source_begin_write_cloning</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + offset</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The functions <b class="Fn">zip_source_begin_write</b>() and + <b class="Fn">zip_source_begin_write_cloning</b>() prepare + <var class="Fa">source</var> for writing. Usually this involves creating + temporary files or allocating buffers. +<div class="Pp"></div> +<b class="Fn">zip_source_begin_write_cloning</b>() preserves the first + <var class="Ar">offset</var> bytes of the original file. This is done + efficiently, and writes to <var class="Ar">source</var> won't overwrite the + original data until <b class="Fn">zip_commit_write</b>() is called. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">source</var> is set to indicate the + error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_commit_write.html">zip_source_commit_write(3)</a>, + <a class="Xr" href="zip_source_rollback_write.html">zip_source_rollback_write(3)</a>, + <a class="Xr" href="zip_source_seek_write.html">zip_source_seek_write(3)</a>, + <a class="Xr" href="zip_source_tell_write.html">zip_source_tell_write(3)</a>, + <a class="Xr" href="zip_source_write.html">zip_source_write(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_begin_write</b>() was added in libzip 1.0. +<div class="Pp"></div> +<b class="Fn">zip_source_begin_write_cloning</b>() was added in libzip 1.4.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_buffer.html b/man/zip_source_buffer.html new file mode 100644 index 0000000..7cf0431 --- /dev/null +++ b/man/zip_source_buffer.html
@@ -0,0 +1,93 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_BUFFER(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_BUFFER(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_BUFFER(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_buffer</b>, <b class="Nm">zip_source_buffer_create</b> + — <span class="Nd">create zip data source from buffer</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_buffer</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">const void + *data</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + len</var>, <var class="Fa" style="white-space: nowrap;">int freep</var>); +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_buffer_create</b>(<var class="Fa" style="white-space: nowrap;">const + void *data</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + len</var>, <var class="Fa" style="white-space: nowrap;">int freep</var>, + <var class="Fa" style="white-space: nowrap;">zip_error_t *error</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The functions <b class="Fn">zip_source_buffer</b>() and + <b class="Fn">zip_source_buffer_create</b>() create a zip source from the + buffer <var class="Ar">data</var> of size <var class="Ar">len</var>. If + <var class="Ar">freep</var> is non-zero, the buffer will be freed when it is + no longer needed. <var class="Ar">data</var> must remain valid for the + lifetime of the created source. +<div class="Pp"></div> +The source can be used to open a zip archive from. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, the created source is returned. Otherwise, + <code class="Dv">NULL</code> is returned and the error code in + <var class="Ar">archive</var> or <var class="Ar">error</var> is set to + indicate the error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_source_buffer</b>() and + <b class="Fn">zip_source_buffer_create</b>() fail if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">len</var> is greater than zero and + <var class="Ar">data</var> is <code class="Dv">NULL</code>.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_add.html">zip_add(3)</a>, + <a class="Xr" href="zip_open_from_source.html">zip_open_from_source(3)</a>, + <a class="Xr" href="zip_replace.html">zip_replace(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_buffer</b>() and + <b class="Fn">zip_source_buffer_create</b>() were added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_buffer_fragment.html b/man/zip_source_buffer_fragment.html new file mode 100644 index 0000000..0bbd921 --- /dev/null +++ b/man/zip_source_buffer_fragment.html
@@ -0,0 +1,110 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_BUFFER_FRAGMENT(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_BUFFER_FRAGMENT(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_BUFFER_FRAGMENT(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_buffer_fragment</b>, + <b class="Nm">zip_source_buffer_fragment_create</b> — + <span class="Nd">create zip data source from multiple buffer</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_buffer_fragment</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, + <var class="Fa" style="white-space: nowrap;">zip_buffer_fragment_t + *fragments</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + nfragments</var>, <var class="Fa" style="white-space: nowrap;">int + freep</var>); +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_buffer_fragment_create</b>(<var class="Fa" style="white-space: nowrap;">zip_buffer_fragment_t + *fragments</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + nfragments</var>, <var class="Fa" style="white-space: nowrap;">int + freep</var>, <var class="Fa" style="white-space: nowrap;">zip_error_t + *error</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The functions <b class="Fn">zip_source_buffer_fragment</b>() and + <b class="Fn">zip_source_buffer_fragment_create</b>() create a zip source from + the data in <var class="Ar">fragments</var>. <var class="Ar">nfragments</var> + specifies the number of fragments. If <var class="Ar">freep</var> is non-zero, + the data will be freed when it is no longer needed. +<div class="Pp"></div> +<div class="Bd" style="margin-left: 0.00ex;"> +<pre class="Li"> +struct zip_stat { + zip_uint8_t *data; /* pointer to the actual data */ + zip_uint64_t length; /* length of this fragment */ +}; +</pre> +</div> +<div class="Pp"></div> +The data <var class="Ar">fragments</var> point to must remain valid for the + lifetime of the created source. <var class="Ar">fragments</var> itself can be + discarded once the source is created. +<div class="Pp"></div> +The source can be used to open a zip archive from. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, the created source is returned. Otherwise, + <code class="Dv">NULL</code> is returned and the error code in + <var class="Ar">archive</var> or <var class="Ar">error</var> is set to + indicate the error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_source_buffer</b>() and + <b class="Fn">zip_source_buffer_create</b>() fail if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">nfragments</var> is greater than zero and + <var class="Ar">fragments</var> is <code class="Dv">NULL</code>.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_add.html">zip_add(3)</a>, + <a class="Xr" href="zip_open_from_source.html">zip_open_from_source(3)</a>, + <a class="Xr" href="zip_replace.html">zip_replace(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_buffer_fragment</b>() and + <b class="Fn">zip_source_buffer_fragment_create</b>() were added in libzip + 1.4.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_close.html b/man/zip_source_close.html new file mode 100644 index 0000000..0a62d99 --- /dev/null +++ b/man/zip_source_close.html
@@ -0,0 +1,61 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_CLOSE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_CLOSE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_CLOSE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_close</b> — <span class="Nd">open zip_source + (which was open for reading)</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_source_close</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_close</b>() closes + <var class="Fa">source</var>, indicating that no more data will be read. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">source</var> is set to indicate the + error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_free.html">zip_source_free(3)</a>, + <a class="Xr" href="zip_source_open.html">zip_source_open(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_close</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_commit_write.html b/man/zip_source_commit_write.html new file mode 100644 index 0000000..c9460eb --- /dev/null +++ b/man/zip_source_commit_write.html
@@ -0,0 +1,65 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_COMMIT_WRITE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_COMMIT_WRITE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_COMMIT_WRITE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_commit_write</b> — <span class="Nd">finalize + changes to zip source</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_source_commit_write</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_commit_write</b>() finishes writing data + to <var class="Fa">source</var> and replaces the original with the newly + written data. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">source</var> is set to indicate the + error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_begin_write.html">zip_source_begin_write(3)</a>, + <a class="Xr" href="zip_source_rollback_write.html">zip_source_rollback_write(3)</a>, + <a class="Xr" href="zip_source_seek_write.html">zip_source_seek_write(3)</a>, + <a class="Xr" href="zip_source_tell_write.html">zip_source_tell_write(3)</a>, + <a class="Xr" href="zip_source_write.html">zip_source_write(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_commit_write</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_error.html b/man/zip_source_error.html new file mode 100644 index 0000000..ef98360 --- /dev/null +++ b/man/zip_source_error.html
@@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_ERROR(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_ERROR(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_ERROR(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_error</b> — <span class="Nd">get zip error for + data source</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_error_t *</var> +<br/> +<b class="Fn">zip_source_error</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_source_error</b>() function returns the zip error for the + data source <var class="Ar">source</var>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</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> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_error</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_file.html b/man/zip_source_file.html new file mode 100644 index 0000000..f152901 --- /dev/null +++ b/man/zip_source_file.html
@@ -0,0 +1,101 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_FILE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_FILE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_FILE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_file</b>, <b class="Nm">zip_source_file_create</b> + — <span class="Nd">create data source from a file</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_file</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">const char + *fname</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + start</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t + len</var>); +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_file_create</b>(<var class="Fa" style="white-space: nowrap;">const + char *fname</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + start</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t + len</var>, <var class="Fa" style="white-space: nowrap;">zip_error_t + *error</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The functions <b class="Fn">zip_source_file</b>() and + <b class="Fn">zip_source_file_create</b>() create a zip source from a file. + They open <var class="Ar">fname</var> and read <var class="Ar">len</var> bytes + from offset <var class="Ar">start</var> from it. If <var class="Ar">len</var> + is 0 or -1, the whole file (starting from <var class="Ar">start</var>) is + used. +<div class="Pp"></div> +If the file supports seek, the source can be used to open a zip archive from. +<div class="Pp"></div> +The file is opened and read when the data from the source is used, usually by + <b class="Fn">zip_close</b>() or <b class="Fn">zip_open_from_source</b>(). +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, the created source is returned. Otherwise, + <code class="Dv">NULL</code> is returned and the error code in + <var class="Ar">archive</var> or <var class="Ar">error</var> is set to + indicate the error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_source_file</b>() and + <b class="Fn">zip_source_file_create</b>() fail if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">fname</var>, <var class="Ar">start</var>, + or <var class="Ar">len</var> are invalid.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_OPEN</code>]</dt> + <dd class="It-tag">Opening <var class="Ar">fname</var> failed.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_add.html">zip_add(3)</a>, + <a class="Xr" href="zip_replace.html">zip_replace(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_file</b>() and + <b class="Fn">zip_source_file_create</b>() were added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_filep.html b/man/zip_source_filep.html new file mode 100644 index 0000000..67da4fb --- /dev/null +++ b/man/zip_source_filep.html
@@ -0,0 +1,96 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_FILEP(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_FILEP(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_FILEP(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_filep</b>, <b class="Nm">zip_source_filep_create</b> + — <span class="Nd">create data source from FILE *</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_filep</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">FILE *file</var>, + <var class="Fa" style="white-space: nowrap;">zip_uint64_t start</var>, + <var class="Fa" style="white-space: nowrap;">zip_int64_t len</var>); +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_filep_create</b>(<var class="Fa" style="white-space: nowrap;">FILE + *file</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + start</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t + len</var>, <var class="Fa" style="white-space: nowrap;">zip_error_t + *error</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The functions <b class="Fn">zip_source_filep</b>() and + <b class="Fn">zip_source_filep_create</b>() create a zip source from a file + stream. They read <var class="Ar">len</var> bytes from offset + <var class="Ar">start</var> from the open file stream + <var class="Ar">file</var>. If <var class="Ar">len</var> is 0 or -1, the whole + file (starting from <var class="Ar">start</var>) is used. +<div class="Pp"></div> +If the file stream supports seeking, the source can be used to open a read-only + zip archive from. +<div class="Pp"></div> +The file stream is closed when the source is being freed, usually by + <a class="Xr" href="zip_close.html">zip_close(3)</a>. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, the created source is returned. Otherwise, + <code class="Dv">NULL</code> is returned and the error code in + <var class="Ar">archive</var> or <var class="Ar">error</var> is set to + indicate the error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_source_filep</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">file</var>, <var class="Ar">start</var>, or + <var class="Ar">len</var> are invalid.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_add.html">zip_add(3)</a>, + <a class="Xr" href="zip_replace.html">zip_replace(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_filep</b>() and + <b class="Fn">zip_source_filep_create</b>() were added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_free.html b/man/zip_source_free.html new file mode 100644 index 0000000..54c52bf --- /dev/null +++ b/man/zip_source_free.html
@@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_FREE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_FREE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_FREE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_free</b> — <span class="Nd">free zip data + source</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_source_free</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_free</b>() decrements the reference count + of <var class="Ar">source</var> and frees it if the reference count drops to + 0. If <var class="Ar">source</var> is <code class="Dv">NULL</code>, it does + nothing. +<div class="Pp"></div> +<i class="Em">NOTE</i>: This function should not be called on a + <var class="Ar">source</var> after it was used successfully in a + <a class="Xr" href="zip_open_from_source.html">zip_open_from_source(3)</a>, + <a class="Xr" href="zip_file_add.html">zip_file_add(3)</a>, or + <a class="Xr" href="zip_file_replace.html">zip_file_replace(3)</a> call. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_keep.html">zip_source_keep(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_free</b>() was added in libzip 0.6. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_function.html b/man/zip_source_function.html new file mode 100644 index 0000000..7f50206 --- /dev/null +++ b/man/zip_source_function.html
@@ -0,0 +1,265 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_FUNCTION(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_FUNCTION(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_FUNCTION(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_function</b>, + <b class="Nm">zip_source_function_create</b> — <span class="Nd">create + data source from function</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_function</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, + <var class="Fa" style="white-space: nowrap;">zip_source_callback fn</var>, + <var class="Fa" style="white-space: nowrap;">void *userdata</var>); +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_function_create</b>(<var class="Fa" style="white-space: nowrap;">zip_source_callback + fn</var>, <var class="Fa" style="white-space: nowrap;">void *userdata</var>, + <var class="Fa" style="white-space: nowrap;">zip_error_t *error</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The functions <b class="Fn">zip_source_function</b>() and + <b class="Fn">zip_source_function_create</b>() creates a zip source from the + user-provided function <var class="Ar">fn</var>, which must be of the + following type: +<div class="Pp"></div> +<var class="Ft">typedef zip_int64_t</var> + <b class="Fn">(*zip_source_callback)</b>(<var class="Fa">void *userdata</var>, + <var class="Fa">void *data</var>, <var class="Fa">zip_uint64_t len</var>, + <var class="Fa">zip_source_cmd_t cmd</var>); +<div class="Pp"></div> +<var class="Ar">archive</var> or <var class="Ar">error</var> are used for + reporting errors and can be <code class="Dv">NULL</code>. +<div class="Pp"></div> +When called by the library, the first argument is the + <var class="Ar">userdata</var> argument supplied to the function. The next two + arguments are a buffer <var class="Ar">data</var> of size + <var class="Ar">len</var> when data is passed in or expected to be returned, + or else <code class="Dv">NULL</code> and 0. The last argument, + <var class="Ar">cmd</var>, specifies which action the function should perform. +<div class="Pp"></div> +Depending on the uses, there are three useful sets of commands to be supported + by a <b class="Fn">zip_source_callback</b>(): +<dl class="Bl-tag" style="margin-left: 22.00ex;"> + <dt class="It-tag" style="margin-left: -22.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -22.00ex;">read source</dt> + <dd class="It-tag">Providing streamed data (for file data added to archives). + Must support <code class="Dv">ZIP_SOURCE_OPEN</code>, + <code class="Dv">ZIP_SOURCE_READ</code>, + <code class="Dv">ZIP_SOURCE_CLOSE</code>, + <code class="Dv">ZIP_SOURCE_STAT</code>, and + <code class="Dv">ZIP_SOURCE_ERROR</code>.</dd> + <dt class="It-tag" style="margin-left: -22.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -22.00ex;">seekable read source</dt> + <dd class="It-tag">Same as previous, but from a source allowing reading from + arbitrary offsets (also for read-only zip archive). Must additionally + support <code class="Dv">ZIP_SOURCE_SEEK</code>, + <code class="Dv">ZIP_SOURCE_TELL</code>, and + <code class="Dv">ZIP_SOURCE_SUPPORTS</code>.</dd> + <dt class="It-tag" style="margin-left: -22.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -22.00ex;">read/write source</dt> + <dd class="It-tag">Same as previous, but additionally allowing writing (also + for writable zip archives). Must additionally support + <code class="Dv">ZIP_SOURCE_BEGIN_WRITE</code>, + <code class="Dv">ZIP_SOURCE_COMMIT_WRITE</code>, + <code class="Dv">ZIP_SOURCE_ROLLBACK_WRITE</code>, + <code class="Dv">ZIP_SOURCE_SEEK_WRITE</code>, + <code class="Dv">ZIP_SOURCE_TELL_WRITE</code>, and + <code class="Dv">ZIP_SOURCE_REMOVE</code>.</dd> +</dl> +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_BEGIN_WRITE</code></h2> +Prepare the source for writing. Use this to create any temporary file(s). +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_BEGIN_WRITE_CLONING</code></h2> +Prepare the source for writing, keeping the first <var class="Ar">len</var> + bytes of the original file. Only implement this command if it is more + efficient than copying the data, and if it does not destructively overwrite + the original file (you still have to be able to execute + <code class="Dv">ZIP_SOURCE_ROLLBACK_WRITE</code>). +<div class="Pp"></div> +The next write should happen at byte <var class="Ar">offset</var>. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_CLOSE</code></h2> +Reading is done. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_COMMIT_WRITE</code></h2> +Finish writing to the source. Replace the original data with the newly written + data. Clean up temporary files or internal buffers. Subsequently opening and + reading from the source should return the newly written data. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_ERROR</code></h2> +Get error information. <var class="Ar">data</var> points to an array of two + ints, which should be filled with the libzip error code and the corresponding + system error code for the error that occurred. See + <a class="Xr" href="zip_errors.html">zip_errors(3)</a> for details on the + error codes. If the source stores error information in a zip_error_t, use + <a class="Xr" href="zip_error_to_data.html">zip_error_to_data(3)</a> and + return its return value. Otherwise, return 2 * sizeof(int). +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_FREE</code></h2> +Clean up and free all resources, including <var class="Ar">userdata</var>. The + callback function will not be called again. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_OPEN</code></h2> +Prepare for reading. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_READ</code></h2> +Read data into the buffer <var class="Ar">data</var> of size + <var class="Ar">len</var>. Return the number of bytes placed into + <var class="Ar">data</var> on success, and zero for end-of-file. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_REMOVE</code></h2> +Remove the underlying file. This is called if a zip archive is empty when + closed. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_ROLLBACK_WRITE</code></h2> +Abort writing to the source. Discard written data. Clean up temporary files or + internal buffers. Subsequently opening and reading from the source should + return the original data. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_SEEK</code></h2> +Specify position to read next byte from, like + <a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/fseek.html">fseek(3)</a>. Use + <a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/ZIP_SOURCE_GET_ARGS.html">ZIP_SOURCE_GET_ARGS(3)</a> to + decode the arguments into the following struct: +<div class="Pp"></div> +<div class="Bd" style="margin-left: 0.00ex;"> +<pre class="Li"> +struct zip_source_args_seek { + zip_int64_t offset; + int whence; +}; +</pre> +</div> +<div class="Pp"></div> +If the size of the source's data is known, use + <a class="Xr" href="zip_source_seek_compute_offset.html">zip_source_seek_compute_offset(3)</a> + to validate the arguments and compute the new offset. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_SEEK_WRITE</code></h2> +Specify position to write next byte to, like + <a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/fseek.html">fseek(3)</a>. See + <code class="Dv">ZIP_SOURCE_SEEK</code> for details. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_STAT</code></h2> +Get meta information for the input data. <var class="Ar">data</var> points to an + allocated <var class="Vt">struct zip_stat</var>, which should be initialized + using <a class="Xr" href="zip_stat_init.html">zip_stat_init(3)</a> and then + filled in. +<div class="Pp"></div> +For uncompressed, unencrypted data, all information is optional. However, fill + in as much information as is readily available. +<div class="Pp"></div> +If the data is compressed, <code class="Dv">ZIP_STAT_COMP_METHOD</code>, + <code class="Dv">ZIP_STAT_SIZE</code>, and + <code class="Dv">ZIP_STAT_CRC</code> must be filled in. +<div class="Pp"></div> +If the data is encrypted, <code class="Dv">ZIP_STAT_ENCRYPTION_METHOD</code>, + <code class="Dv">ZIP_STAT_COMP_METHOD</code>, + <code class="Dv">ZIP_STAT_SIZE</code>, and + <code class="Dv">ZIP_STAT_CRC</code> must be filled in. +<div class="Pp"></div> +Information only available after the source has been read (e.g., size) can be + omitted in an earlier call. <i class="Em">NOTE</i>: + <b class="Fn">zip_source_function</b>() may be called with this argument even + after being called with <code class="Dv">ZIP_SOURCE_CLOSE</code>. +<div class="Pp"></div> +Return sizeof(struct zip_stat) on success. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_SUPPORTS</code></h2> +Return bitmap specifying which commands are supported. Use + <a class="Xr" href="zip_source_make_command_bitmap.html">zip_source_make_command_bitmap(3)</a>. + If this command is not implemented, the source is assumed to be a read source + without seek support. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_TELL</code></h2> +Return the current read offset in the source, like + <a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftell.html">ftell(3)</a>. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_TELL_WRITE</code></h2> +Return the current write offset in the source, like + <a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftell.html">ftell(3)</a>. +<h2 class="Ss"><code class="Dv">ZIP_SOURCE_WRITE</code></h2> +Write data to the source. Return number of bytes written. +<h2 class="Ss" id="Return_Values">Return Values</h2> +Commands should return -1 on error. <code class="Dv">ZIP_SOURCE_ERROR</code> + will be called to retrieve the error code. On success, commands return 0, + unless specified otherwise in the description above. +<h2 class="Ss" id="Calling_Conventions">Calling Conventions</h2> +The library will always issue <code class="Dv">ZIP_SOURCE_OPEN</code> before + issuing <code class="Dv">ZIP_SOURCE_READ</code>, + <code class="Dv">ZIP_SOURCE_SEEK</code>, or + <code class="Dv">ZIP_SOURCE_TELL</code>. When it no longer wishes to read from + this source, it will issue <code class="Dv">ZIP_SOURCE_CLOSE</code>. If the + library wishes to read the data again, it will issue + <code class="Dv">ZIP_SOURCE_OPEN</code> a second time. If the function is + unable to provide the data again, it should return -1. +<div class="Pp"></div> +<code class="Dv">ZIP_SOURCE_BEGIN_WRITE</code> or + <code class="Dv">ZIP_SOURCE_BEGIN_WRITE_CLONING</code> will be called before + <code class="Dv">ZIP_SOURCE_WRITE</code>, + <code class="Dv">ZIP_SOURCE_SEEK_WRITE</code>, or + <code class="Dv">ZIP_SOURCE_TELL_WRITE</code>. When writing is complete, + either <code class="Dv">ZIP_SOURCE_COMMIT_WRITE</code> or + <code class="Dv">ZIP_SOURCE_ROLLBACK_WRITE</code> will be called. +<div class="Pp"></div> +<code class="Dv">ZIP_SOURCE_STAT</code> can be issued at any time. +<div class="Pp"></div> +<code class="Dv">ZIP_SOURCE_ERROR</code> will only be issued in response to the + function returning -1. +<div class="Pp"></div> +<code class="Dv">ZIP_SOURCE_FREE</code> will be the last command issued; if + <code class="Dv">ZIP_SOURCE_OPEN</code> was called and succeeded, + <code class="Dv">ZIP_SOURCE_CLOSE</code> will be called before + <code class="Dv">ZIP_SOURCE_FREE</code>, and similarly for + <code class="Dv">ZIP_SOURCE_BEGIN_WRITE</code> or + <code class="Dv">ZIP_SOURCE_BEGIN_WRITE_CLONING</code> and + <code class="Dv">ZIP_SOURCE_COMMIT_WRITE</code> or + <code class="Dv">ZIP_SOURCE_ROLLBACK_WRITE</code>. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, the created source is returned. Otherwise, + <code class="Dv">NULL</code> is returned and the error code in + <var class="Ar">archive</var> or <var class="Ar">error</var> is set to + indicate the error (unless it is <code class="Dv">NULL</code>). +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_source_function</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_add.html">zip_add(3)</a>, + <a class="Xr" href="zip_replace.html">zip_replace(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_stat_init.html">zip_stat_init(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_function</b>() and + <b class="Fn">zip_source_function_create</b>() were added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_is_deleted.html b/man/zip_source_is_deleted.html new file mode 100644 index 0000000..e8d576e --- /dev/null +++ b/man/zip_source_is_deleted.html
@@ -0,0 +1,59 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_IS_DELETED(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_IS_DELETED(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_IS_DELETED(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_is_deleted</b> — <span class="Nd">check if + zip_source is deleted</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_source_is_deleted</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_is_deleted</b>() returns whether the + zip_source was deleted. This can for example happen when all entries are + removed from a zip archive. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +<b class="Fn">zip_source_is_deleted</b>() returns 1 if the zip_source is deleted + and 0 otherwise. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_is_deleted</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_keep.html b/man/zip_source_keep.html new file mode 100644 index 0000000..6e6cd09 --- /dev/null +++ b/man/zip_source_keep.html
@@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_KEEP(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_KEEP(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_KEEP(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_keep</b> — <span class="Nd">increment reference + count of zip data source</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_source_keep</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_keep</b>() increments the reference count + of <var class="Ar">source</var>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_free.html">zip_source_free(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_keep</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_make_command_bitmap.html b/man/zip_source_make_command_bitmap.html new file mode 100644 index 0000000..1f356ad --- /dev/null +++ b/man/zip_source_make_command_bitmap.html
@@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_MAKE_COMMAND_BITMAP(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_MAKE_COMMAND_BITMAP(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_MAKE_COMMAND_BITMAP(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_make_command_bitmap</b> — <span class="Nd">create + bitmap of supported source operations</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_source_make_command_bitmap</b>(<var class="Fa" style="white-space: nowrap;">zip_source_cmd_t + command</var>, <var class="Fa" style="white-space: nowrap;">...</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_source_make_command_bitmap</b>() function returns a bitmap + of source commands suitable as return value for + <code class="Dv">ZIP_SOURCE_SUPPORTS</code>. It includes all the commands from + the argument list, which must be terminated by -1. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source_function.html">zip_source_function(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_make_command_bitmap</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_open.html b/man/zip_source_open.html new file mode 100644 index 0000000..8a18acc --- /dev/null +++ b/man/zip_source_open.html
@@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_OPEN(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_OPEN(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_OPEN(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_open</b> — <span class="Nd">open zip_source for + reading</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_source_open</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_open</b>() opens + <var class="Fa">source</var> for reading. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">source</var> is set to indicate the + error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_begin_write.html">zip_source_begin_write(3)</a>, + <a class="Xr" href="zip_source_close.html">zip_source_close(3)</a>, + <a class="Xr" href="zip_source_read.html">zip_source_read(3)</a>, + <a class="Xr" href="zip_source_seek.html">zip_source_seek(3)</a>, + <a class="Xr" href="zip_source_tell.html">zip_source_tell(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_open</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_read.html b/man/zip_source_read.html new file mode 100644 index 0000000..0e96b77 --- /dev/null +++ b/man/zip_source_read.html
@@ -0,0 +1,68 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_READ(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_READ(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_READ(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_read</b> — <span class="Nd">read data from zip + source</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_source_read</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>, <var class="Fa" style="white-space: nowrap;">void *data</var>, + <var class="Fa" style="white-space: nowrap;">zip_uint64_t len</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_read</b>() reads up to + <var class="Ar">len</var> bytes of data from <var class="Ar">source</var> at + the current read offset into the buffer <var class="Ar">data</var>. +<div class="Pp"></div> +The zip source <var class="Ar">source</var> has to be opened for reading by + calling <a class="Xr" href="zip_source_open.html">zip_source_open(3)</a> + first. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion the number of bytes read is returned. Upon reading + end-of-file, zero is returned. Otherwise, -1 is returned and the error + information in <var class="Ar">source</var> is set to indicate the error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_seek.html">zip_source_seek(3)</a>, + <a class="Xr" href="zip_source_tell.html">zip_source_tell(3)</a>, + <a class="Xr" href="zip_source_write.html">zip_source_write(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_read</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_rollback_write.html b/man/zip_source_rollback_write.html new file mode 100644 index 0000000..0659346 --- /dev/null +++ b/man/zip_source_rollback_write.html
@@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_ROLLBACK_WRITE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_ROLLBACK_WRITE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_ROLLBACK_WRITE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_rollback_write</b> — <span class="Nd">undo + changes to zip source</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_source_rollback_write</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_rollback_write</b>() reverts changes + written to <var class="Fa">source</var>, restoring the data before + <a class="Xr" href="zip_source_begin_write.html">zip_source_begin_write(3)</a> + was called. Usually this removes temporary files or frees buffers. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">source</var> is set to indicate the + error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_begin_write.html">zip_source_begin_write(3)</a>, + <a class="Xr" href="zip_source_commit_write.html">zip_source_commit_write(3)</a>, + <a class="Xr" href="zip_source_seek_write.html">zip_source_seek_write(3)</a>, + <a class="Xr" href="zip_source_tell_write.html">zip_source_tell_write(3)</a>, + <a class="Xr" href="zip_source_write.html">zip_source_write(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_rollback_write</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_seek.html b/man/zip_source_seek.html new file mode 100644 index 0000000..8b8e1e3 --- /dev/null +++ b/man/zip_source_seek.html
@@ -0,0 +1,81 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_SEEK(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_SEEK(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_SEEK(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_seek</b> — <span class="Nd">set read offset in + zip source</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_source_seek</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t + offset</var>, <var class="Fa" style="white-space: nowrap;">int whence</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_seek</b>() sets the current read offset + for <var class="Fa">source</var>. Just like in + <a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/fseek.html">fseek(3)</a>, depending on the + <var class="Ar">whence</var> argument, the <var class="Ar">offset</var> is + counted relative from: +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 10.00ex;"> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><code class="Dv">SEEK_SET</code></dt> + <dd class="It-tag">start of file</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><code class="Dv">SEEK_CUR</code></dt> + <dd class="It-tag">current read offset in file</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><code class="Dv">SEEK_END</code></dt> + <dd class="It-tag">end of file</dd> +</dl> +</div> +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">source</var> is set to indicate the + error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_read.html">zip_source_read(3)</a>, + <a class="Xr" href="zip_source_tell.html">zip_source_tell(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_seek</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_seek_compute_offset.html b/man/zip_source_seek_compute_offset.html new file mode 100644 index 0000000..2e77399 --- /dev/null +++ b/man/zip_source_seek_compute_offset.html
@@ -0,0 +1,74 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_SEEK_COMPUTE_OFFSET(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_SEEK_COMPUTE_OFFSET(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_SEEK_COMPUTE_OFFSET(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_seek_compute_offset</b> — + <span class="Nd">validate arguments and compute offset</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_source_seek_compute_offset</b>(<var class="Fa" style="white-space: nowrap;">zip_uint64_t + offset</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + length</var>, <var class="Fa" style="white-space: nowrap;">void *data</var>, + <var class="Fa" style="white-space: nowrap;">zip_uint64_t data_length</var>, + <var class="Fa" style="white-space: nowrap;">zip_error_t *error</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +Use this function to compute the offset for a + <code class="Dv">ZIP_SOURCE_SEEK</code> or + <code class="Dv">ZIP_SOURCE_SEEK_WRITE</code> command. + <var class="Ar">data</var> and <var class="Ar">data_length</var> are the + arguments to the source callback, <var class="Ar">offset</var> is the current + offset and <var class="Ar">length</var> is the length of the source data or, + for <code class="Dv">ZIP_SOURCE_SEEK_WRITE</code>, the amount of data written. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +On success, it returns the new offset, on error it returns -1 and sets + <var class="Ar">error</var>. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_source_seek_compute_offset</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag">One of the arguments is invalid or the seek would place the + offset outside the data.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="zip_source_function.html">zip_source_function(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_seek_compute_offset</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_seek_write.html b/man/zip_source_seek_write.html new file mode 100644 index 0000000..1215b2c --- /dev/null +++ b/man/zip_source_seek_write.html
@@ -0,0 +1,84 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_SEEK_WRITE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_SEEK_WRITE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_SEEK_WRITE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_seek_write</b> — <span class="Nd">set write + offset in zip source</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_source_seek_write</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t + offset</var>, <var class="Fa" style="white-space: nowrap;">int whence</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_seek_write</b>() sets the current write + offset for <var class="Fa">source</var>. Just like in + <a class="Xr" href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/fseek.html">fseek(3)</a>, depending on the + <var class="Ar">whence</var> argument, the <var class="Ar">offset</var> is + counted relative from: +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 10.00ex;"> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><code class="Dv">SEEK_SET</code></dt> + <dd class="It-tag">start of file</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><code class="Dv">SEEK_CUR</code></dt> + <dd class="It-tag">current write offset in file</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><code class="Dv">SEEK_END</code></dt> + <dd class="It-tag">end of file</dd> +</dl> +</div> +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">source</var> is set to indicate the + error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_begin_write.html">zip_source_begin_write(3)</a>, + <a class="Xr" href="zip_source_commit_write.html">zip_source_commit_write(3)</a>, + <a class="Xr" href="zip_source_rollback_write.html">zip_source_rollback_write(3)</a>, + <a class="Xr" href="zip_source_tell_write.html">zip_source_tell_write(3)</a>, + <a class="Xr" href="zip_source_write.html">zip_source_write(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_seek_write</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_stat.html b/man/zip_source_stat.html new file mode 100644 index 0000000..897d55c --- /dev/null +++ b/man/zip_source_stat.html
@@ -0,0 +1,114 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_STAT(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_STAT(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_STAT(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_stat</b> — <span class="Nd">get information about + zip_source</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_source_stat</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>, <var class="Fa" style="white-space: nowrap;">zip_stat_t + *sb</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_source_stat</b>() function obtains information about the + zip source <var class="Ar">source</var> +<div class="Pp"></div> +The <var class="Ar">sb</var> argument is a pointer to a <var class="Ft">struct + zip_source_stat</var> (shown below), into which information about the zip + source is placed. +<div class="Pp"></div> +<div class="Bd" style="margin-left: 0.00ex;"> +<pre class="Li"> +struct zip_source_stat { + zip_uint64_t valid; /* which fields have valid values */ + const char *name; /* name of the file */ + zip_uint64_t index; /* index within archive */ + zip_uint64_t size; /* size of file (uncompressed) */ + zip_uint64_t comp_size; /* size of file (compressed) */ + time_t mtime; /* modification time */ + zip_uint32_t crc; /* crc of file data */ + zip_uint16_t comp_method; /* compression method used */ + zip_uint16_t encryption_method; /* encryption method used */ + zip_uint32_t flags; /* reserved for future use */ +}; +</pre> +</div> +The structure pointed to by <var class="Ar">sb</var> must be initialized with + <b class="Fn">zip_stat_init</b>(<var class="Fa">3</var>) before calling + <b class="Fn">zip_source_stat</b>(). +<div class="Pp"></div> +The <var class="Ar">valid</var> field of the structure specifies which other + fields are valid. Check if the flag defined by the following defines are in + <var class="Ar">valid</var> before accessing the fields: +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 35.00ex;"> + <dt class="It-tag" style="margin-left: -35.00ex;"><code class="Dv">ZIP_SOURCE_STAT_NAME</code></dt> + <dd class="It-tag"><var class="Ar">name</var></dd> + <dt class="It-tag" style="margin-left: -35.00ex;"><code class="Dv">ZIP_SOURCE_STAT_INDEX</code></dt> + <dd class="It-tag"><var class="Ar">index</var></dd> + <dt class="It-tag" style="margin-left: -35.00ex;"><code class="Dv">ZIP_SOURCE_STAT_SIZE</code></dt> + <dd class="It-tag"><var class="Ar">size</var></dd> + <dt class="It-tag" style="margin-left: -35.00ex;"><code class="Dv">ZIP_SOURCE_STAT_COMP_SIZE</code></dt> + <dd class="It-tag"><var class="Ar">comp_size</var></dd> + <dt class="It-tag" style="margin-left: -35.00ex;"><code class="Dv">ZIP_SOURCE_STAT_MTIME</code></dt> + <dd class="It-tag"><var class="Ar">mtime</var></dd> + <dt class="It-tag" style="margin-left: -35.00ex;"><code class="Dv">ZIP_SOURCE_STAT_CRC</code></dt> + <dd class="It-tag"><var class="Ar">crc</var></dd> + <dt class="It-tag" style="margin-left: -35.00ex;"><code class="Dv">ZIP_SOURCE_STAT_COMP_METHOD</code></dt> + <dd class="It-tag"><var class="Ar">comp_method</var></dd> + <dt class="It-tag" style="margin-left: -35.00ex;"><code class="Dv">ZIP_SOURCE_STAT_ENCRYPTION_METHOD</code></dt> + <dd class="It-tag"><var class="Ar">encryption_method</var></dd> + <dt class="It-tag" style="margin-left: -35.00ex;"><code class="Dv">ZIP_SOURCE_STAT_FLAGS</code></dt> + <dd class="It-tag"><var class="Ar">flags</var></dd> +</dl> +</div> +<div class="Pp"></div> +<i class="Em">NOTE</i>: Some fields may only be filled out after all data has + been read from the source, for example the <var class="Ar">crc</var> or + <var class="Ar">size</var> fields. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">source</var> is set to indicate the + error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_stat</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_tell.html b/man/zip_source_tell.html new file mode 100644 index 0000000..0c4bb15 --- /dev/null +++ b/man/zip_source_tell.html
@@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_TELL(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_TELL(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_TELL(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_tell</b> — <span class="Nd">report current read + offset in zip source</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_source_tell</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_tell</b>() returns the current read offset + for <var class="Fa">source</var>. The return value can be passed to + <a class="Xr" href="zip_source_seek.html">zip_source_seek(3)</a> with + <var class="Ar">whence</var> set to <code class="Dv">SEEK_SET</code> to return + to the same location in the source. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion the current read offset is returned. Otherwise, -1 is + returned and the error information in <var class="Ar">source</var> is set to + indicate the error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_read.html">zip_source_read(3)</a>, + <a class="Xr" href="zip_source_tell_write.html">zip_source_tell_write(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_tell</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_tell_write.html b/man/zip_source_tell_write.html new file mode 100644 index 0000000..dd103da --- /dev/null +++ b/man/zip_source_tell_write.html
@@ -0,0 +1,67 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_TELL_WRITE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_TELL_WRITE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_TELL_WRITE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_tell_write</b> — <span class="Nd">report current + write offset in zip source</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_source_tell_write</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_tell_write</b>() returns the current write + offset for <var class="Fa">source</var>. The return value can be passed to + <a class="Xr" href="zip_source_seek_write.html">zip_source_seek_write(3)</a> + with <var class="Ar">whence</var> set to <code class="Dv">SEEK_SET</code> to + return to the same location in the source. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion the current write offset is returned. Otherwise, -1 + is returned and the error information in <var class="Ar">source</var> is set + to indicate the error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_begin_write.html">zip_source_begin_write(3)</a>, + <a class="Xr" href="zip_source_commit_write.html">zip_source_commit_write(3)</a>, + <a class="Xr" href="zip_source_rollback_write.html">zip_source_rollback_write(3)</a>, + <a class="Xr" href="zip_source_tell.html">zip_source_tell(3)</a>, + <a class="Xr" href="zip_source_write.html">zip_source_write(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_tell_write</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_win32a.html b/man/zip_source_win32a.html new file mode 100644 index 0000000..661b04e --- /dev/null +++ b/man/zip_source_win32a.html
@@ -0,0 +1,104 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_WIN32A(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_WIN32A(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_WIN32A(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_win32a</b>, <b class="Nm">zip_source_win32a_create</b> + — <span class="Nd">create data source from a Windows ANSI file + name</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_win32a</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">const char + *fname</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + start</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t + len</var>); +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_win32a_create</b>(<var class="Fa" style="white-space: nowrap;">const + char *fname</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + start</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t + len</var>, <var class="Fa" style="white-space: nowrap;">zip_error_t + *error</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The functions <b class="Fn">zip_source_win32a</b>() and + <b class="Fn">zip_source_win32a_create</b>() create a zip source on Windows + using a Windows ANSI name. They open <var class="Ar">fname</var> and read + <var class="Ar">len</var> bytes from offset <var class="Ar">start</var> from + it. If <var class="Ar">len</var> is 0 or -1, the whole file (starting from + <var class="Ar">start</var>) is used. +<div class="Pp"></div> +If the file supports seek, the source can be used to open a zip archive from. +<div class="Pp"></div> +The file is opened and read when the data from the source is used, usually by + <b class="Fn">zip_close</b>() or <b class="Fn">zip_open_from_source</b>(). +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, the created source is returned. Otherwise, + <code class="Dv">NULL</code> is returned and the error code in + <var class="Ar">archive</var> or <var class="Ar">error</var> is set to + indicate the error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_source_win32a</b>() and + <b class="Fn">zip_source_win32a_create</b>() fail if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">fname</var>, <var class="Ar">start</var>, + or <var class="Ar">len</var> are invalid.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_OPEN</code>]</dt> + <dd class="It-tag">Opening <var class="Ar">fname</var> failed.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_add.html">zip_add(3)</a>, + <a class="Xr" href="zip_replace.html">zip_replace(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_win32handle.html">zip_source_win32handle(3)</a>, + <a class="Xr" href="zip_source_win32w.html">zip_source_win32w(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_win32a</b>() and + <b class="Fn">zip_source_win32a_create</b>() were added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_win32handle.html b/man/zip_source_win32handle.html new file mode 100644 index 0000000..b485a72 --- /dev/null +++ b/man/zip_source_win32handle.html
@@ -0,0 +1,103 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_WIN32HANDLE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_WIN32HANDLE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_WIN32HANDLE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_win32handle</b>, + <b class="Nm">zip_source_win32handle_create</b> — + <span class="Nd">create data source from a Windows file handle</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_win32handle</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">HANDLE h</var>, + <var class="Fa" style="white-space: nowrap;">zip_uint64_t start</var>, + <var class="Fa" style="white-space: nowrap;">zip_int64_t len</var>); +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_win32handle_create</b>(<var class="Fa" style="white-space: nowrap;">HANDLE + h</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + start</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t + len</var>, <var class="Fa" style="white-space: nowrap;">zip_error_t + *error</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The functions <b class="Fn">zip_source_win32handle</b>() and + <b class="Fn">zip_source_win32handle_create</b>() create a zip source from a + Windows file handle. They open <var class="Ar">fname</var> and read + <var class="Ar">len</var> bytes from offset <var class="Ar">start</var> from + it. If <var class="Ar">len</var> is 0 or -1, the whole file (starting from + <var class="Ar">start</var>) is used. +<div class="Pp"></div> +If the file supports seek, the source can be used to open a zip archive from. +<div class="Pp"></div> +The file is opened and read when the data from the source is used, usually by + <b class="Fn">zip_close</b>() or <b class="Fn">zip_open_from_source</b>(). +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, the created source is returned. Otherwise, + <code class="Dv">NULL</code> is returned and the error code in + <var class="Ar">archive</var> or <var class="Ar">error</var> is set to + indicate the error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_source_w32handle</b>() and + <b class="Fn">zip_source_w32handle_create</b>() fail if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">fname</var>, <var class="Ar">start</var>, + or <var class="Ar">len</var> are invalid.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_OPEN</code>]</dt> + <dd class="It-tag">Opening <var class="Ar">fname</var> failed.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_add.html">zip_add(3)</a>, + <a class="Xr" href="zip_replace.html">zip_replace(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_win32a.html">zip_source_win32a(3)</a>, + <a class="Xr" href="zip_source_win32w.html">zip_source_win32w(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_win32handle</b>() and + <b class="Fn">zip_source_win32handle_create</b>() were added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_win32w.html b/man/zip_source_win32w.html new file mode 100644 index 0000000..08d4acf --- /dev/null +++ b/man/zip_source_win32w.html
@@ -0,0 +1,103 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_WIN32W(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_WIN32W(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_WIN32W(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_win32w</b>, <b class="Nm">zip_source_win32w_create</b> + — <span class="Nd">create data source from a Windows Unicode file + name</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_win32w</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">const char + *fname</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + start</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t + len</var>); +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_win32w_create</b>(<var class="Fa" style="white-space: nowrap;">const + char *fname</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + start</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t + len</var>, <var class="Fa" style="white-space: nowrap;">zip_error_t + *error</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The functions <b class="Fn">zip_source_win32w</b>() and + <b class="Fn">zip_source_win32w_create</b>() create a zip source on Windows + using a Windows Unicode name. They open <var class="Ar">fname</var> and read + <var class="Ar">len</var> bytes from offset <var class="Ar">start</var> from + it. If <var class="Ar">len</var> is 0 or -1, the whole file (starting from + <var class="Ar">start</var>) is used. +<div class="Pp"></div> +If the file supports seek, the source can be used to open a zip archive from. +<div class="Pp"></div> +The file is opened and read when the data from the source is used, usually by + <b class="Fn">zip_close</b>() or <b class="Fn">zip_open_from_source</b>(). +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, the created source is returned. Otherwise, + <code class="Dv">NULL</code> is returned and the error code in + <var class="Ar">archive</var> or <var class="Ar">error</var> is set to + indicate the error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_source_win32w</b>() and + <b class="Fn">zip_source_win32w_create</b>() fail if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">fname</var>, <var class="Ar">start</var>, + or <var class="Ar">len</var> are invalid.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_OPEN</code>]</dt> + <dd class="It-tag">Opening <var class="Ar">fname</var> failed.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_add.html">zip_add(3)</a>, + <a class="Xr" href="zip_replace.html">zip_replace(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_win32a.html">zip_source_win32a(3)</a>, + <a class="Xr" href="zip_source_win32handle.html">zip_source_win32handle(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_win32w</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_write.html b/man/zip_source_write.html new file mode 100644 index 0000000..08e96c8 --- /dev/null +++ b/man/zip_source_write.html
@@ -0,0 +1,72 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_WRITE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_WRITE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_WRITE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_write</b> — <span class="Nd">write data to zip + source</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_int64_t</var> +<br/> +<b class="Fn">zip_source_write</b>(<var class="Fa" style="white-space: nowrap;">zip_source_t + *source</var>, <var class="Fa" style="white-space: nowrap;">const void + *data</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + len</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_write</b>() writes + <var class="Ar">len</var> bytes from the buffer <var class="Ar">data</var> to + the zip source <var class="Ar">source</var> at the current write offset. +<div class="Pp"></div> +The zip source <var class="Ar">source</var> has to be prepared for writing by + calling + <a class="Xr" href="zip_source_begin_write.html">zip_source_begin_write(3)</a> + first. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion the number of bytes written is returned. Otherwise, + -1 is returned and the error information in <var class="Ar">source</var> is + set to indicate the error. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a>, + <a class="Xr" href="zip_source_begin_write.html">zip_source_begin_write(3)</a>, + <a class="Xr" href="zip_source_commit_write.html">zip_source_commit_write(3)</a>, + <a class="Xr" href="zip_source_rollback_write.html">zip_source_rollback_write(3)</a>, + <a class="Xr" href="zip_source_seek_write.html">zip_source_seek_write(3)</a>, + <a class="Xr" href="zip_source_tell_write.html">zip_source_tell_write(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_write</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_source_zip.html b/man/zip_source_zip.html new file mode 100644 index 0000000..f315116 --- /dev/null +++ b/man/zip_source_zip.html
@@ -0,0 +1,108 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_SOURCE_ZIP(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_SOURCE_ZIP(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_SOURCE_ZIP(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_source_zip</b> — <span class="Nd">create data source + from zip file</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">zip_source_t *</var> +<br/> +<b class="Fn">zip_source_zip</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">zip_t + *srcarchive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + srcidx</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t + flags</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + start</var>, <var class="Fa" style="white-space: nowrap;">zip_int64_t + len</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The function <b class="Fn">zip_source_zip</b>() creates a zip source from a file + in a zip archive. The <var class="Ar">srcarchive</var> argument is the (open) + zip archive containing the source zip file at index + <var class="Ar">srcidx</var>. <var class="Ar">len</var> bytes from offset + <var class="Ar">start</var> will be used in the zip_source. If + <var class="Ar">len</var> is 0 or -1, the rest of the file, starting from + <var class="Ar">start</var>, is used. If <var class="Ar">start</var> is zero + and <var class="Ar">len</var> is -1, the whole file will be copied without + decompressing it. +<div class="Pp"></div> +Supported flags are: +<dl class="Bl-tag" style="margin-left: 21.00ex;"> + <dt class="It-tag" style="margin-left: -21.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -21.00ex;"><code class="Dv">ZIP_FL_UNCHANGED</code></dt> + <dd class="It-tag">Try to get the original data without any changes that may + have been made to <var class="Ar">srcarchive</var> after opening it.</dd> + <dt class="It-tag" style="margin-left: -21.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -21.00ex;"><code class="Dv">ZIP_FL_RECOMPRESS</code></dt> + <dd class="It-tag">When adding the data from <var class="Ar">srcarchive</var>, + re-compress it using the current settings instead of copying the + compressed data.</dd> +</dl> +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion, the created source is returned. Otherwise, + <code class="Dv">NULL</code> is returned and the error code in + <var class="Ar">archive</var> is set to indicate the error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_source_zip</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_CHANGED</code>]</dt> + <dd class="It-tag">Unchanged data was requested, but it is not available.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">srcarchive</var>, + <var class="Ar">srcidx</var>, <var class="Ar">start</var>, or + <var class="Ar">len</var> are invalid.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_MEMORY</code>]</dt> + <dd class="It-tag">Required memory could not be allocated.</dd> +</dl> +Additionally, it can return all error codes from + <b class="Fn">zip_stat_index</b>() and <b class="Fn">zip_fopen_index</b>(). +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_add.html">zip_add(3)</a>, + <a class="Xr" href="zip_replace.html">zip_replace(3)</a>, + <a class="Xr" href="zip_source.html">zip_source(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_source_zip</b>() was added in libzip 1.0. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_stat.html b/man/zip_stat.html new file mode 100644 index 0000000..5c2bed5 --- /dev/null +++ b/man/zip_stat.html
@@ -0,0 +1,148 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_STAT(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_STAT(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_STAT(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_stat</b>, <b class="Nm">zip_stat_index</b> — + <span class="Nd">get information about file</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_stat</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">const char + *fname</var>, <var class="Fa" style="white-space: nowrap;">zip_flags_t + flags</var>, <var class="Fa" style="white-space: nowrap;">zip_stat_t + *sb</var>); +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_stat_index</b>(<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_stat_t + *sb</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_stat</b>() function obtains information about the file + named <var class="Ar">fname</var> in <var class="Ar">archive</var>. The + <var class="Ar">flags</var> argument specifies how the name lookup should be + done. Its values are described in + <a class="Xr" href="zip_name_locate.html">zip_name_locate(3)</a>. Also, + <code class="Dv">ZIP_FL_UNCHANGED</code> may be + <i class="Em">or</i><span class="No">'ed</span> to it to request information + about the original file in the archive, ignoring any changes made. +<div class="Pp"></div> +The <b class="Fn">zip_stat_index</b>() function obtains information about the + file at position <var class="Ar">index</var>. +<div class="Pp"></div> +The <var class="Ar">sb</var> argument is a pointer to a <var class="Ft">struct + zip_stat</var> (shown below), into which information about the file is placed. +<div class="Pp"></div> +<div class="Bd" style="margin-left: 0.00ex;"> +<pre class="Li"> +struct zip_stat { + zip_uint64_t valid; /* which fields have valid values */ + const char *name; /* name of the file */ + zip_uint64_t index; /* index within archive */ + zip_uint64_t size; /* size of file (uncompressed) */ + zip_uint64_t comp_size; /* size of file (compressed) */ + time_t mtime; /* modification time */ + zip_uint32_t crc; /* crc of file data */ + zip_uint16_t comp_method; /* compression method used */ + zip_uint16_t encryption_method; /* encryption method used */ + zip_uint32_t flags; /* reserved for future use */ +}; +</pre> +</div> +The structure pointed to by <var class="Ar">sb</var> must be allocated before + calling <b class="Fn">zip_stat</b>() or <b class="Fn">zip_stat_index</b>(). +<div class="Pp"></div> +The <var class="Ar">valid</var> field of the structure specifies which other + fields are valid. Check if the flag defined by the following defines are in + <var class="Ar">valid</var> before accessing the fields: +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 28.00ex;"> + <dt class="It-tag" style="margin-left: -28.00ex;"><code class="Dv">ZIP_STAT_NAME</code></dt> + <dd class="It-tag"><var class="Ar">name</var></dd> + <dt class="It-tag" style="margin-left: -28.00ex;"><code class="Dv">ZIP_STAT_INDEX</code></dt> + <dd class="It-tag"><var class="Ar">index</var></dd> + <dt class="It-tag" style="margin-left: -28.00ex;"><code class="Dv">ZIP_STAT_SIZE</code></dt> + <dd class="It-tag"><var class="Ar">size</var></dd> + <dt class="It-tag" style="margin-left: -28.00ex;"><code class="Dv">ZIP_STAT_COMP_SIZE</code></dt> + <dd class="It-tag"><var class="Ar">comp_size</var></dd> + <dt class="It-tag" style="margin-left: -28.00ex;"><code class="Dv">ZIP_STAT_MTIME</code></dt> + <dd class="It-tag"><var class="Ar">mtime</var></dd> + <dt class="It-tag" style="margin-left: -28.00ex;"><code class="Dv">ZIP_STAT_CRC</code></dt> + <dd class="It-tag"><var class="Ar">crc</var></dd> + <dt class="It-tag" style="margin-left: -28.00ex;"><code class="Dv">ZIP_STAT_COMP_METHOD</code></dt> + <dd class="It-tag"><var class="Ar">comp_method</var></dd> + <dt class="It-tag" style="margin-left: -28.00ex;"><code class="Dv">ZIP_STAT_ENCRYPTION_METHOD</code></dt> + <dd class="It-tag"><var class="Ar">encryption_method</var></dd> + <dt class="It-tag" style="margin-left: -28.00ex;"><code class="Dv">ZIP_STAT_FLAGS</code></dt> + <dd class="It-tag"><var class="Ar">flags</var></dd> +</dl> +</div> +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +Upon successful completion 0 is returned. Otherwise, -1 is returned and the + error information in <var class="Ar">archive</var> is set to indicate the + error. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +The function <b class="Fn">zip_stat</b>() can fail for any of the errors + specified for the routine + <a class="Xr" href="zip_name_locate.html">zip_name_locate(3)</a>. +<div class="Pp"></div> +The function <b class="Fn">zip_stat_index</b>() fails and sets the error + information to <code class="Er">ZIP_ER_INVAL</code> if + <var class="Ar">index</var> is invalid. If + <code class="Dv">ZIP_FL_UNCHANGED</code> is not set and no information can be + obtained from the source callback, the error information is set to + <code class="Er">ZIP_ER_CHANGED</code>. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_get_num_entries.html">zip_get_num_entries(3)</a>, + <a class="Xr" href="zip_name_locate.html">zip_name_locate(3)</a>, + <a class="Xr" href="zip_stat_init.html">zip_stat_init(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_stat</b>() was added in libzip 0.6. In libzip 0.11 the type of + <var class="Ar">flags</var> was changed from <var class="Vt">int</var> to + <var class="Vt">zip_flags_t</var>. +<div class="Pp"></div> +<b class="Fn">zip_stat_index</b>() 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>. In libzip 0.11 the type of + <var class="Ar">flags</var> was changed from <var class="Vt">int</var> to + <var class="Vt">zip_flags_t</var>. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_stat_init.html b/man/zip_stat_init.html new file mode 100644 index 0000000..5e4b8f5 --- /dev/null +++ b/man/zip_stat_init.html
@@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_STAT_INIT(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_STAT_INIT(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_STAT_INIT(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_stat_init</b> — <span class="Nd">initialize zip_stat + structure</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">void</var> +<br/> +<b class="Fn">zip_stat_init</b>(<var class="Fa" style="white-space: nowrap;">zip_stat_t + *sb</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +The <b class="Fn">zip_stat_init</b>() function initializes the members of a + struct zip_stat. The current members are described in + <a class="Xr" href="zip_stat.html">zip_stat(3)</a>, but this function should + be used to initialize it to make sure none are missed. The structure pointed + to by <var class="Ar">sb</var> must be allocated before calling + <b class="Fn">zip_stat_init</b>(). +<div class="Pp"></div> +This function should be used by functions provided to + <a class="Xr" href="zip_source_function.html">zip_source_function(3)</a> when + returning <code class="Dv">ZIP_SOURCE_STAT</code> information to make sure all + fields are initialized. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</h1> +If <var class="Ar">sb</var> is valid, the function is always successful. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_stat.html">zip_stat(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_stat_init</b>() was added in libzip 0.8. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_unchange.html b/man/zip_unchange.html new file mode 100644 index 0000000..5a00879 --- /dev/null +++ b/man/zip_unchange.html
@@ -0,0 +1,75 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_UNCHANGE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_UNCHANGE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_UNCHANGE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_unchange</b> — <span class="Nd">undo changes to file in + zip archive</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_unchange</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>, <var class="Fa" style="white-space: nowrap;">zip_uint64_t + index</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +Changes to the file at position <var class="Ar">index</var> are reverted. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="ERRORS">ERRORS</h1> +<b class="Fn">zip_unchange</b>() fails if: +<dl class="Bl-tag" style="margin-left: 17.00ex;"> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_EXISTS</code>]</dt> + <dd class="It-tag">Unchanging the name would result in a duplicate name in the + archive.</dd> + <dt class="It-tag" style="margin-left: -17.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -17.00ex;">[<code class="Er">ZIP_ER_INVAL</code>]</dt> + <dd class="It-tag"><var class="Ar">index</var> is not a valid file index in + <var class="Ar">zip</var>.</dd> +</dl> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_unchange_all.html">zip_unchange_all(3)</a>, + <a class="Xr" href="zip_unchange_archive.html">zip_unchange_archive(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_unchange</b>() 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>. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_unchange_all.html b/man/zip_unchange_all.html new file mode 100644 index 0000000..db5a65c --- /dev/null +++ b/man/zip_unchange_all.html
@@ -0,0 +1,59 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_UNCHANGE_ALL(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_UNCHANGE_ALL(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_UNCHANGE_ALL(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_unchange_all</b> — <span class="Nd">undo all changes in + a zip archive</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_unchange_all</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +All changes to files and global information in <var class="Ar">archive</var> are + reverted. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_unchange.html">zip_unchange(3)</a>, + <a class="Xr" href="zip_unchange_archive.html">zip_unchange_archive(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_unchange_all</b>() was added in libzip 0.6. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zip_unchange_archive.html b/man/zip_unchange_archive.html new file mode 100644 index 0000000..e7884c0 --- /dev/null +++ b/man/zip_unchange_archive.html
@@ -0,0 +1,59 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIP_UNCHANGE_ARCHIVE(3)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIP_UNCHANGE_ARCHIVE(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">ZIP_UNCHANGE_ARCHIVE(3)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zip_unchange_archive</b> — <span class="Nd">undo global + changes to zip archive</span> +<h1 class="Sh" id="LIBRARY">LIBRARY</h1> +libzip (-lzip) +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<b class="In">#include <<a class="In">zip.h</a>></b> +<div class="Pp"></div> +<var class="Ft">int</var> +<br/> +<b class="Fn">zip_unchange_archive</b>(<var class="Fa" style="white-space: nowrap;">zip_t + *archive</var>); +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +Revert all global changes to the archive <var class="Ar">archive</var>. This + reverts changes to the archive comment and global flags. +<h1 class="Sh" id="RETURN_VALUES">RETURN VALUES</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. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="libzip.html">libzip(3)</a>, + <a class="Xr" href="zip_unchange.html">zip_unchange(3)</a>, + <a class="Xr" href="zip_unchange_all.html">zip_unchange_all(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Fn">zip_unchange_archive</b>() was added in libzip 0.7. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zipcmp.html b/man/zipcmp.html new file mode 100644 index 0000000..d974497 --- /dev/null +++ b/man/zipcmp.html
@@ -0,0 +1,100 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIPCMP(1)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIPCMP(1)</td> + <td class="head-vol">General Commands Manual</td> + <td class="head-rtitle">ZIPCMP(1)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zipcmp</b> — <span class="Nd">compare contents of zip + archives</span> +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<table class="Nm"> + <colgroup> + <col style="width: 6.00ex;"/> + <col/> + </colgroup> + <tr> + <td><b class="Nm">zipcmp</b></td> + <td>[<span class="Op"><b class="Fl">-hipqtVv</b></span>] + <var class="Ar">archive1 archive2</var></td> + </tr> +</table> +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +<b class="Nm">zipcmp</b> compares the zip archives or directories + <var class="Ar">archive1</var> and <var class="Ar">archive2</var> and checks + if they contain the same files, comparing their names, uncompressed sizes, and + CRCs. File order and compressed size differences are ignored. +<div class="Pp"></div> +Supported options: +<dl class="Bl-tag" style="margin-left: 3.00ex;"> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-h</b></dt> + <dd class="It-tag">Display a short help message and exit.</dd> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-i</b></dt> + <dd class="It-tag">Compare names ignoring case distinctions.</dd> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-p</b></dt> + <dd class="It-tag">Enable paranoid checks. Compares extra fields and other + meta data. (Automatically disabled if one of the archives is a + directory.)</dd> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-q</b></dt> + <dd class="It-tag">Quiet mode. Compare <b class="Fl">-v</b>.</dd> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-t</b></dt> + <dd class="It-tag">Test zip files by comparing the contents to their + checksums.</dd> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-V</b></dt> + <dd class="It-tag">Display version information and exit.</dd> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-v</b></dt> + <dd class="It-tag">Verbose mode. Print details about differences to stdout. + (This is the default.)</dd> +</dl> +<h1 class="Sh" id="EXIT_STATUS">EXIT STATUS</h1> +<b class="Nm">zipcmp</b> exits 0 if the two archives contain the same files, 1 + if they differ, and >1 if an error occurred. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="zipmerge.html">zipmerge(1)</a>, + <a class="Xr" href="ziptool.html">ziptool(1)</a>, + <a class="Xr" href="libzip.html">libzip(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Nm">zipcmp</b> was added in libzip 0.6. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/zipmerge.html b/man/zipmerge.html new file mode 100644 index 0000000..0598209 --- /dev/null +++ b/man/zipmerge.html
@@ -0,0 +1,100 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIPMERGE(1)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIPMERGE(1)</td> + <td class="head-vol">General Commands Manual</td> + <td class="head-rtitle">ZIPMERGE(1)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">zipmerge</b> — <span class="Nd">merge zip archives</span> +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<table class="Nm"> + <colgroup> + <col style="width: 8.00ex;"/> + <col/> + </colgroup> + <tr> + <td><b class="Nm">zipmerge</b></td> + <td>[<span class="Op"><b class="Fl">-DhIiSsV</b></span>] + <var class="Ar">target-zip</var> <var class="Ar">source-zip</var> + [<span class="Op"><var class="Ar">source-zip ...</var></span>]</td> + </tr> +</table> +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +<b class="Nm">zipmerge</b> merges the source zip archives + <var class="Ar">source-zip</var> into the target zip archive + <var class="Ar">target-zip</var>. By default, files in the source zip archives + overwrite existing files of the same name in the target zip archive. +<div class="Pp"></div> +Supported options: +<dl class="Bl-tag" style="margin-left: 3.00ex;"> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-D</b></dt> + <dd class="It-tag">Ignore directory components in file name comparisons. This + option is slow for archives with many files.</dd> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-h</b></dt> + <dd class="It-tag">Display a short help message and exit.</dd> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-I</b></dt> + <dd class="It-tag">Ignore case in file name comparisons This option is slow + for archives with many files.</dd> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-i</b></dt> + <dd class="It-tag">Ask before overwriting files. See also + <b class="Fl">-s</b>.</dd> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-S</b></dt> + <dd class="It-tag">Do not overwrite files that have the same size and CRC32 in + both the source and target archives.</dd> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-s</b></dt> + <dd class="It-tag">When <b class="Fl">-i</b> is given, do not before + overwriting files that have the same size and CRC32.</dd> + <dt class="It-tag" style="margin-left: -3.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><b class="Fl">-V</b></dt> + <dd class="It-tag">Display version information and exit.</dd> +</dl> +<h1 class="Sh" id="EXIT_STATUS">EXIT STATUS</h1> +<b class="Nm">zipmerge</b> exits 0 on success and >1 if an error occurred. +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="zipcmp.html">zipcmp(1)</a>, + <a class="Xr" href="ziptool.html">ziptool(1)</a>, + <a class="Xr" href="libzip.html">libzip(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Nm">zipmerge</b> was added in libzip 0.6. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>
diff --git a/man/ziptool.html b/man/ziptool.html new file mode 100644 index 0000000..be0e366 --- /dev/null +++ b/man/ziptool.html
@@ -0,0 +1,355 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"/> + <style> + table.head, table.foot { width: 100%; } + td.head-rtitle, td.foot-os { text-align: right; } + td.head-vol { text-align: center; } + div.Pp { margin: 1ex 0ex; } + </style> + <link rel="stylesheet" href="../nih-man.css" type="text/css" media="all"/> + <title>ZIPTOOL(1)</title> +</head> +<body> +<table class="head"> + <tr> + <td class="head-ltitle">ZIPTOOL(1)</td> + <td class="head-vol">General Commands Manual</td> + <td class="head-rtitle">ZIPTOOL(1)</td> + </tr> +</table> +<div class="manual-text"> +<h1 class="Sh" id="NAME">NAME</h1> +<b class="Nm">ziptool</b> — <span class="Nd">modify zip archives</span> +<h1 class="Sh" id="SYNOPSIS">SYNOPSIS</h1> +<table class="Nm"> + <colgroup> + <col style="width: 7.00ex;"/> + <col/> + </colgroup> + <tr> + <td><b class="Nm">ziptool</b></td> + <td>[<span class="Op"><b class="Fl">-ceghnrst</b></span>] + [<span class="Op"><b class="Fl">-l</b> + <var class="Ar">length</var></span>] + [<span class="Op"><b class="Fl">-o</b> + <var class="Ar">offset</var></span>] <var class="Ar">zip-archive</var> + <b class="Cm">command</b> [<span class="Op"><var class="Ar">command-args + ...</var></span>] [<span class="Op"><b class="Cm">command</b> + [<span class="Op"><var class="Ar">command-args ...</var></span>] + ...</span>]</td> + </tr> +</table> +<h1 class="Sh" id="DESCRIPTION">DESCRIPTION</h1> +<b class="Nm">ziptool</b> modifies the zip archive + <var class="Ar">zip-archive</var> according to the + <var class="Ar">commands</var> given. +<div class="Pp"></div> +Supported options: +<dl class="Bl-tag" style="margin-left: 11.00ex;"> + <dt class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><b class="Fl">-c</b></dt> + <dd class="It-tag">Check zip archive consistency when opening it.</dd> + <dt class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><b class="Fl">-e</b></dt> + <dd class="It-tag">Error if archive already exists (only useful with + <b class="Fl">-n</b>).</dd> + <dt class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><b class="Fl">-g</b></dt> + <dd class="It-tag">Guess file name encoding (for <b class="Cm">stat</b> + command).</dd> + <dt class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><b class="Fl">-h</b></dt> + <dd class="It-tag">Display help.</dd> + <dt class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><b class="Fl">-l</b> + <var class="Ar">length</var></dt> + <dd class="It-tag">Only read <var class="Ar">length</var> bytes of archive. + See also <b class="Fl">-o</b>.</dd> + <dt class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><b class="Fl">-n</b></dt> + <dd class="It-tag">Create archive if it doesn't exist. See also + <b class="Fl">-e</b>.</dd> + <dt class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><b class="Fl">-o</b> + <var class="Ar">offset</var></dt> + <dd class="It-tag">Start reading input archive from + <var class="Ar">offset</var>. See also <b class="Fl">-l</b>.</dd> + <dt class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><b class="Fl">-r</b></dt> + <dd class="It-tag">Print raw file name encoding without translation (for + <b class="Cm">stat</b> command).</dd> + <dt class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><b class="Fl">-s</b></dt> + <dd class="It-tag">Follow file name convention strictly (for + <b class="Cm">stat</b> command).</dd> + <dt class="It-tag" style="margin-left: -11.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -11.00ex;"><b class="Fl">-t</b></dt> + <dd class="It-tag">Disregard current file contents, if any. + <i class="Em">Note</i>: use this with care, it deletes all existing file + contents when you modify the archive.</dd> +</dl> +<h2 class="Ss" id="Commands">Commands</h2> +For all commands below, the index is zero-based. In other words, the first entry + in the zip archive has index 0. +<div class="Pp"></div> +Supported commands and arguments are: +<dl class="Bl-tag" style="margin-left: 10.00ex;"> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">add</b> + <var class="Ar">name content</var></dt> + <dd class="It-tag">Add file called <var class="Ar">name</var> using the string + <var class="Ar">content</var> from the command line as data.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">add_dir</b> + <var class="Ar">name</var></dt> + <dd class="It-tag">Add directory <var class="Ar">name</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">add_file</b> + <var class="Ar">name file_to_add offset len</var></dt> + <dd class="It-tag">Add file <var class="Ar">name</var> to archive, using + <var class="Ar">len</var> bytes from the file + <var class="Ar">file_to_add</var> as input data, starting at + <var class="Ar">offset</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">add_from_zip</b> + <var class="Ar">name archivename index offset len</var></dt> + <dd class="It-tag">Add file called <var class="Ar">name</var> to archive using + data from another zip archive <var class="Ar">archivename</var> using the + entry with index <var class="Ar">index</var> and reading + <var class="Ar">len</var> bytes from <var class="Ar">offset</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">cat</b> + <var class="Ar">index</var></dt> + <dd class="It-tag">Output file contents for entry <var class="Ar">index</var> + to stdout.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">count_extra</b> + <var class="Ar">index flags</var></dt> + <dd class="It-tag">Print the number of extra fields for archive entry + <var class="Ar">index</var> using <var class="Ar">flags</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">count_extra_by_id</b> + <var class="Ar">index extra_id flags</var></dt> + <dd class="It-tag">Print number of extra fields of type + <var class="Ar">extra_id</var> for archive entry + <var class="Ar">index</var> using <var class="Ar">flags</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">delete</b> + <var class="Ar">index</var></dt> + <dd class="It-tag">Remove entry at <var class="Ar">index</var> from zip + archive.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">delete_extra</b> + <var class="Ar">index extra_idx flags</var></dt> + <dd class="It-tag">Remove extra field number <var class="Ar">extra_idx</var> + from archive entry <var class="Ar">index</var> using + <var class="Ar">flags</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">delete_extra_by_id</b> + <var class="Ar">index extra_id extra_index flags</var></dt> + <dd class="It-tag">Remove extra field number <var class="Ar">extra_index</var> + of type <var class="Ar">extra_id</var> from archive entry + <var class="Ar">index</var> using <var class="Ar">flags</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">get_archive_comment</b></dt> + <dd class="It-tag">Print archive comment.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">get_extra</b> + <var class="Ar">index extra_index flags</var></dt> + <dd class="It-tag">Print extra field <var class="Ar">extra_index</var> for + archive entry <var class="Ar">index</var> using + <var class="Ar">flags</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">get_extra_by_id</b> + <var class="Ar">index extra_id extra_index flags</var></dt> + <dd class="It-tag">Print extra field <var class="Ar">extra_index</var> of type + <var class="Ar">extra_id</var> for archive entry + <var class="Ar">index</var> using <var class="Ar">flags</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">get_file_comment</b> + <var class="Ar">index</var></dt> + <dd class="It-tag">Get file comment for archive entry + <var class="Ar">index</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">get_num_entries</b> + <var class="Ar">flags</var></dt> + <dd class="It-tag">Print number of entries in archive using + <var class="Ar">flags</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">name_locate</b> + <var class="Ar">name flags</var></dt> + <dd class="It-tag">Find entry in archive with the filename + <var class="Ar">name</var> using <var class="Ar">flags</var> and print its + index.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">rename</b> + <var class="Ar">index name</var></dt> + <dd class="It-tag">Rename archive entry <var class="Ar">index</var> to + <var class="Ar">name</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">replace_file_contents</b> + <var class="Ar">index data</var></dt> + <dd class="It-tag">Replace file contents for archive entry + <var class="Ar">index</var> with the string + <var class="Ar">data</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">set_archive_comment</b> + <var class="Ar">comment</var></dt> + <dd class="It-tag">Set archive comment to <var class="Ar">comment</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">set_extra</b> + <var class="Ar">index extra_id extra_index flags value</var></dt> + <dd class="It-tag">Set extra field number <var class="Ar">extra_index</var> of + type <var class="Ar">extra_id</var> for archive entry + <var class="Ar">index</var> using <var class="Ar">flags</var> to + <var class="Ar">value</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">set_file_comment</b> + <var class="Ar">index comment</var></dt> + <dd class="It-tag">Set file comment for archive entry + <var class="Ar">index</var> to string <var class="Ar">comment</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">set_file_compression</b> + <var class="Ar">index method compression_flags</var></dt> + <dd class="It-tag">Set file compression method for archive entry + <var class="Ar">index</var> to <var class="Ar">method</var> using + <var class="Ar">compression_flags</var>. <i class="Em">Note</i>: + Currently, <var class="Ar">compression_flags</var> are ignored.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">set_file_encryption</b> + <var class="Ar">index method password</var></dt> + <dd class="It-tag">Set file encryption method for archive entry + <var class="Ar">index</var> to <var class="Ar">method</var> with password + <var class="Ar">password</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">set_file_mtime</b> + <var class="Ar">index timestamp</var></dt> + <dd class="It-tag">Set file modification time for archive entry + <var class="Ar">index</var> to UNIX mtime + <var class="Ar">timestamp</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">set_file_mtime_all</b> + <var class="Ar">timestamp</var></dt> + <dd class="It-tag">Set file modification time for all archive entries to UNIX + mtime <var class="Ar">timestamp</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">set_password</b> + <var class="Ar">password</var></dt> + <dd class="It-tag">Set default password for encryption/decryption to + <var class="Ar">password</var>.</dd> + <dt class="It-tag" style="margin-left: -10.00ex;"> </dt> + <dd class="It-tag"> </dd> + <dt class="It-tag" style="margin-left: -10.00ex;"><b class="Cm">stat</b> + <var class="Ar">index</var></dt> + <dd class="It-tag">Print information about archive entry + <var class="Ar">index</var>.</dd> +</dl> +<h2 class="Ss" id="Flags">Flags</h2> +Some commands take flag arguments. Supported flags are: +<div class="Bl-tag" style="margin-left: 6.00ex;"> +<dl class="Bl-tag" style="margin-left: 3.00ex;"> + <dt class="It-tag" style="margin-left: -3.00ex;"><var class="Ar">C</var></dt> + <dd class="It-tag"><code class="Dv">ZIP_FL_NOCASE</code></dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><var class="Ar">c</var></dt> + <dd class="It-tag"><code class="Dv">ZIP_FL_CENTRAL</code></dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><var class="Ar">d</var></dt> + <dd class="It-tag"><code class="Dv">ZIP_FL_NODIR</code></dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><var class="Ar">l</var></dt> + <dd class="It-tag"><code class="Dv">ZIP_FL_LOCAL</code></dd> + <dt class="It-tag" style="margin-left: -3.00ex;"><var class="Ar">u</var></dt> + <dd class="It-tag"><code class="Dv">ZIP_FL_UNCHANGED</code></dd> +</dl> +</div> +<h2 class="Ss" id="Compression_Methods">Compression Methods</h2> +Some commands take compression method arguments. Supported methods are: +<ul class="Bl-bullet" style="margin-left: 6.00ex;"> + <li class="It-bullet" style="margin-top: 0.00em;"><code class="Dv">default</code></li> + <li class="It-bullet" style="margin-top: 0.00em;"><code class="Dv">deflate</code></li> + <li class="It-bullet" style="margin-top: 0.00em;"><code class="Dv">store</code></li> +</ul> +<h2 class="Ss" id="Encryption_Methods">Encryption Methods</h2> +Some commands take encryption method arguments. Supported methods are: +<ul class="Bl-bullet" style="margin-left: 6.00ex;"> + <li class="It-bullet" style="margin-top: 0.00em;"><code class="Dv">none</code></li> + <li class="It-bullet" style="margin-top: 0.00em;"><code class="Dv">AES-128</code></li> + <li class="It-bullet" style="margin-top: 0.00em;"><code class="Dv">AES-192</code></li> + <li class="It-bullet" style="margin-top: 0.00em;"><code class="Dv">AES-256</code></li> +</ul> +<h1 class="Sh" id="EXIT_STATUS">EXIT STATUS</h1> +The <b class="Nm">ziptool</b> utility exits 0 on success, and >0 if + an error occurs. +<h1 class="Sh" id="EXAMPLES">EXAMPLES</h1> +Add a file called <i class="Pa">teststring.txt</i> to the zip archive + <i class="Pa">testbuffer.zip</i> with data “This is a test.\n” + where “\n” is replaced with a newline character: +<div class="Pp"></div> +<div class="Bd" style="margin-left: 5.00ex;"> +<pre class="Li"> +ziptool testbuffer.zip add teststring.txt \"This is a test.\n\" +</pre> +</div> +<div class="Pp"></div> +Delete the first file from the zip archive <i class="Pa">testfile.zip</i>: +<div class="Pp"></div> +<div class="Bd" style="margin-left: 5.00ex;"> +<pre class="Li"> +ziptool testfile.zip delete 0 +</pre> +</div> +<h1 class="Sh" id="SEE_ALSO">SEE ALSO</h1> +<a class="Xr" href="zipcmp.html">zipcmp(1)</a>, + <a class="Xr" href="zipmerge.html">zipmerge(1)</a>, + <a class="Xr" href="libzip.html">libzip(3)</a> +<h1 class="Sh" id="HISTORY">HISTORY</h1> +<b class="Nm">ziptool</b> was added in libzip 1.1. +<h1 class="Sh" id="AUTHORS">AUTHORS</h1> +<span class="An">Dieter Baron</span> + <<a class="Mt" href="mailto:dillo@nih.at">dillo@nih.at</a>> and + <span class="An">Thomas Klausner</span> + <<a class="Mt" href="mailto:tk@giga.or.at">tk@giga.or.at</a>></div> +<table class="foot"> + <tr> + <td class="foot-date">December 18, 2017</td> + <td class="foot-os">NetBSD 8.99.14</td> + </tr> +</table> +</body> +</html>