#include <archive.h> void
archive_clear_error (struct archive *); int
archive_compression (struct archive *); const char *
archive_compression_name (struct archive *); void
archive_copy_error (struct archive * struct archive *); int
archive_errno (struct archive *); const char *
archive_error_string (struct archive *); int
archive_format (struct archive *); const char *
archive_format_name (struct archive *); void
Fo archive_set_error
Fa struct archive *
Fa int error_code
Fa const char *fmt
Fa ...
Fc
DESCRIPTION
These functions provide access to various information about the
struct archive
object used in the
libarchive(3)
library.
Fn archive_clear_error
Clears any error information left over from a previous call.
Not generally used in client code.
Fn archive_compression
Returns a numeric code indicating the current compression.
This value is set by
archive_read_open (.);
Fn archive_compression_name
Returns a text description of the current compression suitable for display.
Fn archive_copy_error
Copies error information from one archive to another.
Fn archive_errno
Returns a numeric error code (see
errno(2))
indicating the reason for the most recent error return.
Fn archive_error_string
Returns a textual error message suitable for display.
The error message here is usually more specific than that
obtained from passing the result of
archive_errno ();
to
strerror(3).
Fn archive_format
Returns a numeric code indicating the format of the current
archive entry.
This value is set by a successful call to
archive_read_next_header (.);
Note that it is common for this value to change from
entry to entry.
For example, a tar archive might have several entries that
utilize GNU tar extensions and several entries that do not.
These entries will have different format codes.
Fn archive_format_name
A textual description of the format of the current entry.
Fn archive_set_error
Sets the numeric error code and error description that will be returned
by
archive_errno ();
and
archive_error_string (.);
This function should be used within I/O callbacks to set system-specific
error codes and error descriptions.
This function accepts a printf-like format string and arguments.
However, you should be careful to use only the following printf
format specifiers:
``%c''
``%d''
``%jd''
``%jo''
``%ju''
``%jx''
``%ld''
``%lo''
``%lu''
``%lx''
``%o''
``%u''
``%s''
``%x''
``%%''
Field-width specifiers and other printf features are
not uniformly supported and should not be used.