pkgsrc - initial commit
[pkgsrc.git] / archivers / libarchive / files / doc / text / archive_util.3.txt
1 archive_util(3)        FreeBSD Library Functions Manual        archive_util(3)
2
3 NAME
4      archive_clear_error, archive_compression, archive_compression_name,
5      archive_copy_error, archive_errno, archive_error_string, archive_format,
6      archive_format_name, archive_set_error -- libarchive utility functions
7
8 SYNOPSIS
9      #include <archive.h>
10
11      void
12      archive_clear_error(struct archive *);
13
14      int
15      archive_compression(struct archive *);
16
17      const char *
18      archive_compression_name(struct archive *);
19
20      void
21      archive_copy_error(struct archive *, struct archive *);
22
23      int
24      archive_errno(struct archive *);
25
26      const char *
27      archive_error_string(struct archive *);
28
29      int
30      archive_format(struct archive *);
31
32      const char *
33      archive_format_name(struct archive *);
34
35      void
36      archive_set_error(struct archive *, int error_code, const char *fmt,
37          ...);
38
39 DESCRIPTION
40      These functions provide access to various information about the struct
41      archive object used in the libarchive(3) library.
42      archive_clear_error()
43              Clears any error information left over from a previous call.  Not
44              generally used in client code.
45      archive_compression()
46              Returns a numeric code indicating the current compression.  This
47              value is set by archive_read_open().
48      archive_compression_name()
49              Returns a text description of the current compression suitable
50              for display.
51      archive_copy_error()
52              Copies error information from one archive to another.
53      archive_errno()
54              Returns a numeric error code (see errno(2)) indicating the reason
55              for the most recent error return.
56      archive_error_string()
57              Returns a textual error message suitable for display.  The error
58              message here is usually more specific than that obtained from
59              passing the result of archive_errno() to strerror(3).
60      archive_format()
61              Returns a numeric code indicating the format of the current ar-
62              chive entry.  This value is set by a successful call to
63              archive_read_next_header().  Note that it is common for this
64              value to change from entry to entry.  For example, a tar archive
65              might have several entries that utilize GNU tar extensions and
66              several entries that do not.  These entries will have different
67              format codes.
68      archive_format_name()
69              A textual description of the format of the current entry.
70      archive_set_error()
71              Sets the numeric error code and error description that will be
72              returned by archive_errno() and archive_error_string().  This
73              function should be used within I/O callbacks to set system-spe-
74              cific error codes and error descriptions.  This function accepts
75              a printf-like format string and arguments.  However, you should
76              be careful to use only the following printf format specifiers:
77              ``%c'', ``%d'', ``%jd'', ``%jo'', ``%ju'', ``%jx'', ``%ld'',
78              ``%lo'', ``%lu'', ``%lx'', ``%o'', ``%u'', ``%s'', ``%x'',
79              ``%%''.  Field-width specifiers and other printf features are not
80              uniformly supported and should not be used.
81
82 SEE ALSO
83      archive_read(3), archive_write(3), libarchive(3), printf(3)
84
85 HISTORY
86      The libarchive library first appeared in FreeBSD 5.3.
87
88 AUTHORS
89      The libarchive library was written by Tim Kientzle <kientzle@acm.org>.
90
91 FreeBSD 6.0                     January 8, 2005                    FreeBSD 6.0