Document zip_get_num_entries and mark zip_get_num_files as deprecated.

--HG--
branch : HEAD
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
index 2f9f728..19c0eaa 100644
--- a/man/CMakeLists.txt
+++ b/man/CMakeLists.txt
@@ -20,6 +20,7 @@
   zip_get_file_comment.mdoc
   zip_get_file_extra.mdoc
   zip_get_name.mdoc
+  zip_get_num_entries.mdoc
   zip_get_num_files.mdoc
   zip_name_locate.mdoc
   zip_open.mdoc
diff --git a/man/Makefile.am b/man/Makefile.am
index ef23a69..3db16e3 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -27,6 +27,7 @@
 	zip_get_file_comment.mdoc \
         zip_get_file_extra.mdoc \
 	zip_get_name.mdoc \
+	zip_get_num_entries.mdoc \
 	zip_get_num_files.mdoc \
 	zip_name_locate.mdoc \
 	zip_open.mdoc \
diff --git a/man/libzip.man b/man/libzip.man
index fe3f0eb..68678a9 100644
--- a/man/libzip.man
+++ b/man/libzip.man
@@ -29,7 +29,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.TH LIBZIP 3 "January 3, 2011" NiH
+.TH LIBZIP 3 "February 14, 2011" NiH
 .SH "NAME"
 libzip \- library for manipulating zip archives
 .SH "LIBRARY"
@@ -63,7 +63,7 @@
 zip_get_archive_flag(3)
 zip_get_file_comment(3)
 zip_get_name(3)
-zip_get_num_files(3)
+zip_get_num_entries(3)
 zip_set_default_password(3)
 .SH "CREATING/MODIFYING ZIP ARCHIVES"
 .SS "create/open archive"
diff --git a/man/libzip.mdoc b/man/libzip.mdoc
index 827dbc4..9647f1c 100644
--- a/man/libzip.mdoc
+++ b/man/libzip.mdoc
@@ -29,7 +29,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 3, 2011
+.Dd February 14, 2011
 .Dt LIBZIP 3
 .Os
 .Sh NAME
@@ -66,7 +66,7 @@
 .Xr zip_get_archive_flag 3
 .Xr zip_get_file_comment 3
 .Xr zip_get_name 3
-.Xr zip_get_num_files 3
+.Xr zip_get_num_entries 3
 .Xr zip_set_default_password 3
 .Sh CREATING/MODIFYING ZIP ARCHIVES
 .Ss create/open archive
diff --git a/man/zip_fopen.man b/man/zip_fopen.man
index 89062d8..aa045df 100644
--- a/man/zip_fopen.man
+++ b/man/zip_fopen.man
@@ -29,7 +29,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.TH ZIP_FOPEN 3 "January 3, 2011" NiH
+.TH ZIP_FOPEN 3 "February 14, 2011" NiH
 .SH "NAME"
 zip_fopen , \- .Nm zip_fopen_index
 open file in zip archive for reading
@@ -134,7 +134,7 @@
 libzip(3),
 zip_fclose(3),
 zip_fread(3),
-zip_get_num_files(3),
+zip_get_num_entries(3),
 zip_name_locate(3),
 zip_set_default_password(3)
 .SH "AUTHORS"
diff --git a/man/zip_fopen.mdoc b/man/zip_fopen.mdoc
index fcda149..5f0aa03 100644
--- a/man/zip_fopen.mdoc
+++ b/man/zip_fopen.mdoc
@@ -29,7 +29,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 3, 2011
+.Dd February 14, 2011
 .Dt ZIP_FOPEN 3
 .Os
 .Sh NAME
@@ -125,7 +125,7 @@
 .Xr libzip 3 ,
 .Xr zip_fclose 3 ,
 .Xr zip_fread 3 ,
-.Xr zip_get_num_files 3 ,
+.Xr zip_get_num_entries 3 ,
 .Xr zip_name_locate 3 ,
 .Xr zip_set_default_password 3
 .Sh AUTHORS
diff --git a/man/zip_fopen_encrypted.man b/man/zip_fopen_encrypted.man
index 0615adb..638242d 100644
--- a/man/zip_fopen_encrypted.man
+++ b/man/zip_fopen_encrypted.man
@@ -29,7 +29,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.TH ZIP_FOPEN_ENCRYPTED 3 "January 3, 2011" NiH
+.TH ZIP_FOPEN_ENCRYPTED 3 "February 14, 2011" NiH
 .SH "NAME"
 zip_fopen_encrypted , \- .Nm zip_fopen_index_encrypted
 open encrypted file in zip archive for reading
