]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Update archive_write_open.3 manpage
authorMartin Matuska <martin@matuska.org>
Thu, 12 Nov 2020 09:52:32 +0000 (10:52 +0100)
committerMartin Matuska <martin@matuska.org>
Thu, 12 Nov 2020 09:52:56 +0000 (10:52 +0100)
libarchive/archive_write_open.3

index 2f6e6270b82788e4fa98bb4ed73b144a83ed26ca..f68538502f1a48fd1c1dac8111ac3fbb60eb1300 100644 (file)
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 2, 2012
+.Dd November 12, 2020
 .Dt ARCHIVE_WRITE_OPEN 3
 .Os
 .Sh NAME
+.Nm archive_write_open ,
 .Nm archive_write_open2 ,
 .Nm archive_write_open_fd ,
 .Nm archive_write_open_FILE ,
@@ -39,6 +40,14 @@ Streaming Archive Library (libarchive, -larchive)
 .Sh SYNOPSIS
 .In archive.h
 .Ft int
+.Fo archive_write_open
+.Fa "struct archive *"
+.Fa "void *client_data"
+.Fa "archive_open_callback *"
+.Fa "archive_write_callback *"
+.Fa "archive_close_callback *"
+.Fc
+.Ft int
 .Fo archive_write_open2
 .Fa "struct archive *"
 .Fa "void *client_data"
@@ -62,12 +71,17 @@ Streaming Archive Library (libarchive, -larchive)
 .Fc
 .Sh DESCRIPTION
 .Bl -tag -width indent
-.It Fn archive_write_open2
+.It Fn archive_write_open
 Freeze the settings, open the archive, and prepare for writing entries.
 This is the most generic form of this function, which accepts
-pointers to four callback functions which will be invoked by
+pointers to three callback functions which will be invoked by
 the compression layer to write the constructed archive.
 This does not alter the default archive padding.
+.It Fn archive_write_open2
+Same as
+.Fn archive_write_open
+with an additional fourth free callback. This function should be preferred to
+.Fn archive_write_open .
 .It Fn archive_write_open_fd
 A convenience form of
 .Fn archive_write_open
@@ -163,6 +177,8 @@ If the open fails, it should call
 .Fn archive_set_error
 to register an error code and message and return
 .Cm ARCHIVE_FATAL .
+Please not that if open fails, close is not called and resources must be
+freed inside the open callback or with the free callback.
 .Bl -item -offset indent
 .It
 .Ft typedef la_ssize_t