Imported Upstream version 3.4.1
[platform/upstream/libarchive.git] / doc / man / archive_read_free.3
1 .TH ARCHIVE_READ_FREE 3 "February 2, 2012" ""
2 .SH NAME
3 .ad l
4 \fB\%archive_read_close\fP,
5 \fB\%archive_read_finish\fP,
6 \fB\%archive_read_free\fP
7 \- functions for reading streaming archives
8 .SH LIBRARY
9 .ad l
10 Streaming Archive Library (libarchive, -larchive)
11 .SH SYNOPSIS
12 .ad l
13 \fB#include <archive.h>\fP
14 .br
15 \fIint\fP
16 .br
17 \fB\%archive_read_close\fP(\fI\%struct\ archive\ *\fP);
18 .br
19 \fIint\fP
20 .br
21 \fB\%archive_read_finish\fP(\fI\%struct\ archive\ *\fP);
22 .br
23 \fIint\fP
24 .br
25 \fB\%archive_read_free\fP(\fI\%struct\ archive\ *\fP);
26 .SH DESCRIPTION
27 .ad l
28 .RS 5
29 .TP
30 \fB\%archive_read_close\fP()
31 Complete the archive and invoke the close callback.
32 .TP
33 \fB\%archive_read_finish\fP()
34 This is a deprecated synonym for
35 \fB\%archive_read_free\fP().
36 The new name was introduced with libarchive 3.0.
37 Applications that need to compile with either libarchive 2
38 or libarchive 3 should continue to use the
39 \fB\%archive_read_finish\fP()
40 name.
41 Both names will be supported until libarchive 4.0 is
42 released, which is not expected to occur earlier
43 than 2013.
44 .TP
45 \fB\%archive_read_free\fP()
46 Invokes
47 \fB\%archive_read_close\fP()
48 if it was not invoked manually, then release all resources.
49 Note: In libarchive 1.x, this function was declared to return
50 \fIvoid ,\fP
51 which made it impossible to detect certain errors when
52 \fB\%archive_read_close\fP()
53 was invoked implicitly from this function.
54 The declaration is corrected beginning with libarchive 2.0.
55 .RE
56 .SH RETURN VALUES
57 .ad l
58 These functions return
59 \fBARCHIVE_OK\fP
60 on success, or
61 \fBARCHIVE_FATAL\fP.
62 .SH ERRORS
63 .ad l
64 Detailed error codes and textual descriptions are available from the
65 \fB\%archive_errno\fP()
66 and
67 \fB\%archive_error_string\fP()
68 functions.
69 .SH SEE ALSO
70 .ad l
71 \fBarchive_read_data\fP(3),
72 \fBarchive_read_filter\fP(3),
73 \fBarchive_read_format\fP(3),
74 \fBarchive_read_new\fP(3),
75 \fBarchive_read_open\fP(3),
76 \fBarchive_read_set_options\fP(3),
77 \fBarchive_util\fP(3),
78 \fBlibarchive\fP(3)