@@ -105,7 +105,7 @@
 zip_fclose(3),
 zip_fopen(3),
 zip_fread(3),
-zip_get_num_files(3),
+zip_get_num_entries(3),
 zip_name_locate(3)
 .SH "AUTHORS"
 
diff --git a/man/zip_fopen_encrypted.mdoc b/man/zip_fopen_encrypted.mdoc
index 3f71439..b719ea5 100644
--- a/man/zip_fopen_encrypted.mdoc
+++ b/man/zip_fopen_encrypted.mdoc
@@ -29,7 +29,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 3, 2011
+.Dd February 14, 2011
 .Dt ZIP_FOPEN_ENCRYPTED 3
 .Os
 .Sh NAME
@@ -103,7 +103,7 @@
 .Xr zip_fclose 3 ,
 .Xr zip_fopen 3 ,
 .Xr zip_fread 3 ,
-.Xr zip_get_num_files 3 ,
+.Xr zip_get_num_entries 3 ,
 .Xr zip_name_locate 3
 .Sh AUTHORS
 .An -nosplit
diff --git a/man/zip_get_num_entries.man b/man/zip_get_num_entries.man
new file mode 100644
index 0000000..1b151b8
--- /dev/null
+++ b/man/zip_get_num_entries.man
@@ -0,0 +1,67 @@
+.\" zip_get_num_entries.mdoc \-- get number of files in archive
+.\" Copyright (C) 2011 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <libzip@nih.at>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in
+.\"    the documentation and/or other materials provided with the
+.\"    distribution.
+.\" 3. The names of the authors may not be used to endorse or promote
+.\"    products derived from this software without specific prior
+.\"    written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
+.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
+.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.TH ZIP_GET_NUM_ENTRIES 3 "February 14, 2011" NiH
+.SH "NAME"
+zip_get_num_entries \- get number of files in archive
+.SH "LIBRARY"
+libzip (-lzip)
+.SH "SYNOPSIS"
+#include <zip.h>
+.PP
+zip_uint64_t
+zip_get_num_entries(struct zip *archive, int flags);
+.SH "DESCRIPTION"
+The
+zip_get_num_entries
+function returns the number of files in
+\fBarchive.\fR
+If
+\fBflags\fR
+is set to
+\fBZIP_FL_UNCHANGED,\fR
+the original number of entries is returned.
+.SH "RETURN VALUES"
+zip_get_num_entries
+returns the number of files in the zip archive,
+or \-1 if
+\fBarchive\fR
+is
+\fBNULL.\fR
+.SH "SEE ALSO"
+libzip(3),
+zip_fopen_index(3),
+zip_stat_index(3)
+.SH "AUTHORS"
+
+Dieter Baron <dillo@giga.or.at>
+and
+Thomas Klausner <tk@giga.or.at>
diff --git a/man/zip_get_num_entries.mdoc b/man/zip_get_num_entries.mdoc
new file mode 100644
index 0000000..104ac01
--- /dev/null
+++ b/man/zip_get_num_entries.mdoc
@@ -0,0 +1,69 @@
+.\" zip_get_num_entries.mdoc -- get number of files in archive
+.\" Copyright (C) 2011 Dieter Baron and Thomas Klausner
+.\"
+.\" This file is part of libzip, a library to manipulate ZIP archives.
+.\" The authors can be contacted at <libzip@nih.at>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in
+.\"    the documentation and/or other materials provided with the
+.\"    distribution.
+.\" 3. The names of the authors may not be used to endorse or promote
+.\"    products derived from this software without specific prior
+.\"    written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
+.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
+.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd February 14, 2011
+.Dt ZIP_GET_NUM_ENTRIES 3
+.Os
+.Sh NAME
+.Nm zip_get_num_entries
+.Nd get number of files in archive
+.Sh LIBRARY
+libzip (-lzip)
+.Sh SYNOPSIS
+.In zip.h
+.Ft zip_uint64_t
+.Fn zip_get_num_entries "struct zip *archive" "int flags"
+.Sh DESCRIPTION
+The
+.Fn zip_get_num_entries
+function returns the number of files in
+.Ar archive .
+If
+.Ar flags
+is set to
+.Dv ZIP_FL_UNCHANGED ,
+the original number of entries is returned.
+.Sh RETURN VALUES
+.Fn zip_get_num_entries
+returns the number of files in the zip archive,
+or \-1 if
+.Ar archive
+is
+.Dv NULL .
+.Sh SEE ALSO
+.Xr libzip 3 ,
+.Xr zip_fopen_index 3 ,
+.Xr zip_stat_index 3
+.Sh AUTHORS
+.An -nosplit
+.An Dieter Baron Aq dillo@giga.or.at
+and
+.An Thomas Klausner Aq tk@giga.or.at
diff --git a/man/zip_get_num_files.man b/man/zip_get_num_files.man
index d82df8e..1c690b6 100644
--- a/man/zip_get_num_files.man
+++ b/man/zip_get_num_files.man
@@ -1,5 +1,5 @@
 .\" zip_get_num_files.mdoc \-- get number of files in archive
