Imported Upstream version 1.4.0
[platform/upstream/libzip.git] / man / zip_file_strerror.mdoc
1 .\" zip_file_strerror.mdoc -- get string representation for a zip error
2 .\" Copyright (C) 2003-2017 Dieter Baron and Thomas Klausner
3 .\"
4 .\" This file is part of libzip, a library to manipulate ZIP archives.
5 .\" The authors can be contacted at <libzip@nih.at>
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in
14 .\"    the documentation and/or other materials provided with the
15 .\"    distribution.
16 .\" 3. The names of the authors may not be used to endorse or promote
17 .\"    products derived from this software without specific prior
18 .\"    written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
21 .\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
24 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
26 .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
28 .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
30 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 .\"
32 .Dd December 18, 2017
33 .Dt ZIP_FILE_STRERROR 3
34 .Os
35 .Sh NAME
36 .Nm zip_file_strerror ,
37 .Nm zip_strerror
38 .Nd get string representation for a zip error
39 .Sh LIBRARY
40 libzip (-lzip)
41 .Sh SYNOPSIS
42 .In zip.h
43 .Ft const char *
44 .Fn zip_file_strerror "zip_file_t *file"
45 .Ft const char *
46 .Fn zip_strerror "zip_t *archive"
47 .Sh DESCRIPTION
48 The
49 .Fn zip_strerror
50 function returns a string describing the last error for the zip archive
51 .Ar archive ,
52 while the
53 .Fn zip_file_strerror
54 function does the same for a zip file
55 .Ar file
56 (one file in an archive).
57 The returned string must not be modified or freed, and becomes invalid when
58 .Ar archive
59 or
60 .Ar file ,
61 respectively,
62 is closed or on the next call to
63 .Fn zip_strerror
64 or
65 .Fn zip_file_strerror ,
66 respectively,
67 for the same archive.
68 .Sh RETURN VALUES
69 .Fn zip_file_strerror
70 and
71 .Fn zip_strerror
72 return a pointer to the error string.
73 .Sh SEE ALSO
74 .Xr libzip 3 ,
75 .Xr zip_error_to_str 3
76 .Sh HISTORY
77 .Fn zip_file_strerror
78 and
79 .Fn zip_strerror
80 were added in libzip 0.6.
81 .Sh AUTHORS
82 .An -nosplit
83 .An Dieter Baron Aq Mt dillo@nih.at
84 and
85 .An Thomas Klausner Aq Mt tk@giga.or.at