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