-.\" Copyright (C) 2003-2010 Dieter Baron and Thomas Klausner
+.\" Copyright (C) 2003-2011 Dieter Baron and Thomas Klausner
 .\"
 .\" This file is part of libzip, a library to manipulate ZIP archives.
 .\" The authors can be contacted at <libzip@nih.at>
@@ -29,7 +29,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.TH ZIP_GET_NUM_FILES 3 "January 28, 2010" NiH
+.TH ZIP_GET_NUM_FILES 3 "February 14, 2011" NiH
 .SH "NAME"
 zip_get_num_files \- get number of files in archive
 .SH "LIBRARY"
@@ -40,6 +40,11 @@
 int
 zip_get_num_files(struct zip *archive);
 .SH "DESCRIPTION"
+.I This function is deprecated.
+.I Use
+zip_get_num_entries(3)
+.I instead.
+.PP
 The
 zip_get_num_files
 function returns the number of files in
diff --git a/man/zip_get_num_files.mdoc b/man/zip_get_num_files.mdoc
index 24ac06a..b91df73 100644
--- a/man/zip_get_num_files.mdoc
+++ b/man/zip_get_num_files.mdoc
@@ -1,5 +1,5 @@
 .\" zip_get_num_files.mdoc -- get number of files in archive
-.\" Copyright (C) 2003-2010 Dieter Baron and Thomas Klausner
+.\" Copyright (C) 2003-2011 Dieter Baron and Thomas Klausner
 .\"
 .\" This file is part of libzip, a library to manipulate ZIP archives.
 .\" The authors can be contacted at <libzip@nih.at>
@@ -29,7 +29,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 28, 2010
+.Dd February 14, 2011
 .Dt ZIP_GET_NUM_FILES 3
 .Os
 .Sh NAME
@@ -42,6 +42,11 @@
 .Ft int
 .Fn zip_get_num_files "struct zip *archive"
 .Sh DESCRIPTION
+.Em This function is deprecated.
+.Em Use
+.Xr zip_get_num_entries 3
+.Em instead.
+.Pp
 The
 .Fn zip_get_num_files
 function returns the number of files in
diff --git a/man/zip_stat.man b/man/zip_stat.man
index 338d186..ff5cf99 100644
--- a/man/zip_stat.man
+++ b/man/zip_stat.man
@@ -29,7 +29,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.TH ZIP_STAT 3 "January 3, 2011" NiH
+.TH ZIP_STAT 3 "February 14, 2011" NiH
 .SH "NAME"
 zip_stat , \- .Nm zip_stat_index
 get information about file
@@ -154,7 +154,7 @@
 ZIP_ER_CHANGED.
 .SH "SEE ALSO"
 libzip(3),
-zip_get_num_files(3),
+zip_get_num_entries(3),
 zip_name_locate(3),
 zip_stat_init(3)
 .SH "AUTHORS"
diff --git a/man/zip_stat.mdoc b/man/zip_stat.mdoc
index 3f26f8b..3d4db87 100644
--- a/man/zip_stat.mdoc
+++ b/man/zip_stat.mdoc
@@ -29,7 +29,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 3, 2011
+.Dd February 14, 2011
 .Dt ZIP_STAT 3
 .Os
 .Sh NAME
@@ -145,7 +145,7 @@
 .Er ZIP_ER_CHANGED .
 .Sh SEE ALSO
 .Xr libzip 3 ,
-.Xr zip_get_num_files 3 ,
+.Xr zip_get_num_entries 3 ,
 .Xr zip_name_locate 3 ,
 .Xr zip_stat_init 3
 .Sh AUTHORS