Describe "valid" field.

--HG--
branch : HEAD
diff --git a/man/zip_stat.man b/man/zip_stat.man
index 5cf8b1c..9dbf3cf 100644
--- a/man/zip_stat.man
+++ b/man/zip_stat.man
@@ -1,5 +1,5 @@
 .\" zip_stat.mdoc \-- get information about file
-.\" 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_STAT 3 "January 28, 2010" NiH
+.TH ZIP_STAT 3 "January 3, 2011" NiH
 .SH "NAME"
 zip_stat , \- .Nm zip_stat_index
 get information about file
@@ -86,13 +86,45 @@
     zip_uint16_t encryption_method;     /* encryption method used */
 };
 .Ed
-.\" XXX: document valid
 The structure pointed to by
 \fBsb\fR
 must be allocated before calling
 zip_stat
 or
 zip_stat_index.
+.PP
+The
+\fBvalid\fR
+field of the structure specifies which other fields are valid.
+Check if the flag defined by the following defines are in
+\fBvalid\fR
+before accessing the fields:
+.RS
+.TP 30
+ZIP_STAT_NAME
+\fBname\fR
+.TP 30
+ZIP_STAT_INDEX
+\fBindex\fR
+.TP 30
+ZIP_STAT_SIZE
+\fBsize\fR
+.TP 30
+ZIP_STAT_COMP_SIZE
+\fBcomp_size\fR
+.TP 30
+ZIP_STAT_MTIME
+\fBmtime\fR
+.TP 30
+ZIP_STAT_CRC
+\fBcrc\fR
+.TP 30
+ZIP_STAT_COMP_METHOD
+\fBcomp_method\fR
+.TP 30
+ZIP_STAT_ENCRYPTION_METHOD
+\fBencryption_method\fR
+.RE
 .SH "RETURN VALUES"
 Upon successful completion 0 is returned.
 Otherwise, \-1 is returned and the error information in
diff --git a/man/zip_stat.mdoc b/man/zip_stat.mdoc
index 67840a6..b945280 100644
--- a/man/zip_stat.mdoc
+++ b/man/zip_stat.mdoc
@@ -1,5 +1,5 @@
 .\" zip_stat.mdoc -- get information about file
-.\" 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 January 3, 2011
 .Dt ZIP_STAT 3
 .Os
 .Sh NAME
@@ -86,13 +86,37 @@
     zip_uint16_t encryption_method;     /* encryption method used */
 };
 .Ed
-.\" XXX: document valid
 The structure pointed to by
 .Ar sb
 must be allocated before calling
 .Fn zip_stat
 or
 .Fn zip_stat_index .
+.Pp
+The
+.Ar valid
+field of the structure specifies which other fields are valid.
+Check if the flag defined by the following defines are in
+.Ar valid
+before accessing the fields:
+.Bl -tag -width ZIP_STAT_ENCRYPTION_METHODXX -compact -offset indent
+.It ZIP_STAT_NAME
+.Ar name
+.It ZIP_STAT_INDEX
+.Ar index
+.It ZIP_STAT_SIZE
+.Ar size
+.It ZIP_STAT_COMP_SIZE
+.Ar comp_size
+.It ZIP_STAT_MTIME
+.Ar mtime
+.It ZIP_STAT_CRC
+.Ar crc
+.It ZIP_STAT_COMP_METHOD
+.Ar comp_method
+.It ZIP_STAT_ENCRYPTION_METHOD
+.Ar encryption_method
+.El
 .Sh RETURN VALUES
 Upon successful completion 0 is returned.
 Otherwise, \-1 is returned and the error information in