and
.Cm ARCHIVE_FATAL
(there was a fatal error; the archive should be closed immediately).
-Detailed error codes and textual descriptions are available from the
-.Fn archive_errno
-and
-.Fn archive_error_string
-functions.
.Pp
.Fn archive_read_data
returns a count of bytes actually read or zero at the end of the entry.
.Cm ARCHIVE_WARN ,
or
.Cm ARCHIVE_RETRY
-is returned and an error code and textual description can be retrieved from the
+is returned.
+.\"
+.Sh ERRORS
+Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
-.\" .Sh ERRORS
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
for unusual conditions that do not prevent further operations, and
.Cm ARCHIVE_FATAL
for serious errors that make remaining operations impossible.
-The
-.Xr archive_errno 3
-and
-.Xr archive_error_string 3
-functions can be used to retrieve an appropriate error code and a
-textual error message.
-(See
-.Xr archive_util 3
-for details.)
.Pp
.Fn archive_read_disk_new
returns a pointer to a newly-allocated
The returned pointer points to internal storage that
may be reused on the next call to either of these functions;
callers should copy the string if they need to continue accessing it.
-.Pp
+.\"
+.Sh ERRORS
+Detailed error codes and textual descriptions are available from the
+.Fn archive_errno
+and
+.Fn archive_error_string
+functions.
+.\"
.Sh SEE ALSO
.Xr archive_read 3 ,
+.Xr archive_util 3 ,
.Xr archive_write 3 ,
.Xr archive_write_disk 3 ,
.Xr tar 1 ,
and
.Cm ARCHIVE_FATAL
(there was a fatal error; the archive should be closed immediately).
-.Pp
+.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
-.\" .Sh ERRORS
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
.Pp
.Fn archive_read_support_filter_none
always succeeds.
-.Pp
+.\"
+.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
.\"
-.\" .Sh ERRORS
-.\"
.Sh SEE ALSO
.Xr libarchive 3 ,
.Xr archive_read 3 ,
.Cm ARCHIVE_OK
on success, or
.Cm ARCHIVE_FATAL .
-.Pp
+.\"
+.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
-.\" .Sh ERRORS
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
.Cm ARCHIVE_OK
on success, or
.Cm ARCHIVE_FATAL .
-.Pp
+.\"
+.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
-.\" .Sh ERRORS
+.\"
.Sh SEE ALSO
.Xr libarchive 3 ,
.Xr archive_read_new 3 ,
and
.Cm ARCHIVE_FATAL
(there was a fatal error; the archive should be closed immediately).
-.Pp
+.\"
+.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
-.\" .Sh ERRORS
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
.Cm ARCHIVE_OK
on success, or
.Cm ARCHIVE_FATAL .
-.Pp
+.\"
+.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
-.Pp
-The library expects the client callbacks to behave similarly.
-If there is an error, you can use
-.Fn archive_set_error
-to set an appropriate error code and description,
-then return one of the non-zero values above.
-(Note that the value eventually returned to the client may
-not be the same; many errors that are not critical at the level
-of basic I/O can prevent the archive from being properly read,
-thus most I/O errors eventually cause
-.Cm ARCHIVE_FATAL
-to be returned.)
-.\" .Sh ERRORS
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
to disable.
.El
.El
+.\"
+.Sh ERRORS
+Detailed error codes and textual descriptions are available from the
+.Fn archive_errno
+and
+.Fn archive_error_string
+functions.
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
.Pc ,
or
.Cm ARCHIVE_FATAL .
-.Pp
+.\"
+.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
This function returns the number of bytes actually written, or
.Li -1
on error.
-.Pp
+.\"
+.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
for unusual conditions that do not prevent further operations, and
.Cm ARCHIVE_FATAL
for serious errors that make remaining operations impossible.
-The
-.Fn archive_errno
-and
-.Fn archive_error_string
-functions can be used to retrieve an appropriate error code and a
-textual error message.
.Pp
.Fn archive_write_disk_new
returns a pointer to a newly-allocated
object.
.Pp
.Fn archive_write_data
-returns a count of the number of bytes actually written.
-On error, -1 is returned and the
+returns a count of the number of bytes actually written,
+or
+.Li -1
+on error.
+.\"
+.Sh ERRORS
+Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
-functions will return appropriate values.
+functions.
+.\"
.Sh SEE ALSO
.Xr archive_read 3 ,
.Xr archive_write 3 ,
.Cm ARCHIVE_OK
on success, or
.Cm ARCHIVE_FATAL .
-.Pp
+.\"
+.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
for unusual conditions that do not prevent further operations, and
.Cm ARCHIVE_FATAL
for serious errors that make remaining operations impossible.
-.Pp
+.\"
+.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
.Cm ARCHIVE_OK
on success, or
.Cm ARCHIVE_FATAL .
-.Pp
+.\"
+.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
.Cm ARCHIVE_OK
on success, or
.Cm ARCHIVE_FATAL .
-.Pp
+.\"
+.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
-.\" .Sh ERRORS
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
for unusual conditions that do not prevent further operations, and
.Cm ARCHIVE_FATAL
for serious errors that make remaining operations impossible.
+.\"
+.Sh ERRORS
+Detailed error codes and textual descriptions are available from the
+.Fn archive_errno
+and
+.Fn archive_error_string
+functions.
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
to register an error code and message and
return
.Cm ARCHIVE_FATAL.
-.\" .Sh EXAMPLE
-.Sh RETURN VALUES
-These functions return
-.Cm ARCHIVE_OK
-on success, or
-.Cm ARCHIVE_FATAL .
-.Pp
-Detailed error codes and textual descriptions are available from the
-.Fn archive_errno
-and
-.Fn archive_error_string
-functions.
.Pp
Note that if the client-provided write callback function
returns a non-zero value, that error will be propagated back to the caller
.Fn archive_errno
and
.Fn archive_error_string .
+.\" .Sh EXAMPLE
+.Sh RETURN VALUES
+These functions return
+.Cm ARCHIVE_OK
+on success, or
+.Cm ARCHIVE_FATAL .
+.\"
+.Sh ERRORS
+Detailed error codes and textual descriptions are available from the
+.Fn archive_errno
+and
+.Fn archive_error_string
+functions.
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
archive_write_set_options(a, "boot=kernel.img,compression=9");
archive_write_open_filename(a, filename, blocksize);
.Ed
+.\"
+.Sh ERRORS
+Detailed error codes and textual descriptions are available from the
+.Fn archive_errno
+and
+.Fn archive_error_string
+functions.
+.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,