summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-08-06 19:39:22 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-08-06 19:39:22 (GMT)
commitde875442351b3ddd204b65d371536e63de6be8ff (patch)
tree70a5b576c5335e57b8ae210741c14f255a301c13 /src
parent430b1a9c84257bac574fddd09d90cb8676d02cb7 (diff)
downloadhdf5-de875442351b3ddd204b65d371536e63de6be8ff.zip
hdf5-de875442351b3ddd204b65d371536e63de6be8ff.tar.gz
hdf5-de875442351b3ddd204b65d371536e63de6be8ff.tar.bz2
[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.
Diffstat (limited to 'src')
-rw-r--r--src/.distdep586
-rw-r--r--src/H5B.c4
-rw-r--r--src/H5Distore.c8
-rw-r--r--src/H5Fistore.c8
-rw-r--r--src/H5MMprivate.h4
-rw-r--r--src/H5O.c4
-rw-r--r--src/H5Ocomp.c40
-rw-r--r--src/H5Oefl.c2
-rw-r--r--src/H5Oprivate.h2
-rw-r--r--src/H5P.c47
-rw-r--r--src/H5Ppublic.h3
-rw-r--r--src/H5S.c6
-rw-r--r--src/H5Sselect.c3
-rw-r--r--src/H5Z.c44
-rw-r--r--src/H5Zprivate.h20
-rw-r--r--src/H5public.h2
16 files changed, 411 insertions, 372 deletions
diff --git a/src/.distdep b/src/.distdep
index 88b4253..d7abd6d 100644
--- a/src/.distdep
+++ b/src/.distdep
@@ -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,36 +681,193 @@ H5Ssimp.o: \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h
-H5Sselect.o: \
- H5Sselect.c \
+H5Tbit.o: \
+ H5Tbit.c \
+ H5private.h \
+ H5public.h \
+ H5config.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5Ipublic.h \
+ H5Iprivate.h \
+ H5Tpkg.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Dpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h \
+ H5Gprivate.h
+H5Tconv.o: \
+ H5Tconv.c \
+ H5Iprivate.h \
+ H5Ipublic.h \
+ H5public.h \
+ H5config.h \
+ H5private.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5MMprivate.h \
+ H5MMpublic.h \
+ H5Tpkg.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Dpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h \
+ H5Gprivate.h \
+ H5Gpublic.h \
+ H5Bprivate.h \
+ H5Bpublic.h
+H5Tinit.o: \
+ H5Tinit.c \
H5private.h \
H5public.h \
H5config.h \
+ H5Iprivate.h \
+ H5Ipublic.h \
H5Eprivate.h \
H5Epublic.h \
+ H5MMprivate.h \
+ H5MMpublic.h \
+ H5Tpkg.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Dpublic.h \
+ H5Tprivate.h
+H5TB.o: \
+ H5TB.c \
+ H5private.h \
+ H5public.h \
+ H5config.h \
+ H5Iprivate.h \
+ H5Ipublic.h \
+ H5Eprivate.h
+H5V.o: \
+ H5V.c \
+ H5private.h \
+ H5public.h \
+ H5config.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5Ipublic.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 \
+ 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
-H5T.o: \
- H5T.c \
+ H5Zpublic.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5HLprivate.h \
+ H5HLpublic.h \
+ H5MFprivate.h \
+ H5MFpublic.h
+H5Fistore.o: \
+ H5Fistore.c \
H5private.h \
H5public.h \
H5config.h \
@@ -986,100 +890,196 @@ H5T.o: \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h \
- H5Iprivate.h \
H5Eprivate.h \
H5Epublic.h \
- H5MMprivate.h
-H5Tbit.o: \
- H5Tbit.c \
+ 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 \
- H5Ipublic.h \
- H5Iprivate.h \
- H5Tpkg.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 \
- H5Fprivate.h \
- H5Fpublic.h \
- H5Dpublic.h \
H5Tprivate.h \
H5Tpublic.h \
- H5Gprivate.h
-H5Tconv.o: \
- H5Tconv.c \
- H5Iprivate.h \
- H5Ipublic.h \
+ H5Sprivate.h
+H5Ocomp.o: \
+ H5Ocomp.c \
+ H5private.h \
H5public.h \
H5config.h \
- H5private.h \
H5Eprivate.h \
H5Epublic.h \
+ H5Ipublic.h \
H5MMprivate.h \
H5MMpublic.h \
- H5Tpkg.h \
- H5HGprivate.h \
- H5HGpublic.h \
+ H5Oprivate.h \
+ H5Opublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
- H5Tprivate.h \
- H5Tpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
- H5Bpublic.h
-H5Tinit.o: \
- H5Tinit.c \
+ H5Bpublic.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h
+H5Oefl.o: \
+ H5Oefl.c \
H5private.h \
H5public.h \
H5config.h \
- H5Iprivate.h \
- H5Ipublic.h \
H5Eprivate.h \
H5Epublic.h \
+ H5Ipublic.h \
+ H5HLprivate.h \
+ H5HLpublic.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Dpublic.h \
H5MMprivate.h \
H5MMpublic.h \
- H5Tpkg.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 \
- H5Tprivate.h
-H5TB.o: \
- H5TB.c \
+ 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
-H5V.o: \
- H5V.c \
+ 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 \
- H5Dpublic.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
+ H5Spublic.h \
+ H5Zprivate.h \
+ H5Zpublic.h \
+ H5Iprivate.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5MMprivate.h
H5Z.o: \
H5Z.c \
H5private.h \
diff --git a/src/H5B.c b/src/H5B.c
index b219b17..a834bef 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -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];
}
diff --git a/src/H5Distore.c b/src/H5Distore.c
index 21f90bc..e77aabc 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -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];
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index 21f90bc..e77aabc 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -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];
diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h
index d417584..dc7b48a 100644
--- a/src/H5MMprivate.h
+++ b/src/H5MMprivate.h
@@ -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...
diff --git a/src/H5O.c b/src/H5O.c
index 70f5181..ca8e402 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -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");
}
diff --git a/src/H5Ocomp.c b/src/H5Ocomp.c
index a30eb6f..1b959a1 100644
--- a/src/H5Ocomp.c
+++ b/src/H5Ocomp.c
@@ -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;
}
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 442b7b4..1c8adcc 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -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)))) {
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 370603f..748e619 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -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,
diff --git a/src/H5P.c b/src/H5P.c
index a509486..63e5844 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -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:
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index c7de8f6..028fa57 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -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);
diff --git a/src/H5S.c b/src/H5S.c
index 68345fa..818077e 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -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");
}
}
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 2188470..d3e67b9 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -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)));
diff --git a/src/H5Z.c b/src/H5Z.c
index 9919023..e415790 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -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;
}
diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h
index 7330265..8cf88f6 100644
--- a/src/H5Zprivate.h
+++ b/src/H5Zprivate.h
@@ -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
diff --git a/src/H5public.h b/src/H5public.h
index 30346b1..df6267a 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -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)