a0998bd6c6c4454a9973697d353f049b6307bbf8
[platform/upstream/libzip.git] / man / zip_set_archive_comment.man
1 .TH "ZIP_SET_ARCHIVE_COMMENT" "3" "July 22, 2012" "NiH" "Library Functions Manual"
2 .nh
3 .if n .ad l
4 .SH "NAME"
5 \fBzip_set_archive_comment\fR
6 \- set zip archive comment
7 .SH "LIBRARY"
8 libzip (-lzip)
9 .SH "SYNOPSIS"
10 \fB#include <zip.h>\fR
11 .sp
12 \fIint\fR
13 .PD 0
14 .HP 4n
15 \fBzip_set_archive_comment\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *comment\fR, \fIzip_uint16_t\ len\fR);
16 .PD
17 .SH "DESCRIPTION"
18 The
19 \fBzip_set_archive_comment\fR()
20 function sets the comment for the entire zip archive.
21 If
22 \fIcomment\fR
23 is
24 \fRNULL\fR
25 and
26 \fIlen\fR
27 is 0, the archive comment will be removed.
28 \fIcomment\fR
29 must be encoded in ASCII or UTF-8.
30 .SH "RETURN VALUES"
31 Upon successful completion 0 is returned.
32 Otherwise, \-1 is returned and the error information in
33 \fIarchive\fR
34 is set to indicate the error.
35 .SH "ERRORS"
36 \fBzip_set_archive_comment\fR()
37 fails if:
38 .TP 19n
39 [\fRZIP_ER_INVAL\fR]
40 \fIlen\fR
41 is less than 0 or longer than the maximum comment length in a zip file
42 (65535), or
43 \fIcomment\fR
44 is not a valid UTF-8 encoded string.
45 .TP 19n
46 [\fRZIP_ER_MEMORY\fR]
47 Required memory could not be allocated.
48 .SH "SEE ALSO"
49 libzip(3),
50 zip_get_archive_comment(3),
51 zip_get_file_comment(3),
52 zip_set_file_comment(3)
53 .SH "AUTHORS"
54 Dieter Baron <\fIdillo@nih.at\fR>
55 and
56 Thomas Klausner <\fItk@giga.or.at\fR>