[svn-r578] Changes since 19980805

----------------------

./MANIFEST
	Replaced Compression.html with Filters.html

./doc/html/Filters.html
./src/H5Ocomp.c
./src/H5P.c
./src/H5Ppublic.h
./src/H5Z.c
./src/H5Zprivate.h
	Added two extra arguments to H5Pget_filter() in order to
	retrieve the filter name.  The name is the name registered for
	the filter with H5Zregister(), but if the dataset creation
	property originally came from an existing file then the name
	is that which is stored in the file.

./tools/h5ls.c
	The `-v' option now prints the names of the filters.

./src/H5B.c
./src/H5Fistore.c
./src/H5O.c
./src/H5Oefl.c
./src/H5Oprivate.h
./src/H5P.c
	Plugged a memory leak.

./src/H5MMprivate.h
	H5MM_malloc(0) and H5MM_calloc(0) actually allocate a single
	byte in order to be sure that we get a valid pointer.

./src/H5S.c
./src/H5Sselect.c
	Fixed pointer->integer conversions in error return values in
	three places.
This commit is contained in:
Robb Matzke 1998-08-06 14:39:22 -05:00
parent 430b1a9c84
commit de87544235
20 changed files with 448 additions and 399 deletions

View File

@ -48,13 +48,13 @@
./doc/html/Caching.html
./doc/html/CodeReview.html
./doc/html/Coding.html
./doc/html/Compression.html
./doc/html/Datasets.html
./doc/html/Dataspaces.html
./doc/html/Datatypes.html
./doc/html/Errors.html
./doc/html/ExternalFiles.html
./doc/html/Files.html
./doc/html/Filters.html
./doc/html/Glossary.html
./doc/html/Groups.html
./doc/html/H5.api.html

2
README
View File

@ -1,4 +1,4 @@
This is hdf5-1.0.50 released on Wed Aug 5 04:14:08 CDT 1998
This is hdf5-1.0.51 released on Wed Aug 5 18:48:30 EDT 1998
Please refer to the INSTALL file for installation instructions.
------------------------------------------------------------------------------

View File

@ -111,7 +111,7 @@
<dt><code>H5Z_filter_t H5Pget_filter (hid_t <em>plist</em>,
int <em>filter_number</em>, unsigned int *<em>flags</em>,
size_t *<em>cd_nelmts</em>, unsigned int
*<em>cd_values</em>)</code>
*<em>cd_values</em>, size_t namelen, char name[])</code>
<dd>This is the query counterpart of
<code>H5Pset_filter()</code> and returns information about a
particular filter number in a permanent or transient pipeline
@ -123,7 +123,12 @@
<em>filter_number</em> should be a value between zero and
<em>N</em>-1 as described for <code>H5Pget_nfilters()</code>
and the function will return failure (a negative value) if the
filter number is out of range.
filter number is out of range. If <em>name</em> is a pointer
to an array of at least <em>namelen</em> bytes then the filter
name will be copied into that array. The name will be null
terminated if the <em>namelen</em> is large enough. The
filter name returned will be the name appearing in the file or
else the name registered for the filter or else an empty string.
</dl>
<p>The flags argument to the functions above is a bit vector of
@ -186,8 +191,8 @@
<dl>
<dt><code>typedef size_t (*H5Z_func_t)(unsigned int
<em>flags</em>, size_t <em>cd_nelmts</em>, unsigned int
*<em>cd_values</em>, size_t <em>nbytes</em>, size_t
<em>flags</em>, size_t <em>cd_nelmts</em>, const unsigned int
<em>cd_values</em>[], size_t <em>nbytes</em>, size_t
*<em>buf_size</em>, void **<em>buf</em>)</code>
<dd>The <em>flags</em>, <em>cd_nelmts</em>, and
<em>cd_values</em> are the same as for the
@ -282,8 +287,9 @@
<p><code><pre>
size_t
md5_filter(unsigned int flags, size_t cd_nelmts, unsigned int *cd_values,
size_t nbytes, size_t *buf_size, void **buf)
md5_filter(unsigned int flags, size_t cd_nelmts,
const unsigned int cd_values[], size_t nbytes,
size_t *buf_size, void **buf)
{
#ifdef HAVE_MD5
unsigned char cksum[16];
@ -457,7 +463,7 @@ H5Z: filter statistics accumulated over life of library:
<address><a href="mailto:matzke@llnl.gov">Robb Matzke</a></address>
<!-- Created: Fri Apr 17 13:39:35 EDT 1998 -->
<!-- hhmts start -->
Last modified: Tue Aug 4 16:04:43 EDT 1998
Last modified: Thu Aug 6 14:58:42 EDT 1998
<!-- hhmts end -->
</body>
</html>

View File

@ -1,34 +1,3 @@
H5.o: \
H5.c \
H5private.h \
H5public.h \
H5config.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Ipublic.h \
H5Dpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5Iprivate.h \
H5MMprivate.h \
H5MMpublic.h \
H5Pprivate.h \
H5Ppublic.h \
H5Zpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h
H5A.o: \
H5A.c \
H5private.h \
@ -62,70 +31,6 @@ H5A.o: \
H5Ppublic.h \
H5Apkg.h \
H5Aprivate.h
H5AC.o: \
H5AC.c \
H5private.h \
H5public.h \
H5config.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Ipublic.h \
H5Dpublic.h \
H5Eprivate.h \
H5Epublic.h
H5B.o: \
H5B.c \
H5private.h \
H5public.h \
H5config.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Ipublic.h \
H5Dpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MFprivate.h \
H5MFpublic.h \
H5MMprivate.h
H5D.o: \
H5D.c \
H5private.h \
H5public.h \
H5config.h \
H5Iprivate.h \
H5Ipublic.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5HLprivate.h \
H5HLpublic.h \
H5MFprivate.h \
H5MFpublic.h
H5E.o: \
H5E.c \
H5private.h \
@ -201,34 +106,6 @@ H5Ffamily.o: \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h
H5Fistore.o: \
H5Fistore.c \
H5private.h \
H5public.h \
H5config.h \
H5Dprivate.h \
H5Dpublic.h \
H5Ipublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MFprivate.h \
H5MFpublic.h
H5Flow.o: \
H5Flow.c \
H5private.h \
@ -482,34 +359,6 @@ H5MM.o: \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h
H5O.o: \
H5O.c \
H5private.h \
H5public.h \
H5config.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Ipublic.h \
H5Dpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MFprivate.h \
H5MFpublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h
H5Oattr.o: \
H5Oattr.c \
H5private.h \
@ -538,29 +387,6 @@ H5Oattr.o: \
H5Zprivate.h \
H5Zpublic.h \
H5Apkg.h
H5Ocomp.o: \
H5Ocomp.c \
H5private.h \
H5public.h \
H5config.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h
H5Ocont.o: \
H5Ocont.c \
H5private.h \
@ -607,34 +433,6 @@ H5Odtype.o: \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h
H5Oefl.o: \
H5Oefl.c \
H5private.h \
H5public.h \
H5config.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
H5HLprivate.h \
H5HLpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h
H5Olayout.o: \
H5Olayout.c \
H5private.h \
@ -791,57 +589,6 @@ H5Ostab.o: \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h
H5P.o: \
H5P.c \
H5private.h \
H5public.h \
H5config.h \
H5Iprivate.h \
H5Ipublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Gprivate.h \
H5Gpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h
H5S.o: \
H5S.c \
H5private.h \
H5public.h \
H5config.h \
H5Iprivate.h \
H5Ipublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h
H5Sall.o: \
H5Sall.c \
H5private.h \
@ -934,62 +681,6 @@ H5Ssimp.o: \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h
H5Sselect.o: \
H5Sselect.c \
H5private.h \
H5public.h \
H5config.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
H5Iprivate.h \
H5MMprivate.h \
H5MMpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Zprivate.h \
H5Zpublic.h
H5T.o: \
H5T.c \
H5private.h \
H5public.h \
H5config.h \
H5Dprivate.h \
H5Dpublic.h \
H5Ipublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Iprivate.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h
H5Tbit.o: \
H5Tbit.c \
H5private.h \
@ -1080,6 +771,315 @@ H5V.o: \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h
H5.o: \
H5.c \
H5private.h \
H5public.h \
H5config.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Ipublic.h \
H5Dpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5Iprivate.h \
H5MMprivate.h \
H5MMpublic.h \
H5Pprivate.h \
H5Ppublic.h \
H5Zpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h
H5AC.o: \
H5AC.c \
H5private.h \
H5public.h \
H5config.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Ipublic.h \
H5Dpublic.h \
H5Eprivate.h \
H5Epublic.h
H5B.o: \
H5B.c \
H5private.h \
H5public.h \
H5config.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Ipublic.h \
H5Dpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MFprivate.h \
H5MFpublic.h \
H5MMprivate.h
H5D.o: \
H5D.c \
H5private.h \
H5public.h \
H5config.h \
H5Iprivate.h \
H5Ipublic.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5HLprivate.h \
H5HLpublic.h \
H5MFprivate.h \
H5MFpublic.h
H5Fistore.o: \
H5Fistore.c \
H5private.h \
H5public.h \
H5config.h \
H5Dprivate.h \
H5Dpublic.h \
H5Ipublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MFprivate.h \
H5MFpublic.h
H5O.o: \
H5O.c \
H5private.h \
H5public.h \
H5config.h \
H5ACprivate.h \
H5ACpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Ipublic.h \
H5Dpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MFprivate.h \
H5MFpublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h
H5Ocomp.o: \
H5Ocomp.c \
H5private.h \
H5public.h \
H5config.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h
H5Oefl.o: \
H5Oefl.c \
H5private.h \
H5public.h \
H5config.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
H5HLprivate.h \
H5HLpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h
H5P.o: \
H5P.c \
H5private.h \
H5public.h \
H5config.h \
H5Iprivate.h \
H5Ipublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Dprivate.h \
H5Gprivate.h \
H5Gpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h
H5S.o: \
H5S.c \
H5private.h \
H5public.h \
H5config.h \
H5Iprivate.h \
H5Ipublic.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h \
H5MMpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h
H5Sselect.o: \
H5Sselect.c \
H5private.h \
H5public.h \
H5config.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
H5Iprivate.h \
H5MMprivate.h \
H5MMpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Zprivate.h \
H5Zpublic.h
H5T.o: \
H5T.c \
H5private.h \
H5public.h \
H5config.h \
H5Dprivate.h \
H5Dpublic.h \
H5Ipublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
H5Oprivate.h \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
H5Iprivate.h \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h
H5Z.o: \
H5Z.c \
H5private.h \

View File

@ -1471,10 +1471,6 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, const haddr_t *addr,
if (NULL==(bt=H5AC_find (f, H5AC_BT, cur_addr, type, udata))) {
HGOTO_ERROR (H5E_BTREE, H5E_CANTLOAD, FAIL, "B-tree node");
}
if (NULL==(child=H5MM_malloc (bt->nchildren*sizeof(haddr_t)))) {
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
}
for (i=0; i<bt->nchildren; i++) {
child[i] = bt->child[i];
}

View File

@ -1163,8 +1163,8 @@ H5F_istore_lock (H5F_t *f, const H5O_layout_t *layout,
ent->dirty = FALSE;
ent->chunk_size = chunk_size;
ent->alloc_size = chunk_alloc;
ent->layout = H5O_copy (H5O_LAYOUT, layout);
ent->pline = H5O_copy (H5O_PLINE, pline);
ent->layout = H5O_copy (H5O_LAYOUT, layout, NULL);
ent->pline = H5O_copy (H5O_PLINE, pline, NULL);
for (i=0; i<layout->ndims; i++) {
ent->offset[i] = offset[i];
}
@ -1268,8 +1268,8 @@ H5F_istore_unlock (H5F_t *f, const H5O_layout_t *layout,
H5F_rdcc_ent_t x;
HDmemset (&x, 0, sizeof x);
x.dirty = TRUE;
x.layout = H5O_copy (H5O_LAYOUT, layout);
x.pline = H5O_copy (H5O_PLINE, pline);
x.layout = H5O_copy (H5O_LAYOUT, layout, NULL);
x.pline = H5O_copy (H5O_PLINE, pline, NULL);
for (i=0, x.chunk_size=1; i<layout->ndims; i++) {
x.offset[i] = offset[i];
x.chunk_size *= layout->dim[i];

View File

@ -1163,8 +1163,8 @@ H5F_istore_lock (H5F_t *f, const H5O_layout_t *layout,
ent->dirty = FALSE;
ent->chunk_size = chunk_size;
ent->alloc_size = chunk_alloc;
ent->layout = H5O_copy (H5O_LAYOUT, layout);
ent->pline = H5O_copy (H5O_PLINE, pline);
ent->layout = H5O_copy (H5O_LAYOUT, layout, NULL);
ent->pline = H5O_copy (H5O_PLINE, pline, NULL);
for (i=0; i<layout->ndims; i++) {
ent->offset[i] = offset[i];
}
@ -1268,8 +1268,8 @@ H5F_istore_unlock (H5F_t *f, const H5O_layout_t *layout,
H5F_rdcc_ent_t x;
HDmemset (&x, 0, sizeof x);
x.dirty = TRUE;
x.layout = H5O_copy (H5O_LAYOUT, layout);
x.pline = H5O_copy (H5O_PLINE, pline);
x.layout = H5O_copy (H5O_LAYOUT, layout, NULL);
x.pline = H5O_copy (H5O_PLINE, pline, NULL);
for (i=0, x.chunk_size=1; i<layout->ndims; i++) {
x.offset[i] = offset[i];
x.chunk_size *= layout->dim[i];

View File

@ -22,8 +22,8 @@
/* Private headers needed by this file */
#include <H5private.h>
#define H5MM_malloc(Z) HDmalloc(Z)
#define H5MM_calloc(Z) HDcalloc(1,Z)
#define H5MM_malloc(Z) HDmalloc(MAX(1,Z))
#define H5MM_calloc(Z) HDcalloc(1,MAX(1,Z))
/*
* Library prototypes...

View File

@ -742,7 +742,7 @@ H5O_free (const H5O_class_t *type, void *mesg)
*-------------------------------------------------------------------------
*/
void *
H5O_copy (const H5O_class_t *type, const void *mesg)
H5O_copy (const H5O_class_t *type, const void *mesg, void *dst)
{
void *ret_value = NULL;
@ -752,7 +752,7 @@ H5O_copy (const H5O_class_t *type, const void *mesg)
assert (type->copy);
if (mesg) {
if (NULL==(ret_value=(type->copy)(mesg, NULL))) {
if (NULL==(ret_value=(type->copy)(mesg, dst))) {
HRETURN_ERROR (H5E_OHDR, H5E_CANTINIT, NULL,
"unable to copy object header message");
}

View File

@ -171,6 +171,8 @@ H5O_pline_encode (H5F_t __unused__ *f, uint8 *p/*out*/, const void *mesg)
{
const H5O_pline_t *pline = (const H5O_pline_t*)mesg;
size_t i, j, name_length;
const char *name=NULL;
H5Z_class_t *cls=NULL;
FUNC_ENTER (H5O_pline_encode, FAIL);
@ -188,17 +190,24 @@ H5O_pline_encode (H5F_t __unused__ *f, uint8 *p/*out*/, const void *mesg)
*p++ = 0; /*reserved 6*/
for (i=0; i<pline->nfilters; i++) {
if (pline->filter[i].name) {
name_length = strlen(pline->filter[i].name)+1;
} else {
name_length = 0;
/*
* Get the filter name. If the pipeline message has a name in it then
* use that one. Otherwise try to look up the filter and get the name
* as it was registered.
*/
if (NULL==(name=pline->filter[i].name) &&
(cls=H5Z_find(pline->filter[i].id))) {
name = cls->name;
}
name_length = name ? strlen(name)+1 : 0;
/* Encode the filter */
UINT16ENCODE(p, pline->filter[i].id);
UINT16ENCODE(p, H5O_ALIGN(name_length));
UINT16ENCODE(p, pline->filter[i].flags);
UINT16ENCODE(p, pline->filter[i].cd_nelmts);
if (name_length>0) {
memcpy(p, pline->filter[i].name, name_length);
memcpy(p, name, name_length);
p += name_length;
while (name_length++ % 8) *p++ = 0;
}
@ -313,23 +322,32 @@ static size_t
H5O_pline_size (H5F_t __unused__ *f, const void *mesg)
{
const H5O_pline_t *pline = (const H5O_pline_t*)mesg;
size_t i, size;
size_t i, size, name_len;
const char *name = NULL;
H5Z_class_t *cls = NULL;
FUNC_ENTER (H5O_pline_size, 0);
/* Message header */
size = 1 + /*version */
1 + /*number of filters */
6; /*reserved */
for (i=0; i<pline->nfilters; i++) {
/* Get the name of the filter, same as done with H5O_pline_encode() */
if (NULL==(name=pline->filter[i].name) &&
(cls=H5Z_find(pline->filter[i].id))) {
name = cls->name;
}
name_len = name ? strlen(name)+1 : 0;
size += 2 + /*filter identification number */
2 + /*name length */
2 + /*flags */
2; /*number of client data values */
if (pline->filter[i].name) {
size_t n = strlen(pline->filter[i].name) + 1;
size += H5O_ALIGN(n);
}
2 + /*number of client data values */
H5O_ALIGN(name_len); /*length of the filter name */
size += pline->filter[i].cd_nelmts * 4;
if (pline->filter[i].cd_nelmts % 2) size += 4;
}

View File

@ -244,7 +244,7 @@ H5O_efl_copy(const void *_mesg, void *_dest)
"memory allocation failed");
}
} else if (NULL==dest->slot || dest->nalloc<mesg->nalloc) {
} else if (dest->nalloc<mesg->nalloc) {
H5MM_xfree(dest->slot);
if (NULL==(dest->slot = H5MM_malloc(mesg->nalloc*
sizeof(H5O_efl_entry_t)))) {

View File

@ -268,7 +268,7 @@ herr_t H5O_touch(H5G_entry_t *ent, hbool_t force);
herr_t H5O_remove (H5G_entry_t *ent, const H5O_class_t *type, intn sequence);
herr_t H5O_reset (const H5O_class_t *type, void *native);
void *H5O_free (const H5O_class_t *type, void *mesg);
void *H5O_copy (const H5O_class_t *type, const void *mesg);
void *H5O_copy (const H5O_class_t *type, const void *mesg, void *dst);
herr_t H5O_share (H5F_t *f, const H5O_class_t *type, const void *mesg,
H5HG_t *hobj/*out*/);
herr_t H5O_debug (H5F_t *f, const haddr_t *addr, FILE * stream, intn indent,

View File

@ -346,7 +346,8 @@ H5P_close (H5P_class_t type, void *plist)
break;
case H5P_DATASET_CREATE:
H5O_reset (H5O_EFL, &(dc_list->efl));
H5O_reset(H5O_EFL, &(dc_list->efl));
H5O_reset(H5O_PLINE, &(dc_list->pline));
break;
case H5P_DATASET_XFER:
@ -2302,13 +2303,15 @@ H5Pget_nfilters (hid_t plist_id)
*/
H5Z_filter_t
H5Pget_filter (hid_t plist_id, int idx, unsigned int *flags/*out*/,
size_t *cd_nelmts/*in_out*/, unsigned cd_values[]/*out*/)
size_t *cd_nelmts/*in_out*/, unsigned cd_values[]/*out*/,
size_t namelen, char name[]/*out*/)
{
H5D_create_t *plist = NULL;
size_t i;
FUNC_ENTER (H5Pget_filter, FAIL);
H5TRACE5("Zf","iIsx*zx",plist_id,idx,flags,cd_nelmts,cd_values);
H5TRACE7("Zf","iIsx*zxzx",plist_id,idx,flags,cd_nelmts,cd_values,namelen,
name);
/* Check arguments */
if (H5P_DATASET_XFER==H5P_get_class(plist_id)) {
@ -2355,6 +2358,16 @@ H5Pget_filter (hid_t plist_id, int idx, unsigned int *flags/*out*/,
}
if (cd_nelmts) *cd_nelmts = plist->pline.filter[idx].cd_nelmts;
if (namelen>0 && name) {
const char *s = plist->pline.filter[idx].name;
if (!s) {
H5Z_class_t *cls = H5Z_find(plist->pline.filter[idx].id);
if (cls) s = cls->name;
}
if (s) strncpy(name, s, namelen);
else name[0] = '\0';
}
FUNC_LEAVE (plist->pline.filter[idx].id);
}
@ -2737,7 +2750,6 @@ H5P_copy (H5P_class_t type, const void *src)
{
size_t size;
void *dst = NULL;
int i;
const H5D_create_t *dc_src = NULL;
H5D_create_t *dc_dst = NULL;
const H5F_access_t *fa_src = NULL;
@ -2809,20 +2821,21 @@ H5P_copy (H5P_class_t type, const void *src)
case H5P_DATASET_CREATE:
dc_src = (const H5D_create_t*)src;
dc_dst = (H5D_create_t*)dst;
if (dc_src->efl.nalloc>0) {
dc_dst->efl.slot = H5MM_malloc (dc_dst->efl.nalloc *
sizeof(H5O_efl_entry_t));
if (NULL==dc_dst->efl.slot) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
}
for (i=0; i<dc_src->efl.nused; i++) {
char *s = H5MM_xstrdup (dc_src->efl.slot[i].name);
dc_dst->efl.slot[i] = dc_src->efl.slot[i];
dc_dst->efl.slot[i].name = s;
}
/* Copy the external file list */
HDmemset(&(dc_dst->efl), 0, sizeof(dc_dst->efl));
if (NULL==H5O_copy(H5O_EFL, &(dc_src->efl), &(dc_dst->efl))) {
HRETURN_ERROR(H5E_TEMPLATE, H5E_CANTINIT, NULL,
"unable to copy external file list message");
}
/* Copy the filter pipeline */
if (NULL==H5O_copy(H5O_PLINE, &(dc_src->pline), &(dc_dst->pline))) {
HRETURN_ERROR(H5E_TEMPLATE, H5E_CANTINIT, NULL,
"unable to copy filter pipeline message");
}
break;
case H5P_DATASET_XFER:

View File

@ -98,7 +98,8 @@ int H5Pget_nfilters(hid_t plist_id);
H5Z_filter_t H5Pget_filter(hid_t plist_id, int filter,
unsigned int *flags/*out*/,
size_t *cd_nelmts/*out*/,
unsigned cd_values[]/*out*/);
unsigned cd_values[]/*out*/,
size_t namelen, char name[]);
herr_t H5Pset_deflate (hid_t plist_id, unsigned aggression);
herr_t H5Pset_cache (hid_t plist_id, int mdc_nelmts, size_t rdcc_nbytes,
double rdcc_w0);

View File

@ -1195,7 +1195,8 @@ H5S_set_extent_simple (H5S_t *space, int rank, const hsize_t *dims,
/* Allocate space for the offset and set it to zeros */
if (NULL==(space->select.offset = H5MM_calloc(rank*sizeof(hssize_t)))) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
}
/* shift out of the previous state to a "simple" dataspace */
@ -1632,7 +1633,8 @@ H5Soffset_simple (hid_t space_id, const hssize_t *offset)
/* Allocate space for new offset */
if(space->select.offset==NULL) {
if (NULL==(space->select.offset = H5MM_malloc(sizeof(hssize_t)*space->extent.u.simple.rank))) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
}
}

View File

@ -108,7 +108,8 @@ H5S_select_copy (H5S_t *dst, const H5S_t *src)
/* Copy offset information */
if (NULL==(dst->select.offset = H5MM_calloc(src->extent.u.simple.rank*sizeof(hssize_t)))) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
}
if(src->select.offset!=NULL)
HDmemcpy(dst->select.offset,src->select.offset,(src->extent.u.simple.rank*sizeof(hssize_t)));

View File

@ -24,30 +24,10 @@ static intn interface_initialize_g = FALSE;
static herr_t H5Z_init_interface (void);
static void H5Z_term_interface (void);
/*
* The filter table maps filter identification numbers to structs that
* contain a pointers to the filter function and timing statistics.
*/
typedef struct H5Z_class_t {
H5Z_filter_t id; /*filter ID number */
char *comment; /*comment for debugging */
H5Z_func_t func; /*the filter function */
#ifdef H5Z_DEBUG
struct {
hsize_t total; /*total number of bytes processed */
hsize_t errors; /*bytes of total attributable to errors */
H5_timer_t timer; /*execution time including errors */
} stats[2]; /*0=output, 1=input */
#endif
} H5Z_class_t;
static size_t H5Z_table_alloc_g = 0;
static size_t H5Z_table_used_g = 0;
static H5Z_class_t *H5Z_table_g = NULL;
static H5Z_class_t *H5Z_find(H5Z_filter_t id);
/* Predefined filters */
static size_t H5Z_filter_deflate(uintn flags, size_t cd_nelmts,
const uintn cd_values[], size_t nbytes,
@ -123,7 +103,7 @@ H5Z_term_interface (void)
}
/* Truncate the comment to fit in the field */
strncpy(comment, H5Z_table_g[i].comment, sizeof comment);
strncpy(comment, H5Z_table_g[i].name, sizeof comment);
comment[sizeof(comment)-1] = '\0';
/*
@ -151,7 +131,7 @@ H5Z_term_interface (void)
/* Free the table */
for (i=0; i<H5Z_table_used_g; i++) {
H5MM_xfree(H5Z_table_g[i].comment);
H5MM_xfree(H5Z_table_g[i].name);
}
H5Z_table_g = H5MM_xfree(H5Z_table_g);
H5Z_table_used_g = H5Z_table_alloc_g = 0;
@ -252,12 +232,12 @@ H5Z_register (H5Z_filter_t id, const char *comment, H5Z_func_t func)
i = H5Z_table_used_g++;
HDmemset(H5Z_table_g+i, 0, sizeof(H5Z_class_t));
H5Z_table_g[i].id = id;
H5Z_table_g[i].comment = H5MM_xstrdup(comment);
H5Z_table_g[i].name = H5MM_xstrdup(comment);
H5Z_table_g[i].func = func;
} else {
/* Replace old contents */
H5MM_xfree(H5Z_table_g[i].comment);
H5Z_table_g[i].comment = H5MM_xstrdup(comment);
H5MM_xfree(H5Z_table_g[i].name);
H5Z_table_g[i].name = H5MM_xstrdup(comment);
H5Z_table_g[i].func = func;
}
@ -354,7 +334,7 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, uintn flags,
*
*-------------------------------------------------------------------------
*/
static H5Z_class_t *
H5Z_class_t *
H5Z_find(H5Z_filter_t id)
{
size_t i;
@ -544,7 +524,10 @@ H5Z_filter_deflate (uintn flags, size_t cd_nelmts, const uintn cd_values[],
z_stream z_strm;
size_t nalloc = *buf_size;
outbuf = H5MM_malloc(nalloc);
if (NULL==(outbuf = H5MM_malloc(nalloc))) {
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0,
"memory allocation failed for deflate uncompression");
}
HDmemset(&z_strm, 0, sizeof(z_strm));
z_strm.next_in = *buf;
z_strm.avail_in = nbytes;
@ -562,7 +545,12 @@ H5Z_filter_deflate (uintn flags, size_t cd_nelmts, const uintn cd_values[],
}
if (Z_OK==status && 0==z_strm.avail_out) {
nalloc *= 2;
outbuf = H5MM_realloc(outbuf, nalloc);
if (NULL==(outbuf = H5MM_realloc(outbuf, nalloc))) {
inflateEnd(&z_strm);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0,
"memory allocation failed for deflate "
"uncompression");
}
z_strm.next_out = (char*)outbuf + z_strm.total_out;
z_strm.avail_out = nalloc - z_strm.total_out;
}

View File

@ -10,6 +10,24 @@
#include <H5Zpublic.h>
/*
* The filter table maps filter identification numbers to structs that
* contain a pointers to the filter function and timing statistics.
*/
typedef struct H5Z_class_t {
H5Z_filter_t id; /*filter ID number */
char *name; /*comment for debugging */
H5Z_func_t func; /*the filter function */
#ifdef H5Z_DEBUG
struct {
hsize_t total; /*total number of bytes processed */
hsize_t errors; /*bytes of total attributable to errors */
H5_timer_t timer; /*execution time including errors */
} stats[2]; /*0=output, 1=input */
#endif
} H5Z_class_t;
struct H5O_pline_t; /*forward decl*/
herr_t H5Z_register(H5Z_filter_t id, const char *comment, H5Z_func_t filter);
@ -18,5 +36,7 @@ herr_t H5Z_append(struct H5O_pline_t *pline, H5Z_filter_t filter, uintn flags,
herr_t H5Z_pipeline(H5F_t *f, const struct H5O_pline_t *pline, uintn flags,
uintn *filter_mask/*in,out*/, size_t *nbytes/*in,out*/,
size_t *buf_size/*in,out*/, void **buf/*in,out*/);
H5Z_class_t *H5Z_find(H5Z_filter_t id);
#endif

View File

@ -27,7 +27,7 @@
/* Version numbers */
#define H5_VERS_MAJOR 1 /* For major interface/format changes */
#define H5_VERS_MINOR 0 /* For minor interface/format changes */
#define H5_VERS_RELEASE 64 /* For tweaks, bug-fixes, or development */
#define H5_VERS_RELEASE 65 /* For tweaks, bug-fixes, or development */
#define H5check() H5vers_check(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)

View File

@ -215,10 +215,14 @@ list (hid_t group, const char *name, void __unused__ *op_data)
unsigned cd_values[20];
size_t cd_nelmts = NELMTS(cd_values);
size_t cd_num;
char f_name[32];
filt_id = H5Pget_filter(dcpl, i, &filt_flags, &cd_nelmts,
cd_values);
cd_values, sizeof(f_name), f_name);
f_name[sizeof(f_name)-1] = '\0';
sprintf(comment, "Filter-%d:", i);
printf(" %-10s %u %s {", comment, (unsigned)filt_id,
printf(" %-10s %s-%u %s {", comment,
f_name[0]?f_name:"method",
(unsigned)filt_id,
filt_flags & H5Z_FLAG_OPTIONAL?"OPT":"");
for (cd_num=0; cd_num<cd_nelmts; cd_num++) {
printf("%s%u", cd_num?", ":"", cd_values[cd_num]);