| <!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> |