Imported Upstream version 1.4.0
[platform/upstream/libzip.git] / man / zip_error_get.mdoc
1 .\" zip_error_get.mdoc -- get error codes for archive or file
2 .\" Copyright (C) 2004-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_ERROR_GET 3
34 .Os
35 .Sh NAME
36 .Nm zip_error_get ,
37 .Nm zip_file_error_get
38 .Nd get error codes for archive or file (obsolete interface)
39 .Sh LIBRARY
40 libzip (-lzip)
41 .Sh SYNOPSIS
42 .In zip.h
43 .Ft void
44 .Fn zip_error_get "zip_t *archive" "int *zep" "int *sep"
45 .Ft void
46 .Fn zip_file_error_get "zip_file_t *file" "int *zep" "int *sep"
47 .Sh DESCRIPTION
48 The functions
49 .Fn zip_error_get
50 and
51 .Fn zip_file_error_get
52 are deprecated.
53 Use
54 .Xr zip_error_code_system 3 ,
55 .Xr zip_error_code_zip 3 ,
56 .Xr zip_file_get_error 3 ,
57 and
58 .Xr zip_get_error 3
59 instead.
60 .Pp
61 For
62 .Fn zip_error_get ,
63 replace
64 .Bd -literal -offset indent
65 int ze, se;
66 zip_error_get(za, &ze, &se);
67 .Ed
68 with
69 .Bd -literal -offset indent
70 int ze, se;
71 zip_error_t *error = zip_get_error(za);
72 ze = zip_error_code_zip(error);
73 se = zip_error_code_system(error);
74 .Ed
75 For
76 .Fn zip_file_error_get ,
77 replace
78 .Bd -literal -offset indent
79 int ze, se;
80 zip_file_error_get(zf, &ze, &se);
81 .Ed
82 with
83 .Bd -literal -offset indent
84 int ze, se;
85 zip_error_t *error = zip_file_get_error(zf);
86 ze = zip_error_code_zip(error);
87 se = zip_error_code_system(error);
88 .Ed
89 .Sh SEE ALSO
90 .Xr libzip 3 ,
91 .Xr zip_error_code_system 3 ,
92 .Xr zip_error_code_zip 3 ,
93 .Xr zip_file_get_error 3 ,
94 .Xr zip_get_error 3
95 .Sh HISTORY
96 .Fn zip_error_get
97 was added in libzip 0.6.
98 It was deprecated in libzip 1.0, use
99 .Fn zip_get_error ,
100 .Fn zip_error_code_zip ,
101 /
102 .Fn zip_error_code_system
103 instead.
104 .Pp
105 .Fn zip_file_error_get
106 was added in libzip 0.6.
107 It was deprecated in libzip 1.0, use
108 .Fn zip_file_get_error ,
109 .Fn zip_error_code_zip ,
110 /
111 .Fn zip_error_code_system
112 instead.
113 .Sh AUTHORS
114 .An -nosplit
115 .An Dieter Baron Aq Mt dillo@nih.at
116 and
117 .An Thomas Klausner Aq Mt tk@giga.or.at