Blame libarchive/archive_read_free.3

Packit 08bd4c
.\" Copyright (c) 2003-2011 Tim Kientzle
Packit 08bd4c
.\" All rights reserved.
Packit 08bd4c
.\"
Packit 08bd4c
.\" Redistribution and use in source and binary forms, with or without
Packit 08bd4c
.\" modification, are permitted provided that the following conditions
Packit 08bd4c
.\" are met:
Packit 08bd4c
.\" 1. Redistributions of source code must retain the above copyright
Packit 08bd4c
.\"    notice, this list of conditions and the following disclaimer.
Packit 08bd4c
.\" 2. Redistributions in binary form must reproduce the above copyright
Packit 08bd4c
.\"    notice, this list of conditions and the following disclaimer in the
Packit 08bd4c
.\"    documentation and/or other materials provided with the distribution.
Packit 08bd4c
.\"
Packit 08bd4c
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
Packit 08bd4c
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit 08bd4c
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit 08bd4c
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
Packit 08bd4c
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit 08bd4c
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Packit 08bd4c
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Packit 08bd4c
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Packit 08bd4c
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Packit 08bd4c
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Packit 08bd4c
.\" SUCH DAMAGE.
Packit 08bd4c
.\"
Packit 08bd4c
.\" $FreeBSD$
Packit 08bd4c
.\"
Packit 08bd4c
.Dd February 2, 2012
Packit 08bd4c
.Dt ARCHIVE_READ_FREE 3
Packit 08bd4c
.Os
Packit 08bd4c
.Sh NAME
Packit 08bd4c
.Nm archive_read_close ,
Packit 08bd4c
.Nm archive_read_finish ,
Packit 08bd4c
.Nm archive_read_free
Packit 08bd4c
.Nd functions for reading streaming archives
Packit 08bd4c
.Sh LIBRARY
Packit 08bd4c
Streaming Archive Library (libarchive, -larchive)
Packit 08bd4c
.Sh SYNOPSIS
Packit 08bd4c
.In archive.h
Packit 08bd4c
.Ft int
Packit 08bd4c
.Fn archive_read_close "struct archive *"
Packit 08bd4c
.Ft int
Packit 08bd4c
.Fn archive_read_finish "struct archive *"
Packit 08bd4c
.Ft int
Packit 08bd4c
.Fn archive_read_free "struct archive *"
Packit 08bd4c
.\"
Packit 08bd4c
.Sh DESCRIPTION
Packit 08bd4c
.Bl -tag -compact -width indent
Packit 08bd4c
.It Fn archive_read_close
Packit 08bd4c
Complete the archive and invoke the close callback.
Packit 08bd4c
.It Fn archive_read_finish
Packit 08bd4c
This is a deprecated synonym for
Packit 08bd4c
.Fn archive_read_free .
Packit 08bd4c
The new name was introduced with libarchive 3.0.
Packit 08bd4c
Applications that need to compile with either libarchive 2
Packit 08bd4c
or libarchive 3 should continue to use the
Packit 08bd4c
.Fn archive_read_finish
Packit 08bd4c
name.
Packit 08bd4c
Both names will be supported until libarchive 4.0 is
Packit 08bd4c
released, which is not expected to occur earlier
Packit 08bd4c
than 2013.
Packit 08bd4c
.It Fn archive_read_free
Packit 08bd4c
Invokes
Packit 08bd4c
.Fn archive_read_close
Packit 08bd4c
if it was not invoked manually, then release all resources.
Packit 08bd4c
Note: In libarchive 1.x, this function was declared to return
Packit 08bd4c
.Ft void ,
Packit 08bd4c
which made it impossible to detect certain errors when
Packit 08bd4c
.Fn archive_read_close
Packit 08bd4c
was invoked implicitly from this function.
Packit 08bd4c
The declaration is corrected beginning with libarchive 2.0.
Packit 08bd4c
.El
Packit 08bd4c
.Sh RETURN VALUES
Packit 08bd4c
These functions return
Packit 08bd4c
.Cm ARCHIVE_OK
Packit 08bd4c
on success, or
Packit 08bd4c
.Cm ARCHIVE_FATAL .
Packit 08bd4c
.\"
Packit 08bd4c
.Sh ERRORS
Packit 08bd4c
Detailed error codes and textual descriptions are available from the
Packit 08bd4c
.Fn archive_errno
Packit 08bd4c
and
Packit 08bd4c
.Fn archive_error_string
Packit 08bd4c
functions.
Packit 08bd4c
.\"
Packit 08bd4c
.Sh SEE ALSO
Packit 08bd4c
.Xr libarchive 3 ,
Packit 08bd4c
.Xr archive_read_new 3 ,
Packit 08bd4c
.Xr archive_read_data 3 ,
Packit 08bd4c
.Xr archive_read_filter 3 ,
Packit 08bd4c
.Xr archive_read_format 3 ,
Packit 08bd4c
.Xr archive_read_open 3 ,
Packit 08bd4c
.Xr archive_read_set_options 3 ,
Packit 08bd4c
.Xr archive_util 3