~ubuntu-branches/ubuntu/vivid/libzip/vivid

« back to all changes in this revision

Viewing changes to man/zip_file_extra_fields_count.mdoc

  • Committer: Package Import Robot
  • Author(s): Fathi Boudra
  • Date: 2014-02-09 13:24:18 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140209132418-t7u2auujqnfb5rvm
Tags: 0.11.2-1
* New upstream release (Closes: #734388).
* Remove patches:
  - fix_open_nonarchive_test.patch - fixed upstream
  - fix_zipconf_path.patch - fixed upstream
  - fix_broken_decrypt.patch - fixed upstream
  - fix_autotools_tests.diff - stolen upstream
* Update debian/control:
  - add unzip to Build-Depends.
  - bump compat to 9
* Update *.install: multiarch paths.
* Update libzip2 symbols file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" zip_file_extra_fields_count.mdoc -- count extra field for file in zip
 
2
.\" Copyright (C) 2012-2013 Dieter Baron and Thomas Klausner
 
3
.\"
 
4
.\" This file is part of libzip, a library to manipulate ZIP files.
 
5
.\" The authors can be contacted at <libzip@nih.at>
 
6
.\"
 
7
.\" Redistribution and use in source and binary forms, with or without
 
8
.\" modification, are permitted provided that the following conditions
 
9
.\" are met:
 
10
.\" 1. Redistributions of source code must retain the above copyright
 
11
.\"    notice, this list of conditions and the following disclaimer.
 
12
.\" 2. Redistributions in binary form must reproduce the above copyright
 
13
.\"    notice, this list of conditions and the following disclaimer in
 
14
.\"    the documentation and/or other materials provided with the
 
15
.\"    distribution.
 
16
.\" 3. The names of the authors may not be used to endorse or promote
 
17
.\"    products derived from this software without specific prior
 
18
.\"    written permission.
 
19
.\"
 
20
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
 
21
.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
22
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
23
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
 
24
.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
25
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 
26
.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 
27
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 
28
.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 
29
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 
30
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
31
.\"
 
32
.Dd February 20, 2013
 
33
.Dt ZIP_FILE_EXTRA_FIELDS_COUNT 3
 
34
.Os
 
35
.Sh NAME
 
36
.Nm zip_file_extra_fields_count ,
 
37
.Nm zip_file_extra_fields_count_by_id
 
38
.Nd count extra fields for file in zip
 
39
.Sh LIBRARY
 
40
libzip (-lzip)
 
41
.Sh SYNOPSIS
 
42
.In zip.h
 
43
.Ft zip_int16_t
 
44
.Fn zip_file_extra_fields_count "struct zip *archive" "zip_uint64_t index" \
 
45
"zip_flags_t flags"
 
46
.Ft zip_int16_t
 
47
.Fn zip_file_extra_fields_count_by_id "struct zip *archive" "zip_uint64_t index" \
 
48
"zip_uint16_t extra_field_id" "zip_flags_t flags"
 
49
.Sh DESCRIPTION
 
50
The
 
51
.Fn zip_file_extra_fields_count
 
52
function counts the extra fields for the file at position
 
53
.Ar index
 
54
in the zip archive.
 
55
.Pp
 
56
The following
 
57
.Ar flags
 
58
are supported:
 
59
.Bl -tag -width ZIP_FL_CENTRALXX -offset indent
 
60
.It Dv ZIP_FL_CENTRAL
 
61
Count extra fields from the archive's central directory.
 
62
.It Dv ZIP_FL_LOCAL
 
63
Count extra fields from the local file headers.
 
64
.It Dv ZIP_FL_UNCHANGED
 
65
Count the original unchanged extra fields, ignoring any changes made.
 
66
.El
 
67
.Pp
 
68
The
 
69
.Fn zip_file_extra_fields_count_by_id
 
70
function counts the extra fields with ID (two-byte signature)
 
71
.Ar extra_field_id .
 
72
The other arguments are the same as for
 
73
.Fn zip_file_extra_fields_count .
 
74
.Pp
 
75
Extra fields that are the same in the central directory and the local file
 
76
header are merged into one.
 
77
Therefore, the counts with
 
78
.Dv ZIP_FL_CENTRAL
 
79
and
 
80
.Dv ZIP_FL_LOCAL
 
81
do not need to add up to the same value as when given
 
82
.Dv ZIP_FL_CENTRAL|ZIP_FL_LOCAL
 
83
at the same time.
 
84
.Sh RETURN VALUES
 
85
Upon successful completion, the requested number of extra fields is returned.
 
86
Otherwise, \-1 is returned and the error code in
 
87
.Ar archive
 
88
is set to indicate the error.
 
89
.Sh ERRORS
 
90
.Fn zip_file_extra_fields_count
 
91
and
 
92
.Fn zip_file_extra_fields_count_by_id
 
93
fail if:
 
94
.Bl -tag -width Er
 
95
.It Bq Er ZIP_ER_NOENT
 
96
.Ar index
 
97
is not a valid file index in
 
98
.Ar archive .
 
99
.\" TODO: _zip_read_local_ef errors
 
100
.El
 
101
.Sh SEE ALSO
 
102
.Xr libzip 3 ,
 
103
.Xr zip_file_extra_field_delete 3 ,
 
104
.Xr zip_file_extra_field_get 3 ,
 
105
.Xr zip_file_extra_field_set 3
 
106
.Sh AUTHORS
 
107
.An -nosplit
 
108
.An Dieter Baron Aq Mt dillo@nih.at
 
109
and
 
110
.An Thomas Klausner Aq Mt tk@giga.or.at