summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-08-14 00:03:16 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2020-08-14 00:03:16 (GMT)
commitcb5de74ac26158f6f541eed2e0dddb50d4d197d6 (patch)
treefd3d7a6b216cddcf1a86520217b82bed2c46cbd3
parentf2681e36aeb1c1c22fd3a14efda03668d906b0a0 (diff)
parent4f9542c3327df06d1c2ae72141ded67b7b52a9bf (diff)
downloadhdf5-cb5de74ac26158f6f541eed2e0dddb50d4d197d6.zip
hdf5-cb5de74ac26158f6f541eed2e0dddb50d4d197d6.tar.gz
hdf5-cb5de74ac26158f6f541eed2e0dddb50d4d197d6.tar.bz2
Merge remote-tracking branch 'origin/develop' into remove_unneeded_tagging
-rw-r--r--MANIFEST1
-rw-r--r--release_docs/RELEASE.txt15
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/H5.c24
-rw-r--r--src/H5AC.c16
-rw-r--r--src/H5ACdbg.c6
-rw-r--r--src/H5ACmodule.h2
-rw-r--r--src/H5ACmpio.c3
-rw-r--r--src/H5ACprivate.h2
-rw-r--r--src/H5ACpublic.h4
-rw-r--r--src/H5Abtree2.c3
-rw-r--r--src/H5Adense.c14
-rw-r--r--src/H5Adeprec.c2
-rw-r--r--src/H5Aint.c5
-rw-r--r--src/H5Amodule.h2
-rw-r--r--src/H5Apkg.h3
-rw-r--r--src/H5B.c14
-rw-r--r--src/H5B2.c3
-rw-r--r--src/H5B2cache.c24
-rw-r--r--src/H5B2dbg.c5
-rw-r--r--src/H5B2hdr.c3
-rw-r--r--src/H5B2int.c14
-rw-r--r--src/H5B2internal.c12
-rw-r--r--src/H5B2leaf.c16
-rw-r--r--src/H5B2module.h2
-rw-r--r--src/H5B2stat.c2
-rw-r--r--src/H5B2test.c2
-rw-r--r--src/H5Bcache.c7
-rw-r--r--src/H5C.c532
-rw-r--r--src/H5CS.c4
-rw-r--r--src/H5CX.c2
-rw-r--r--src/H5Cdbg.c68
-rw-r--r--src/H5Cimage.c48
-rw-r--r--src/H5Cmodule.h2
-rw-r--r--src/H5Cpkg.h2
-rw-r--r--src/H5Cprivate.h3
-rw-r--r--src/H5Cpublic.h2
-rw-r--r--src/H5Dbtree.c5
-rw-r--r--src/H5Dbtree2.c11
-rw-r--r--src/H5Dchunk.c139
-rw-r--r--src/H5Dcompact.c2
-rw-r--r--src/H5Dcontig.c2
-rw-r--r--src/H5Ddeprec.c2
-rw-r--r--src/H5Defl.c5
-rw-r--r--src/H5Dfill.c4
-rw-r--r--src/H5Dint.c14
-rw-r--r--src/H5Dmpio.c38
-rw-r--r--src/H5Dnone.c2
-rw-r--r--src/H5Dpkg.h5
-rw-r--r--src/H5Dsingle.c2
-rw-r--r--src/H5Dtest.c2
-rw-r--r--src/H5Dvirtual.c4
-rw-r--r--src/H5E.c12
-rw-r--r--src/H5EA.c13
-rw-r--r--src/H5EAcache.c31
-rw-r--r--src/H5EAdblkpage.c7
-rw-r--r--src/H5EAdblock.c9
-rw-r--r--src/H5EAhdr.c16
-rw-r--r--src/H5EAiblock.c34
-rw-r--r--src/H5EAint.c4
-rw-r--r--src/H5EAsblock.c2
-rw-r--r--src/H5EAstat.c7
-rw-r--r--src/H5EAtest.c4
-rw-r--r--src/H5Edeprec.c2
-rw-r--r--src/H5Eint.c2
-rw-r--r--src/H5Emodule.h2
-rw-r--r--src/H5Epkg.h2
-rw-r--r--src/H5FA.c3
-rw-r--r--src/H5FAcache.c18
-rw-r--r--src/H5FAhdr.c4
-rw-r--r--src/H5FAint.c2
-rw-r--r--src/H5FAmodule.h2
-rw-r--r--src/H5FAstat.c6
-rw-r--r--src/H5FAtest.c2
-rw-r--r--src/H5FDcore.c37
-rw-r--r--src/H5FDcore.h2
-rw-r--r--src/H5FDdirect.c265
-rw-r--r--src/H5FDdirect.h2
-rw-r--r--src/H5FDdrvr_module.h2
-rw-r--r--src/H5FDfamily.c312
-rw-r--r--src/H5FDfamily.h2
-rw-r--r--src/H5FDhdfs.c1313
-rw-r--r--src/H5FDhdfs.h11
-rw-r--r--src/H5FDlog.c256
-rw-r--r--src/H5FDlog.h2
-rw-r--r--src/H5FDmirror.c878
-rw-r--r--src/H5FDmirror.h292
-rw-r--r--src/H5FDmirror_priv.h323
-rw-r--r--src/H5FDmodule.h2
-rw-r--r--src/H5FDmpi.c33
-rw-r--r--src/H5FDmpi.h2
-rw-r--r--src/H5FDmpio.c2
-rw-r--r--src/H5FDmpio.h2
-rw-r--r--src/H5FDmulti.c21
-rw-r--r--src/H5FDmulti.h2
-rw-r--r--src/H5FDpkg.h2
-rw-r--r--src/H5FDprivate.h2
-rw-r--r--src/H5FDpublic.h2
-rw-r--r--src/H5FDros3.c768
-rw-r--r--src/H5FDs3comms.c1715
-rw-r--r--src/H5FDsec2.c187
-rw-r--r--src/H5FDsec2.h2
-rw-r--r--src/H5FDspace.c14
-rw-r--r--src/H5FDsplitter.c763
-rw-r--r--src/H5FDstdio.c2
-rw-r--r--src/H5FDstdio.h2
-rw-r--r--src/H5FDtest.c1
-rw-r--r--src/H5FDwindows.h4
-rw-r--r--src/H5FL.c2
-rw-r--r--src/H5FLmodule.h2
-rw-r--r--src/H5FLprivate.h4
-rw-r--r--src/H5FS.c11
-rw-r--r--src/H5FScache.c8
-rw-r--r--src/H5FSdbg.c2
-rw-r--r--src/H5FSint.c2
-rw-r--r--src/H5FSmodule.h2
-rw-r--r--src/H5FSpkg.h2
-rw-r--r--src/H5FSprivate.h2
-rw-r--r--src/H5FSsection.c133
-rw-r--r--src/H5Faccum.c8
-rw-r--r--src/H5Fcwfs.c2
-rw-r--r--src/H5Fdbg.c3
-rw-r--r--src/H5Fdeprec.c2
-rw-r--r--src/H5Fefc.c2
-rw-r--r--src/H5Ffake.c2
-rw-r--r--src/H5Fint.c2
-rw-r--r--src/H5Fio.c6
-rw-r--r--src/H5Fmodule.h2
-rw-r--r--src/H5Fmount.c12
-rw-r--r--src/H5Fmpi.c2
-rw-r--r--src/H5Fpkg.h2
-rw-r--r--src/H5Fprivate.h14
-rw-r--r--src/H5Fquery.c3
-rw-r--r--src/H5Fspace.c2
-rw-r--r--src/H5Fsuper.c5
-rw-r--r--src/H5Fsuper_cache.c14
-rw-r--r--src/H5Ftest.c2
-rw-r--r--src/H5Gbtree2.c145
-rw-r--r--src/H5Gcache.c2
-rw-r--r--src/H5Gcompact.c20
-rw-r--r--src/H5Gdense.c167
-rw-r--r--src/H5Gdeprec.c10
-rw-r--r--src/H5Gent.c9
-rw-r--r--src/H5Gint.c36
-rw-r--r--src/H5Glink.c48
-rw-r--r--src/H5Gloc.c10
-rw-r--r--src/H5Gmodule.h2
-rw-r--r--src/H5Gname.c78
-rw-r--r--src/H5Gnode.c96
-rw-r--r--src/H5Gobj.c33
-rw-r--r--src/H5Gpkg.h2
-rw-r--r--src/H5Gprivate.h2
-rw-r--r--src/H5Gpublic.h2
-rw-r--r--src/H5Groot.c4
-rw-r--r--src/H5Gstab.c39
-rw-r--r--src/H5Gtest.c3
-rw-r--r--src/H5Gtraverse.c7
-rw-r--r--src/H5HF.c65
-rw-r--r--src/H5HFbtree2.c2
-rw-r--r--src/H5HFcache.c42
-rw-r--r--src/H5HFdbg.c29
-rw-r--r--src/H5HFdblock.c41
-rw-r--r--src/H5HFdtable.c69
-rw-r--r--src/H5HFhdr.c254
-rw-r--r--src/H5HFhuge.c64
-rw-r--r--src/H5HFiblock.c113
-rw-r--r--src/H5HFiter.c130
-rw-r--r--src/H5HFman.c31
-rw-r--r--src/H5HFmodule.h2
-rw-r--r--src/H5HFpkg.h126
-rw-r--r--src/H5HFprivate.h18
-rw-r--r--src/H5HFsection.c385
-rw-r--r--src/H5HFspace.c42
-rw-r--r--src/H5HFstat.c2
-rw-r--r--src/H5HFtest.c11
-rw-r--r--src/H5HFtiny.c86
-rw-r--r--src/H5HG.c4
-rw-r--r--src/H5HGcache.c2
-rw-r--r--src/H5HGdbg.c3
-rw-r--r--src/H5HGmodule.h2
-rw-r--r--src/H5HGpkg.h2
-rw-r--r--src/H5HGprivate.h2
-rw-r--r--src/H5HGquery.c2
-rw-r--r--src/H5HL.c2
-rw-r--r--src/H5HLcache.c8
-rw-r--r--src/H5HLdbg.c2
-rw-r--r--src/H5HLdblk.c2
-rw-r--r--src/H5HLint.c2
-rw-r--r--src/H5HLprfx.c2
-rw-r--r--src/H5HP.c72
-rw-r--r--src/H5I.c6
-rw-r--r--src/H5Imodule.h2
-rw-r--r--src/H5Ipkg.h2
-rw-r--r--src/H5Itest.c2
-rw-r--r--src/H5L.c97
-rw-r--r--src/H5Lexternal.c2
-rw-r--r--src/H5Lmodule.h2
-rw-r--r--src/H5Lpkg.h24
-rw-r--r--src/H5Lprivate.h22
-rw-r--r--src/H5Lpublic.h2
-rw-r--r--src/H5MF.c34
-rw-r--r--src/H5MFaggr.c10
-rw-r--r--src/H5MFdbg.c5
-rw-r--r--src/H5MFmodule.h2
-rw-r--r--src/H5MFpkg.h3
-rw-r--r--src/H5MFprivate.h3
-rw-r--r--src/H5MFsection.c17
-rw-r--r--src/H5MM.c2
-rw-r--r--src/H5MMprivate.h2
-rw-r--r--src/H5MMpublic.h6
-rw-r--r--src/H5MP.c30
-rw-r--r--src/H5MPmodule.h2
-rw-r--r--src/H5MPpkg.h2
-rw-r--r--src/H5MPprivate.h2
-rw-r--r--src/H5MPtest.c18
-rw-r--r--src/H5Oainfo.c55
-rw-r--r--src/H5Oalloc.c17
-rw-r--r--src/H5Oattr.c112
-rw-r--r--src/H5Oattribute.c54
-rw-r--r--src/H5Obogus.c36
-rw-r--r--src/H5Obtreek.c54
-rw-r--r--src/H5Ocache.c10
-rw-r--r--src/H5Ocache_image.c36
-rw-r--r--src/H5Ocopy.c34
-rw-r--r--src/H5Ocopy_ref.c112
-rw-r--r--src/H5Odbg.c6
-rw-r--r--src/H5Odrvinfo.c57
-rw-r--r--src/H5Odtype.c174
-rw-r--r--src/H5Oefl.c60
-rw-r--r--src/H5Ofill.c179
-rw-r--r--src/H5Oflush.c2
-rw-r--r--src/H5Ofsinfo.c248
-rw-r--r--src/H5Oginfo.c65
-rw-r--r--src/H5Oint.c132
-rw-r--r--src/H5Olayout.c4
-rw-r--r--src/H5Olinfo.c46
-rw-r--r--src/H5Olink.c57
-rw-r--r--src/H5Omessage.c36
-rw-r--r--src/H5Omodule.h2
-rw-r--r--src/H5Omtime.c86
-rw-r--r--src/H5Oname.c54
-rw-r--r--src/H5Onull.c1
-rw-r--r--src/H5Opkg.h5
-rw-r--r--src/H5Opline.c241
-rw-r--r--src/H5Oprivate.h11
-rw-r--r--src/H5Opublic.h2
-rw-r--r--src/H5Orefcount.c57
-rw-r--r--src/H5Osdspace.c105
-rw-r--r--src/H5Oshared.c6
-rw-r--r--src/H5Oshared.h2
-rw-r--r--src/H5Oshmesg.c38
-rw-r--r--src/H5Ostab.c16
-rw-r--r--src/H5Otest.c4
-rw-r--r--src/H5Ounknown.c2
-rw-r--r--src/H5P.c2
-rw-r--r--src/H5PBmodule.h2
-rw-r--r--src/H5PLpkg.h2
-rw-r--r--src/H5Pdapl.c34
-rw-r--r--src/H5Pdcpl.c60
-rw-r--r--src/H5Pdeprec.c2
-rw-r--r--src/H5Pdxpl.c14
-rw-r--r--src/H5Pencdec.c2
-rw-r--r--src/H5Pfapl.c142
-rw-r--r--src/H5Pfcpl.c39
-rw-r--r--src/H5Pfmpl.c14
-rw-r--r--src/H5Pgcpl.c2
-rw-r--r--src/H5Pint.c6
-rw-r--r--src/H5Plapl.c2
-rw-r--r--src/H5Plcpl.c14
-rw-r--r--src/H5Pmodule.h2
-rw-r--r--src/H5Pocpl.c75
-rw-r--r--src/H5Pocpypl.c2
-rw-r--r--src/H5Ppkg.h2
-rw-r--r--src/H5Pstrcpl.c2
-rw-r--r--src/H5Ptest.c2
-rw-r--r--src/H5RS.c14
-rw-r--r--src/H5Rdeprec.c152
-rw-r--r--src/H5Rint.c195
-rw-r--r--src/H5Rpkg.h4
-rw-r--r--src/H5SL.c101
-rw-r--r--src/H5SLmodule.h2
-rw-r--r--src/H5SM.c127
-rw-r--r--src/H5SMbtree2.c42
-rw-r--r--src/H5SMcache.c8
-rw-r--r--src/H5SMmessage.c26
-rw-r--r--src/H5SMmodule.h2
-rw-r--r--src/H5SMpkg.h14
-rw-r--r--src/H5SMprivate.h2
-rw-r--r--src/H5SMtest.c2
-rw-r--r--src/H5ST.c72
-rw-r--r--src/H5Sall.c2
-rw-r--r--src/H5Sdbg.c1
-rw-r--r--src/H5Sdeprec.c1
-rw-r--r--src/H5Shyper.c10
-rw-r--r--src/H5Smodule.h2
-rw-r--r--src/H5Snone.c2
-rw-r--r--src/H5Spkg.h2
-rw-r--r--src/H5Sselect.c38
-rw-r--r--src/H5Stest.c2
-rw-r--r--src/H5T.c32
-rw-r--r--src/H5TSprivate.h2
-rw-r--r--src/H5Tcompound.c12
-rw-r--r--src/H5Tconv.c110
-rw-r--r--src/H5Tcset.c8
-rw-r--r--src/H5Tdeprec.c2
-rw-r--r--src/H5Tenum.c52
-rw-r--r--src/H5Tfields.c13
-rw-r--r--src/H5Tfixed.c9
-rw-r--r--src/H5Tfloat.c4
-rw-r--r--src/H5Tmodule.h2
-rw-r--r--src/H5Toffset.c20
-rw-r--r--src/H5Topaque.c4
-rw-r--r--src/H5Torder.c14
-rw-r--r--src/H5Tpad.c8
-rw-r--r--src/H5Tpkg.h4
-rw-r--r--src/H5Tprecis.c24
-rw-r--r--src/H5Tprivate.h2
-rw-r--r--src/H5Tref.c8
-rw-r--r--src/H5Tstrpad.c8
-rw-r--r--src/H5Tvisit.c2
-rw-r--r--src/H5Tvlen.c8
-rw-r--r--src/H5VLnative_link.c22
-rw-r--r--src/H5VLnative_object.c8
-rw-r--r--src/H5VM.c67
-rw-r--r--src/H5VMprivate.h106
-rw-r--r--src/H5WB.c6
-rw-r--r--src/H5WBprivate.h2
-rw-r--r--src/H5Z.c48
-rw-r--r--src/H5Zdeflate.c20
-rw-r--r--src/H5Zfletcher32.c27
-rw-r--r--src/H5Zmodule.h2
-rw-r--r--src/H5Znbit.c268
-rw-r--r--src/H5Zprivate.h2
-rw-r--r--src/H5Zpublic.h2
-rw-r--r--src/H5Zscaleoffset.c192
-rw-r--r--src/H5Zshuffle.c34
-rw-r--r--src/H5Zszip.c50
-rw-r--r--src/H5Ztrans.c342
-rw-r--r--src/H5checksum.c22
-rw-r--r--src/H5detect.c25
-rw-r--r--src/H5private.h5
-rw-r--r--src/H5system.c2
-rw-r--r--src/H5timer.c2
-rw-r--r--src/H5trace.c2
-rw-r--r--src/hdf5.lnt2
-rw-r--r--test/accum.c4
-rw-r--r--test/big.c4
-rw-r--r--test/btree2.c12
-rw-r--r--test/earray.c38
-rw-r--r--test/fheap.c135
-rw-r--r--test/hdfs.c29
-rw-r--r--test/mirror_vfd.c2
-rw-r--r--test/pool.c4
-rw-r--r--test/swmr_addrem_writer.c20
-rw-r--r--test/swmr_generator.c28
-rw-r--r--test/swmr_remove_writer.c20
-rw-r--r--test/swmr_sparse_writer.c20
-rw-r--r--test/swmr_start_write.c10
-rw-r--r--test/swmr_writer.c16
-rw-r--r--test/tattr.c11
-rw-r--r--test/thread_id.c4
-rw-r--r--test/trefer.c50
-rw-r--r--test/ttsafe_attr_vlen.c27
-rw-r--r--utils/mirror_vfd/mirror_remote.h2
364 files changed, 6708 insertions, 10201 deletions
diff --git a/MANIFEST b/MANIFEST
index 9720ebf..6aaf772 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -692,6 +692,7 @@
./src/H5FDlog.h
./src/H5FDmirror.c
./src/H5FDmirror.h
+./src/H5FDmirror_priv.h
./src/H5FDmodule.h
./src/H5FDmpi.c
./src/H5FDmpi.h
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 7ccdbe9..07c61e5 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -349,9 +349,9 @@ New Features
added to the libhdf5.settings file.
Autotools:
-
+
An --enable-file-locking=(yes|no|best-effort) option has been added.
-
+
yes: Use file locking.
no: Do not use file locking.
best-effort: Use file locking and ignore "disabled" errors.
@@ -765,6 +765,15 @@ Bug Fixes since HDF5-1.10.3 release
Library
-------
+ - Explicitly declared dlopen to use RTLD_LOCAL
+
+ dlopen documentation states that if neither RTLD_GLOBAL nor
+ RTLD_LOCAL are specified, then the default behavior is unspecified.
+ The default on linux is usually RTLD_LOCAL while macos will default
+ to RTLD_GLOBAL.
+
+ (ADB - 2020/08/12, HDFFV-11127)
+
- Fixed issues CVE-2018-13870 and CVE-2018-13869
When a buffer overflow occurred because a name length was corrupted
@@ -774,7 +783,7 @@ Bug Fixes since HDF5-1.10.3 release
locations to prevent the crashes and h5dump now simply fails with an
error message when this error condition occurs.
- (BMR - 2020/7/22, HDFFV-11120 and HDFFV-11121)
+ (BMR - 2020/07/22, HDFFV-11120 and HDFFV-11121)
- Fixed the segmentation fault when reading attributes with multiple threads
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 39a9e3e..022e5a3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -839,6 +839,7 @@ set (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5FApkg.h
${HDF5_SRC_DIR}/H5FAprivate.h
+ ${HDF5_SRC_DIR}/H5FDmirror_priv.h
${HDF5_SRC_DIR}/H5FDpkg.h
${HDF5_SRC_DIR}/H5FDprivate.h
diff --git a/src/H5.c b/src/H5.c
index 31b8546..4e5648a 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -50,9 +50,9 @@
/********************/
/* Local Prototypes */
/********************/
-static void H5_debug_mask(const char*);
+static void H5__debug_mask(const char*);
#ifdef H5_HAVE_PARALLEL
-static int H5_mpi_delete_cb(MPI_Comm comm, int keyval, void *attr_val, int *flag);
+static int H5__mpi_delete_cb(MPI_Comm comm, int keyval, void *attr_val, int *flag);
#endif /*H5_HAVE_PARALLEL*/
/*********************/
@@ -139,7 +139,7 @@ H5_init_library(void)
int key_val;
if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_COMM_NULL_COPY_FN,
- (MPI_Comm_delete_attr_function *)H5_mpi_delete_cb,
+ (MPI_Comm_delete_attr_function *)H5__mpi_delete_cb,
&key_val, NULL)))
HMPI_GOTO_ERROR(FAIL, "MPI_Comm_create_keyval failed", mpi_code)
@@ -219,10 +219,6 @@ H5_init_library(void)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize vol interface")
if(H5P_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize property list interface")
- if(H5T_init() < 0)
- HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize datatype interface")
- if(H5D_init() < 0)
- HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize dataset interface")
if(H5AC_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize metadata caching interface")
if(H5L_init() < 0)
@@ -235,8 +231,8 @@ H5_init_library(void)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize vol interface")
/* Debugging? */
- H5_debug_mask("-all");
- H5_debug_mask(HDgetenv("HDF5_DEBUG"));
+ H5__debug_mask("-all");
+ H5__debug_mask(HDgetenv("HDF5_DEBUG"));
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -639,7 +635,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5_debug_mask
+ * Function: H5__debug_mask
*
* Purpose: Set runtime debugging flags according to the string S. The
* string should contain file numbers and package names
@@ -662,7 +658,7 @@ done:
*-------------------------------------------------------------------------
*/
static void
-H5_debug_mask(const char *s)
+H5__debug_mask(const char *s)
{
FILE *stream = stderr;
char pkg_name[32], *rest;
@@ -738,12 +734,12 @@ H5_debug_mask(const char *s)
return;
-} /* end H5_debug_mask() */
+} /* end H5__debug_mask() */
#ifdef H5_HAVE_PARALLEL
/*-------------------------------------------------------------------------
- * Function: H5_mpi_delete_cb
+ * Function: H5__mpi_delete_cb
*
* Purpose: Callback attribute on MPI_COMM_SELF to terminate the HDF5
* library when the communicator is destroyed, i.e. on MPI_Finalize.
@@ -752,7 +748,7 @@ H5_debug_mask(const char *s)
*
*-------------------------------------------------------------------------
*/
-static int H5_mpi_delete_cb(MPI_Comm H5_ATTR_UNUSED comm, int H5_ATTR_UNUSED keyval, void H5_ATTR_UNUSED *attr_val, int H5_ATTR_UNUSED *flag)
+static int H5__mpi_delete_cb(MPI_Comm H5_ATTR_UNUSED comm, int H5_ATTR_UNUSED keyval, void H5_ATTR_UNUSED *attr_val, int H5_ATTR_UNUSED *flag)
{
H5_term_library();
return MPI_SUCCESS;
diff --git a/src/H5AC.c b/src/H5AC.c
index 402f562..51e5102 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -15,7 +15,7 @@
*
* Created: H5AC.c
* Jul 9 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Functions in this file implement a cache for
* things which exist on disk. All "things" associated
@@ -239,8 +239,6 @@ H5AC_term_package(void)
*
* Programmer: John Mainzer, 1/10/17
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
hbool_t
@@ -275,7 +273,6 @@ H5AC_cache_image_pending(const H5F_t *f)
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@@ -469,7 +466,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@@ -587,7 +583,6 @@ H5AC_evict(H5F_t *f)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't evict cache")
done:
-
/* If currently logging, generate a message */
if(f->shared->cache->log_info->logging)
if(H5C_log_write_evict_cache_msg(f->shared->cache, ret_value) < 0)
@@ -655,7 +650,6 @@ done:
* request to flush all items and something was protected.
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@@ -775,7 +769,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@@ -1075,7 +1068,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@@ -1271,7 +1263,6 @@ done:
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Sep 2 1997
*
*-------------------------------------------------------------------------
@@ -1509,7 +1500,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Sep 2 1997
*
*-------------------------------------------------------------------------
@@ -1536,8 +1526,8 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing,
HDassert(type->image_len);
HDassert(H5F_addr_defined(addr));
HDassert(thing);
- HDassert( ((H5AC_info_t *)thing)->addr == addr );
- HDassert( ((H5AC_info_t *)thing)->type == type );
+ HDassert(((H5AC_info_t *)thing)->addr == addr);
+ HDassert(((H5AC_info_t *)thing)->type == type);
dirtied = (hbool_t)(((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG) ||
(((H5AC_info_t *)thing)->dirtied));
diff --git a/src/H5ACdbg.c b/src/H5ACdbg.c
index b40f8d0..94f3d83 100644
--- a/src/H5ACdbg.c
+++ b/src/H5ACdbg.c
@@ -270,10 +270,6 @@ H5AC_flush_dependency_exists(H5F_t *f, haddr_t parent_addr, haddr_t child_addr,
*
* Programmer: John Mainzer, 5/30/14
*
- * Changes: None.
- *
- * JRM -- 9/17/16
- *
*-------------------------------------------------------------------------
*/
#ifndef NDEBUG
@@ -351,8 +347,6 @@ H5AC_get_serialization_in_progress(H5F_t *f)
*
* Programmer: John Mainzer, 6/18/16
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
#ifndef NDEBUG
diff --git a/src/H5ACmodule.h b/src/H5ACmodule.h
index e218b31..8c6eae2 100644
--- a/src/H5ACmodule.h
+++ b/src/H5ACmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index f097e83..c6ffc80 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -15,7 +15,7 @@
*
* Created: H5ACmpio.c
* Jun 20 2015
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Functions in this file implement support for parallel
* I/O cache functionality
@@ -2284,7 +2284,6 @@ H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, unsigned num_candidates,
* request to flush all items and something was protected.
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 22 2009
*
*-------------------------------------------------------------------------
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index b932e16..f6c3d6b 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -15,7 +15,7 @@
*
* Created: H5ACprivate.h
* Jul 9 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Constants and typedefs available to the rest of the
* library.
diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h
index a48aa69..e6f4010 100644
--- a/src/H5ACpublic.h
+++ b/src/H5ACpublic.h
@@ -15,12 +15,10 @@
*
* Created: H5ACpublic.h
* Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Public include file for cache functions.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef _H5ACpublic_H
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index 3377aa2..843799e 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -15,7 +15,7 @@
*
* Created: H5Abtree2.c
* Dec 4 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: v2 B-tree callbacks for indexing attributes on objects
*
@@ -152,7 +152,6 @@ const H5B2_class_t H5A_BT2_CORDER[1]={{ /* B-tree class information */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 4 2006
*
*-------------------------------------------------------------------------
diff --git a/src/H5Adense.c b/src/H5Adense.c
index fd92e8f..ac6501a 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -15,7 +15,7 @@
*
* Created: H5Adense.c
* Dec 4 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Routines for operating on "dense" attribute storage
* for an object.
@@ -209,9 +209,6 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
/* Retrieve the heap's address in the file */
if(H5HF_get_heap_addr(fheap, &ainfo->fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap address")
-#ifdef QAK
-HDfprintf(stderr, "%s: ainfo->fheap_addr = %a\n", FUNC, ainfo->fheap_addr);
-#endif /* QAK */
#ifndef NDEBUG
{
@@ -221,9 +218,6 @@ HDfprintf(stderr, "%s: ainfo->fheap_addr = %a\n", FUNC, ainfo->fheap_addr);
if(H5HF_get_id_len(fheap, &fheap_id_len) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length")
HDassert(fheap_id_len == H5O_FHEAP_ID_LEN);
-#ifdef QAK
-HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
-#endif /* QAK */
}
#endif /* NDEBUG */
@@ -243,9 +237,6 @@ HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
/* Retrieve the v2 B-tree's address in the file */
if(H5B2_get_addr(bt2_name, &ainfo->name_bt2_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get v2 B-tree address for name index")
-#ifdef QAK
-HDfprintf(stderr, "%s: ainfo->name_bt2_addr = %a\n", FUNC, ainfo->name_bt2_addr);
-#endif /* QAK */
/* Check if we should create a creation order index v2 B-tree */
if(ainfo->index_corder) {
@@ -264,9 +255,6 @@ HDfprintf(stderr, "%s: ainfo->name_bt2_addr = %a\n", FUNC, ainfo->name_bt2_addr)
/* Retrieve the v2 B-tree's address in the file */
if(H5B2_get_addr(bt2_corder, &ainfo->corder_bt2_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get v2 B-tree address for creation order index")
-#ifdef QAK
-HDfprintf(stderr, "%s: ainfo->corder_bt2_addr = %a\n", FUNC, ainfo->corder_bt2_addr);
-#endif /* QAK */
} /* end if */
done:
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index dd5eae3..c4d8bb8 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -15,7 +15,7 @@
*
* Created: H5Adeprec.c
* November 27 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Deprecated functions from the H5A interface. These
* functions are here for compatibility purposes and may be
diff --git a/src/H5Aint.c b/src/H5Aint.c
index d6ea1f4..5ecfd06 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -14,8 +14,8 @@
/*-------------------------------------------------------------------------
*
* Created: H5Aint.c
- * Dec 18 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Dec 18 2006
+ * Quincey Koziol
*
* Purpose: Internal routines for managing attributes.
*
@@ -2416,7 +2416,6 @@ done:
* Failure: Negative
*
* Programmer: Peter Cao
- * xcao@hdfgroup.org
* July 20, 2007
*
*-------------------------------------------------------------------------
diff --git a/src/H5Amodule.h b/src/H5Amodule.h
index 8ed056b..6b835e1 100644
--- a/src/H5Amodule.h
+++ b/src/H5Amodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Apkg.h b/src/H5Apkg.h
index f3870c0..39fdea3 100644
--- a/src/H5Apkg.h
+++ b/src/H5Apkg.h
@@ -263,9 +263,6 @@ H5_DLL herr_t H5O__attr_remove(const H5O_loc_t *loc, const char *name);
H5_DLL herr_t H5O__attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n);
H5_DLL htri_t H5O__attr_exists(const H5O_loc_t *loc, const char *name);
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-H5_DLL int H5O__attr_count(const H5O_loc_t *loc);
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
H5_DLL H5A_t *H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
H5O_copy_t *cpy_info);
H5_DLL herr_t H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *mesg_src,
diff --git a/src/H5B.c b/src/H5B.c
index f909d90..2ab5198 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -15,7 +15,7 @@
*
* Created: H5B.c
* Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Implements balanced, sibling-linked, N-ary trees
* capable of storing any type of data with unique key
@@ -206,7 +206,6 @@ H5FL_SEQ_DEFINE_STATIC(size_t);
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -291,7 +290,6 @@ done:
* UDATA is undefined).
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -387,7 +385,6 @@ done:
* returned through the NEW_ADDR argument). Negative on failure.
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 3 1997
*
*-------------------------------------------------------------------------
@@ -542,7 +539,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -700,7 +696,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 8 1997
*
*-------------------------------------------------------------------------
@@ -789,7 +784,6 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx,
* Failure: H5B_INS_ERROR
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@@ -1118,7 +1112,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -1185,7 +1178,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@@ -1679,7 +1671,6 @@ done:
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 27 2008
*
*-------------------------------------------------------------------------
@@ -1786,7 +1777,6 @@ H5B_shared_free(void *_shared)
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 18 2000
*
*-------------------------------------------------------------------------
@@ -1852,7 +1842,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jun 3 2008
*
*-------------------------------------------------------------------------
@@ -2066,7 +2055,6 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 26, 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5B2.c b/src/H5B2.c
index 5c83de2..06806aa 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -1497,9 +1497,6 @@ H5B2_delete(H5F_t *f, haddr_t addr, void *ctx_udata, H5B2_remove_t op,
HDassert(H5F_addr_defined(addr));
/* Lock the v2 B-tree header into memory */
-#ifdef QAK
-HDfprintf(stderr, "%s: addr = %a\n", FUNC, addr);
-#endif /* QAK */
if(NULL == (hdr = H5B2__hdr_protect(f, addr, ctx_udata, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header")
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 80cb6c5..3b7dd5d 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -15,7 +15,7 @@
*
* Created: H5B2cache.c
* Jan 31 2005
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement v2 B-tree metadata cache methods.
*
@@ -171,7 +171,6 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 18, 2010
*
*-------------------------------------------------------------------------
@@ -240,7 +239,6 @@ H5B2__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 1 2005
*
*-------------------------------------------------------------------------
@@ -339,7 +337,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 20, 2010
*
*-------------------------------------------------------------------------
@@ -370,7 +367,6 @@ H5B2__cache_hdr_image_len(const void *_thing, size_t *image_len)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 1 2005
*
*-------------------------------------------------------------------------
@@ -442,7 +438,6 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
- * nfortne2@hdfgroup.org
* Apr 24 2012
*
*-------------------------------------------------------------------------
@@ -530,7 +525,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Mike McGreevy
- * mcgreevy@hdfgroup.org
* June 18, 2008
*
*-------------------------------------------------------------------------
@@ -562,7 +556,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 18, 2010
*
*-------------------------------------------------------------------------
@@ -637,7 +630,6 @@ H5B2__cache_int_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, voi
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -756,7 +748,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 20, 2010
*
*-------------------------------------------------------------------------
@@ -788,7 +779,6 @@ H5B2__cache_int_image_len(const void *_thing, size_t *image_len)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 3 2005
*
*-------------------------------------------------------------------------
@@ -875,7 +865,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
- * nfortne2@hdfgroup.org
* Apr 25 2012
*
*-------------------------------------------------------------------------
@@ -886,7 +875,7 @@ H5B2__cache_int_notify(H5AC_notify_action_t action, void *_thing)
H5B2_internal_t *internal = (H5B2_internal_t *)_thing;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -952,7 +941,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Mike McGreevy
- * mcgreevy@hdfgroup.org
* June 18, 2008
*
*-------------------------------------------------------------------------
@@ -985,7 +973,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 18, 2010
*
*-------------------------------------------------------------------------
@@ -1060,7 +1047,6 @@ H5B2__cache_leaf_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -1159,7 +1145,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 20, 2010
*
*-------------------------------------------------------------------------
@@ -1191,7 +1176,6 @@ H5B2__cache_leaf_image_len(const void *_thing, size_t *image_len)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -1264,7 +1248,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
- * nfortne2@hdfgroup.org
* Apr 25 2012
*
*-------------------------------------------------------------------------
@@ -1275,7 +1258,7 @@ H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *_thing)
H5B2_leaf_t *leaf = (H5B2_leaf_t *)_thing;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -1341,7 +1324,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Mike McGreevy
- * mcgreevy@hdfgroup.org
* June 18, 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index b5b1c03..0d93ed6 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -15,7 +15,7 @@
*
* Created: H5B2dbg.c
* Feb 2 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Dump debugging information about a v2 B-tree.
*
@@ -80,7 +80,6 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -175,7 +174,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 4 2005
*
*-------------------------------------------------------------------------
@@ -287,7 +285,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 7 2005
*
*-------------------------------------------------------------------------
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index 9ba8235..7b8b564 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -573,7 +573,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 18 2015
*
*-------------------------------------------------------------------------
@@ -605,7 +604,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -682,7 +680,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 15 2009
*
*-------------------------------------------------------------------------
diff --git a/src/H5B2int.c b/src/H5B2int.c
index 53ac835..816d8f8 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -15,7 +15,7 @@
*
* Created: H5B2int.c
* Feb 27 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Internal routines for managing v2 B-trees.
*
@@ -97,7 +97,6 @@ H5FL_SEQ_EXTERN(H5B2_node_info_t);
* record to locate is greater than all records to search).
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 3 2005
*
*-------------------------------------------------------------------------
@@ -141,7 +140,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 28 2006
*
*-------------------------------------------------------------------------
@@ -336,7 +334,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 3 2005
*
*-------------------------------------------------------------------------
@@ -414,7 +411,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 9 2005
*
*-------------------------------------------------------------------------
@@ -658,7 +654,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 9 2005
*
*-------------------------------------------------------------------------
@@ -1032,7 +1027,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 4 2005
*
*-------------------------------------------------------------------------
@@ -1195,7 +1189,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 4 2005
*
*-------------------------------------------------------------------------
@@ -1437,7 +1430,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 23 2015
*
*-------------------------------------------------------------------------
@@ -1497,7 +1489,6 @@ done:
* Return: Value from callback, non-negative on success, negative on error
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 11 2005
*
*-------------------------------------------------------------------------
@@ -1612,7 +1603,6 @@ done:
* Return: Value from callback, non-negative on success, negative on error
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 9 2005
*
*-------------------------------------------------------------------------
@@ -1779,7 +1769,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* Dec 1 2016
*
*-------------------------------------------------------------------------
@@ -1877,7 +1866,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* Dec 1 2016
*
*-------------------------------------------------------------------------
diff --git a/src/H5B2internal.c b/src/H5B2internal.c
index 1fee0af..82f676f 100644
--- a/src/H5B2internal.c
+++ b/src/H5B2internal.c
@@ -15,7 +15,7 @@
*
* Created: H5B2internal.c
* Dec 01 2016
- * Quincey Koziol <koziol@lbl.gov>
+ * Quincey Koziol
*
* Purpose: Routines for managing v2 B-tree internal ndoes.
*
@@ -87,7 +87,6 @@ H5FL_DEFINE(H5B2_internal_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 3 2005
*
*-------------------------------------------------------------------------
@@ -183,7 +182,6 @@ done:
* Return: Pointer to internal node on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 25 2006
*
*-------------------------------------------------------------------------
@@ -277,7 +275,6 @@ done:
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 9 2005
*
*-------------------------------------------------------------------------
@@ -350,7 +347,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 2 2005
*
*-------------------------------------------------------------------------
@@ -513,7 +509,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 24 2015
*
*-------------------------------------------------------------------------
@@ -782,7 +777,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 3 2005
*
*-------------------------------------------------------------------------
@@ -1015,7 +1009,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 14 2006
*
*-------------------------------------------------------------------------
@@ -1300,7 +1293,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -1349,7 +1341,6 @@ done:
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 19 2005
*
*-------------------------------------------------------------------------
@@ -1390,7 +1381,6 @@ H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_NDEBUG_U
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 19 2005
*
*-------------------------------------------------------------------------
diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c
index 1fde36d..d2cfbe0 100644
--- a/src/H5B2leaf.c
+++ b/src/H5B2leaf.c
@@ -15,7 +15,7 @@
*
* Created: H5B2leaf.c
* Dec 01 2016
- * Quincey Koziol <koziol@lbl.gov>
+ * Quincey Koziol
*
* Purpose: Routines for managing v2 B-tree leaf ndoes.
*
@@ -88,7 +88,6 @@ H5FL_DEFINE(H5B2_leaf_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -174,7 +173,6 @@ done:
* Return: Pointer to leaf node on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 5 2010
*
*-------------------------------------------------------------------------
@@ -266,7 +264,6 @@ done:
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 9 2005
*
*-------------------------------------------------------------------------
@@ -340,7 +337,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 3 2005
*
*-------------------------------------------------------------------------
@@ -453,7 +449,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 23 2015
*
*-------------------------------------------------------------------------
@@ -608,7 +603,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 4 2005
*
*-------------------------------------------------------------------------
@@ -765,14 +759,14 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 3 2005
*
*-------------------------------------------------------------------------
*/
herr_t
H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr,
- H5B2_nodepos_t curr_pos, void *parent, void *udata, H5B2_remove_t op, void *op_data)
+ H5B2_nodepos_t curr_pos, void *parent, void *udata, H5B2_remove_t op,
+ void *op_data)
{
H5B2_leaf_t *leaf; /* Pointer to leaf node */
haddr_t leaf_addr = HADDR_UNDEF; /* Leaf address on disk */
@@ -874,7 +868,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 14 2006
*
*-------------------------------------------------------------------------
@@ -976,7 +969,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@@ -1021,7 +1013,6 @@ done:
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 19 2005
*
*-------------------------------------------------------------------------
@@ -1045,7 +1036,6 @@ H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr,
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 19 2005
*
*-------------------------------------------------------------------------
diff --git a/src/H5B2module.h b/src/H5B2module.h
index 35c982c..6e8c92a 100644
--- a/src/H5B2module.h
+++ b/src/H5B2module.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5B2stat.c b/src/H5B2stat.c
index 5dd9cc2..5c09b3d 100644
--- a/src/H5B2stat.c
+++ b/src/H5B2stat.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Monday, March 6, 2006
*
* Purpose: v2 B-tree metadata statistics functions.
diff --git a/src/H5B2test.c b/src/H5B2test.c
index 7affd49..ee37c54 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Thursday, February 3, 2005
*
* Purpose: v2 B-tree testing functions.
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index c2c7a80..80fb200 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -15,7 +15,7 @@
*
* Created: H5Bcache.c
* Oct 31 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Implement B-tree metadata cache methods.
*
@@ -98,7 +98,6 @@ const H5AC_class_t H5AC_BT[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 18, 2010
*
*-------------------------------------------------------------------------
@@ -135,7 +134,6 @@ H5B__cache_get_initial_load_size(void *_udata, size_t *image_len)
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 24, 2008
*
*-------------------------------------------------------------------------
@@ -241,7 +239,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 20, 2010
*
*-------------------------------------------------------------------------
@@ -277,7 +274,6 @@ H5B__cache_image_len(const void *_thing, size_t *image_len)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 24, 2008
*
*-------------------------------------------------------------------------
@@ -363,7 +359,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 26, 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5C.c b/src/H5C.c
index 91e4158..fd4386c 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -147,11 +147,11 @@ static herr_t H5C__flash_increase_cache_size(H5C_t * cache_ptr,
static herr_t H5C__flush_invalidate_cache(H5F_t *f, unsigned flags);
-static herr_t H5C_flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags);
+static herr_t H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags);
static herr_t H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags);
-static void * H5C_load_entry(H5F_t * f,
+static void * H5C__load_entry(H5F_t * f,
#ifdef H5_HAVE_PARALLEL
hbool_t coll_access,
#endif /* H5_HAVE_PARALLEL */
@@ -166,19 +166,20 @@ static herr_t H5C__mark_flush_dep_clean(H5C_cache_entry_t * entry);
static herr_t H5C__serialize_ring(H5F_t *f, H5C_ring_t ring);
static herr_t H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr,
H5C_cache_entry_t *entry_ptr);
-
+static herr_t H5C__generate_image(H5F_t *f, H5C_t *cache_ptr,
+ H5C_cache_entry_t *entry_ptr);
static herr_t H5C__verify_len_eoa(H5F_t *f, const H5C_class_t * type,
haddr_t addr, size_t *len, hbool_t actual);
#if H5C_DO_SLIST_SANITY_CHECKS
-static hbool_t H5C_entry_in_skip_list(H5C_t * cache_ptr,
+static hbool_t H5C__entry_in_skip_list(H5C_t * cache_ptr,
H5C_cache_entry_t *target_ptr);
#endif /* H5C_DO_SLIST_SANITY_CHECKS */
#if H5C_DO_EXTREME_SANITY_CHECKS
-static herr_t H5C_validate_lru_list(H5C_t * cache_ptr);
-static herr_t H5C_validate_pinned_entry_list(H5C_t * cache_ptr);
-static herr_t H5C_validate_protected_entry_list(H5C_t * cache_ptr);
+static herr_t H5C__validate_lru_list(H5C_t * cache_ptr);
+static herr_t H5C__validate_pinned_entry_list(H5C_t * cache_ptr);
+static herr_t H5C__validate_protected_entry_list(H5C_t * cache_ptr);
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
#ifndef NDEBUG
@@ -406,17 +407,17 @@ H5C_create(size_t max_cache_size,
(cache_ptr->resize_ctl).max_increment = H5C__DEF_AR_MAX_INCREMENT;
(cache_ptr->resize_ctl).flash_incr_mode = H5C_flash_incr__off;
- (cache_ptr->resize_ctl).flash_multiple = 1.0f;
- (cache_ptr->resize_ctl).flash_threshold = 0.25f;
+ (cache_ptr->resize_ctl).flash_multiple = (double)1.0f;
+ (cache_ptr->resize_ctl).flash_threshold = (double)0.25f;
(cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
- (cache_ptr->resize_ctl).upper_hr_threshold = H5C__DEF_AR_UPPER_THRESHHOLD;
- (cache_ptr->resize_ctl).decrement = H5C__DEF_AR_DECREMENT;
+ (cache_ptr->resize_ctl).upper_hr_threshold = (double)H5C__DEF_AR_UPPER_THRESHHOLD;
+ (cache_ptr->resize_ctl).decrement = (double)H5C__DEF_AR_DECREMENT;
(cache_ptr->resize_ctl).apply_max_decrement = TRUE;
(cache_ptr->resize_ctl).max_decrement = H5C__DEF_AR_MAX_DECREMENT;
(cache_ptr->resize_ctl).epochs_before_eviction = H5C__DEF_AR_EPCHS_B4_EVICT;
(cache_ptr->resize_ctl).apply_empty_reserve = TRUE;
- (cache_ptr->resize_ctl).empty_reserve = H5C__DEF_AR_EMPTY_RESERVE;
+ (cache_ptr->resize_ctl).empty_reserve = (double)H5C__DEF_AR_EMPTY_RESERVE;
cache_ptr->epoch_markers_active = 0;
@@ -691,7 +692,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
/*-------------------------------------------------------------------------
- * Function: H5C_free_tag_list_cb
+ * Function: H5C__free_tag_list_cb
*
* Purpose: Callback function to free tag nodes from the skip list.
*
@@ -703,11 +704,11 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
*-------------------------------------------------------------------------
*/
static herr_t
-H5C_free_tag_list_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *op_data)
+H5C__free_tag_list_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *op_data)
{
H5C_tag_info_t *tag_info = (H5C_tag_info_t *)_item;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(tag_info);
@@ -715,7 +716,7 @@ H5C_free_tag_list_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED
tag_info = H5FL_FREE(H5C_tag_info_t, tag_info);
FUNC_LEAVE_NOAPI(0)
-} /* H5C_free_tag_list_cb() */
+} /* H5C__free_tag_list_cb() */
/*-------------------------------------------------------------------------
@@ -863,7 +864,7 @@ H5C_dest(H5F_t * f)
} /* end if */
if(cache_ptr->tag_list != NULL) {
- H5SL_destroy(cache_ptr->tag_list, H5C_free_tag_list_cb, NULL);
+ H5SL_destroy(cache_ptr->tag_list, H5C__free_tag_list_cb, NULL);
cache_ptr->tag_list = NULL;
} /* end if */
@@ -951,7 +952,7 @@ H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flag
HDassert(H5F_addr_defined(addr));
#if H5C_DO_EXTREME_SANITY_CHECKS
- if(H5C_validate_lru_list(cache_ptr) < 0)
+ if(H5C__validate_lru_list(cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -986,7 +987,7 @@ H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flag
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if(H5C_validate_lru_list(cache_ptr) < 0)
+ if(H5C__validate_lru_list(cache_ptr) < 0)
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU extreme sanity check failed on exit")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -1094,9 +1095,9 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
#endif /* H5C_DO_SANITY_CHECKS */
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -1277,9 +1278,9 @@ H5C_insert_entry(H5F_t * f,
#if H5C_DO_EXTREME_SANITY_CHECKS
/* no need to verify that entry is not already in the index as */
/* we already make that check below. */
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -1468,9 +1469,9 @@ H5C_insert_entry(H5F_t * f,
H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, FAIL)
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed just before done")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -1500,9 +1501,9 @@ H5C_insert_entry(H5F_t * f,
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -1828,9 +1829,9 @@ H5C_move_entry(H5C_t * cache_ptr,
HDassert(H5F_addr_ne(old_addr, new_addr));
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -1932,9 +1933,9 @@ H5C_move_entry(H5C_t * cache_ptr,
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -1981,8 +1982,8 @@ H5C_resize_entry(void *thing, size_t new_size)
HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "Entry isn't pinned or protected??")
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -2081,8 +2082,8 @@ H5C_resize_entry(void *thing, size_t new_size)
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0))
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -2123,9 +2124,9 @@ H5C_pin_protected_entry(void *thing)
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -2140,9 +2141,9 @@ H5C_pin_protected_entry(void *thing)
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -2210,9 +2211,9 @@ H5C_protect(H5F_t * f,
HDassert( H5F_addr_defined(addr) );
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -2338,7 +2339,7 @@ H5C_protect(H5F_t * f,
hit = FALSE;
- if(NULL == (thing = H5C_load_entry(f,
+ if(NULL == (thing = H5C__load_entry(f,
#ifdef H5_HAVE_PARALLEL
coll_access,
#endif /* H5_HAVE_PARALLEL */
@@ -2592,9 +2593,9 @@ H5C_protect(H5F_t * f,
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "an extreme sanity check failed on exit")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -2910,9 +2911,9 @@ H5C_unpin_entry(void *_entry_ptr)
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -2923,9 +2924,9 @@ H5C_unpin_entry(void *_entry_ptr)
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -3012,9 +3013,9 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
was_clean = ! ( entry_ptr->is_dirty );
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -3211,9 +3212,9 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
done:
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0)) {
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0)) {
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -3958,7 +3959,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
enum H5C_resize_status status = in_spec; /* will change if needed */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert( f );
HDassert( cache_ptr );
@@ -4274,7 +4275,7 @@ H5C__autoadjust__ageout(H5F_t * f, double hit_rate, enum H5C_resize_status * sta
size_t test_size;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert( f );
HDassert( cache_ptr );
@@ -4375,10 +4376,10 @@ done:
static herr_t
H5C__autoadjust__ageout__cycle_epoch_marker(H5C_t * cache_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
int i;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -4492,7 +4493,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
H5C_cache_entry_t * prev_ptr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert( f );
HDassert( cache_ptr );
@@ -4675,10 +4676,10 @@ done:
static herr_t
H5C__autoadjust__ageout__insert_new_marker(H5C_t * cache_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
int i;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -4745,11 +4746,11 @@ done:
static herr_t
H5C__autoadjust__ageout__remove_all_markers(H5C_t * cache_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
- int i;
int ring_buf_index;
+ int i;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -4822,11 +4823,11 @@ done:
static herr_t
H5C__autoadjust__ageout__remove_excess_markers(H5C_t * cache_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
- int i;
int ring_buf_index;
+ int i;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -4912,7 +4913,7 @@ H5C__flash_increase_cache_size(H5C_t * cache_ptr,
double hit_rate;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -5128,7 +5129,7 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
*/
ring = H5C_RING_USER;
while(ring < H5C_RING_NTYPES) {
- if(H5C_flush_invalidate_ring(f, ring, flags) < 0)
+ if(H5C__flush_invalidate_ring(f, ring, flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush invalidate ring failed")
ring++;
} /* end while */
@@ -5176,7 +5177,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5C_flush_invalidate_ring
+ * Function: H5C__flush_invalidate_ring
*
* Purpose: Flush and destroy the entries contained in the target
* cache and ring.
@@ -5212,7 +5213,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5C_flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
+H5C__flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
{
H5C_t *cache_ptr;
hbool_t restart_slist_scan;
@@ -5231,7 +5232,7 @@ H5C_flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
#endif /* H5C_DO_SANITY_CHECKS */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
HDassert(f);
HDassert(f->shared);
@@ -5326,7 +5327,7 @@ H5C_flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
* This flag is set to TRUE by H5C__flush_single_entry if the slist
* is modified by a pre_serialize, serialize, or notify callback.
*
- * H5C_flush_invalidate_ring() uses this flag to detect any
+ * H5C__flush_invalidate_ring() uses this flag to detect any
* modifications to the slist that might corrupt the scan of
* the slist -- and restart the scan in this event.
*/
@@ -5622,7 +5623,7 @@ H5C_flush_invalidate_ring(H5F_t * f, H5C_ring_t ring, unsigned flags)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_flush_invalidate_ring() */
+} /* H5C__flush_invalidate_ring() */
/*-------------------------------------------------------------------------
@@ -5679,9 +5680,9 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
HDassert(ring < H5C_RING_NTYPES);
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -6477,7 +6478,7 @@ done:
/*-------------------------------------------------------------------------
*
- * Function: H5C_load_entry
+ * Function: H5C__load_entry
*
* Purpose: Attempt to load the entry at the specified disk address
* and with the specified type into memory. If successful.
@@ -6494,7 +6495,7 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5C_load_entry(H5F_t * f,
+H5C__load_entry(H5F_t * f,
#ifdef H5_HAVE_PARALLEL
hbool_t coll_access,
#endif /* H5_HAVE_PARALLEL */
@@ -6514,7 +6515,7 @@ H5C_load_entry(H5F_t * f,
#endif /* H5_HAVE_PARALLEL */
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity checks */
HDassert(f);
@@ -6812,7 +6813,7 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_load_entry() */
+} /* H5C__load_entry() */
/*-------------------------------------------------------------------------
@@ -7160,7 +7161,7 @@ done:
/*-------------------------------------------------------------------------
*
- * Function: H5C_validate_lru_list
+ * Function: H5C__validate_lru_list
*
* Purpose: Debugging function that scans the LRU list for errors.
*
@@ -7172,123 +7173,73 @@ done:
*
* Programmer: John Mainzer, 7/14/05
*
- * Changes:
- *
- * Added code to verify that the LRU contains no pinned
- * entries. JRM -- 4/25/14
- *
*-------------------------------------------------------------------------
*/
#if H5C_DO_EXTREME_SANITY_CHECKS
-
static herr_t
-H5C_validate_lru_list(H5C_t * cache_ptr)
+H5C__validate_lru_list(H5C_t * cache_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
int32_t len = 0;
size_t size = 0;
H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
-
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ FUNC_ENTER_STATIC
- if ( ( ( cache_ptr->LRU_head_ptr == NULL )
- ||
- ( cache_ptr->LRU_tail_ptr == NULL )
- )
- &&
- ( cache_ptr->LRU_head_ptr != cache_ptr->LRU_tail_ptr )
- ) {
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ if(((cache_ptr->LRU_head_ptr == NULL) || (cache_ptr->LRU_tail_ptr == NULL))
+ && (cache_ptr->LRU_head_ptr != cache_ptr->LRU_tail_ptr))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 1 failed")
- }
if(cache_ptr->LRU_list_len < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 2 failed")
- if ( ( cache_ptr->LRU_list_len == 1 )
- &&
- ( ( cache_ptr->LRU_head_ptr != cache_ptr->LRU_tail_ptr )
- ||
- ( cache_ptr->LRU_head_ptr == NULL )
- ||
- ( cache_ptr->LRU_head_ptr->size != cache_ptr->LRU_list_size )
- )
- ) {
-
+ if((cache_ptr->LRU_list_len == 1) &&
+ ((cache_ptr->LRU_head_ptr != cache_ptr->LRU_tail_ptr) ||
+ (cache_ptr->LRU_head_ptr == NULL) || (cache_ptr->LRU_head_ptr->size != cache_ptr->LRU_list_size)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 3 failed")
- }
-
- if ( ( cache_ptr->LRU_list_len >= 1 )
- &&
- ( ( cache_ptr->LRU_head_ptr == NULL )
- ||
- ( cache_ptr->LRU_head_ptr->prev != NULL )
- ||
- ( cache_ptr->LRU_tail_ptr == NULL )
- ||
- ( cache_ptr->LRU_tail_ptr->next != NULL )
- )
- ) {
+ if((cache_ptr->LRU_list_len >= 1) &&
+ ((cache_ptr->LRU_head_ptr == NULL) || (cache_ptr->LRU_head_ptr->prev != NULL)
+ || (cache_ptr->LRU_tail_ptr == NULL) || (cache_ptr->LRU_tail_ptr->next != NULL)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 4 failed")
- }
entry_ptr = cache_ptr->LRU_head_ptr;
- while ( entry_ptr != NULL )
- {
-
- if ( ( entry_ptr != cache_ptr->LRU_head_ptr ) &&
- ( ( entry_ptr->prev == NULL ) ||
- ( entry_ptr->prev->next != entry_ptr ) ) ) {
-
+ while(entry_ptr != NULL) {
+ if((entry_ptr != cache_ptr->LRU_head_ptr) &&
+ ((entry_ptr->prev == NULL) || (entry_ptr->prev->next != entry_ptr)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 5 failed")
- }
-
- if ( ( entry_ptr != cache_ptr->LRU_tail_ptr ) &&
- ( ( entry_ptr->next == NULL ) ||
- ( entry_ptr->next->prev != entry_ptr ) ) ) {
+ if((entry_ptr != cache_ptr->LRU_tail_ptr) &&
+ ((entry_ptr->next == NULL) || (entry_ptr->next->prev != entry_ptr)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 6 failed")
- }
-
- if ( ( entry_ptr->is_pinned ) ||
- ( entry_ptr->pinned_from_client ) ||
- ( entry_ptr->pinned_from_cache ) ) {
+ if((entry_ptr->is_pinned) ||
+ (entry_ptr->pinned_from_client) || (entry_ptr->pinned_from_cache))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 7 failed")
- }
len++;
size += entry_ptr->size;
entry_ptr = entry_ptr->next;
}
- if ( ( cache_ptr->LRU_list_len != len ) ||
- ( cache_ptr->LRU_list_size != size ) ) {
-
+ if((cache_ptr->LRU_list_len != len) || (cache_ptr->LRU_list_size != size))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 8 failed")
- }
done:
-
- if ( ret_value != SUCCEED ) {
-
+ if(ret_value != SUCCEED)
HDassert(0);
- }
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5C_validate_lru_list() */
-
+} /* H5C__validate_lru_list() */
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
/*-------------------------------------------------------------------------
*
- * Function: H5C_validate_pinned_entry_list
+ * Function: H5C__validate_pinned_entry_list
*
* Purpose: Debugging function that scans the pinned entry list for
* errors.
@@ -7301,126 +7252,78 @@ done:
*
* Programmer: John Mainzer, 4/25/14
*
- * Changes:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
#if H5C_DO_EXTREME_SANITY_CHECKS
-
static herr_t
-H5C_validate_pinned_entry_list(H5C_t * cache_ptr)
+H5C__validate_pinned_entry_list(H5C_t * cache_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
int32_t len = 0;
size_t size = 0;
H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
-
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ FUNC_ENTER_STATIC
- if ( ( ( cache_ptr->pel_head_ptr == NULL )
- ||
- ( cache_ptr->pel_tail_ptr == NULL )
- )
- &&
- ( cache_ptr->pel_head_ptr != cache_ptr->pel_tail_ptr )
- ) {
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ if(((cache_ptr->pel_head_ptr == NULL) || (cache_ptr->pel_tail_ptr == NULL))
+ && (cache_ptr->pel_head_ptr != cache_ptr->pel_tail_ptr))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 1 failed")
- }
if(cache_ptr->pel_len < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 2 failed")
- if ( ( cache_ptr->pel_len == 1 )
- &&
- ( ( cache_ptr->pel_head_ptr != cache_ptr->pel_tail_ptr )
- ||
- ( cache_ptr->pel_head_ptr == NULL )
- ||
- ( cache_ptr->pel_head_ptr->size != cache_ptr->pel_size )
- )
- ) {
-
+ if((cache_ptr->pel_len == 1) &&
+ ((cache_ptr->pel_head_ptr != cache_ptr->pel_tail_ptr) ||
+ (cache_ptr->pel_head_ptr == NULL) ||
+ (cache_ptr->pel_head_ptr->size != cache_ptr->pel_size)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 3 failed")
- }
-
- if ( ( cache_ptr->pel_len >= 1 )
- &&
- ( ( cache_ptr->pel_head_ptr == NULL )
- ||
- ( cache_ptr->pel_head_ptr->prev != NULL )
- ||
- ( cache_ptr->pel_tail_ptr == NULL )
- ||
- ( cache_ptr->pel_tail_ptr->next != NULL )
- )
- ) {
+ if((cache_ptr->pel_len >= 1) &&
+ ((cache_ptr->pel_head_ptr == NULL) ||
+ (cache_ptr->pel_head_ptr->prev != NULL) ||
+ (cache_ptr->pel_tail_ptr == NULL) ||
+ (cache_ptr->pel_tail_ptr->next != NULL)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 4 failed")
- }
entry_ptr = cache_ptr->pel_head_ptr;
- while ( entry_ptr != NULL )
- {
-
- if ( ( entry_ptr != cache_ptr->pel_head_ptr ) &&
- ( ( entry_ptr->prev == NULL ) ||
- ( entry_ptr->prev->next != entry_ptr ) ) ) {
-
+ while(entry_ptr != NULL) {
+ if((entry_ptr != cache_ptr->pel_head_ptr) &&
+ ((entry_ptr->prev == NULL) || (entry_ptr->prev->next != entry_ptr)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 5 failed")
- }
-
- if ( ( entry_ptr != cache_ptr->pel_tail_ptr ) &&
- ( ( entry_ptr->next == NULL ) ||
- ( entry_ptr->next->prev != entry_ptr ) ) ) {
+ if((entry_ptr != cache_ptr->pel_tail_ptr) &&
+ ((entry_ptr->next == NULL) || (entry_ptr->next->prev != entry_ptr)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 6 failed")
- }
-
- if ( ! entry_ptr->is_pinned ) {
+ if(!entry_ptr->is_pinned)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 7 failed")
- }
-
- if ( ! ( ( entry_ptr->pinned_from_client ) ||
- ( entry_ptr->pinned_from_cache ) ) ) {
+ if(!(entry_ptr->pinned_from_client || entry_ptr->pinned_from_cache))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 8 failed")
- }
len++;
size += entry_ptr->size;
entry_ptr = entry_ptr->next;
}
- if ( ( cache_ptr->pel_len != len ) ||
- ( cache_ptr->pel_size != size ) ) {
-
+ if((cache_ptr->pel_len != len) || (cache_ptr->pel_size != size))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 9 failed")
- }
done:
-
- if ( ret_value != SUCCEED ) {
-
+ if(ret_value != SUCCEED)
HDassert(0);
- }
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5C_validate_pinned_entry_list() */
-
+} /* H5C__validate_pinned_entry_list() */
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
/*-------------------------------------------------------------------------
*
- * Function: H5C_validate_protected_entry_list
+ * Function: H5C__validate_protected_entry_list
*
* Purpose: Debugging function that scans the protected entry list for
* errors.
@@ -7433,26 +7336,21 @@ done:
*
* Programmer: John Mainzer, 4/25/14
*
- * Changes:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
#if H5C_DO_EXTREME_SANITY_CHECKS
-
static herr_t
-H5C_validate_protected_entry_list(H5C_t * cache_ptr)
+H5C__validate_protected_entry_list(H5C_t * cache_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
int32_t len = 0;
size_t size = 0;
H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if(((cache_ptr->pl_head_ptr == NULL) || (cache_ptr->pl_tail_ptr == NULL))
&& (cache_ptr->pl_head_ptr != cache_ptr->pl_tail_ptr))
@@ -7461,91 +7359,55 @@ H5C_validate_protected_entry_list(H5C_t * cache_ptr)
if(cache_ptr->pl_len < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 2 failed")
- if ( ( cache_ptr->pl_len == 1 )
- &&
- ( ( cache_ptr->pl_head_ptr != cache_ptr->pl_tail_ptr )
- ||
- ( cache_ptr->pl_head_ptr == NULL )
- ||
- ( cache_ptr->pl_head_ptr->size != cache_ptr->pl_size )
- )
- ) {
-
+ if((cache_ptr->pl_len == 1) &&
+ ((cache_ptr->pl_head_ptr != cache_ptr->pl_tail_ptr) ||
+ (cache_ptr->pl_head_ptr == NULL) ||
+ (cache_ptr->pl_head_ptr->size != cache_ptr->pl_size)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 3 failed")
- }
-
- if ( ( cache_ptr->pl_len >= 1 )
- &&
- ( ( cache_ptr->pl_head_ptr == NULL )
- ||
- ( cache_ptr->pl_head_ptr->prev != NULL )
- ||
- ( cache_ptr->pl_tail_ptr == NULL )
- ||
- ( cache_ptr->pl_tail_ptr->next != NULL )
- )
- ) {
+ if((cache_ptr->pl_len >= 1) &&
+ ((cache_ptr->pl_head_ptr == NULL) ||
+ (cache_ptr->pl_head_ptr->prev != NULL) ||
+ (cache_ptr->pl_tail_ptr == NULL) ||
+ (cache_ptr->pl_tail_ptr->next != NULL)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 4 failed")
- }
entry_ptr = cache_ptr->pl_head_ptr;
- while ( entry_ptr != NULL )
- {
-
- if ( ( entry_ptr != cache_ptr->pl_head_ptr ) &&
- ( ( entry_ptr->prev == NULL ) ||
- ( entry_ptr->prev->next != entry_ptr ) ) ) {
-
+ while(entry_ptr != NULL) {
+ if((entry_ptr != cache_ptr->pl_head_ptr) &&
+ ((entry_ptr->prev == NULL) || (entry_ptr->prev->next != entry_ptr)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 5 failed")
- }
-
- if ( ( entry_ptr != cache_ptr->pl_tail_ptr ) &&
- ( ( entry_ptr->next == NULL ) ||
- ( entry_ptr->next->prev != entry_ptr ) ) ) {
+ if((entry_ptr != cache_ptr->pl_tail_ptr) &&
+ ((entry_ptr->next == NULL) || (entry_ptr->next->prev != entry_ptr)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 6 failed")
- }
-
- if ( ! entry_ptr->is_protected ) {
+ if(!entry_ptr->is_protected)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 7 failed")
- }
-
- if ( ( entry_ptr->is_read_only ) &&
- ( entry_ptr->ro_ref_count <= 0 ) ) {
+ if(entry_ptr->is_read_only && (entry_ptr->ro_ref_count <= 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 8 failed")
- }
len++;
size += entry_ptr->size;
entry_ptr = entry_ptr->next;
}
- if ( ( cache_ptr->pl_len != len ) ||
- ( cache_ptr->pl_size != size ) ) {
-
+ if((cache_ptr->pl_len != len) || (cache_ptr->pl_size != size))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Check 9 failed")
- }
done:
-
- if ( ret_value != SUCCEED ) {
-
+ if(ret_value != SUCCEED)
HDassert(0);
- }
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5C_validate_protected_entry_list() */
-
+} /* H5C__validate_protected_entry_list() */
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
/*-------------------------------------------------------------------------
*
- * Function: H5C_entry_in_skip_list
+ * Function: H5C__entry_in_skip_list
*
* Purpose: Debugging function that scans skip list to see if it
* is in present. We need this, as it is possible for
@@ -7556,49 +7418,39 @@ done:
*
* Programmer: John Mainzer, 11/1/14
*
- * Changes:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
#if H5C_DO_SLIST_SANITY_CHECKS
-
static hbool_t
-H5C_entry_in_skip_list(H5C_t * cache_ptr, H5C_cache_entry_t *target_ptr)
+H5C__entry_in_skip_list(H5C_t * cache_ptr, H5C_cache_entry_t *target_ptr)
{
- hbool_t in_slist = FALSE;
- H5SL_node_t * node_ptr = NULL;
- H5C_cache_entry_t * entry_ptr = NULL;
+ H5SL_node_t *node_ptr;
+ hbool_t in_slist;
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->slist_ptr );
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(cache_ptr->slist_ptr);
node_ptr = H5SL_first(cache_ptr->slist_ptr);
+ in_slist = FALSE;
+ while((node_ptr != NULL) && (!in_slist)) {
+ H5C_cache_entry_t *entry_ptr;
- while ( ( node_ptr != NULL ) && ( ! in_slist ) )
- {
entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
- HDassert( entry_ptr );
- HDassert( entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC );
- HDassert( entry_ptr->is_dirty );
- HDassert( entry_ptr->in_slist );
-
- if ( entry_ptr == target_ptr ) {
+ HDassert(entry_ptr);
+ HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(entry_ptr->is_dirty);
+ HDassert(entry_ptr->in_slist);
+ if(entry_ptr == target_ptr)
in_slist = TRUE;
-
- } else {
-
+ else
node_ptr = H5SL_next(node_ptr);
- }
}
return(in_slist);
-
-} /* H5C_entry_in_skip_list() */
+} /* H5C__entry_in_skip_list() */
#endif /* H5C_DO_SLIST_SANITY_CHECKS */
@@ -8062,9 +7914,9 @@ H5C__serialize_cache(H5F_t *f)
#endif /* H5C_DO_SANITY_CHECKS */
#if H5C_DO_EXTREME_SANITY_CHECKS
- if((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
- (H5C_validate_pinned_entry_list(cache_ptr) < 0) ||
- (H5C_validate_lru_list(cache_ptr) < 0))
+ if((H5C__validate_protected_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_pinned_entry_list(cache_ptr) < 0) ||
+ (H5C__validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -8502,7 +8354,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
{
haddr_t new_addr = HADDR_UNDEF;
@@ -8511,7 +8363,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
unsigned serialize_flags = H5C__SERIALIZE_NO_FLAGS_SET;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(f);
diff --git a/src/H5CS.c b/src/H5CS.c
index 3fccce4..324d383 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -123,8 +123,6 @@ H5CS__get_stack(void)
* Programmer: Quincey Koziol
* Thursday, February 6, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -214,8 +212,6 @@ H5CS_push(const char *func_name)
* Programmer: Quincey Koziol
* Thursday, February 6, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5CX.c b/src/H5CX.c
index b78d9ec..6beaf56 100644
--- a/src/H5CX.c
+++ b/src/H5CX.c
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@lbl.gov>
+ * Programmer: Quincey Koziol
* Monday, February 19, 2018
*
* Purpose:
diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c
index d5599f2..425bda3 100644
--- a/src/H5Cdbg.c
+++ b/src/H5Cdbg.c
@@ -1086,74 +1086,6 @@ H5C_stats__reset(H5C_t H5_ATTR_UNUSED * cache_ptr)
return;
} /* H5C_stats__reset() */
-extern void
-H5C__dump_entry(H5C_t *cache_ptr, const H5C_cache_entry_t *entry_ptr,
- hbool_t dump_parents, const char *prefix, int indent);
-
-static void
-H5C__dump_parents(H5C_t *cache_ptr, const H5C_cache_entry_t *entry_ptr, const char *prefix, int indent)
-{
- unsigned u;
-
- for(u = 0; u < entry_ptr->flush_dep_nparents; u++)
- H5C__dump_entry(cache_ptr, entry_ptr->flush_dep_parent[u], TRUE, prefix, indent + 2);
-}
-
-typedef struct H5C__dump_child_ctx_t {
- H5C_t *cache_ptr;
- const H5C_cache_entry_t *parent;
- hbool_t dump_parents;
- const char *prefix;
- int indent;
-} H5C__dump_child_ctx_t;
-
-static int
-H5C__dump_children_cb(H5C_cache_entry_t *entry_ptr, void *_ctx)
-{
- H5C__dump_child_ctx_t *ctx = (H5C__dump_child_ctx_t *)_ctx;
-
- if(entry_ptr->tag_info->tag != entry_ptr->addr) {
- unsigned u;
-
- HDassert(entry_ptr->flush_dep_nparents);
- for(u = 0; u < entry_ptr->flush_dep_nparents; u++)
- if(ctx->parent == entry_ptr->flush_dep_parent[u])
- H5C__dump_entry(ctx->cache_ptr, entry_ptr, ctx->dump_parents, ctx->prefix, ctx->indent + 2);
- } /* end if */
-
- return(H5_ITER_CONT);
-} /* end H5C__dump_children_cb() */
-
-static void
-H5C__dump_children(H5C_t *cache_ptr, const H5C_cache_entry_t *entry_ptr,
- hbool_t dump_parents, const char *prefix, int indent)
-{
- H5C__dump_child_ctx_t ctx;
-
- HDassert(entry_ptr->tag_info);
-
- ctx.cache_ptr = cache_ptr;
- ctx.parent = entry_ptr;
- ctx.dump_parents = dump_parents;
- ctx.prefix = prefix;
- ctx.indent = indent;
- H5C__iter_tagged_entries(cache_ptr, entry_ptr->tag_info->tag, FALSE, H5C__dump_children_cb, &ctx);
-} /* end H5C__dump_children() */
-
-void
-H5C__dump_entry(H5C_t *cache_ptr, const H5C_cache_entry_t *entry_ptr,
- hbool_t dump_parents, const char *prefix, int indent)
-{
- HDassert(cache_ptr);
- HDassert(entry_ptr);
-
- HDfprintf(stderr, "%*s%s: entry_ptr = (%a, '%s', %a, %t, %u, %u/%u)\n", indent, "", prefix, entry_ptr->addr, entry_ptr->type->name, entry_ptr->tag_info ? entry_ptr->tag_info->tag : HADDR_UNDEF, entry_ptr->is_dirty, entry_ptr->flush_dep_nparents, entry_ptr->flush_dep_nchildren, entry_ptr->flush_dep_ndirty_children);
- if(dump_parents && entry_ptr->flush_dep_nparents)
- H5C__dump_parents(cache_ptr, entry_ptr, "Parent", indent);
- if(entry_ptr->flush_dep_nchildren)
- H5C__dump_children(cache_ptr, entry_ptr, FALSE, "Child", indent);
-} /* end H5C__dump_entry() */
-
/*-------------------------------------------------------------------------
* Function: H5C_flush_dependency_exists()
diff --git a/src/H5Cimage.c b/src/H5Cimage.c
index ee286d9..26cbe7d 100644
--- a/src/H5Cimage.c
+++ b/src/H5Cimage.c
@@ -864,54 +864,6 @@ H5C__free_image_entries_array(H5C_t * cache_ptr)
/*-------------------------------------------------------------------------
- * Function: H5C_force_cache_image_load()
- *
- * Purpose: On rare occasions, it is necessary to run
- * H5MF_tidy_self_referential_fsm_hack() prior to the first
- * metadata cache access. This is a problem as if there is a
- * cache image at the end of the file, that routine will
- * discard it.
- *
- * We solve this issue by calling this function, which will
- * load the cache image and then call
- * H5MF_tidy_self_referential_fsm_hack() to discard it.
- *
- * Return: SUCCEED on success, and FAIL on failure.
- *
- * Programmer: John Mainzer
- * 1/11/17
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_force_cache_image_load(H5F_t *f)
-{
- H5C_t *cache_ptr;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(FAIL)
-
- /* Sanity checks */
- HDassert(f);
- HDassert(f->shared);
- cache_ptr = f->shared->cache;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->load_image);
-
- /* Load the cache image, if requested */
- if(cache_ptr->load_image) {
- cache_ptr->load_image = FALSE;
- if(H5C__load_cache_image(f) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, FAIL, "can't load cache image")
- } /* end if */
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_force_cache_image_load() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5C_get_cache_image_config
*
* Purpose: Copy the current configuration for cache image generation
diff --git a/src/H5Cmodule.h b/src/H5Cmodule.h
index 534404d..5b23490 100644
--- a/src/H5Cmodule.h
+++ b/src/H5Cmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 8712af5..22c67ce 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -4911,8 +4911,6 @@ H5_DLL herr_t H5C__mark_flush_dep_unserialized(H5C_cache_entry_t * entry_ptr);
H5_DLL herr_t H5C__make_space_in_cache(H5F_t * f, size_t space_needed,
hbool_t write_permitted);
H5_DLL herr_t H5C__flush_marked_entries(H5F_t * f);
-H5_DLL herr_t H5C__generate_image(H5F_t *f, H5C_t *cache_ptr,
- H5C_cache_entry_t *entry_ptr);
H5_DLL herr_t H5C__serialize_cache(H5F_t *f);
H5_DLL herr_t H5C__iter_tagged_entries(H5C_t *cache, haddr_t tag, hbool_t match_global,
H5C_tag_iter_cb_t cb, void *cb_ctx);
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 0ba0234..f82f8df 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -20,8 +20,6 @@
* Purpose: Constants and typedefs available to the rest of the
* library.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
@@ -2243,7 +2241,6 @@ H5_DLL herr_t H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr,
unsigned flags);
H5_DLL herr_t H5C_flush_cache(H5F_t *f, unsigned flags);
H5_DLL herr_t H5C_flush_tagged_entries(H5F_t *f, haddr_t tag);
-H5_DLL herr_t H5C_force_cache_image_load(H5F_t * f);
H5_DLL herr_t H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global);
H5_DLL herr_t H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags);
H5_DLL herr_t H5C_get_tag(const void *thing, /*OUT*/ haddr_t *tag);
diff --git a/src/H5Cpublic.h b/src/H5Cpublic.h
index 62107d9..565f41b 100644
--- a/src/H5Cpublic.h
+++ b/src/H5Cpublic.h
@@ -19,8 +19,6 @@
*
* Purpose: Public include file for cache functions.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef _H5Cpublic_H
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index 098e01b..5b5ff4a 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Wednesday, October 8, 1997
*
* Purpose: v1 B-tree indexed (chunked) I/O functions. The chunks are
@@ -620,8 +620,7 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
* March 28, 2002
*
*-------------------------------------------------------------------------
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c
index ccb786b..d233ce5 100644
--- a/src/H5Dbtree2.c
+++ b/src/H5Dbtree2.c
@@ -112,7 +112,7 @@ static herr_t H5D__bt2_found_cb(const void *nrecord, void *op_data);
*/
static herr_t H5D__bt2_remove_cb(const void *nrecord, void *_udata);
-/* Callback for H5B2_modify() which is called in H5D__bt2_idx_insert() */
+/* Callback for H5B2_update() which is called in H5D__bt2_idx_insert() */
static herr_t H5D__bt2_mod_cb(void *_record, void *_op_data, hbool_t *changed);
/* Chunked layout indexing callbacks for v2 B-tree indexing */
@@ -837,7 +837,7 @@ H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
* Function: H5D__bt2_mod_cb
*
* Purpose: Modify record for dataset chunk when it is found in a v2 B-tree.
- * This is the callback for H5B2_modify() which is called in
+ * This is the callback for H5B2_update() which is called in
* H5D__bt2_idx_insert().
*
* Return: Success: non-negative
@@ -1266,13 +1266,6 @@ done:
*
* Programmer: Vailin Choi; June 2010
*
- * Modifications:
- * Vailin Choi; March 2011
- * Initialize size of an unfiltered chunk.
- * This is a fix for for the assertion failure in:
- * [src/H5FSsection.c:968: H5FS_sect_link_size: Assertion `bin < sinfo->nbins' failed.]
- * which is uncovered by test_unlink_chunked_dataset() in test/unlink.c
- *
*-------------------------------------------------------------------------
*/
static herr_t
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index ee83564..8962348 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Thursday, April 24, 2008
*
* Purpose: Abstract indexed (chunked) I/O functions. The logical
@@ -278,7 +278,7 @@ H5D__nonexistent_readvv(const H5D_io_info_t *io_info,
size_t chunk_max_nseq, size_t *chunk_curr_seq, size_t chunk_len_arr[], hsize_t chunk_offset_arr[],
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
-/* format convert cb */
+/* Format convert cb */
static int H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata);
/* Helper routines */
@@ -300,9 +300,7 @@ static herr_t H5D__create_chunk_file_map_all(H5D_chunk_map_t *fm,
const H5D_io_info_t *io_info);
static herr_t H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm,
const H5D_io_info_t *io_info);
-
static herr_t H5D__create_chunk_mem_map_1d(const H5D_chunk_map_t *fm);
-
static herr_t H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm);
static herr_t H5D__chunk_file_cb(void *elem, const H5T_t *type, unsigned ndims,
const hsize_t *coords, void *fm);
@@ -327,8 +325,8 @@ static herr_t H5D__chunk_collective_fill(const H5D_t *dset,
static int H5D__chunk_cmp_addr(const void *addr1, const void *addr2);
#endif /* H5_HAVE_PARALLEL */
-static int
-H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata);
+/* Debugging helper routine callback */
+static int H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata);
/*********************/
/* Package Variables */
@@ -999,7 +997,7 @@ H5D__chunk_init(H5F_t *f, const H5D_t * const dset, hid_t dapl_id)
rdcc->scaled_dims[u] = (dset->shared->curr_dims[u] + dset->shared->layout.u.chunk.dim[u] - 1) /
dset->shared->layout.u.chunk.dim[u];
- if( !(scaled_power2up = H5VM_power2up(rdcc->scaled_dims[u])) )
+ if(!(scaled_power2up = H5VM_power2up(rdcc->scaled_dims[u])))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2")
/* Inital 'power2up' values for scaled dimensions */
@@ -2821,12 +2819,12 @@ H5D__chunk_flush(H5D_t *dset)
/* Loop over all entries in the chunk cache */
for(ent = rdcc->head; ent; ent = next) {
- next = ent->next;
+ next = ent->next;
if(H5D__chunk_flush_entry(dset, ent, FALSE) < 0)
nerrors++;
} /* end for */
if(nerrors)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2970,7 +2968,7 @@ H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
/* Reset index structures */
if((storage->ops->reset)(storage, reset_addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset chunk index info")
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset chunk index info")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2992,7 +2990,7 @@ done:
static herr_t
H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
{
- FUNC_ENTER_PACKAGE_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(last);
@@ -3615,14 +3613,14 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush)
static herr_t
H5D__chunk_cache_prune(const H5D_t *dset, size_t size)
{
- const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
- size_t total = rdcc->nbytes_max;
- const int nmeth = 2; /*number of methods */
- int w[1]; /*weighting as an interval */
- H5D_rdcc_ent_t *p[2], *cur; /*list pointers */
- H5D_rdcc_ent_t *n[2]; /*list next pointers */
- int nerrors = 0; /* Accumulated error count during preemptions */
- herr_t ret_value = SUCCEED; /* Return value */
+ const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
+ size_t total = rdcc->nbytes_max;
+ const int nmeth = 2; /* Number of methods */
+ int w[1]; /* Weighting as an interval */
+ H5D_rdcc_ent_t *p[2], *cur; /* List pointers */
+ H5D_rdcc_ent_t *n[2]; /* List next pointers */
+ int nerrors = 0; /* Accumulated error count during preemptions */
+ herr_t ret_value = SUCCEED;/* Return value */
FUNC_ENTER_STATIC
@@ -3643,62 +3641,62 @@ H5D__chunk_cache_prune(const H5D_t *dset, size_t size)
while((p[0] || p[1]) && (rdcc->nbytes_used + size) > total) {
int i; /* Local index variable */
- /* Introduce new pointers */
- for(i = 0; i < nmeth - 1; i++)
+ /* Introduce new pointers */
+ for(i = 0; i < nmeth - 1; i++)
if(0 == w[i])
p[i + 1] = rdcc->head;
- /* Compute next value for each pointer */
- for(i = 0; i < nmeth; i++)
+ /* Compute next value for each pointer */
+ for(i = 0; i < nmeth; i++)
n[i] = p[i] ? p[i]->next : NULL;
- /* Give each method a chance */
- for(i = 0; i < nmeth && (rdcc->nbytes_used + size) > total; i++) {
- if(0 == i && p[0] && !p[0]->locked &&
+ /* Give each method a chance */
+ for(i = 0; i < nmeth && (rdcc->nbytes_used + size) > total; i++) {
+ if(0 == i && p[0] && !p[0]->locked &&
((0 == p[0]->rd_count && 0 == p[0]->wr_count) ||
- (0 == p[0]->rd_count && dset->shared->layout.u.chunk.size == p[0]->wr_count) ||
- (dset->shared->layout.u.chunk.size == p[0]->rd_count && 0 == p[0]->wr_count))) {
- /*
- * Method 0: Preempt entries that have been completely written
- * and/or completely read but not entries that are partially
- * written or partially read.
- */
- cur = p[0];
- } else if(1 == i && p[1] && !p[1]->locked) {
- /*
- * Method 1: Preempt the entry without regard to
- * considerations other than being locked. This is the last
- * resort preemption.
- */
- cur = p[1];
- } else {
- /* Nothing to preempt at this point */
- cur = NULL;
- }
+ (0 == p[0]->rd_count && dset->shared->layout.u.chunk.size == p[0]->wr_count) ||
+ (dset->shared->layout.u.chunk.size == p[0]->rd_count && 0 == p[0]->wr_count))) {
+ /*
+ * Method 0: Preempt entries that have been completely written
+ * and/or completely read but not entries that are partially
+ * written or partially read.
+ */
+ cur = p[0];
+ } else if(1 == i && p[1] && !p[1]->locked) {
+ /*
+ * Method 1: Preempt the entry without regard to
+ * considerations other than being locked. This is the last
+ * resort preemption.
+ */
+ cur = p[1];
+ } else {
+ /* Nothing to preempt at this point */
+ cur = NULL;
+ }
- if(cur) {
+ if(cur) {
int j; /* Local index variable */
- for(j = 0; j < nmeth; j++) {
- if(p[j] == cur)
+ for(j = 0; j < nmeth; j++) {
+ if(p[j] == cur)
p[j] = NULL;
- if(n[j] == cur)
+ if(n[j] == cur)
n[j] = cur->next;
- } /* end for */
- if(H5D__chunk_cache_evict(dset, cur, TRUE) < 0)
+ } /* end for */
+ if(H5D__chunk_cache_evict(dset, cur, TRUE) < 0)
nerrors++;
- } /* end if */
- } /* end for */
+ } /* end if */
+ } /* end for */
- /* Advance pointers */
- for(i = 0; i < nmeth; i++)
+ /* Advance pointers */
+ for(i = 0; i < nmeth; i++)
p[i] = n[i];
- for(i = 0; i < nmeth - 1; i++)
+ for(i = 0; i < nmeth - 1; i++)
w[i] -= 1;
} /* end while */
if(nerrors)
- HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to preempt one or more raw data cache entry")
+ HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to preempt one or more raw data cache entry")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -4347,7 +4345,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
hbool_t unfilt_edge_chunk_dim[H5O_LAYOUT_NDIMS]; /* Whether there are unfiltered edge chunks at the edge of each dimension */
hsize_t edge_chunk_scaled[H5O_LAYOUT_NDIMS]; /* Offset of the unfiltered edge chunks at the edge of each dimension */
unsigned nunfilt_edge_chunk_dims = 0; /* Number of dimensions on an edge */
- const H5O_storage_chunk_t *sc = &(layout->storage.u.chunk);
+ H5O_storage_chunk_t *sc = &(layout->storage.u.chunk); /* Convenience variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -4556,9 +4554,8 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
#ifndef NDEBUG
/* None of the chunks should be allocated */
- if(H5D_CHUNK_IDX_NONE != sc->idx_type) {
+ if(H5D_CHUNK_IDX_NONE != sc->idx_type)
HDassert(!H5F_addr_defined(udata.chunk_block.offset));
- }
/* Make sure the chunk is really in the dataset and outside the
* original dimensions */
@@ -5126,8 +5123,8 @@ H5D__chunk_cmp_addr(const void *addr1, const void *addr2)
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
- * March 26, 2002
+ * Programmer: Pedro Vicente
+ * March 26, 2002
*
*-------------------------------------------------------------------------
*/
@@ -5252,7 +5249,7 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
* Algorithm: Robb Matzke
* March 27, 2002
*
@@ -5405,13 +5402,13 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
elmts_per_chunk = 1;
for(u = 0; u < space_ndims; u++) {
elmts_per_chunk *= layout->u.chunk.dim[u];
- chunk_dim[u] = layout->u.chunk.dim[u];
- shrunk_dim[u] = (space_dim[u] < old_dim[u]);
+ chunk_dim[u] = layout->u.chunk.dim[u];
+ shrunk_dim[u] = (space_dim[u] < old_dim[u]);
} /* end for */
/* Create a dataspace for a chunk & set the extent */
if(NULL == (chunk_space = H5S_create_simple(space_ndims, chunk_dim, NULL)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
/* Reset hyperslab start array */
/* (hyperslabs will always start from origin) */
@@ -5599,7 +5596,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Remove the chunk from disk, if present */
if(H5F_addr_defined(chk_udata.chunk_block.offset)) {
/* Update the offset in idx_udata */
- idx_udata.scaled = udata.common.scaled;
+ idx_udata.scaled = udata.common.scaled;
/* Remove the chunk from disk */
if((sc->ops->remove)(&idx_info, &idx_udata) < 0)
@@ -5989,7 +5986,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
if(pline && pline->nused) {
must_filter = TRUE;
if((udata->common.layout->flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) &&
- H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, udata->common.layout->dim, chunk_rec->scaled, udata->dset_dims))
+ H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, udata->common.layout->dim, chunk_rec->scaled, udata->dset_dims))
must_filter = FALSE;
}
@@ -6932,9 +6929,9 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
} /* end else */
} /* end if */
else {
- HDassert(!H5F_addr_defined(new_chunk->offset));
- HDassert(new_chunk->length == idx_info->layout->size);
- alloc_chunk = TRUE;
+ HDassert(!H5F_addr_defined(new_chunk->offset));
+ HDassert(new_chunk->length == idx_info->layout->size);
+ alloc_chunk = TRUE;
} /* end else */
/* Actually allocate space for the chunk in the file */
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index 809cdfc..1792fa2 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* August 5, 2002
*
* Purpose: Compact dataset I/O functions. These routines are similar
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 655f660..662be69 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, September 28, 2000
*
* Purpose:
diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c
index f4f4223..7668389 100644
--- a/src/H5Ddeprec.c
+++ b/src/H5Ddeprec.c
@@ -15,7 +15,7 @@
*
* Created: H5Ddeprec.c
* April 5 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Deprecated functions from the H5D interface. These
* functions are here for compatibility purposes and may be
diff --git a/src/H5Defl.c b/src/H5Defl.c
index 91caa61..79cec8c 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, September 30, 2004
*/
@@ -336,9 +336,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, March 4, 1998
*
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
*-------------------------------------------------------------------------
*/
static herr_t
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index 94c7b1c..0efe98a 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -15,7 +15,7 @@
*
* Created: H5Dfill.c
* Jun 19 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Fill value operations for datasets
*
@@ -647,7 +647,7 @@ done:
static herr_t
H5D__fill_release(H5D_fill_buf_info_t *fb_info)
{
- FUNC_ENTER_PACKAGE_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(fb_info);
diff --git a/src/H5Dint.c b/src/H5Dint.c
index c063bb9..079fef7 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -97,6 +97,7 @@ static herr_t H5D__vlen_get_buf_size_cb(void *elem, hid_t type_id, unsigned ndim
const hsize_t *point, void *op_data);
static herr_t H5D__vlen_get_buf_size_gen_cb(void *elem, hid_t type_id, unsigned ndim,
const hsize_t *point, void *op_data);
+static herr_t H5D__check_filters(H5D_t *dataset);
/*********************/
@@ -671,7 +672,7 @@ H5D__cache_dataspace_info(const H5D_t *dset)
for(u = 0; u < dset->shared->ndims; u++) {
hsize_t scaled_power2up; /* Scaled value, rounded to next power of 2 */
- if( !(scaled_power2up = H5VM_power2up(dset->shared->curr_dims[u])) )
+ if(!(scaled_power2up = H5VM_power2up(dset->shared->curr_dims[u])))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2")
dset->shared->curr_power2up[u] = scaled_power2up;
}
@@ -908,7 +909,7 @@ H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc)
HDassert(dset);
HDassert(oloc);
- oh = H5O__create_ohdr(file, dset->shared->dcpl_id);
+ oh = H5O_create_ohdr(file, dset->shared->dcpl_id);
if(NULL == oh)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "can't instantiate object header")
@@ -917,7 +918,7 @@ H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "computed header size is invalid")
/* Special allocation of space for compact datsets is handled by the call here. */
- if(H5O__apply_ohdr(file, oh, dset->shared->dcpl_id, ohdr_size, (size_t)1, oloc) == FAIL)
+ if(H5O_apply_ohdr(file, oh, dset->shared->dcpl_id, ohdr_size, (size_t)1, oloc) == FAIL)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "can't apply object header to file")
done:
@@ -1022,7 +1023,8 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
if(TRUE == use_minimized_header) {
if(H5D__prepare_minimized_oh(file, dset, oloc) == FAIL)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create minimized dataset object header")
- } else {
+ } /* end if */
+ else {
/* Add the dataset's raw data size to the size of the header, if the
* raw data will be stored as compact
*/
@@ -2960,13 +2962,13 @@ done:
* Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5D__check_filters(H5D_t *dataset)
{
H5O_fill_t *fill; /* Dataset's fill value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_PACKAGE
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(dataset);
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index cfed02e..e56f341 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -1342,9 +1342,9 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in
HDassert(fm);
/* Obtain the current rank of the process and the number of processes */
- if ((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
+ if((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi rank")
- if ((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
+ if((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi size")
/* Set the actual-chunk-opt-mode property. */
@@ -1356,10 +1356,10 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in
H5CX_set_mpio_actual_io_mode(H5D_MPIO_CHUNK_COLLECTIVE);
/* Build a list of selected chunks in the collective io operation */
- if (H5D__construct_filtered_io_info_list(io_info, type_info, fm, &chunk_list, &chunk_list_num_entries) < 0)
+ if(H5D__construct_filtered_io_info_list(io_info, type_info, fm, &chunk_list, &chunk_list_num_entries) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't construct filtered I/O info list")
- if (io_info->op_type == H5D_IO_OP_WRITE) { /* Filtered collective write */
+ if(io_info->op_type == H5D_IO_OP_WRITE) { /* Filtered collective write */
H5D_chk_idx_info_t index_info;
H5D_chunk_ud_t udata;
hsize_t mpi_buf_count;
@@ -1379,15 +1379,15 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in
* updating each chunk with the data modifications from other processes,
* then re-filtering the chunk.
*/
- for (i = 0; i < chunk_list_num_entries; i++)
- if (mpi_rank == chunk_list[i].owners.new_owner)
- if (H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info, fm) < 0)
+ for(i = 0; i < chunk_list_num_entries; i++)
+ if(mpi_rank == chunk_list[i].owners.new_owner)
+ if(H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info, fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't process chunk entry")
/* Gather the new chunk sizes to all processes for a collective reallocation
* of the chunks in the file.
*/
- if (H5D__mpio_array_gatherv(chunk_list, chunk_list_num_entries, sizeof(H5D_filtered_collective_io_info_t),
+ if(H5D__mpio_array_gatherv(chunk_list, chunk_list_num_entries, sizeof(H5D_filtered_collective_io_info_t),
(void **) &collective_chunk_list, &collective_chunk_list_num_entries, true, 0, io_info->comm, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL, "couldn't gather new chunk sizes")
@@ -1480,9 +1480,9 @@ done:
H5MM_free(collective_chunk_list);
/* Free the MPI buf and file types, if they were derived */
- if (mem_type_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&mem_type)))
+ if(mem_type_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&mem_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
- if (file_type_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&file_type)))
+ if(file_type_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&file_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
FUNC_LEAVE_NOAPI(ret_value)
@@ -1770,9 +1770,9 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i
HDassert(fm);
/* Obtain the current rank of the process and the number of processes */
- if ((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
+ if((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi rank")
- if ((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
+ if((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi size")
/* Set the actual chunk opt mode property */
@@ -1784,7 +1784,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i
H5CX_set_mpio_actual_io_mode(H5D_MPIO_CHUNK_COLLECTIVE);
/* Build a list of selected chunks in the collective IO operation */
- if (H5D__construct_filtered_io_info_list(io_info, type_info, fm, &chunk_list, &chunk_list_num_entries) < 0)
+ if(H5D__construct_filtered_io_info_list(io_info, type_info, fm, &chunk_list, &chunk_list_num_entries) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't construct filtered I/O info list")
/* Set up contiguous I/O info object */
@@ -1799,9 +1799,9 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i
/* Set dataset storage for I/O info */
io_info->store = &store;
- if (io_info->op_type == H5D_IO_OP_READ) { /* Filtered collective read */
- for (i = 0; i < chunk_list_num_entries; i++)
- if (H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info, fm) < 0)
+ if(io_info->op_type == H5D_IO_OP_READ) { /* Filtered collective read */
+ for(i = 0; i < chunk_list_num_entries; i++)
+ if(H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info, fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't process chunk entry")
} /* end if */
else { /* Filtered collective write */
@@ -1852,14 +1852,14 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i
/* Check if this process has a chunk to work on for this iteration */
hbool_t have_chunk_to_process = (i < chunk_list_num_entries) && (mpi_rank == chunk_list[i].owners.new_owner);
- if (have_chunk_to_process)
- if (H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info, fm) < 0)
+ if(have_chunk_to_process)
+ if(H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info, fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't process chunk entry")
/* Gather the new chunk sizes to all processes for a collective re-allocation
* of the chunks in the file
*/
- if (H5D__mpio_array_gatherv(&chunk_list[i], have_chunk_to_process ? 1 : 0, sizeof(H5D_filtered_collective_io_info_t),
+ if(H5D__mpio_array_gatherv(&chunk_list[i], have_chunk_to_process ? 1 : 0, sizeof(H5D_filtered_collective_io_info_t),
(void **) &collective_chunk_list, &collective_chunk_list_num_entries, true, 0, io_info->comm, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL, "couldn't gather new chunk sizes")
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index 40ddcb8..751d067 100644
--- a/src/H5Dnone.c
+++ b/src/H5Dnone.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Vailin Choi <vchoi@hdfgroup.org>
+/* Programmer: Vailin Choi
* September 2010
*
* Purpose: Implicit (Non Index) chunked I/O functions.
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 37a27d3..5efcc9b 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -234,8 +234,8 @@ typedef struct H5D_io_info_t {
typedef struct H5D_chk_idx_info_t {
H5F_t *f; /* File pointer for operation */
const H5O_pline_t *pline; /* I/O pipeline info */
- H5O_layout_chunk_t *layout; /* Chunk layout description */
- H5O_storage_chunk_t *storage; /* Chunk storage description */
+ H5O_layout_chunk_t *layout; /* Chunk layout description */
+ H5O_storage_chunk_t *storage; /* Chunk storage description */
} H5D_chk_idx_info_t;
/*
@@ -566,7 +566,6 @@ H5_DLL herr_t H5D__get_chunk_info_by_coord(const H5D_t *dset, const hsize_t *coo
H5_DLL haddr_t H5D__get_offset(const H5D_t *dset);
H5_DLL herr_t H5D__vlen_get_buf_size(H5D_t *dset, hid_t type_id, hid_t space_id, hsize_t *size);
H5_DLL herr_t H5D__vlen_get_buf_size_gen(H5VL_object_t *vol_obj, hid_t type_id, hid_t space_id, hsize_t *size);
-H5_DLL herr_t H5D__check_filters(H5D_t *dataset);
H5_DLL herr_t H5D__set_extent(H5D_t *dataset, const hsize_t *size);
H5_DLL herr_t H5D__flush_sieve_buf(H5D_t *dataset);
H5_DLL herr_t H5D__flush_real(H5D_t *dataset);
diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c
index 33274bb..cd71e93 100644
--- a/src/H5Dsingle.c
+++ b/src/H5Dsingle.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Vailin Choi <vchoi@hdfgroup.org>
+/* Programmer: Vailin Choi
* May 2011; updated 10/2015
*
* Purpose: Single Chunk I/O functions.
diff --git a/src/H5Dtest.c b/src/H5Dtest.c
index 916ec72..7c791d4 100644
--- a/src/H5Dtest.c
+++ b/src/H5Dtest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Thursday, May 27, 2004
*
* Purpose: Dataset testing functions.
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index e07f538..799ee2b 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Wednesday, January 28, 2015
*
* Purpose:
@@ -2238,7 +2238,7 @@ H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset)
size_t i, j; /* Local index variables */
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_PACKAGE_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity checks */
HDassert(shared_dset);
diff --git a/src/H5E.c b/src/H5E.c
index f204864..0f7a031 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -391,7 +391,7 @@ H5E__get_stack(void)
/*-------------------------------------------------------------------------
- * Function: H5E_free_class
+ * Function: H5E__free_class
*
* Purpose: Private function to free an error class.
*
@@ -403,9 +403,9 @@ H5E__get_stack(void)
*-------------------------------------------------------------------------
*/
static herr_t
-H5E_free_class(H5E_cls_t *cls)
+H5E__free_class(H5E_cls_t *cls)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check arguments */
HDassert(cls);
@@ -417,7 +417,7 @@ H5E_free_class(H5E_cls_t *cls)
cls = H5FL_FREE(H5E_cls_t, cls);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5E_free_class() */
+} /* end H5E__free_class() */
/*-------------------------------------------------------------------------
@@ -502,7 +502,7 @@ H5E__register_class(const char *cls_name, const char *lib_name, const char *vers
done:
if(!ret_value)
- if(cls && H5E_free_class(cls) < 0)
+ if(cls && H5E__free_class(cls) < 0)
HDONE_ERROR(H5E_ERROR, H5E_CANTRELEASE, NULL, "unable to free error class")
FUNC_LEAVE_NOAPI(ret_value)
@@ -572,7 +572,7 @@ H5E__unregister_class(H5E_cls_t *cls)
HGOTO_ERROR(H5E_ERROR, H5E_BADITER, FAIL, "unable to free all messages in this error class")
/* Free error class structure */
- if(H5E_free_class(cls) < 0)
+ if(H5E__free_class(cls) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, FAIL, "unable to free error class")
done:
diff --git a/src/H5EA.c b/src/H5EA.c
index 56663dc..bf50452 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -15,7 +15,7 @@
*
* Created: H5EA.c
* Jun 17 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implements an "extensible array" for storing elements
* in an array whose high bounds can extend and shrink.
@@ -124,7 +124,6 @@ H5FL_BLK_DEFINE(ea_native_elmt);
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* Oct 10 2016
*
*-------------------------------------------------------------------------
@@ -190,7 +189,6 @@ END_FUNC(STATIC) /* end H5EA__new() */
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jun 17 2008
*
*-------------------------------------------------------------------------
@@ -241,7 +239,6 @@ END_FUNC(PRIV) /* end H5EA_create() */
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 28 2008
*
*-------------------------------------------------------------------------
@@ -283,7 +280,6 @@ END_FUNC(PRIV) /* end H5EA_open() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 21 2008
*
*-------------------------------------------------------------------------
@@ -314,7 +310,6 @@ END_FUNC(PRIV) /* end H5EA_get_nelmts() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 21 2008
*
*-------------------------------------------------------------------------
@@ -347,7 +342,6 @@ END_FUNC(PRIV) /* end H5EA_get_addr() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@@ -656,7 +650,6 @@ END_FUNC(STATIC) /* end H5EA__lookup_elmt() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@@ -721,7 +714,6 @@ END_FUNC(PRIV) /* end H5EA_set() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
@@ -786,7 +778,6 @@ END_FUNC(PRIV) /* end H5EA_get() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 27 2009
*
*-------------------------------------------------------------------------
@@ -836,7 +827,6 @@ END_FUNC(PRIV) /* end H5EA_depend() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 21 2008
*
*-------------------------------------------------------------------------
@@ -937,7 +927,6 @@ END_FUNC(PRIV) /* end H5EA_close() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 28 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index affa127..f7534fb 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -15,7 +15,7 @@
*
* Created: H5EAcache.c
* Aug 26 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement extensible array metadata cache methods.
*
@@ -239,7 +239,6 @@ const H5AC_class_t H5AC_EARRAY_DBLK_PAGE[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@@ -305,7 +304,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@@ -429,7 +427,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@@ -459,7 +456,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@@ -606,7 +602,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@@ -635,7 +630,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_free_icr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -708,7 +702,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -815,7 +808,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -845,7 +837,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -932,7 +923,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1001,7 +991,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1030,7 +1019,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_free_icr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1122,7 +1110,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1226,7 +1213,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1256,7 +1242,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1330,7 +1315,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 31 2009
*
*-------------------------------------------------------------------------
@@ -1414,7 +1398,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1443,7 +1426,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_free_icr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1536,7 +1518,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1639,7 +1620,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1672,7 +1652,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1744,7 +1723,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 31 2009
*
*-------------------------------------------------------------------------
@@ -1828,7 +1806,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1904,7 +1881,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_fsf_size() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -1970,7 +1946,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -2043,7 +2018,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -2073,7 +2047,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -2125,7 +2098,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 31 2009
*
*-------------------------------------------------------------------------
@@ -2209,7 +2181,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
diff --git a/src/H5EAdblkpage.c b/src/H5EAdblkpage.c
index 6dd2e98..ee5c904 100644
--- a/src/H5EAdblkpage.c
+++ b/src/H5EAdblkpage.c
@@ -15,7 +15,7 @@
*
* Created: H5EAdblkpage.c
* Nov 20 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Data block page routines for extensible arrays.
*
@@ -91,7 +91,6 @@ H5FL_DEFINE_STATIC(H5EA_dblk_page_t);
* Return: Non-NULL pointer to data block on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
@@ -141,7 +140,6 @@ END_FUNC(PKG) /* end H5EA__dblk_page_alloc() */
* Return: Valid file address on success/HADDR_UNDEF on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
@@ -206,7 +204,6 @@ END_FUNC(PKG) /* end H5EA__dblk_page_create() */
* Return: Non-NULL pointer to data block page on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
@@ -267,7 +264,6 @@ END_FUNC(PKG) /* end H5EA__dblk_page_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
@@ -298,7 +294,6 @@ END_FUNC(PKG) /* end H5EA__dblk_page_unprotect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5EAdblock.c b/src/H5EAdblock.c
index d926fd5..d540a3c 100644
--- a/src/H5EAdblock.c
+++ b/src/H5EAdblock.c
@@ -15,7 +15,7 @@
*
* Created: H5EAdblock.c
* Sep 11 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Data block routines for extensible arrays.
*
@@ -92,7 +92,6 @@ H5FL_DEFINE_STATIC(H5EA_dblock_t);
* Return: Non-NULL pointer to data block on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
@@ -153,7 +152,6 @@ END_FUNC(PKG) /* end H5EA__dblock_alloc() */
* Return: Valid file address on success/HADDR_UNDEF on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@@ -248,7 +246,6 @@ END_FUNC(PKG) /* end H5EA__dblock_create() */
* Return: Super block index on success/Can't fail
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
@@ -285,7 +282,6 @@ END_FUNC(PKG) /* end H5EA__dblock_sblk_idx() */
* Return: Non-NULL pointer to data block on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 18 2008
*
*-------------------------------------------------------------------------
@@ -348,7 +344,6 @@ END_FUNC(PKG) /* end H5EA__dblock_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
@@ -379,7 +374,6 @@ END_FUNC(PKG) /* end H5EA__dblock_unprotect() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 22 2008
*
*-------------------------------------------------------------------------
@@ -442,7 +436,6 @@ END_FUNC(PKG) /* end H5EA__dblock_delete() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index ec40298..8b4d5f7 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -15,7 +15,7 @@
*
* Created: H5EAhdr.c
* Aug 26 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Array header routines for extensible arrays.
*
@@ -110,7 +110,6 @@ H5FL_SEQ_DEFINE_STATIC(H5EA_sblk_info_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 26 2008
*
*-------------------------------------------------------------------------
@@ -180,7 +179,6 @@ END_FUNC(PKG) /* end H5EA__hdr_alloc() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 18 2008
*
*-------------------------------------------------------------------------
@@ -245,7 +243,6 @@ END_FUNC(PKG) /* end H5EA__hdr_init() */
* Return: Non-NULL pointer to buffer for elements on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 16 2008
*
*-------------------------------------------------------------------------
@@ -312,7 +309,6 @@ END_FUNC(PKG) /* end H5EA__hdr_alloc_elmts() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 18 2008
*
*-------------------------------------------------------------------------
@@ -349,7 +345,6 @@ END_FUNC(PKG) /* end H5EA__hdr_free_elmts() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jun 17 2008
*
*-------------------------------------------------------------------------
@@ -464,7 +459,6 @@ END_FUNC(PKG) /* end H5EA__hdr_create() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 26 2008
*
*-------------------------------------------------------------------------
@@ -497,7 +491,6 @@ END_FUNC(PKG) /* end H5EA__hdr_incr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 26 2008
*
*-------------------------------------------------------------------------
@@ -533,7 +526,6 @@ END_FUNC(PKG) /* end H5EA__hdr_decr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 26 2008
*
*-------------------------------------------------------------------------
@@ -559,7 +551,6 @@ END_FUNC(PKG) /* end H5EA__hdr_fuse_incr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 26 2008
*
*-------------------------------------------------------------------------
@@ -589,7 +580,6 @@ END_FUNC(PKG) /* end H5EA__hdr_fuse_decr() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@@ -619,7 +609,6 @@ END_FUNC(PKG) /* end H5EA__hdr_modified() */
* Return: Non-NULL pointer to header on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 31 2013
*
*-------------------------------------------------------------------------
@@ -677,7 +666,6 @@ END_FUNC(PKG) /* end H5EA__hdr_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 1 2013
*
*-------------------------------------------------------------------------
@@ -708,7 +696,6 @@ END_FUNC(PKG) /* end H5EA__hdr_unprotect() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 26 2008
*
*-------------------------------------------------------------------------
@@ -765,7 +752,6 @@ END_FUNC(PKG) /* end H5EA__hdr_delete() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5EAiblock.c b/src/H5EAiblock.c
index 1b5957a..c45d15a 100644
--- a/src/H5EAiblock.c
+++ b/src/H5EAiblock.c
@@ -15,7 +15,7 @@
*
* Created: H5EAiblock.c
* Sep 9 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Index block routines for extensible arrays.
*
@@ -42,7 +42,7 @@
#include "H5EApkg.h" /* Extensible Arrays */
#include "H5FLprivate.h" /* Free Lists */
#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
@@ -98,7 +98,6 @@ H5FL_SEQ_DEFINE_STATIC(haddr_t);
* Return: Non-NULL pointer to index block on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@@ -129,11 +128,6 @@ H5EA__iblock_alloc(H5EA_hdr_t *hdr))
iblock->nsblks = H5EA_SBLK_FIRST_IDX(hdr->cparam.sup_blk_min_data_ptrs);
iblock->ndblk_addrs = 2 * ((size_t)hdr->cparam.sup_blk_min_data_ptrs - 1);
iblock->nsblk_addrs = hdr->nsblks - iblock->nsblks;
-#ifdef QAK
-HDfprintf(stderr, "%s: iblock->nsblks = %u\n", FUNC, iblock->nsblks);
-HDfprintf(stderr, "%s: iblock->ndblk_addrs = %Zu\n", FUNC, iblock->ndblk_addrs);
-HDfprintf(stderr, "%s: iblock->nsblk_addrs = %Zu\n", FUNC, iblock->nsblk_addrs);
-#endif /* QAK */
/* Allocate buffer for elements in index block */
if(hdr->cparam.idx_blk_elmts > 0)
@@ -169,7 +163,6 @@ END_FUNC(PKG) /* end H5EA__iblock_alloc() */
* Return: Valid file address on success/HADDR_UNDEF on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@@ -183,10 +176,6 @@ H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed))
haddr_t iblock_addr; /* Extensible array index block address */
hbool_t inserted = FALSE; /* Whether the header was inserted into cache */
-#ifdef QAK
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* QAK */
-
/* Sanity check */
HDassert(hdr);
HDassert(stats_changed);
@@ -197,9 +186,6 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/* Set size of index block on disk */
iblock->size = H5EA_IBLOCK_SIZE(iblock);
-#ifdef QAK
-HDfprintf(stderr, "%s: iblock->size = %Zu\n", FUNC, iblock->size);
-#endif /* QAK */
/* Allocate space for the index block on disk */
if(HADDR_UNDEF == (iblock_addr = H5MF_alloc(hdr->f, H5FD_MEM_EARRAY_IBLOCK, (hsize_t)iblock->size)))
@@ -284,7 +270,6 @@ END_FUNC(PKG) /* end H5EA__iblock_create() */
* Return: Non-NULL pointer to index block on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@@ -296,10 +281,6 @@ H5EA__iblock_protect(H5EA_hdr_t *hdr, unsigned flags))
/* Local variables */
H5EA_iblock_t *iblock = NULL; /* Pointer to index block */
-#ifdef QAK
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* QAK */
-
/* Sanity check */
HDassert(hdr);
@@ -340,7 +321,6 @@ END_FUNC(PKG) /* end H5EA__iblock_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@@ -351,10 +331,6 @@ H5EA__iblock_unprotect(H5EA_iblock_t *iblock, unsigned cache_flags))
/* Local variables */
-#ifdef QAK
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* QAK */
-
/* Sanity check */
HDassert(iblock);
@@ -375,7 +351,6 @@ END_FUNC(PKG) /* end H5EA__iblock_unprotect() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@@ -387,10 +362,6 @@ H5EA__iblock_delete(H5EA_hdr_t *hdr))
/* Local variables */
H5EA_iblock_t *iblock = NULL; /* Pointer to index block */
-#ifdef QAK
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* QAK */
-
/* Sanity check */
HDassert(hdr);
HDassert(H5F_addr_defined(hdr->idx_blk_addr));
@@ -459,7 +430,6 @@ END_FUNC(PKG) /* end H5EA__iblock_delete() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5EAint.c b/src/H5EAint.c
index 2baf1f4..ef8cd7a 100644
--- a/src/H5EAint.c
+++ b/src/H5EAint.c
@@ -15,7 +15,7 @@
*
* Created: H5EAint.c
* Jun 17 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Internal routines for extnsible arrays.
*
@@ -86,7 +86,6 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 26 2009
*
*-------------------------------------------------------------------------
@@ -116,7 +115,6 @@ END_FUNC(PKG) /* end H5EA__create_flush_depend() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 26 2009
*
*-------------------------------------------------------------------------
diff --git a/src/H5EAsblock.c b/src/H5EAsblock.c
index fb7c458..b5b9d94 100644
--- a/src/H5EAsblock.c
+++ b/src/H5EAsblock.c
@@ -42,7 +42,7 @@
#include "H5EApkg.h" /* Extensible Arrays */
#include "H5FLprivate.h" /* Free Lists */
#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
diff --git a/src/H5EAstat.c b/src/H5EAstat.c
index 509d3f8..68e0b1e 100644
--- a/src/H5EAstat.c
+++ b/src/H5EAstat.c
@@ -15,7 +15,7 @@
*
* Created: H5EAstat.c
* Sep 11 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Extensible array metadata statistics functions.
*
@@ -87,7 +87,6 @@
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 21 2008
*
*-------------------------------------------------------------------------
@@ -98,10 +97,6 @@ H5EA_get_stats(const H5EA_t *ea, H5EA_stat_t *stats))
/* Local variables */
-#ifdef QAK
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* QAK */
-
/*
* Check arguments.
*/
diff --git a/src/H5EAtest.c b/src/H5EAtest.c
index 8926d6a..a0802bc 100644
--- a/src/H5EAtest.c
+++ b/src/H5EAtest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
* Purpose: Extensible array testing functions.
@@ -38,7 +38,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5EApkg.h" /* Extensible Arrays */
#include "H5FLprivate.h" /* Free Lists */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c
index 4462303..437c431 100644
--- a/src/H5Edeprec.c
+++ b/src/H5Edeprec.c
@@ -15,7 +15,7 @@
*
* Created: H5Edeprec.c
* April 11 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Deprecated functions from the H5E interface. These
* functions are here for compatibility purposes and may be
diff --git a/src/H5Eint.c b/src/H5Eint.c
index 2371a5f..cf1d649 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -15,7 +15,7 @@
*
* Created: H5Eint.c
* April 11 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: General use, "internal" routines for error handling.
*
diff --git a/src/H5Emodule.h b/src/H5Emodule.h
index 2d1bcd0..fbfc262 100644
--- a/src/H5Emodule.h
+++ b/src/H5Emodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Epkg.h b/src/H5Epkg.h
index 83f3816..eac5829 100644
--- a/src/H5Epkg.h
+++ b/src/H5Epkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Wednesday, April 11, 2007
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5FA.c b/src/H5FA.c
index f8bb094..ee99bb2 100644
--- a/src/H5FA.c
+++ b/src/H5FA.c
@@ -15,7 +15,7 @@
*
* Created: H5FA.c
* April 2009
- * Vailin Choi <vchoi@hdfgroup.org>
+ * Vailin Choi
*
* Purpose: Implements a Fixed Array for storing elements
* of datasets with fixed dimensions.
@@ -112,7 +112,6 @@ H5FL_BLK_DEFINE(fa_native_elmt);
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* Oct 17 2016
*
*-------------------------------------------------------------------------
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index 8f5e696..90770fb 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -15,7 +15,7 @@
*
* Created: H5FAcache.c
* Jul 2 2009
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement fixed array metadata cache methods.
*
@@ -180,7 +180,6 @@ const H5AC_class_t H5AC_FARRAY_DBLK_PAGE[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 31, 2013
*
*-------------------------------------------------------------------------
@@ -246,7 +245,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@@ -359,7 +357,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@@ -389,7 +386,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@@ -527,7 +523,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_notify() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@@ -556,7 +551,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_free_icr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@@ -644,7 +638,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -744,7 +737,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -777,7 +769,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -924,7 +915,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_notify() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -1001,7 +991,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_fsf_size() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -1068,7 +1057,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -1141,7 +1129,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -1171,7 +1158,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_image_len() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -1223,7 +1209,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* Oct 17 2016
*
*-------------------------------------------------------------------------
@@ -1286,7 +1271,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c
index 506c767..b25d50b 100644
--- a/src/H5FAhdr.c
+++ b/src/H5FAhdr.c
@@ -414,7 +414,6 @@ END_FUNC(PKG) /* end H5FA__hdr_modified() */
* Return: Non-NULL pointer to header on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 12 2013
*
*-------------------------------------------------------------------------
@@ -471,7 +470,6 @@ END_FUNC(PKG) /* end H5FA__hdr_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 12 2013
*
*-------------------------------------------------------------------------
@@ -491,7 +489,7 @@ H5FA__hdr_unprotect(H5FA_hdr_t *hdr, unsigned cache_flags))
CATCH
-END_FUNC(PKG) /* end H5EA__hdr_unprotect() */
+END_FUNC(PKG) /* end H5FA__hdr_unprotect() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FAint.c b/src/H5FAint.c
index 9d3bce8..3a1375a 100644
--- a/src/H5FAint.c
+++ b/src/H5FAint.c
@@ -15,7 +15,7 @@
*
* Created: H5FAint.c
* Fall 2012
- * Dana Robinson <derobins@hdfgroup.org>
+ * Dana Robinson
*
* Purpose: Internal routines for fixed arrays.
*
diff --git a/src/H5FAmodule.h b/src/H5FAmodule.h
index f675faf..57a85b1 100644
--- a/src/H5FAmodule.h
+++ b/src/H5FAmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5FAstat.c b/src/H5FAstat.c
index 49a56a9..882da99 100644
--- a/src/H5FAstat.c
+++ b/src/H5FAstat.c
@@ -35,9 +35,9 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FApkg.h" /* Fixed Arrays */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FApkg.h" /* Fixed Arrays */
#include "H5MMprivate.h" /* Memory management */
diff --git a/src/H5FAtest.c b/src/H5FAtest.c
index e55d408..2bcdc01 100644
--- a/src/H5FAtest.c
+++ b/src/H5FAtest.c
@@ -36,7 +36,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5FApkg.h" /* Fixed Arrays */
#include "H5FLprivate.h" /* Free Lists */
-#include "H5VMprivate.h" /* Vector functions */
+#include "H5VMprivate.h" /* Vector functions */
/****************/
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 9a82e2b..97437de 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, August 10, 1999
*
* Purpose: A driver which stores the HDF5 data in main memory using
@@ -148,8 +148,8 @@ static herr_t H5FD__core_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, ha
size_t size, const void *buf);
static herr_t H5FD__core_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD__core_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_core_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_core_unlock(H5FD_t *_file);
+static herr_t H5FD__core_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__core_unlock(H5FD_t *_file);
static const H5FD_class_t H5FD_core_g = {
"core", /* name */
@@ -181,8 +181,8 @@ static const H5FD_class_t H5FD_core_g = {
H5FD__core_write, /* write */
H5FD__core_flush, /* flush */
H5FD__core_truncate, /* truncate */
- H5FD_core_lock, /* lock */
- H5FD_core_unlock, /* unlock */
+ H5FD__core_lock, /* lock */
+ H5FD__core_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
@@ -349,7 +349,7 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
HDoff_t offset = (HDoff_t)addr; /* Offset to write at */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -419,7 +419,7 @@ H5FD__init_package(void)
char *lock_env_var = NULL; /* Environment variable pointer */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check the use disabled file locks environment variable */
lock_env_var = HDgetenv("HDF5_USE_FILE_LOCKING");
@@ -1605,7 +1605,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_lock
+ * Function: H5FD__core_lock
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
@@ -1619,13 +1619,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_core_lock(H5FD_t *_file, hbool_t rw)
+H5FD__core_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_core_t *file = (H5FD_core_t*)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -1633,7 +1633,6 @@ H5FD_core_lock(H5FD_t *_file, hbool_t rw)
* descriptor, this is a no-op.
*/
if(file->fd >= 0) {
-
/* Set exclusive or shared lock based on rw status */
lock_flags = rw ? LOCK_EX : LOCK_SH;
@@ -1648,16 +1647,15 @@ H5FD_core_lock(H5FD_t *_file, hbool_t rw)
else
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to lock file")
} /* end if */
-
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_core_lock() */
+} /* end H5FD__core_lock() */
/*-------------------------------------------------------------------------
- * Function: H5FD_core_unlock
+ * Function: H5FD__core_unlock
*
* Purpose: To remove the existing lock on the file
*
@@ -1668,17 +1666,16 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_core_unlock(H5FD_t *_file)
+H5FD__core_unlock(H5FD_t *_file)
{
H5FD_core_t *file = (H5FD_core_t*)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
- if(file->fd >= 0) {
-
+ if(file->fd >= 0)
if(HDflock(file->fd, LOCK_UN) < 0) {
if(file->ignore_disabled_file_locks && ENOSYS == errno) {
/* When errno is set to ENOSYS, the file system does not support
@@ -1690,9 +1687,7 @@ H5FD_core_unlock(H5FD_t *_file)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to unlock file")
}
- } /* end if */
-
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_core_unlock() */
+} /* end H5FD__core_unlock() */
diff --git a/src/H5FDcore.h b/src/H5FDcore.h
index 5fe2912..63b6f27 100644
--- a/src/H5FDcore.h
+++ b/src/H5FDcore.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the core driver.
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index 9839269..3d514c7 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@hdfgroup.uiuc.edu>
+ * Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Purpose: The Direct I/O file driver forces the data to be written to
@@ -23,15 +23,15 @@
#include "H5FDdrvr_module.h" /* This source code file is part of the H5FD driver module */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDdirect.h" /* Direct file driver */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDdirect.h" /* Direct file driver */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
#ifdef H5_HAVE_DIRECT
@@ -113,69 +113,68 @@ typedef struct H5FD_direct_t {
* which can be addressed entirely by the second
* argument of the file seek function.
*/
-#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \
- ((A) & ~(haddr_t)MAXADDR))
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (HDoff_t)((A)+(Z))<(HDoff_t)(A))
+#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
+ HADDR_UNDEF == (A) + (Z) || \
+ (HDoff_t)((A) + (Z)) < (HDoff_t)(A))
/* Prototypes */
-static herr_t H5FD_direct_term(void);
-static void *H5FD_direct_fapl_get(H5FD_t *file);
-static void *H5FD_direct_fapl_copy(const void *_old_fa);
-static H5FD_t *H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id,
+static herr_t H5FD__direct_term(void);
+static void *H5FD__direct_fapl_get(H5FD_t *file);
+static void *H5FD__direct_fapl_copy(const void *_old_fa);
+static H5FD_t *H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
-static herr_t H5FD_direct_close(H5FD_t *_file);
-static int H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_direct_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_direct_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
-static haddr_t H5FD_direct_get_eof(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_direct_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_direct_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
+static herr_t H5FD__direct_close(H5FD_t *_file);
+static int H5FD__direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD__direct_query(const H5FD_t *_f1, unsigned long *flags);
+static haddr_t H5FD__direct_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__direct_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static haddr_t H5FD__direct_get_eof(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__direct_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
+static herr_t H5FD__direct_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, void *buf);
-static herr_t H5FD_direct_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
+static herr_t H5FD__direct_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, const void *buf);
-static herr_t H5FD_direct_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_direct_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_direct_unlock(H5FD_t *_file);
+static herr_t H5FD__direct_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__direct_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__direct_unlock(H5FD_t *_file);
static const H5FD_class_t H5FD_direct_g = {
- "direct", /*name */
- MAXADDR, /*maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
- H5FD_direct_term, /*terminate */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- sizeof(H5FD_direct_fapl_t), /*fapl_size */
- H5FD_direct_fapl_get, /*fapl_get */
- H5FD_direct_fapl_copy, /*fapl_copy */
- NULL, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_direct_open, /*open */
- H5FD_direct_close, /*close */
- H5FD_direct_cmp, /*cmp */
- H5FD_direct_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_direct_get_eoa, /*get_eoa */
- H5FD_direct_set_eoa, /*set_eoa */
- H5FD_direct_get_eof, /*get_eof */
- H5FD_direct_get_handle, /*get_handle */
- H5FD_direct_read, /*read */
- H5FD_direct_write, /*write */
- NULL, /*flush */
- H5FD_direct_truncate, /*truncate */
- H5FD_direct_lock, /*lock */
- H5FD_direct_unlock, /*unlock */
- H5FD_FLMAP_DICHOTOMY /*fl_map */
+ "direct", /* name */
+ MAXADDR, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD__direct_term, /* terminate */
+ NULL, /* sb_size */
+ NULL, /* sb_encode */
+ NULL, /* sb_decode */
+ sizeof(H5FD_direct_fapl_t), /* fapl_size */
+ H5FD__direct_fapl_get, /* fapl_get */
+ H5FD__direct_fapl_copy, /* fapl_copy */
+ NULL, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD__direct_open, /* open */
+ H5FD__direct_close, /* close */
+ H5FD__direct_cmp, /* cmp */
+ H5FD__direct_query, /* query */
+ NULL, /* get_type_map */
+ NULL, /* alloc */
+ NULL, /* free */
+ H5FD__direct_get_eoa, /* get_eoa */
+ H5FD__direct_set_eoa, /* set_eoa */
+ H5FD__direct_get_eof, /* get_eof */
+ H5FD__direct_get_handle, /* get_handle */
+ H5FD__direct_read, /* read */
+ H5FD__direct_write, /* write */
+ NULL, /* flush */
+ H5FD__direct_truncate, /* truncate */
+ H5FD__direct_lock, /* lock */
+ H5FD__direct_unlock, /* unlock */
+ H5FD_FLMAP_DICHOTOMY /* fl_map */
};
/* Declare a free list to manage the H5FD_direct_t struct */
@@ -252,7 +251,7 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_direct_term
+ * Function: H5FD__direct_term
*
* Purpose: Shut down the VFD
*
@@ -264,15 +263,15 @@ done:
*---------------------------------------------------------------------------
*/
static herr_t
-H5FD_direct_term(void)
+H5FD__direct_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Reset VFL ID */
H5FD_DIRECT_g=0;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_direct_term() */
+} /* end H5FD__direct_term() */
/*-------------------------------------------------------------------------
@@ -375,7 +374,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_fapl_get
+ * Function: H5FD__direct_fapl_get
*
* Purpose: Returns a file access property list which indicates how the
* specified file is being accessed. The return list could be
@@ -389,28 +388,26 @@ done:
* Programmer: Raymond Lu
* Wednesday, 18 October 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
-H5FD_direct_fapl_get(H5FD_t *_file)
+H5FD__direct_fapl_get(H5FD_t *_file)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Set return value */
- ret_value= H5FD_direct_fapl_copy(&(file->fa));
+ ret_value= H5FD__direct_fapl_copy(&(file->fa));
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_direct_fapl_get() */
+} /* end H5FD__direct_fapl_get() */
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_fapl_copy
+ * Function: H5FD__direct_fapl_copy
*
* Purpose: Copies the direct-specific file access properties.
*
@@ -421,17 +418,15 @@ done:
* Programmer: Raymond Lu
* Wednesday, 18 October 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
-H5FD_direct_fapl_copy(const void *_old_fa)
+H5FD__direct_fapl_copy(const void *_old_fa)
{
const H5FD_direct_fapl_t *old_fa = (const H5FD_direct_fapl_t*)_old_fa;
H5FD_direct_fapl_t *new_fa = H5MM_calloc(sizeof(H5FD_direct_fapl_t));
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(new_fa);
@@ -439,11 +434,11 @@ H5FD_direct_fapl_copy(const void *_old_fa)
H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_direct_fapl_t));
FUNC_LEAVE_NOAPI(new_fa)
-} /* end H5FD_direct_fapl_copy() */
+} /* end H5FD__direct_fapl_copy() */
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_open
+ * Function: H5FD__direct_open
*
* Purpose: Create and/or opens a Unix file for direct I/O as an HDF5 file.
*
@@ -456,12 +451,10 @@ H5FD_direct_fapl_copy(const void *_old_fa)
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
+H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
int o_flags;
int fd=(-1);
@@ -476,7 +469,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
void *buf1, *buf2;
H5FD_t *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check on file offsets */
HDassert(sizeof(HDoff_t)>=sizeof(size_t));
@@ -601,7 +594,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_close
+ * Function: H5FD__direct_close
*
* Purpose: Closes the file.
*
@@ -612,17 +605,15 @@ done:
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_direct_close(H5FD_t *_file)
+H5FD__direct_close(H5FD_t *_file)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if (HDclose(file->fd)<0)
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
@@ -635,7 +626,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_cmp
+ * Function: H5FD__direct_cmp
*
* Purpose: Compares two files belonging to this driver using an
* arbitrary (but consistent) ordering.
@@ -648,18 +639,16 @@ done:
* Programmer: Raymond Lu
* Thursday, 21 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
+H5FD__direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_direct_t *f1 = (const H5FD_direct_t*)_f1;
const H5FD_direct_t *f2 = (const H5FD_direct_t*)_f2;
int ret_value=0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#ifdef H5_HAVE_WIN32_API
if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
@@ -692,7 +681,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_query
+ * Function: H5FD__direct_query
*
* Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
@@ -704,14 +693,12 @@ done:
* Programmer: Raymond Lu
* Thursday, 21 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_direct_query(const H5FD_t H5_ATTR_UNUSED * _f, unsigned long *flags /* out */)
+H5FD__direct_query(const H5FD_t H5_ATTR_UNUSED * _f, unsigned long *flags /* out */)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
@@ -728,7 +715,7 @@ H5FD_direct_query(const H5FD_t H5_ATTR_UNUSED * _f, unsigned long *flags /* out
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_get_eoa
+ * Function: H5FD__direct_get_eoa
*
* Purpose: Gets the end-of-address marker for the file. The EOA marker
* is the first address past the last byte allocated in the
@@ -741,26 +728,21 @@ H5FD_direct_query(const H5FD_t H5_ATTR_UNUSED * _f, unsigned long *flags /* out
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- *
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_direct_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__direct_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_direct_t *file = (const H5FD_direct_t*)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
}
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_set_eoa
+ * Function: H5FD__direct_set_eoa
*
* Purpose: Set the end-of-address marker for the file. This function is
* called shortly after an existing HDF5 file is opened in order
@@ -773,19 +755,14 @@ H5FD_direct_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
+H5FD__direct_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
file->eoa = addr;
@@ -794,7 +771,7 @@ H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_get_eof
+ * Function: H5FD__direct_get_eof
*
* Purpose: Returns the end-of-file marker, which is the greater of
* either the Unix end-of-file or the HDF5 end-of-address
@@ -809,16 +786,14 @@ H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_direct_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__direct_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_direct_t *file = (const H5FD_direct_t*)_file;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
FUNC_LEAVE_NOAPI(file->eof)
}
@@ -834,17 +809,15 @@ H5FD_direct_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
* Programmer: Raymond Lu
* 21 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_direct_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void** file_handle)
+H5FD__direct_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void** file_handle)
{
H5FD_direct_t *file = (H5FD_direct_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -856,7 +829,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_read
+ * Function: H5FD__direct_read
*
* Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
* into buffer BUF according to data transfer properties in
@@ -870,12 +843,10 @@ done:
* Programmer: Raymond Lu
* Thursday, 21 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
+H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
size_t size, void *buf/*out*/)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file;
@@ -891,7 +862,7 @@ H5FD_direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
size_t copy_size = size; /* Size remaining to read when using copy buffer */
size_t copy_offset; /* Offset into copy buffer of the requested data */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -1042,7 +1013,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_write
+ * Function: H5FD__direct_write
*
* Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
* from buffer BUF according to data transfer properties in
@@ -1055,12 +1026,10 @@ done:
* Programmer: Raymond Lu
* Thursday, 21 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
+H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
size_t size, const void *buf)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file;
@@ -1079,7 +1048,7 @@ H5FD_direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
size_t copy_size = size; /* Size remaining to write when using copy buffer */
size_t copy_offset; /* Offset into copy buffer of the data to write */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -1277,7 +1246,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_truncate
+ * Function: H5FD__direct_truncate
*
* Purpose: Makes sure that the true file size is the same (or larger)
* than the end-of-address.
@@ -1292,12 +1261,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -1338,11 +1307,11 @@ H5FD_direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATT
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_direct_truncate() */
+} /* end H5FD__direct_truncate() */
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_lock
+ * Function: H5FD__direct_lock
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
@@ -1356,13 +1325,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_direct_lock(H5FD_t *_file, hbool_t rw)
+H5FD__direct_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -1383,11 +1352,11 @@ H5FD_direct_lock(H5FD_t *_file, hbool_t rw)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_direct_lock() */
+} /* end H5FD__direct_lock() */
/*-------------------------------------------------------------------------
- * Function: H5FD_direct_unlock
+ * Function: H5FD__direct_unlock
*
* Purpose: To remove the existing lock on the file
*
@@ -1398,12 +1367,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_direct_unlock(H5FD_t *_file)
+H5FD__direct_unlock(H5FD_t *_file)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -1420,7 +1389,7 @@ H5FD_direct_unlock(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_direct_unlock() */
+} /* end H5FD__direct_unlock() */
#endif /* H5_HAVE_DIRECT */
diff --git a/src/H5FDdirect.h b/src/H5FDdirect.h
index 805f3be..630a1e6 100644
--- a/src/H5FDdirect.h
+++ b/src/H5FDdirect.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@hdfgroup.uiuc.edu>
+ * Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Purpose: The public header file for the direct driver.
diff --git a/src/H5FDdrvr_module.h b/src/H5FDdrvr_module.h
index 59a419e..34beb32 100644
--- a/src/H5FDdrvr_module.h
+++ b/src/H5FDdrvr_module.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 154878e..290d743 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, November 10, 1997
*
* Purpose: Implements a family of files that acts as a single hdf5
@@ -79,67 +79,67 @@ typedef struct H5FD_family_fapl_t {
} H5FD_family_fapl_t;
/* Callback prototypes */
-static herr_t H5FD_family_term(void);
-static void *H5FD_family_fapl_get(H5FD_t *_file);
-static void *H5FD_family_fapl_copy(const void *_old_fa);
-static herr_t H5FD_family_fapl_free(void *_fa);
-static hsize_t H5FD_family_sb_size(H5FD_t *_file);
-static herr_t H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/,
+static herr_t H5FD__family_term(void);
+static void *H5FD__family_fapl_get(H5FD_t *_file);
+static void *H5FD__family_fapl_copy(const void *_old_fa);
+static herr_t H5FD__family_fapl_free(void *_fa);
+static hsize_t H5FD__family_sb_size(H5FD_t *_file);
+static herr_t H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/,
unsigned char *buf/*out*/);
-static herr_t H5FD_family_sb_decode(H5FD_t *_file, const char *name,
+static herr_t H5FD__family_sb_decode(H5FD_t *_file, const char *name,
const unsigned char *buf);
-static H5FD_t *H5FD_family_open(const char *name, unsigned flags,
+static H5FD_t *H5FD__family_open(const char *name, unsigned flags,
hid_t fapl_id, haddr_t maxaddr);
-static herr_t H5FD_family_close(H5FD_t *_file);
-static int H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_family_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa);
-static haddr_t H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
+static herr_t H5FD__family_close(H5FD_t *_file);
+static int H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD__family_query(const H5FD_t *_f1, unsigned long *flags);
+static haddr_t H5FD__family_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa);
+static haddr_t H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
+static herr_t H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, void *_buf/*out*/);
-static herr_t H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
+static herr_t H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, const void *_buf);
-static herr_t H5FD_family_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_family_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_family_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_family_unlock(H5FD_t *_file);
+static herr_t H5FD__family_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__family_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__family_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__family_unlock(H5FD_t *_file);
/* The class struct */
static const H5FD_class_t H5FD_family_g = {
- "family", /*name */
- HADDR_MAX, /*maxaddr */
- H5F_CLOSE_WEAK, /*fc_degree */
- H5FD_family_term, /*terminate */
- H5FD_family_sb_size, /*sb_size */
- H5FD_family_sb_encode, /*sb_encode */
- H5FD_family_sb_decode, /*sb_decode */
- sizeof(H5FD_family_fapl_t), /*fapl_size */
- H5FD_family_fapl_get, /*fapl_get */
- H5FD_family_fapl_copy, /*fapl_copy */
- H5FD_family_fapl_free, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_family_open, /*open */
- H5FD_family_close, /*close */
- H5FD_family_cmp, /*cmp */
- H5FD_family_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_family_get_eoa, /*get_eoa */
- H5FD_family_set_eoa, /*set_eoa */
- H5FD_family_get_eof, /*get_eof */
- H5FD_family_get_handle, /*get_handle */
- H5FD_family_read, /*read */
- H5FD_family_write, /*write */
- H5FD_family_flush, /*flush */
- H5FD_family_truncate, /*truncate */
- H5FD_family_lock, /*lock */
- H5FD_family_unlock, /*unlock */
- H5FD_FLMAP_DICHOTOMY /*fl_map */
+ "family", /* name */
+ HADDR_MAX, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD__family_term, /* terminate */
+ H5FD__family_sb_size, /* sb_size */
+ H5FD__family_sb_encode, /* sb_encode */
+ H5FD__family_sb_decode, /* sb_decode */
+ sizeof(H5FD_family_fapl_t), /* fapl_size */
+ H5FD__family_fapl_get, /* fapl_get */
+ H5FD__family_fapl_copy, /* fapl_copy */
+ H5FD__family_fapl_free, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD__family_open, /* open */
+ H5FD__family_close, /* close */
+ H5FD__family_cmp, /* cmp */
+ H5FD__family_query, /* query */
+ NULL, /* get_type_map */
+ NULL, /* alloc */
+ NULL, /* free */
+ H5FD__family_get_eoa, /* get_eoa */
+ H5FD__family_set_eoa, /* set_eoa */
+ H5FD__family_get_eof, /* get_eof */
+ H5FD__family_get_handle, /* get_handle */
+ H5FD__family_read, /* read */
+ H5FD__family_write, /* write */
+ H5FD__family_flush, /* flush */
+ H5FD__family_truncate, /* truncate */
+ H5FD__family_lock, /* lock */
+ H5FD__family_unlock, /* unlock */
+ H5FD_FLMAP_DICHOTOMY /* fl_map */
};
@@ -203,7 +203,7 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_family_term
+ * Function: H5FD__family_term
*
* Purpose: Shut down the VFD
*
@@ -215,15 +215,15 @@ done:
*---------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_term(void)
+H5FD__family_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Reset VFL ID */
H5FD_FAMILY_g=0;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_family_term() */
+} /* end H5FD__family_term() */
/*-------------------------------------------------------------------------
@@ -242,13 +242,6 @@ H5FD_family_term(void)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -296,13 +289,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -335,7 +321,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_family_fapl_get
+ * Function: H5FD__family_fapl_get
*
* Purpose: Gets a file access property list which could be used to
* create an identical file.
@@ -347,19 +333,17 @@ done:
* Programmer: Robb Matzke
* Friday, August 13, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
-H5FD_family_fapl_get(H5FD_t *_file)
+H5FD__family_fapl_get(H5FD_t *_file)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
H5FD_family_fapl_t *fa = NULL;
H5P_genplist_t *plist; /* Property list pointer */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(NULL == (fa = (H5FD_family_fapl_t *)H5MM_calloc(sizeof(H5FD_family_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -373,16 +357,16 @@ H5FD_family_fapl_get(H5FD_t *_file)
ret_value=fa;
done:
- if(ret_value==NULL) {
+ if(ret_value==NULL)
if(fa!=NULL)
H5MM_xfree(fa);
- } /* end if */
+
FUNC_LEAVE_NOAPI(ret_value)
}
/*-------------------------------------------------------------------------
- * Function: H5FD_family_fapl_copy
+ * Function: H5FD__family_fapl_copy
*
* Purpose: Copies the family-specific file access properties.
*
@@ -393,19 +377,17 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
-H5FD_family_fapl_copy(const void *_old_fa)
+H5FD__family_fapl_copy(const void *_old_fa)
{
const H5FD_family_fapl_t *old_fa = (const H5FD_family_fapl_t*)_old_fa;
H5FD_family_fapl_t *new_fa = NULL;
H5P_genplist_t *plist; /* Property list pointer */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(NULL == (new_fa = (H5FD_family_fapl_t *)H5MM_malloc(sizeof(H5FD_family_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@@ -428,16 +410,16 @@ H5FD_family_fapl_copy(const void *_old_fa)
ret_value=new_fa;
done:
- if(ret_value==NULL) {
+ if(ret_value==NULL)
if(new_fa!=NULL)
H5MM_xfree(new_fa);
- } /* end if */
+
FUNC_LEAVE_NOAPI(ret_value)
}
/*-------------------------------------------------------------------------
- * Function: H5FD_family_fapl_free
+ * Function: H5FD__family_fapl_free
*
* Purpose: Frees the family-specific file access properties.
*
@@ -448,17 +430,15 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_fapl_free(void *_fa)
+H5FD__family_fapl_free(void *_fa)
{
H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(H5I_dec_ref(fa->memb_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID")
@@ -470,7 +450,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_family_sb_size
+ * Function: H5FD__family_sb_size
*
* Purpose: Returns the size of the private information to be stored in
* the superblock.
@@ -482,14 +462,12 @@ done:
* Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static hsize_t
-H5FD_family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
+H5FD__family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* 8 bytes field for the size of member file size field should be
* enough for now. */
@@ -498,7 +476,7 @@ H5FD_family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
/*-------------------------------------------------------------------------
- * Function: H5FD_family_sb_encode
+ * Function: H5FD__family_sb_encode
*
* Purpose: Encode driver information for the superblock. The NAME
* argument is a nine-byte buffer which will be initialized with
@@ -513,16 +491,14 @@ H5FD_family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
* Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/)
+H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Name and version number */
HDstrncpy(name, "NCSAfami", (size_t)9);
@@ -532,18 +508,18 @@ H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*
* This is to guarantee backward compatibility. If a file is created with
* v1.6 library and the driver info isn't saved in the superblock. We open
* it with v1.8, the FILE->MEMB_SIZE will be the actual size of the first
- * member file (see H5FD_family_open). So it isn't safe to use FILE->MEMB_SIZE.
+ * member file (see H5FD__family_open). So it isn't safe to use FILE->MEMB_SIZE.
* If the file is created with v1.8, the correctness of FILE->PMEM_SIZE is
- * checked in H5FD_family_sb_decode. SLU - 2009/3/21
+ * checked in H5FD__family_sb_decode. SLU - 2009/3/21
*/
UINT64ENCODE(buf, (uint64_t)file->pmem_size);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_family_sb_encode() */
+} /* end H5FD__family_sb_encode() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_sb_decode
+ * Function: H5FD__family_sb_decode
*
* Purpose: This function has 2 separate purpose. One is to decodes the
* superblock information for this driver. The NAME argument is
@@ -561,13 +537,13 @@ H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsigned char *buf)
+H5FD__family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsigned char *buf)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
uint64_t msize;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Read member file size. Skip name template for now although it's saved. */
UINT64DECODE(buf, msize);
@@ -594,11 +570,11 @@ H5FD_family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsi
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_sb_decode() */
+} /* end H5FD__family_sb_decode() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_open
+ * Function: H5FD__family_open
*
* Purpose: Creates and/or opens a family of files as an HDF5 file.
*
@@ -621,7 +597,7 @@ done:
*/
H5_GCC_DIAG_OFF(format-nonliteral)
static H5FD_t *
-H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
+H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr)
{
H5FD_family_t *file = NULL;
@@ -630,7 +606,7 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
unsigned t_flags = flags & ~H5F_ACC_CREAT;
H5FD_t *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments */
if(!name || !*name)
@@ -769,12 +745,12 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_open() */
+} /* end H5FD__family_open() */
H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
- * Function: H5FD_family_close
+ * Function: H5FD__family_close
*
* Purpose: Closes a family of files.
*
@@ -790,14 +766,14 @@ H5_GCC_DIAG_ON(format-nonliteral)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_close(H5FD_t *_file)
+H5FD__family_close(H5FD_t *_file)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
unsigned nerrors = 0; /* Number of errors while closing member files */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Close as many members as possible. Use private function here to avoid clearing
* the error stack. We need the error message to indicate wrong member file size. */
@@ -822,11 +798,11 @@ H5FD_family_close(H5FD_t *_file)
H5MM_xfree(file);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_close() */
+} /* end H5FD__family_close() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_cmp
+ * Function: H5FD__family_cmp
*
* Purpose: Compares two file families to see if they are the same. It
* does this by comparing the first member of the two families.
@@ -839,18 +815,16 @@ H5FD_family_close(H5FD_t *_file)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
+H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_family_t *f1 = (const H5FD_family_t*)_f1;
const H5FD_family_t *f2 = (const H5FD_family_t*)_f2;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(f1->nmembs >= 1 && f1->memb[0]);
HDassert(f2->nmembs >= 1 && f2->memb[0]);
@@ -858,11 +832,11 @@ H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
ret_value = H5FDcmp(f1->memb[0], f2->memb[0]);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_cmp() */
+} /* end H5FD__family_cmp() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_query
+ * Function: H5FD__family_query
*
* Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
@@ -876,11 +850,11 @@ H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_query(const H5FD_t * _file, unsigned long *flags /* out */)
+H5FD__family_query(const H5FD_t * _file, unsigned long *flags /* out */)
{
const H5FD_family_t *file = (const H5FD_family_t*)_file; /* Family VFD info */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
@@ -896,11 +870,11 @@ H5FD_family_query(const H5FD_t * _file, unsigned long *flags /* out */)
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_family_query() */
+} /* end H5FD__family_query() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_get_eoa
+ * Function: H5FD__family_get_eoa
*
* Purpose: Returns the end-of-address marker for the file. The EOA
* marker is the first address past the last byte allocated in
@@ -913,26 +887,21 @@ H5FD_family_query(const H5FD_t * _file, unsigned long *flags /* out */)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- *
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_family_t *file = (const H5FD_family_t*)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
}
/*-------------------------------------------------------------------------
- * Function: H5FD_family_set_eoa
+ * Function: H5FD__family_set_eoa
*
* Purpose: Set the end-of-address marker for the file.
*
@@ -943,11 +912,6 @@ H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- *
*-------------------------------------------------------------------------
*/
/* Disable warning for "format not a string literal" here -QAK */
@@ -958,7 +922,7 @@ H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*/
H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
-H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
+H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
haddr_t addr = abs_eoa;
@@ -966,7 +930,7 @@ H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Allocate space for the member name buffer */
if(NULL == (memb_name = (char *)H5MM_malloc(H5FD_FAM_MEMB_NAME_BUF_SIZE)))
@@ -1027,7 +991,7 @@ H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
- * Function: H5FD_family_get_eof
+ * Function: H5FD__family_get_eof
*
* Purpose: Returns the end-of-file marker, which is the greater of
* either the total family size or the current EOA marker.
@@ -1041,19 +1005,17 @@ H5_GCC_DIAG_ON(format-nonliteral)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
+H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
{
const H5FD_family_t *file = (const H5FD_family_t*)_file;
haddr_t eof=0;
int i; /* Local index variable */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/*
* Find the last member that has a non-zero EOF and break out of the loop
@@ -1085,7 +1047,7 @@ H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
/*-------------------------------------------------------------------------
- * Function: H5FD_family_get_handle
+ * Function: H5FD__family_get_handle
*
* Purpose: Returns the file handle of FAMILY file driver.
*
@@ -1094,12 +1056,10 @@ H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
* Programmer: Raymond Lu
* Sept. 16, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
+H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
{
H5FD_family_t *file = (H5FD_family_t *)_file;
H5P_genplist_t *plist;
@@ -1107,7 +1067,7 @@ H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
int memb;
herr_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Get the plist structure and family offset */
if(NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
@@ -1127,7 +1087,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_family_read
+ * Function: H5FD__family_read
*
* Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
* into buffer BUF according to data transfer properties in
@@ -1141,12 +1101,10 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
void *_buf/*out*/)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
@@ -1158,7 +1116,7 @@ H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, si
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Get the member data transfer property list. If the transfer property
@@ -1197,7 +1155,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_family_write
+ * Function: H5FD__family_write
*
* Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
* from buffer BUF according to data transfer properties in
@@ -1210,12 +1168,10 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
const void *_buf)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
@@ -1227,7 +1183,7 @@ H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Get the member data transfer property list. If the transfer property
@@ -1266,7 +1222,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_family_flush
+ * Function: H5FD__family_flush
*
* Purpose: Flushes all family members.
*
@@ -1279,13 +1235,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
+H5FD__family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
unsigned u, nerrors = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
for(u = 0; u < file->nmembs; u++)
if(file->memb[u] && H5FD_flush(file->memb[u], closing) < 0)
@@ -1296,11 +1252,11 @@ H5FD_family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_flush() */
+} /* end H5FD__family_flush() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_truncate
+ * Function: H5FD__family_truncate
*
* Purpose: Truncates all family members.
*
@@ -1314,13 +1270,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
+H5FD__family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
unsigned u, nerrors = 0;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
for(u = 0; u < file->nmembs; u++)
if(file->memb[u] && H5FD_truncate(file->memb[u], closing) < 0)
@@ -1331,11 +1287,11 @@ H5FD_family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closin
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_truncate() */
+} /* end H5FD__family_truncate() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_lock
+ * Function: H5FD__family_lock
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
@@ -1349,13 +1305,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_lock(H5FD_t *_file, hbool_t rw)
+H5FD__family_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Place the lock on all the member files */
for(u = 0; u < file->nmembs; u++)
@@ -1379,11 +1335,11 @@ H5FD_family_lock(H5FD_t *_file, hbool_t rw)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_lock() */
+} /* end H5FD__family_lock() */
/*-------------------------------------------------------------------------
- * Function: H5FD_family_unlock
+ * Function: H5FD__family_unlock
*
* Purpose: To remove the existing lock on the file
*
@@ -1394,13 +1350,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_unlock(H5FD_t *_file)
+H5FD__family_unlock(H5FD_t *_file)
{
H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Remove the lock on the member files */
for(u = 0; u < file->nmembs; u++)
@@ -1410,5 +1366,5 @@ H5FD_family_unlock(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_family_unlock() */
+} /* end H5FD__family_unlock() */
diff --git a/src/H5FDfamily.h b/src/H5FDfamily.h
index 1584cf6..45bdccc 100644
--- a/src/H5FDfamily.h
+++ b/src/H5FDfamily.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 4, 1999
*
* Purpose: The public header file for the family driver.
diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c
index 3d086ea..29d032e 100644
--- a/src/H5FDhdfs.c
+++ b/src/H5FDhdfs.c
@@ -20,9 +20,6 @@
* File System (HDFS).
*/
-/* This source code file is part of the H5FD driver module */
-#include "H5FDdrvr_module.h"
-
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5FDprivate.h" /* File drivers */
@@ -32,8 +29,12 @@
#include "H5MMprivate.h" /* Memory management */
#ifdef H5_HAVE_LIBHDFS
+
+/* This source code file is part of the H5FD driver module */
+#include "H5FDdrvr_module.h"
+
+/* HDFS routines */
#include "hdfs.h"
-#endif
/* toggle function call prints: 1 turns on */
#define HDFS_DEBUG 0
@@ -74,7 +75,7 @@ static hid_t H5FD_HDFS_g = 0;
#define HDFS_STATS_POW(bin_i, out_ptr) { \
unsigned long long donotshadowresult = 1; \
unsigned donotshadowindex = 0; \
- for (donotshadowindex = 0; \
+ for(donotshadowindex = 0; \
donotshadowindex < (((bin_i) * HDFS_STATS_INTERVAL) + \
HDFS_STATS_START_POWER); \
donotshadowindex++) \
@@ -118,8 +119,6 @@ static unsigned long long hdfs_stats_boundaries[HDFS_STATS_BIN_COUNT];
*
* Programmer: Jacob Smith
*
- * Changes: None
- *
***************************************************************************/
typedef struct {
unsigned long long count;
@@ -130,7 +129,6 @@ typedef struct {
#endif /* HDFS_STATS */
-#ifdef H5_HAVE_LIBHDFS
/* "unique" identifier for `hdfs_t` structures.
* Randomly generated by unweighted dice rolls.
@@ -146,9 +144,7 @@ typedef struct {
*
* Contain/retain information associated with a file hosted on Hadoop
* Distributed File System (HDFS). Instantiated and populated via
- * `H5FD_hdfs_handle_open()` and cleaned up via `H5FD_hdfs_handle_close()`.
- *
- *
+ * `H5FD__hdfs_handle_open()` and cleaned up via `H5FD__hdfs_handle_close()`.
*
* `magic` (unisgned long)
*
@@ -175,8 +171,6 @@ typedef struct {
* Programmer: Jacob Smith
* May 2018
*
- * Changes: None
- *
***************************************************************************
*/
typedef struct {
@@ -187,194 +181,6 @@ typedef struct {
} hdfs_t;
-/*--------------------------------------------------------------------------
- * Function: H5FD_hdfs_handle_open
- *
- * Purpose: Create a HDFS file handle, 'opening' the target file.
- *
- * Return: Success: Pointer to HDFS container/handle of opened file.
- * Failure: NULL
- *
- * Programmer: Gerd Herber
- * May 2018
- *
- * Changes: None.
- *--------------------------------------------------------------------------
- */
-static hdfs_t *
-H5FD_hdfs_handle_open(
- const char *path,
- const char *namenode_name,
- const int32_t namenode_port,
- const char *user_name,
- const char *kerberos_ticket_cache,
- const int32_t stream_buffer_size)
-{
- struct hdfsBuilder *builder = NULL;
- hdfs_t *handle = NULL;
- hdfs_t *ret_value = NULL;
-
- FUNC_ENTER_NOAPI_NOINIT
-
-#if HDFS_DEBUG
- HDfprintf(stdout, "called H5FD_hdfs_handle_open.\n");
-#endif
-
- if (path == NULL || path[0] == '\0') {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "path cannot be null.\n")
- }
- if (namenode_name == NULL /* || namenode_name[0] == '\0' */ ) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "namenode name cannot be null.\n")
- }
- if (namenode_port < 0 || namenode_port > 65535) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "namenode port must be non-negative and <= 65535.\n")
- }
- if (stream_buffer_size < 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "buffer size must non-negative.\n")
- }
-
- handle = (hdfs_t *)H5MM_malloc(sizeof(hdfs_t));
- if (handle == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL,
- "could not malloc space for handle.\n")
- }
-
- handle->magic = (unsigned long)HDFS_HDFST_MAGIC;
- handle->filesystem = NULL; /* TODO: not a pointer; NULL may cause bug */
- handle->fileinfo = NULL;
- handle->file = NULL; /* TODO: not a pointer; NULL may cause bug */
-
- builder = hdfsNewBuilder();
- if (!builder) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "(hdfs) failed to create builder")
- }
- hdfsBuilderSetNameNode(builder, namenode_name);
- hdfsBuilderSetNameNodePort(builder, (tPort)namenode_port);
- if (user_name != NULL && user_name[0] != '\0') {
- hdfsBuilderSetUserName(builder, user_name);
- }
- if (kerberos_ticket_cache != NULL && kerberos_ticket_cache[0] != '\0') {
- hdfsBuilderSetKerbTicketCachePath(builder, kerberos_ticket_cache);
- }
- /* Call to `hdfsBuilderConnect` releases builder, regardless of success. */
- handle->filesystem = hdfsBuilderConnect(builder);
- if (!handle->filesystem) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "(hdfs) could not connect to default namenode")
- }
- handle->fileinfo = hdfsGetPathInfo(handle->filesystem, path);
- if (!handle->fileinfo) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "hdfsGetPathInfo failed")
- }
- handle->file = hdfsOpenFile(
- handle->filesystem,
- path,
- O_RDONLY,
- stream_buffer_size,
- 0,
- 0);
- if (!handle->file) {
- HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL,
- "(hdfs) could not open")
- }
-
- ret_value = handle;
-
-done:
- if (ret_value == NULL && handle != NULL) {
- /* error; clean up */
- HDassert(handle->magic == HDFS_HDFST_MAGIC);
- handle->magic++;
- if (handle->file != NULL) {
- if (FAIL == (hdfsCloseFile(handle->filesystem, handle->file))) {
- HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL,
- "unable to close hdfs file handle")
- }
- }
- if (handle->fileinfo != NULL) {
- hdfsFreeFileInfo(handle->fileinfo, 1);
- }
- if (handle->filesystem != NULL) {
- if (FAIL == (hdfsDisconnect(handle->filesystem))) {
- HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL,
- "unable to disconnect from hdfs")
- }
- }
- H5MM_xfree(handle);
- }
-
- FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5FD_hdfs_handle_open() */
-
-
-/*--------------------------------------------------------------------------
- * Function: H5FD_hdfs_handle_close
- *
- * Purpose: 'Close' an HDFS file container/handle, releasing underlying
- * resources.
- *
- * Return: Success: `SUCCEED` (0)
- * Failure: `FAIL` (-1)
- *
- * Programmer: Gerd Herber
- * May 2018
- *
- * Changes: None.
- *--------------------------------------------------------------------------
- */
-static herr_t
-H5FD_hdfs_handle_close(hdfs_t *handle)
-{
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_NOAPI_NOINIT
-
-#if HDFS_DEBUG
- HDfprintf(stdout, "called H5FD_hdfs_close.\n");
-#endif
-
- if (handle == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle cannot be null.\n")
- }
- if (handle->magic != HDFS_HDFST_MAGIC) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle has invalid magic.\n")
- }
-
- handle->magic++;
- if (handle->file != NULL) {
- if (FAIL == (hdfsCloseFile(handle->filesystem, handle->file))) {
- HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL,
- "unable to close hdfs file handle")
- }
- }
- if (handle->fileinfo != NULL) {
- hdfsFreeFileInfo(handle->fileinfo, 1);
- }
- if (handle->filesystem != NULL) {
- if (FAIL == (hdfsDisconnect(handle->filesystem))) {
- HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL,
- "unable to disconnect hdfs file system")
- }
- }
-
- H5MM_xfree(handle);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5FD_hdfs_close() */
-
-#endif /* H5_HAVE_LIBHDFS */
-
/***************************************************************************
*
@@ -432,17 +238,13 @@ done:
*
* Programmer: Jacob Smith
*
- * Changes: None.
- *
***************************************************************************
*/
typedef struct H5FD_hdfs_t {
H5FD_t pub;
H5FD_hdfs_fapl_t fa;
haddr_t eoa;
-#ifdef H5_HAVE_LIBHDFS
hdfs_t *hdfs_handle;
-#endif
#if HDFS_STATS
hdfs_statsbin meta[HDFS_STATS_BIN_COUNT + 1];
hdfs_statsbin raw[HDFS_STATS_BIN_COUNT + 1];
@@ -459,75 +261,72 @@ typedef struct H5FD_hdfs_t {
* Only included if HDFS code should compile.
*
*/
-#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
-#ifdef H5_HAVE_LIBHDFS
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
-#endif /* H5_HAVE_LIBHDFS */
/* Prototypes */
-static herr_t H5FD_hdfs_term(void);
-static void *H5FD_hdfs_fapl_get(H5FD_t *_file);
-static void *H5FD_hdfs_fapl_copy(const void *_old_fa);
-static herr_t H5FD_hdfs_fapl_free(void *_fa);
-static H5FD_t *H5FD_hdfs_open(const char *name, unsigned flags, hid_t fapl_id,
+static herr_t H5FD__hdfs_term(void);
+static void *H5FD__hdfs_fapl_get(H5FD_t *_file);
+static void *H5FD__hdfs_fapl_copy(const void *_old_fa);
+static herr_t H5FD__hdfs_fapl_free(void *_fa);
+static H5FD_t *H5FD__hdfs_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
-static herr_t H5FD_hdfs_close(H5FD_t *_file);
-static int H5FD_hdfs_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_hdfs_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_hdfs_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_hdfs_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
-static haddr_t H5FD_hdfs_get_eof(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_hdfs_get_handle(H5FD_t *_file, hid_t fapl,
+static herr_t H5FD__hdfs_close(H5FD_t *_file);
+static int H5FD__hdfs_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD__hdfs_query(const H5FD_t *_f1, unsigned long *flags);
+static haddr_t H5FD__hdfs_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__hdfs_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static haddr_t H5FD__hdfs_get_eof(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__hdfs_get_handle(H5FD_t *_file, hid_t fapl,
void** file_handle);
-static herr_t H5FD_hdfs_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
+static herr_t H5FD__hdfs_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
haddr_t addr, size_t size, void *buf);
-static herr_t H5FD_hdfs_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
+static herr_t H5FD__hdfs_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
haddr_t addr, size_t size, const void *buf);
-static herr_t H5FD_hdfs_truncate(H5FD_t *_file, hid_t dxpl_id,
+static herr_t H5FD__hdfs_truncate(H5FD_t *_file, hid_t dxpl_id,
hbool_t closing);
-static herr_t H5FD_hdfs_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_hdfs_unlock(H5FD_t *_file);
-static herr_t H5FD_hdfs_validate_config(const H5FD_hdfs_fapl_t * fa);
+static herr_t H5FD__hdfs_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__hdfs_unlock(H5FD_t *_file);
+
+static herr_t H5FD__hdfs_validate_config(const H5FD_hdfs_fapl_t * fa);
static const H5FD_class_t H5FD_hdfs_g = {
"hdfs", /* name */
MAXADDR, /* maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
- H5FD_hdfs_term, /* terminate */
+ H5FD__hdfs_term, /* terminate */
NULL, /* sb_size */
NULL, /* sb_encode */
NULL, /* sb_decode */
sizeof(H5FD_hdfs_fapl_t), /* fapl_size */
- H5FD_hdfs_fapl_get, /* fapl_get */
- H5FD_hdfs_fapl_copy, /* fapl_copy */
- H5FD_hdfs_fapl_free, /* fapl_free */
+ H5FD__hdfs_fapl_get, /* fapl_get */
+ H5FD__hdfs_fapl_copy, /* fapl_copy */
+ H5FD__hdfs_fapl_free, /* fapl_free */
0, /* dxpl_size */
NULL, /* dxpl_copy */
NULL, /* dxpl_free */
- H5FD_hdfs_open, /* open */
- H5FD_hdfs_close, /* close */
- H5FD_hdfs_cmp, /* cmp */
- H5FD_hdfs_query, /* query */
+ H5FD__hdfs_open, /* open */
+ H5FD__hdfs_close, /* close */
+ H5FD__hdfs_cmp, /* cmp */
+ H5FD__hdfs_query, /* query */
NULL, /* get_type_map */
NULL, /* alloc */
NULL, /* free */
- H5FD_hdfs_get_eoa, /* get_eoa */
- H5FD_hdfs_set_eoa, /* set_eoa */
- H5FD_hdfs_get_eof, /* get_eof */
- H5FD_hdfs_get_handle, /* get_handle */
- H5FD_hdfs_read, /* read */
- H5FD_hdfs_write, /* write */
+ H5FD__hdfs_get_eoa, /* get_eoa */
+ H5FD__hdfs_set_eoa, /* set_eoa */
+ H5FD__hdfs_get_eof, /* get_eof */
+ H5FD__hdfs_get_handle, /* get_handle */
+ H5FD__hdfs_read, /* read */
+ H5FD__hdfs_write, /* write */
NULL, /* flush */
- H5FD_hdfs_truncate, /* truncate */
- H5FD_hdfs_lock, /* lock */
- H5FD_hdfs_unlock, /* unlock */
+ H5FD__hdfs_truncate, /* truncate */
+ H5FD__hdfs_lock, /* lock */
+ H5FD__hdfs_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
-#ifdef H5_HAVE_LIBHDFS
/* Declare a free list to manage the H5FD_hdfs_t struct */
H5FL_DEFINE_STATIC(H5FD_hdfs_t);
-#endif /* H5_HAVE_LIBHDFS */
/*-------------------------------------------------------------------------
@@ -537,9 +336,6 @@ H5FL_DEFINE_STATIC(H5FD_hdfs_t);
*
* Return: Non-negative on success/Negative on failure
*
- * Changes: Rename as appropriate for hdfs vfd.
- * Jacob Smith 2018
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -549,14 +345,11 @@ H5FD__init_package(void)
FUNC_ENTER_STATIC
- if (H5FD_hdfs_init() < 0) {
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL,
- "unable to initialize hdfs VFD")
- }
+ if(H5FD_hdfs_init() < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize hdfs VFD")
done:
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5FD__init_package() */
@@ -584,11 +377,11 @@ H5FD_hdfs_init(void)
FUNC_ENTER_NOAPI(FAIL)
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_init() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif
if(H5I_VFL != H5I_get_type(H5FD_HDFS_g))
- H5FD_HDFS_g = H5FD_register( &H5FD_hdfs_g, sizeof(H5FD_class_t), FALSE);
+ H5FD_HDFS_g = H5FD_register(&H5FD_hdfs_g, sizeof(H5FD_class_t), FALSE);
#if HDFS_STATS
/* pre-compute statsbin boundaries
@@ -609,7 +402,7 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_hdfs_term
+ * Function: H5FD__hdfs_term
*
* Purpose: Shut down the VFD
*
@@ -618,82 +411,162 @@ done:
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
*
- * Changes: Rename as appropriate for hdfs vfd.
- * Jacob Smith 2018
- *
*---------------------------------------------------------------------------
*/
static herr_t
-H5FD_hdfs_term(void)
+H5FD__hdfs_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_term() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif
/* Reset VFL ID */
H5FD_HDFS_g = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_hdfs_term() */
+} /* end H5FD__hdfs_term() */
-/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_hdfs
- *
- * Purpose: Modify the file access property list to use the H5FD_HDFS
- * driver defined in this source file. All driver specfic
- * properties are passed in as a pointer to a suitably
- * initialized instance of H5FD_hdfs_fapl_t
+/*--------------------------------------------------------------------------
+ * Function: H5FD__hdfs_handle_open
*
- * Return: SUCCEED/FAIL
+ * Purpose: Create a HDFS file handle, 'opening' the target file.
*
- * Programmer: John Mainzer
- * 9/10/17
+ * Return: Success: Pointer to HDFS container/handle of opened file.
+ * Failure: NULL
*
- * Changes: Rename as appropriate for hdfs vfd.
- * Jacob Smith 2018
+ * Programmer: Gerd Herber
+ * May 2018
*
- *-------------------------------------------------------------------------
+ *--------------------------------------------------------------------------
*/
-herr_t
-H5Pset_fapl_hdfs(hid_t fapl_id,
- H5FD_hdfs_fapl_t *fa)
+static hdfs_t *
+H5FD__hdfs_handle_open(const char *path, const char *namenode_name,
+ const int32_t namenode_port, const char *user_name,
+ const char *kerberos_ticket_cache, const int32_t stream_buffer_size)
{
- H5P_genplist_t *plist = NULL; /* Property list pointer */
- herr_t ret_value = FAIL;
-
- FUNC_ENTER_API(FAIL)
- H5TRACE2("e", "i*x", fapl_id, fa);
+ struct hdfsBuilder *builder = NULL;
+ hdfs_t *handle = NULL;
+ hdfs_t *ret_value = NULL;
- HDassert(fa != NULL);
+ FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "H5Pset_fapl_hdfs() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif
- plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
- if (plist == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, \
- "not a file access property list")
- }
+ if(path == NULL || path[0] == '\0')
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "path cannot be null")
+ if(namenode_name == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "namenode name cannot be null")
+ if(namenode_port < 0 || namenode_port > 65535)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "namenode port must be non-negative and <= 65535")
+ if(stream_buffer_size < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "buffer size must non-negative")
- if (FAIL == H5FD_hdfs_validate_config(fa)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "invalid hdfs config")
- }
+ handle = (hdfs_t *)H5MM_malloc(sizeof(hdfs_t));
+ if(handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "could not malloc space for handle")
- ret_value = H5P_set_driver(plist, H5FD_HDFS, (void *)fa);
+ handle->magic = (unsigned long)HDFS_HDFST_MAGIC;
+ handle->filesystem = NULL; /* TODO: not a pointer; NULL may cause bug */
+ handle->fileinfo = NULL;
+ handle->file = NULL; /* TODO: not a pointer; NULL may cause bug */
+
+ builder = hdfsNewBuilder();
+ if(!builder)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "(hdfs) failed to create builder")
+ hdfsBuilderSetNameNode(builder, namenode_name);
+ hdfsBuilderSetNameNodePort(builder, (tPort)namenode_port);
+ if(user_name != NULL && user_name[0] != '\0')
+ hdfsBuilderSetUserName(builder, user_name);
+ if(kerberos_ticket_cache != NULL && kerberos_ticket_cache[0] != '\0')
+ hdfsBuilderSetKerbTicketCachePath(builder, kerberos_ticket_cache);
+
+ /* Call to `hdfsBuilderConnect` releases builder, regardless of success. */
+ handle->filesystem = hdfsBuilderConnect(builder);
+ if(!handle->filesystem)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "(hdfs) could not connect to default namenode")
+ handle->fileinfo = hdfsGetPathInfo(handle->filesystem, path);
+ if(!handle->fileinfo)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "hdfsGetPathInfo failed")
+ handle->file = hdfsOpenFile(handle->filesystem, path, O_RDONLY, stream_buffer_size, 0, 0);
+ if(!handle->file)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "(hdfs) could not open")
+
+ ret_value = handle;
done:
- FUNC_LEAVE_API(ret_value)
+ if(ret_value == NULL && handle != NULL) {
+ /* error; clean up */
+ HDassert(handle->magic == HDFS_HDFST_MAGIC);
+ handle->magic++;
+ if(handle->file != NULL)
+ if(FAIL == (hdfsCloseFile(handle->filesystem, handle->file)))
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL, "unable to close hdfs file handle")
+ if(handle->fileinfo != NULL)
+ hdfsFreeFileInfo(handle->fileinfo, 1);
+ if(handle->filesystem != NULL)
+ if(FAIL == (hdfsDisconnect(handle->filesystem)))
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL, "unable to disconnect from hdfs")
+ H5MM_xfree(handle);
+ }
-} /* H5Pset_fapl_hdfs() */
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD__hdfs_handle_open() */
+
+
+/*--------------------------------------------------------------------------
+ * Function: H5FD__hdfs_handle_close
+ *
+ * Purpose: 'Close' an HDFS file container/handle, releasing underlying
+ * resources.
+ *
+ * Return: Success: `SUCCEED` (0)
+ * Failure: `FAIL` (-1)
+ *
+ * Programmer: Gerd Herber
+ * May 2018
+ *
+ *--------------------------------------------------------------------------
+ */
+static herr_t
+H5FD__hdfs_handle_close(hdfs_t *handle)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_STATIC
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ if(handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null")
+ if(handle->magic != HDFS_HDFST_MAGIC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic")
+
+ handle->magic++;
+ if(handle->file != NULL)
+ if(FAIL == (hdfsCloseFile(handle->filesystem, handle->file)))
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close hdfs file handle")
+ if(handle->fileinfo != NULL)
+ hdfsFreeFileInfo(handle->fileinfo, 1);
+ if(handle->filesystem != NULL)
+ if(FAIL == (hdfsDisconnect(handle->filesystem)))
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to disconnect hdfs file system")
+
+ H5MM_xfree(handle);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD__hdfs_handle_close() */
/*-------------------------------------------------------------------------
- * Function: H5FD_hdfs_validate_config()
+ * Function: H5FD__hdfs_validate_config()
*
* Purpose: Test to see if the supplied instance of H5FD_hdfs_fapl_t
* contains internally consistant data. Return SUCCEED if so,
@@ -710,37 +583,70 @@ done:
* Programmer: Jacob Smith
* 9/10/17
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_hdfs_validate_config(const H5FD_hdfs_fapl_t * fa)
+H5FD__hdfs_validate_config(const H5FD_hdfs_fapl_t * fa)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(fa != NULL);
- if ( fa->version != H5FD__CURR_HDFS_FAPL_T_VERSION ) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "Unknown H5FD_hdfs_fapl_t version");
- }
-
- if ( fa->namenode_port > 65535 ) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "Invalid namenode port number");
- }
- if ( fa->namenode_port < 0 ) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "Invalid namenode port number");
- }
+ if(fa->version != H5FD__CURR_HDFS_FAPL_T_VERSION)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown H5FD_hdfs_fapl_t version");
+ if(fa->namenode_port > 65535)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid namenode port number");
+ if(fa->namenode_port < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid namenode port number");
done:
FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD__hdfs_validate_config() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pset_fapl_hdfs
+ *
+ * Purpose: Modify the file access property list to use the H5FD_HDFS
+ * driver defined in this source file. All driver specfic
+ * properties are passed in as a pointer to a suitably
+ * initialized instance of H5FD_hdfs_fapl_t
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: John Mainzer
+ * 9/10/17
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa)
+{
+ H5P_genplist_t *plist = NULL; /* Property list pointer */
+ herr_t ret_value = FAIL;
-} /* H5FD_hdfs_validate_config() */
+ FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "i*x", fapl_id, fa);
+
+ HDassert(fa != NULL);
+
+#if HDFS_DEBUG
+ HDfprintf(stdout, "called %s.\n", FUNC);
+#endif
+
+ plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
+ if(plist == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
+ if(FAIL == H5FD__hdfs_validate_config(fa))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid hdfs config")
+
+ ret_value = H5P_set_driver(plist, H5FD_HDFS, (void *)fa);
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5Pset_fapl_hdfs() */
/*-------------------------------------------------------------------------
@@ -756,13 +662,10 @@ done:
* Programmer: John Mainzer
* 9/10/17
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5Pget_fapl_hdfs(hid_t fapl_id,
- H5FD_hdfs_fapl_t *fa_out)
+H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_out)
{
const H5FD_hdfs_fapl_t *fa = NULL;
H5P_genplist_t *plist = NULL;
@@ -772,40 +675,31 @@ H5Pget_fapl_hdfs(hid_t fapl_id,
H5TRACE2("e", "i*x", fapl_id, fa_out);
#if HDFS_DEBUG
- HDfprintf(stdout, "H5Pget_fapl_hdfs() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif
- if (fa_out == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "fa_out is NULL")
- }
+ if(fa_out == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_out is NULL")
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
- if (plist == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access list")
- }
- if (H5FD_HDFS != H5P_peek_driver(plist)) {
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL,
- "incorrect VFL driver")
- }
+ if(plist == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list")
+ if(H5FD_HDFS != H5P_peek_driver(plist))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
fa = (const H5FD_hdfs_fapl_t *)H5P_peek_driver_info(plist);
- if (fa == NULL) {
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL,
- "bad VFL driver info")
- }
+ if(fa == NULL)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
/* Copy the hdfs fapl data out */
HDmemcpy(fa_out, fa, sizeof(H5FD_hdfs_fapl_t));
done:
FUNC_LEAVE_API(ret_value)
-
} /* H5Pget_fapl_hdfs() */
/*-------------------------------------------------------------------------
- * Function: H5FD_hdfs_fapl_get
+ * Function: H5FD__hdfs_fapl_get
*
* Purpose: Gets a file access property list which could be used to
* create an identical file.
@@ -817,24 +711,20 @@ done:
* Programmer: John Mainzer
* 9/8/17
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
-H5FD_hdfs_fapl_get(H5FD_t *_file)
+H5FD__hdfs_fapl_get(H5FD_t *_file)
{
H5FD_hdfs_t *file = (H5FD_hdfs_t*)_file;
H5FD_hdfs_fapl_t *fa = NULL;
void *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
fa = (H5FD_hdfs_fapl_t *)H5MM_calloc(sizeof(H5FD_hdfs_fapl_t));
- if (fa == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
- "memory allocation failed")
- }
+ if(fa == NULL)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "memory allocation failed")
/* Copy the fields of the structure */
HDmemcpy(fa, &(file->fa), sizeof(H5FD_hdfs_fapl_t));
@@ -842,17 +732,15 @@ H5FD_hdfs_fapl_get(H5FD_t *_file)
ret_value = fa;
done:
- if (ret_value == NULL && fa != NULL) {
+ if(ret_value == NULL && fa != NULL)
H5MM_xfree(fa); /* clean up on error */
- }
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5FD_hdfs_fapl_get() */
+} /* H5FD__hdfs_fapl_get() */
/*-------------------------------------------------------------------------
- * Function: H5FD_hdfs_fapl_copy
+ * Function: H5FD__hdfs_fapl_copy
*
* Purpose: Copies the hdfs-specific file access properties.
*
@@ -863,40 +751,34 @@ done:
* Programmer: John Mainzer
* 9/8/17
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
-H5FD_hdfs_fapl_copy(const void *_old_fa)
+H5FD__hdfs_fapl_copy(const void *_old_fa)
{
const H5FD_hdfs_fapl_t *old_fa = (const H5FD_hdfs_fapl_t*)_old_fa;
H5FD_hdfs_fapl_t *new_fa = NULL;
void *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
new_fa = (H5FD_hdfs_fapl_t *)H5MM_malloc(sizeof(H5FD_hdfs_fapl_t));
- if (new_fa == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
- "memory allocation failed")
- }
+ if(new_fa == NULL)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "memory allocation failed")
HDmemcpy(new_fa, old_fa, sizeof(H5FD_hdfs_fapl_t));
ret_value = new_fa;
done:
- if (ret_value == NULL && new_fa != NULL) {
+ if(ret_value == NULL && new_fa != NULL)
H5MM_xfree(new_fa); /* clean up on error */
- }
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5FD_hdfs_fapl_copy() */
+} /* H5FD__hdfs_fapl_copy() */
/*-------------------------------------------------------------------------
- * Function: H5FD_hdfs_fapl_free
+ * Function: H5FD__hdfs_fapl_free
*
* Purpose: Frees the hdfs-specific file access properties.
*
@@ -905,30 +787,27 @@ done:
* Programmer: John Mainzer
* 9/8/17
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_hdfs_fapl_free(void *_fa)
+H5FD__hdfs_fapl_free(void *_fa)
{
H5FD_hdfs_fapl_t *fa = (H5FD_hdfs_fapl_t*)_fa;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(fa != NULL); /* sanity check */
H5MM_xfree(fa);
FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5FD__hdfs_fapl_free() */
-} /* H5FD_hdfs_fapl_free() */
#if HDFS_STATS
-
/*----------------------------------------------------------------------------
*
- * Function: hdfs_reset_stats()
+ * Function: hdfs__reset_stats()
*
* Purpose:
*
@@ -945,28 +824,24 @@ H5FD_hdfs_fapl_free(void *_fa)
* Programmer: Jacob Smith
* 2017-12-08
*
- * Changes: None.
- *
*----------------------------------------------------------------------------
*/
static herr_t
-hdfs_reset_stats(H5FD_hdfs_t *file)
+hdfs__reset_stats(H5FD_hdfs_t *file)
{
unsigned i = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDprintf("hdfs_reset_stats() called\n");
+ HDprintf("hdfs__reset_stats() called\n");
#endif
- if (file == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "file was null")
- }
+ if(file == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file was null")
- for (i = 0; i <= HDFS_STATS_BIN_COUNT; i++) {
+ for(i = 0; i <= HDFS_STATS_BIN_COUNT; i++) {
file->raw[i].bytes = 0;
file->raw[i].count = 0;
file->raw[i].min = (unsigned long long)HDFS_STATS_STARTING_MIN;
@@ -981,13 +856,13 @@ hdfs_reset_stats(H5FD_hdfs_t *file)
done:
FUNC_LEAVE_NOAPI(ret_value);
-} /* hdfs_reset_stats */
+} /* hdfs__reset_stats */
#endif /* HDFS_STATS */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_hdfs_open()
+ * Function: H5FD__hdfs_open()
*
* Purpose:
*
@@ -1006,137 +881,78 @@ done:
* Programmer: Jacob Smith
* 2017-11-02
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_LIBHDFS
static H5FD_t *
-H5FD_hdfs_open(
- const char *path,
- unsigned flags,
- hid_t fapl_id,
- haddr_t maxaddr)
+H5FD__hdfs_open(const char *path, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
H5FD_t *ret_value = NULL;
H5FD_hdfs_t *file = NULL;
hdfs_t *handle = NULL;
H5FD_hdfs_fapl_t fa;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_open() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif /* HDFS_DEBUG */
/* Sanity check on file offsets */
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
/* Check arguments */
- if (!path || !*path) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "invalid file name")
- }
- if (0 == maxaddr || HADDR_UNDEF == maxaddr) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL,
- "bogus maxaddr")
- }
- if (ADDR_OVERFLOW(maxaddr)) {
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL,
- "bogus maxaddr")
- }
- if (flags != H5F_ACC_RDONLY) {
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL,
- "only Read-Only access allowed")
- }
- if (fapl_id == H5P_DEFAULT || fapl_id == H5P_FILE_ACCESS_DEFAULT) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "fapl cannot be H5P_DEFAULT")
- }
- if (FAIL == H5Pget_fapl_hdfs(fapl_id, &fa)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "can't get property list")
- }
-
- handle = H5FD_hdfs_handle_open(
- path,
- fa.namenode_name,
- fa.namenode_port,
- fa.user_name,
- fa.kerberos_ticket_cache,
- fa.stream_buffer_size);
-
- if (handle == NULL) {
- HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL,
- "could not open")
- }
+ if(!path || !*path)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
+ if(0 == maxaddr || HADDR_UNDEF == maxaddr)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
+ if(ADDR_OVERFLOW(maxaddr))
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr")
+ if(flags != H5F_ACC_RDONLY)
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL, "only Read-Only access allowed")
+ if(fapl_id == H5P_DEFAULT || fapl_id == H5P_FILE_ACCESS_DEFAULT)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "fapl cannot be H5P_DEFAULT")
+ if(FAIL == H5Pget_fapl_hdfs(fapl_id, &fa))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "can't get property list")
+
+ handle = H5FD__hdfs_handle_open(path, fa.namenode_name, fa.namenode_port,
+ fa.user_name, fa.kerberos_ticket_cache, fa.stream_buffer_size);
+ if(handle == NULL)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "could not open")
HDassert(handle->magic == HDFS_HDFST_MAGIC);
- /* create new file struct
- */
+ /* Create new file struct */
file = H5FL_CALLOC(H5FD_hdfs_t);
- if (file == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
- "unable to allocate file struct")
- }
+ if(file == NULL)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file struct")
file->hdfs_handle = handle;
HDmemcpy(&(file->fa), &fa, sizeof(H5FD_hdfs_fapl_t));
#if HDFS_STATS
- if (FAIL == hdfs_reset_stats(file)) {
- HGOTO_ERROR(H5E_INTERNAL, H5E_UNINITIALIZED, NULL,
- "unable to reset file statistics")
- }
+ if(FAIL == hdfs__reset_stats(file))
+ HGOTO_ERROR(H5E_INTERNAL, H5E_UNINITIALIZED, NULL, "unable to reset file statistics")
#endif /* HDFS_STATS */
ret_value = (H5FD_t*)file;
done:
- if (ret_value == NULL) {
- if (handle != NULL) {
- if (FAIL == H5FD_hdfs_handle_close(handle)) {
- HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL,
- "unable to close HDFS file handle")
- }
- }
- if (file != NULL) {
+ if(ret_value == NULL) {
+ if(handle != NULL)
+ if(FAIL == H5FD__hdfs_handle_close(handle))
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL, "unable to close HDFS file handle")
+ if(file != NULL)
file = H5FL_FREE(H5FD_hdfs_t, file);
- }
} /* end if null return value (error) */
FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FD__hdfs_open() */
-} /* H5FD_hdfs_open() */
-
-#else /* H5_HAVE_LIBHDFS not defined */
-
-static H5FD_t *
-H5FD_hdfs_open(
- const char H5_ATTR_UNUSED *path,
- unsigned H5_ATTR_UNUSED flags,
- hid_t H5_ATTR_UNUSED fapl_id,
- haddr_t H5_ATTR_UNUSED maxaddr)
-{
- H5FD_t *ret_value = NULL;
-
- FUNC_ENTER_NOAPI_NOINIT
-
- HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL,
- "Illegal open of unsupported virtual file (hdfs)");
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5FD_hdfs_open() */
-
-#endif /* H5_HAVE_LIBHDFS */
#if HDFS_STATS
/*----------------------------------------------------------------------------
*
- * Function: hdfs_fprint_stats()
+ * Function: hdfs__fprint_stats()
*
* Purpose:
*
@@ -1186,14 +1002,10 @@ done:
*
* Programmer: Jacob Smith
*
- * Changes: None.
- *
*----------------------------------------------------------------------------
*/
static herr_t
-hdfs_fprint_stats(
- FILE *stream,
- const H5FD_hdfs_t *file)
+hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file)
{
herr_t ret_value = SUCCEED;
parsed_url_t *purl = NULL;
@@ -1212,49 +1024,43 @@ hdfs_fprint_stats(
unsigned suffix_i = 0;
const char suffixes[] = { ' ', 'K', 'M', 'G', 'T', 'P' };
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- if (stream == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "file stream cannot be null" )
- }
- if (file == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "file cannot be null")
- }
- if (file->hdfs_handle == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "hdfs handle cannot be null")
- }
- if (file->hdfs_handle->magic != HDFS_HDFST_MAGIC) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "hdfs handle has invalid magic")
- }
+ if(stream == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file stream cannot be null")
+ if(file == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file cannot be null")
+ if(file->hdfs_handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hdfs handle cannot be null")
+ if(file->hdfs_handle->magic != HDFS_HDFST_MAGIC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hdfs handle has invalid magic")
/*******************
* AGGREGATE STATS *
*******************/
- for (i = 0; i <= HDFS_STATS_BIN_COUNT; i++) {
+ for(i = 0; i <= HDFS_STATS_BIN_COUNT; i++) {
const hdfs_statsbin *r = &file->raw[i];
const hdfs_statsbin *m = &file->meta[i];
- if (m->min < min_meta) { min_meta = m->min; }
- if (r->min < min_raw) { min_raw = r->min; }
- if (m->max > max_meta) { max_meta = m->max; }
- if (r->max > max_raw) { max_raw = r->max; }
+ if(m->min < min_meta)
+ min_meta = m->min;
+ if(r->min < min_raw)
+ min_raw = r->min;
+ if(m->max > max_meta)
+ max_meta = m->max;
+ if(r->max > max_raw)
+ max_raw = r->max;
count_raw += r->count;
count_meta += m->count;
bytes_raw += r->bytes;
bytes_meta += m->bytes;
}
- if (count_raw > 0) {
+ if(count_raw > 0)
average_raw = (double)bytes_raw / (double)count_raw;
- }
- if (count_meta > 0) {
+ if(count_meta > 0)
average_meta = (double)bytes_meta / (double)count_meta;
- }
/******************
* PRINT OVERVIEW *
@@ -1265,9 +1071,8 @@ hdfs_fprint_stats(
HDfprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n",
bytes_raw + bytes_meta, bytes_meta, bytes_raw);
- if (count_raw + count_meta == 0) {
+ if(count_raw + count_meta == 0)
goto done;
- }
/*************************
* PRINT AGGREGATE STATS *
@@ -1275,55 +1080,49 @@ hdfs_fprint_stats(
HDfprintf(stream, "SIZES meta raw\n");
HDfprintf(stream, " min ");
- if (count_meta == 0) {
+ if(count_meta == 0)
HDfprintf(stream, " 0.000 ");
- } else {
+ else {
re_dub = (double)min_meta;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) {
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- }
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
}
- if (count_raw == 0) {
+ if(count_raw == 0)
HDfprintf(stream, " 0.000 \n");
- } else {
+ else {
re_dub = (double)min_raw;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) {
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- }
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
}
HDfprintf(stream, " avg ");
re_dub = (double)average_meta;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) {
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- }
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
re_dub = (double)average_raw;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) {
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- }
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
HDfprintf(stream, " max ");
re_dub = (double)max_meta;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) {
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- }
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
re_dub = (double)max_raw;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) {
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- }
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
@@ -1336,7 +1135,7 @@ hdfs_fprint_stats(
HDfprintf(stream,
" up-to meta raw meta raw meta raw\n");
- for (i = 0; i <= HDFS_STATS_BIN_COUNT; i++) {
+ for(i = 0; i <= HDFS_STATS_BIN_COUNT; i++) {
const hdfs_statsbin *m;
const hdfs_statsbin *r;
unsigned long long range_end = 0;
@@ -1351,55 +1150,47 @@ hdfs_fprint_stats(
m = &file->meta[i];
r = &file->raw[i];
- if (r->count == 0 && m->count == 0) {
+ if(r->count == 0 && m->count == 0)
continue;
- }
range_end = hdfs_stats_boundaries[i];
- if (i == HDFS_STATS_BIN_COUNT) {
+ if(i == HDFS_STATS_BIN_COUNT) {
range_end = hdfs_stats_boundaries[i-1];
HDfprintf(stream, ">");
- } else {
- HDfprintf(stream, " ");
}
+ else
+ HDfprintf(stream, " ");
bm_val = (double)m->bytes;
- for (suffix_i = 0; bm_val >= 1024.0; suffix_i++) {
+ for(suffix_i = 0; bm_val >= 1024.0; suffix_i++)
bm_val /= 1024.0;
- }
HDassert(suffix_i < sizeof(suffixes));
bm_suffix = suffixes[suffix_i];
br_val = (double)r->bytes;
- for (suffix_i = 0; br_val >= 1024.0; suffix_i++) {
+ for(suffix_i = 0; br_val >= 1024.0; suffix_i++)
br_val /= 1024.0;
- }
HDassert(suffix_i < sizeof(suffixes));
br_suffix = suffixes[suffix_i];
- if (m->count > 0) {
+ if(m->count > 0)
am_val = (double)(m->bytes) / (double)(m->count);
- }
- for (suffix_i = 0; am_val >= 1024.0; suffix_i++) {
+ for(suffix_i = 0; am_val >= 1024.0; suffix_i++)
am_val /= 1024.0;
- }
HDassert(suffix_i < sizeof(suffixes));
am_suffix = suffixes[suffix_i];
- if (r->count > 0) {
+ if(r->count > 0)
ar_val = (double)(r->bytes) / (double)(r->count);
- }
- for (suffix_i = 0; ar_val >= 1024.0; suffix_i++) {
+ for(suffix_i = 0; ar_val >= 1024.0; suffix_i++)
ar_val /= 1024.0;
- }
HDassert(suffix_i < sizeof(suffixes));
ar_suffix = suffixes[suffix_i];
re_dub = (double)range_end;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++) {
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
- }
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(
@@ -1412,18 +1203,18 @@ hdfs_fprint_stats(
br_val, br_suffix, /* rawdata bytes */
am_val, am_suffix, /* metadata average */
ar_val, ar_suffix); /* rawdata average */
- fflush(stream);
+ HDfflush(stream);
}
done:
FUNC_LEAVE_NOAPI(ret_value);
-} /* hdfs_fprint_stats */
+} /* hdfs__fprint_stats */
#endif /* HDFS_STATS */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_hdfs_close()
+ * Function: H5FD__hdfs_close()
*
* Purpose:
*
@@ -1436,77 +1227,47 @@ done:
* Programmer: Jacob Smith
* 2017-11-02
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_LIBHDFS
-
static herr_t
-H5FD_hdfs_close(H5FD_t *_file)
+H5FD__hdfs_close(H5FD_t *_file)
{
herr_t ret_value = SUCCEED;
H5FD_hdfs_t *file = (H5FD_hdfs_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_close() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif
- /* Sanity checks
- */
+ /* Sanity checks */
HDassert(file != NULL);
HDassert(file->hdfs_handle != NULL);
HDassert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
- /* Close the underlying request handle
- */
- if (file->hdfs_handle != NULL) {
- if (FAIL == H5FD_hdfs_handle_close(file->hdfs_handle)) {
- HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL,
- "unable to close HDFS file handle")
- }
- }
+ /* Close the underlying request handle */
+ if(file->hdfs_handle != NULL)
+ if(FAIL == H5FD__hdfs_handle_close(file->hdfs_handle))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close HDFS file handle")
#if HDFS_STATS
/* TODO: mechanism to re-target stats printout */
- if (FAIL == hdfs_fprint_stats(stdout, file)) {
- HGOTO_ERROR(H5E_INTERNAL, H5E_ERROR, FAIL,
- "problem while writing file statistics")
- }
+ if(FAIL == hdfs__fprint_stats(stdout, file))
+ HGOTO_ERROR(H5E_INTERNAL, H5E_ERROR, FAIL, "problem while writing file statistics")
#endif /* HDFS_STATS */
- /* Release the file info
- */
+ /* Release the file info */
file = H5FL_FREE(H5FD_hdfs_t, file);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_hdfs_close() */
-
-#else /* H5_HAVE_LIBHDFS not defined */
-
-static herr_t
-H5FD_hdfs_close(H5FD_t H5_ATTR_UNUSED *_file)
-{
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_NOAPI_NOINIT
-
- HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL,
- "Illegal close of unsupported Virtual File (hdfs)")
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_hdfs_close() */
-
-#endif /* H5_HAVE_LIBHDFS */
+} /* end H5FD__hdfs_close() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_hdfs_cmp()
+ * Function: H5FD__hdfs_cmp()
*
* Purpose:
*
@@ -1520,19 +1281,10 @@ done:
* Programmer: Gerd Herber
* May 2018
*
- * Changes:
- *
- * + Replace `if (ret_value == 0)` chain with `HGOTO_DONE` jumps.
- * Jacob Smith 17 May 2018
- *
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_LIBHDFS
-
static int
-H5FD_hdfs_cmp(
- const H5FD_t *_f1,
- const H5FD_t *_f2)
+H5FD__hdfs_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
int ret_value = 0;
const H5FD_hdfs_t *f1 = (const H5FD_hdfs_t *)_f1;
@@ -1540,10 +1292,10 @@ H5FD_hdfs_cmp(
hdfsFileInfo *finfo1 = NULL;
hdfsFileInfo *finfo2 = NULL;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_cmp() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif /* HDFS_DEBUG */
HDassert(f1->hdfs_handle != NULL);
@@ -1556,40 +1308,24 @@ H5FD_hdfs_cmp(
HDassert(finfo1 != NULL);
HDassert(finfo2 != NULL);
- if (finfo1->mKind != finfo2->mKind) { HGOTO_DONE(-1); }
- if (finfo1->mName != finfo2->mName) { HGOTO_DONE(-1); }
- if (finfo1->mLastMod != finfo2->mLastMod) { HGOTO_DONE(-1); }
- if (finfo1->mSize != finfo2->mSize) { HGOTO_DONE(-1); }
- if (finfo1->mReplication != finfo2->mReplication) { HGOTO_DONE(-1); }
- if (finfo1->mBlockSize != finfo2->mBlockSize) { HGOTO_DONE(-1); }
- if (strcmp(finfo1->mOwner, finfo2->mOwner)) { HGOTO_DONE(-1); }
- if (strcmp(finfo1->mGroup, finfo2->mGroup)) { HGOTO_DONE(-1); }
- if (finfo1->mPermissions != finfo2->mPermissions) { HGOTO_DONE(-1); }
- if (finfo1->mLastAccess != finfo2->mLastAccess) { HGOTO_DONE(-1); }
+ if(finfo1->mKind != finfo2->mKind) { HGOTO_DONE(-1); }
+ if(finfo1->mName != finfo2->mName) { HGOTO_DONE(-1); }
+ if(finfo1->mLastMod != finfo2->mLastMod) { HGOTO_DONE(-1); }
+ if(finfo1->mSize != finfo2->mSize) { HGOTO_DONE(-1); }
+ if(finfo1->mReplication != finfo2->mReplication) { HGOTO_DONE(-1); }
+ if(finfo1->mBlockSize != finfo2->mBlockSize) { HGOTO_DONE(-1); }
+ if(HDstrcmp(finfo1->mOwner, finfo2->mOwner)) { HGOTO_DONE(-1); }
+ if(HDstrcmp(finfo1->mGroup, finfo2->mGroup)) { HGOTO_DONE(-1); }
+ if(finfo1->mPermissions != finfo2->mPermissions) { HGOTO_DONE(-1); }
+ if(finfo1->mLastAccess != finfo2->mLastAccess) { HGOTO_DONE(-1); }
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5FD_hdfs_cmp() */
-
-#else /* H5_HAVE_LIBHDFS not defined */
-
-static int
-H5FD_hdfs_cmp(
- const H5FD_t H5_ATTR_UNUSED *_f1,
- const H5FD_t H5_ATTR_UNUSED *_f2)
-{
- int ret_value = 0;
-
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5FD_hdfs_cmp() */
-
-#endif /* H5_HAVE_LIBHDFS */
+} /* H5FD__hdfs_cmp() */
/*-------------------------------------------------------------------------
- * Function: H5FD_hdfs_query
+ * Function: H5FD__hdfs_query
*
* Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
@@ -1608,28 +1344,26 @@ H5FD_hdfs_cmp(
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_hdfs_query(
- const H5FD_t H5_ATTR_UNUSED *_file,
- unsigned long *flags) /* out variable */
+H5FD__hdfs_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_query() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif
- if (flags) {
+ if(flags) {
*flags = 0;
*flags |= H5FD_FEAT_DATA_SIEVE;
}
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5FD_hdfs_query() */
+} /* H5FD__hdfs_query() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_hdfs_get_eoa()
+ * Function: H5FD__hdfs_get_eoa()
*
* Purpose:
*
@@ -1644,50 +1378,26 @@ H5FD_hdfs_query(
* Programmer: Jacob Smith
* 2017-11-02
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_LIBHDFS
-
static haddr_t
-H5FD_hdfs_get_eoa(
- const H5FD_t *_file,
- H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__hdfs_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_hdfs_t *file = (const H5FD_hdfs_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_get_eoa() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif
FUNC_LEAVE_NOAPI(file->eoa)
-} /* end H5FD_hdfs_get_eoa() */
-
-#else /* H5_HAVE_LIBHDFS not defined */
-
-static haddr_t
-H5FD_hdfs_get_eoa(
- const H5FD_t H5_ATTR_UNUSED *_file,
- H5FD_mem_t H5_ATTR_UNUSED type)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
-#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_get_eoa() called.\n");
-#endif
-
- FUNC_LEAVE_NOAPI(0)
-} /* end H5FD_hdfs_get_eoa() */
-
-#endif /* H5_HAVE_LIBHDFS */
+} /* end H5FD__hdfs_get_eoa() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_hdfs_set_eoa()
+ * Function: H5FD__hdfs_set_eoa()
*
* Purpose:
*
@@ -1700,54 +1410,28 @@ H5FD_hdfs_get_eoa(
* Programmer: Jacob Smith
* 2017-11-03
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_LIBHDFS
-
static herr_t
-H5FD_hdfs_set_eoa(
- H5FD_t *_file,
- H5FD_mem_t H5_ATTR_UNUSED type,
- haddr_t addr)
+H5FD__hdfs_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
H5FD_hdfs_t *file = (H5FD_hdfs_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_set_eoa() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif
file->eoa = addr;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5FD_hdfs_set_eoa() */
-
-#else /* H5_HAVE_LIBHDFS not defined */
-
-static herr_t
-H5FD_hdfs_set_eoa(
- H5FD_t H5_ATTR_UNUSED *_file,
- H5FD_mem_t H5_ATTR_UNUSED type,
- haddr_t H5_ATTR_UNUSED addr)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
-#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_set_eoa() called.\n");
-#endif
-
- FUNC_LEAVE_NOAPI(FAIL)
-} /* H5FD_hdfs_set_eoa() */
-
-#endif /* H5_HAVE_LIBHDFS */
+} /* H5FD__hdfs_set_eoa() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_hdfs_get_eof()
+ * Function: H5FD__hdfs_get_eof()
*
* Purpose:
*
@@ -1763,49 +1447,27 @@ H5FD_hdfs_set_eoa(
*
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_LIBHDFS
-
static haddr_t
-H5FD_hdfs_get_eof(
- const H5FD_t *_file,
- H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__hdfs_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_hdfs_t *file = (const H5FD_hdfs_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_get_eof() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif
HDassert(file->hdfs_handle != NULL);
HDassert(file->hdfs_handle->magic == HDFS_HDFST_MAGIC);
FUNC_LEAVE_NOAPI((size_t) file->hdfs_handle->fileinfo->mSize)
-} /* end H5FD_hdfs_get_eof() */
-
-#else /* H5_HAVE_LIBHDFS not defined */
-
-static haddr_t
-H5FD_hdfs_get_eof(
- const H5FD_t H5_ATTR_UNUSED *_file,
- H5FD_mem_t H5_ATTR_UNUSED type)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
-#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_get_eof() called.\n");
-#endif
-
- FUNC_LEAVE_NOAPI((size_t)0)
-} /* end H5FD_hdfs_get_eof() */
-
-#endif /* H5_HAVE_LIBHDFS */
+} /* end H5FD__hdfs_get_eof() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_hdfs_get_handle()
+ * Function: H5FD__hdfs_get_handle()
*
* Purpose:
*
@@ -1818,67 +1480,33 @@ H5FD_hdfs_get_eof(
* Programmer: Jacob Smith
* 2017-11-02
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_LIBHDFS
-
static herr_t
-H5FD_hdfs_get_handle(
- H5FD_t *_file,
- hid_t H5_ATTR_UNUSED fapl,
- void **file_handle)
+H5FD__hdfs_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
{
herr_t ret_value = SUCCEED;
H5FD_hdfs_t *file = (H5FD_hdfs_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_get_handle() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif /* HDFS_DEBUG */
- if (!file_handle) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "file handle not valid")
- }
+ if(!file_handle)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
*file_handle = file->hdfs_handle;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_hdfs_get_handle() */
-
-#else /* H5_HAVE_LIBHDFS not defined */
-
-static herr_t
-H5FD_hdfs_get_handle(
- H5FD_t H5_ATTR_UNUSED *_file,
- hid_t H5_ATTR_UNUSED fapl,
- void H5_ATTR_UNUSED **file_handle)
-{
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_NOAPI_NOINIT
-
-#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_get_handle() called.\n");
-#endif /* HDFS_DEBUG */
-
- HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL,
- "Illegal get-handle of unsupported virtual file (hdfs)");
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_hdfs_get_handle() */
-
-#endif /* H5_HAVE_LIBHDFS */
+} /* end H5FD__hdfs_get_handle() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_hdfs_read()
+ * Function: H5FD__hdfs_read()
*
* Purpose:
*
@@ -1896,20 +1524,11 @@ done:
* Programmer: Jacob Smith
* 2017-11-??
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_LIBHDFS
-
static herr_t
-H5FD_hdfs_read(
- H5FD_t *_file,
- H5FD_mem_t H5_ATTR_UNUSED type,
- hid_t H5_ATTR_UNUSED dxpl_id,
- haddr_t addr, /* start offset */
- size_t size, /* length of read */
- void *buf) /* out */
+H5FD__hdfs_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type,
+ hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, size_t size, void *buf)
{
herr_t ret_value = SUCCEED;
H5FD_hdfs_t *file = (H5FD_hdfs_t *)_file;
@@ -1920,10 +1539,10 @@ H5FD_hdfs_read(
unsigned bin_i = 0;
#endif /* HDFS_STATS */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_read() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif /* HDFS_DEBUG */
HDassert(file != NULL);
@@ -1933,44 +1552,33 @@ H5FD_hdfs_read(
filesize = (size_t) file->hdfs_handle->fileinfo->mSize;
- if ((addr > filesize) || ((addr + size) > filesize)) {
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL,
- "range exceeds file address")
- }
+ if((addr > filesize) || ((addr + size) > filesize))
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "range exceeds file address")
- if (FAIL == hdfsPread(
- file->hdfs_handle->filesystem,
- file->hdfs_handle->file,
- (tOffset)addr,
- buf,
- (tSize)size))
- {
- HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL,
- "unable to execute read")
- }
+ if(FAIL == hdfsPread(file->hdfs_handle->filesystem, file->hdfs_handle->file,
+ (tOffset)addr, buf, (tSize)size))
+ HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "unable to execute read")
#if HDFS_STATS
- /* Find which "bin" this read fits in. Can be "overflow" bin.
- */
- for (bin_i = 0; bin_i < HDFS_STATS_BIN_COUNT; bin_i++) {
- if ((unsigned long long)size < hdfs_stats_boundaries[bin_i]) {
+ /* Find which "bin" this read fits in. Can be "overflow" bin. */
+ for(bin_i = 0; bin_i < HDFS_STATS_BIN_COUNT; bin_i++)
+ if((unsigned long long)size < hdfs_stats_boundaries[bin_i])
break;
- }
- }
bin = (type == H5FD_MEM_DRAW)
? &file->raw[bin_i]
: &file->meta[bin_i];
- /* Store collected stats in appropriate bin
- */
- if (bin->count == 0) {
+ /* Store collected stats in appropriate bin */
+ if(bin->count == 0) {
bin->min = size;
bin->max = size;
}
else {
- if (size < bin->min) { bin->min = size; }
- if (size > bin->max) { bin->max = size; }
+ if(size < bin->min)
+ bin->min = size;
+ if(size > bin->max)
+ bin->max = size;
}
bin->count++;
bin->bytes += (unsigned long long)size;
@@ -1979,40 +1587,12 @@ H5FD_hdfs_read(
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_hdfs_read() */
-
-#else /* H5_HAVE_LIBHDFS not defined */
-
-static herr_t
-H5FD_hdfs_read(
- H5FD_t H5_ATTR_UNUSED *_file,
- H5FD_mem_t H5_ATTR_UNUSED type,
- hid_t H5_ATTR_UNUSED dxpl_id,
- haddr_t H5_ATTR_UNUSED addr,
- size_t H5_ATTR_UNUSED size,
- void H5_ATTR_UNUSED *buf)
-{
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_NOAPI_NOINIT
-
-#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_read() called.\n");
-#endif /* HDFS_DEBUG */
-
- HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL,
- "Illegal get-handle of unsupported virtual file (hdfs)");
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_hdfs_read() */
-
-#endif /* H5_HAVE_LIBHDFS */
+} /* end H5FD__hdfs_read() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_hdfs_write()
+ * Function: H5FD__hdfs_write()
*
* Purpose:
*
@@ -2026,38 +1606,31 @@ done:
* Programmer: Jacob Smith
* 2017-10-23
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_hdfs_write(
- H5FD_t H5_ATTR_UNUSED *_file,
- H5FD_mem_t H5_ATTR_UNUSED type,
- hid_t H5_ATTR_UNUSED dxpl_id,
- haddr_t H5_ATTR_UNUSED addr,
- size_t H5_ATTR_UNUSED size,
- const void H5_ATTR_UNUSED *buf)
+H5FD__hdfs_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type,
+ hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr, size_t H5_ATTR_UNUSED size,
+ const void H5_ATTR_UNUSED *buf)
{
herr_t ret_value = FAIL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_write() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif
- HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL,
- "cannot write to read-only file.")
+ HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5FD_hdfs_write() */
+} /* H5FD__hdfs_write() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_hdfs_truncate()
+ * Function: H5FD__hdfs_truncate()
*
* Purpose:
*
@@ -2073,35 +1646,30 @@ done:
* Programmer: Jacob Smith
* 2017-10-23
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_hdfs_truncate(
- H5FD_t H5_ATTR_UNUSED *_file,
- hid_t H5_ATTR_UNUSED dxpl_id,
- hbool_t H5_ATTR_UNUSED closing)
+H5FD__hdfs_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id,
+ hbool_t H5_ATTR_UNUSED closing)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if HDFS_DEBUG
- HDfprintf(stdout, "H5FD_hdfs_truncate() called.\n");
+ HDfprintf(stdout, "called %s.\n", FUNC);
#endif
- HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL,
- "cannot truncate read-only file.")
+ HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_hdfs_truncate() */
+} /* end H5FD__hdfs_truncate() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_hdfs_lock()
+ * Function: H5FD__hdfs_lock()
*
* Purpose:
*
@@ -2118,23 +1686,22 @@ done:
* Programmer: Jacob Smith
* 2017-11-03
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_hdfs_lock(
+H5FD__hdfs_lock(
H5FD_t H5_ATTR_UNUSED *_file,
hbool_t H5_ATTR_UNUSED rw)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
+
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_hdfs_lock() */
+} /* end H5FD__hdfs_lock() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_hdfs_unlock()
+ * Function: H5FD__hdfs_unlock()
*
* Purpose:
*
@@ -2148,14 +1715,14 @@ H5FD_hdfs_lock(
* Programmer: Jacob Smith
* 2017-11-03
*
- * Changes: None.
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_hdfs_unlock(H5FD_t H5_ATTR_UNUSED *_file)
+H5FD__hdfs_unlock(H5FD_t H5_ATTR_UNUSED *_file)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
+
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_hdfs_unlock() */
+} /* end H5FD__hdfs_unlock() */
+#endif /* H5_HAVE_LIBHDFS */
diff --git a/src/H5FDhdfs.h b/src/H5FDhdfs.h
index 37252f0..d67ab9e 100644
--- a/src/H5FDhdfs.h
+++ b/src/H5FDhdfs.h
@@ -22,8 +22,13 @@
#ifndef H5FDhdfs_H
#define H5FDhdfs_H
-#define H5FD_HDFS (H5FD_hdfs_init())
+#ifdef H5_HAVE_LIBHDFS
+#define H5FD_HDFS (H5FD_hdfs_init())
+#else /* H5_HAVE_LIBHDFS */
+#define H5FD_HDFS (-1)
+#endif /* H5_HAVE_LIBHDFS */
+#ifdef H5_HAVE_LIBHDFS
#ifdef __cplusplus
extern "C" {
#endif
@@ -90,8 +95,6 @@ extern "C" {
* Programmer: Jacob Smith
* 2018-04-23
*
- * Changes: None
- *
****************************************************************************/
#define H5FD__CURR_HDFS_FAPL_T_VERSION 1
@@ -116,7 +119,7 @@ H5_DLL herr_t H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa);
#ifdef __cplusplus
}
#endif
+#endif /* H5_HAVE_LIBHDFS */
#endif /* ifndef H5FDhdfs_H */
-
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index c0506e9..5d1b536 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Monday, April 17, 2000
*
* Purpose: The POSIX unbuffered file driver using only the HDF5 public
@@ -155,71 +155,71 @@ typedef struct H5FD_log_t {
* which can be addressed entirely by the second
* argument of the file seek function.
*/
-#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (HDoff_t)((A)+(Z))<(HDoff_t)(A))
+ HADDR_UNDEF == (A) + (Z) || \
+ (HDoff_t)((A) + (Z)) < (HDoff_t)(A))
/* Prototypes */
-static herr_t H5FD_log_term(void);
-static void *H5FD_log_fapl_get(H5FD_t *file);
-static void *H5FD_log_fapl_copy(const void *_old_fa);
-static herr_t H5FD_log_fapl_free(void *_fa);
-static H5FD_t *H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id,
+static herr_t H5FD__log_term(void);
+static void *H5FD__log_fapl_get(H5FD_t *file);
+static void *H5FD__log_fapl_copy(const void *_old_fa);
+static herr_t H5FD__log_fapl_free(void *_fa);
+static H5FD_t *H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
-static herr_t H5FD_log_close(H5FD_t *_file);
-static int H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_log_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
+static herr_t H5FD__log_close(H5FD_t *_file);
+static int H5FD__log_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD__log_query(const H5FD_t *_f1, unsigned long *flags);
+static haddr_t H5FD__log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
static herr_t H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
hsize_t size);
-static haddr_t H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
-static haddr_t H5FD_log_get_eof(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_log_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
+static haddr_t H5FD__log_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static haddr_t H5FD__log_get_eof(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__log_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
+static herr_t H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, void *buf);
-static herr_t H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
+static herr_t H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, const void *buf);
-static herr_t H5FD_log_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_log_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_log_unlock(H5FD_t *_file);
+static herr_t H5FD__log_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__log_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__log_unlock(H5FD_t *_file);
static const H5FD_class_t H5FD_log_g = {
- "log", /*name */
- MAXADDR, /*maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
- H5FD_log_term, /*terminate */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- sizeof(H5FD_log_fapl_t), /*fapl_size */
- H5FD_log_fapl_get, /*fapl_get */
- H5FD_log_fapl_copy, /*fapl_copy */
- H5FD_log_fapl_free, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_log_open, /*open */
- H5FD_log_close, /*close */
- H5FD_log_cmp, /*cmp */
- H5FD_log_query, /*query */
- NULL, /*get_type_map */
- H5FD_log_alloc, /*alloc */
- H5FD__log_free, /*free */
- H5FD_log_get_eoa, /*get_eoa */
- H5FD_log_set_eoa, /*set_eoa */
- H5FD_log_get_eof, /*get_eof */
- H5FD_log_get_handle, /*get_handle */
- H5FD_log_read, /*read */
- H5FD_log_write, /*write */
- NULL, /*flush */
- H5FD_log_truncate, /*truncate */
- H5FD_log_lock, /*lock */
- H5FD_log_unlock, /*unlock */
- H5FD_FLMAP_DICHOTOMY /*fl_map */
+ "log", /* name */
+ MAXADDR, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD__log_term, /* terminate */
+ NULL, /* sb_size */
+ NULL, /* sb_encode */
+ NULL, /* sb_decode */
+ sizeof(H5FD_log_fapl_t), /* fapl_size */
+ H5FD__log_fapl_get, /* fapl_get */
+ H5FD__log_fapl_copy, /* fapl_copy */
+ H5FD__log_fapl_free, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD__log_open, /* open */
+ H5FD__log_close, /* close */
+ H5FD__log_cmp, /* cmp */
+ H5FD__log_query, /* query */
+ NULL, /* get_type_map */
+ H5FD__log_alloc, /* alloc */
+ H5FD__log_free, /* free */
+ H5FD__log_get_eoa, /* get_eoa */
+ H5FD__log_set_eoa, /* set_eoa */
+ H5FD__log_get_eof, /* get_eof */
+ H5FD__log_get_handle, /* get_handle */
+ H5FD__log_read, /* read */
+ H5FD__log_write, /* write */
+ NULL, /* flush */
+ H5FD__log_truncate, /* truncate */
+ H5FD__log_lock, /* lock */
+ H5FD__log_unlock, /* unlock */
+ H5FD_FLMAP_DICHOTOMY /* fl_map */
};
/* Declare a free list to manage the H5FD_log_t struct */
@@ -293,7 +293,7 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_log_term
+ * Function: H5FD__log_term
*
* Purpose: Shut down the VFD
*
@@ -305,15 +305,15 @@ done:
*---------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_term(void)
+H5FD__log_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Reset VFL ID */
H5FD_LOG_g = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_log_term() */
+} /* end H5FD__log_term() */
/*-------------------------------------------------------------------------
@@ -366,7 +366,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_log_fapl_get
+ * Function: H5FD__log_fapl_get
*
* Purpose: Returns a file access property list which indicates how the
* specified file is being accessed. The return list could be
@@ -382,22 +382,22 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5FD_log_fapl_get(H5FD_t *_file)
+H5FD__log_fapl_get(H5FD_t *_file)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Set return value */
- ret_value = H5FD_log_fapl_copy(&(file->fa));
+ ret_value = H5FD__log_fapl_copy(&(file->fa));
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_log_fapl_get() */
+} /* end H5FD__log_fapl_get() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_fapl_copy
+ * Function: H5FD__log_fapl_copy
*
* Purpose: Copies the log-specific file access properties.
*
@@ -410,13 +410,13 @@ H5FD_log_fapl_get(H5FD_t *_file)
*-------------------------------------------------------------------------
*/
static void *
-H5FD_log_fapl_copy(const void *_old_fa)
+H5FD__log_fapl_copy(const void *_old_fa)
{
const H5FD_log_fapl_t *old_fa = (const H5FD_log_fapl_t*)_old_fa;
H5FD_log_fapl_t *new_fa = NULL; /* New FAPL info */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(old_fa);
@@ -444,11 +444,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_log_fapl_copy() */
+} /* end H5FD__log_fapl_copy() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_fapl_free
+ * Function: H5FD__log_fapl_free
*
* Purpose: Frees the log-specific file access properties.
*
@@ -460,11 +460,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_fapl_free(void *_fa)
+H5FD__log_fapl_free(void *_fa)
{
H5FD_log_fapl_t *fa = (H5FD_log_fapl_t*)_fa;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Free the fapl information */
if(fa->logfile)
@@ -472,11 +472,11 @@ H5FD_log_fapl_free(void *_fa)
H5MM_xfree(fa);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_log_fapl_free() */
+} /* end H5FD__log_fapl_free() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_open
+ * Function: H5FD__log_open
*
* Purpose: Create and/or opens a file as an HDF5 file.
*
@@ -491,7 +491,7 @@ H5FD_log_fapl_free(void *_fa)
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
+H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
H5FD_log_t *file = NULL;
H5P_genplist_t *plist; /* Property list */
@@ -506,7 +506,7 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
h5_stat_t sb;
H5FD_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check on file offsets */
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
@@ -673,11 +673,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_log_open() */
+} /* end H5FD__log_open() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_close
+ * Function: H5FD__log_close
*
* Purpose: Closes an HDF5 file.
*
@@ -690,13 +690,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_close(H5FD_t *_file)
+H5FD__log_close(H5FD_t *_file)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
H5_timer_t close_timer; /* Timer for close() call */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(file);
@@ -818,11 +818,11 @@ H5FD_log_close(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_log_close() */
+} /* end H5FD__log_close() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_cmp
+ * Function: H5FD__log_cmp
*
* Purpose: Compares two files belonging to this driver using an
* arbitrary (but consistent) ordering.
@@ -837,13 +837,13 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
+H5FD__log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_log_t *f1 = (const H5FD_log_t *)_f1;
const H5FD_log_t *f2 = (const H5FD_log_t *)_f2;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#ifdef H5_HAVE_WIN32_API
if(f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber) HGOTO_DONE(-1)
@@ -874,11 +874,11 @@ H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_log_cmp() */
+} /* end H5FD__log_cmp() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_query
+ * Function: H5FD__log_query
*
* Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
@@ -891,11 +891,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_query(const H5FD_t *_file, unsigned long *flags /* out */)
+H5FD__log_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
const H5FD_log_t *file = (const H5FD_log_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
@@ -914,11 +914,11 @@ H5FD_log_query(const H5FD_t *_file, unsigned long *flags /* out */)
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_log_query() */
+} /* end H5FD__log_query() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_alloc
+ * Function: H5FD__log_alloc
*
* Purpose: Allocate file memory.
*
@@ -931,13 +931,13 @@ H5FD_log_query(const H5FD_t *_file, unsigned long *flags /* out */)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hsize_t size)
+H5FD__log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hsize_t size)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
haddr_t addr;
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Compute the address for the block to allocate */
addr = file->eoa;
@@ -961,7 +961,7 @@ H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hsi
ret_value = addr;
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_log_alloc() */
+} /* end H5FD__log_alloc() */
/*-------------------------------------------------------------------------
@@ -1002,7 +1002,7 @@ H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
/*-------------------------------------------------------------------------
- * Function: H5FD_log_get_eoa
+ * Function: H5FD__log_get_eoa
*
* Purpose: Gets the end-of-address marker for the file. The EOA marker
* is the first address past the last byte allocated in the
@@ -1017,18 +1017,18 @@ H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__log_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_log_t *file = (const H5FD_log_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
-} /* end H5FD_log_get_eoa() */
+} /* end H5FD__log_get_eoa() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_set_eoa
+ * Function: H5FD__log_set_eoa
*
* Purpose: Set the end-of-address marker for the file. This function is
* called shortly after an existing HDF5 file is opened in order
@@ -1042,11 +1042,11 @@ H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
+H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
if(file->fa.flags != 0) {
/* Check for increasing file size */
@@ -1085,11 +1085,11 @@ H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
file->eoa = addr;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_log_set_eoa() */
+} /* end H5FD__log_set_eoa() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_get_eof
+ * Function: H5FD__log_get_eof
*
* Purpose: Returns the end-of-file marker, which is the greater of
* either the filesystem end-of-file or the HDF5 end-of-address
@@ -1106,18 +1106,18 @@ H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_log_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__log_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_log_t *file = (const H5FD_log_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eof)
-} /* end H5FD_log_get_eof() */
+} /* end H5FD__log_get_eof() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_get_handle
+ * Function: H5FD__log_get_handle
*
* Purpose: Returns the file handle of LOG file driver.
*
@@ -1129,12 +1129,12 @@ H5FD_log_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
+H5FD__log_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -1143,11 +1143,11 @@ H5FD_log_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_log_get_handle() */
+} /* end H5FD__log_get_handle() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_read
+ * Function: H5FD__log_read
*
* Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
* into buffer BUF according to data transfer properties in
@@ -1163,7 +1163,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
+H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
size_t size, void *buf/*out*/)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
@@ -1178,7 +1178,7 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hadd
HDoff_t offset = (HDoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -1349,11 +1349,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_log_read() */
+} /* end H5FD__log_read() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_write
+ * Function: H5FD__log_write
*
* Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
* from buffer BUF according to data transfer properties in
@@ -1367,7 +1367,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
+H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
size_t size, const void *buf)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
@@ -1382,7 +1382,7 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
HDoff_t offset = (HDoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file && file->pub.cls);
HDassert(size > 0);
@@ -1555,11 +1555,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_log_write() */
+} /* end H5FD__log_write() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_truncate
+ * Function: H5FD__log_truncate
*
* Purpose: Makes sure that the true file size is the same (or larger)
* than the end-of-address.
@@ -1572,12 +1572,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -1663,11 +1663,11 @@ H5FD_log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_U
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_log_truncate() */
+} /* end H5FD__log_truncate() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_lock
+ * Function: H5FD__log_lock
*
* Purpose: Place a lock on the file
*
@@ -1679,13 +1679,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_lock(H5FD_t *_file, hbool_t rw)
+H5FD__log_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_log_t *file = (H5FD_log_t *)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(file);
@@ -1707,11 +1707,11 @@ H5FD_log_lock(H5FD_t *_file, hbool_t rw)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_log_lock() */
+} /* end H5FD__log_lock() */
/*-------------------------------------------------------------------------
- * Function: H5FD_log_unlock
+ * Function: H5FD__log_unlock
*
* Purpose: Remove the existing lock on the file
*
@@ -1722,12 +1722,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_unlock(H5FD_t *_file)
+H5FD__log_unlock(H5FD_t *_file)
{
H5FD_log_t *file = (H5FD_log_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -1744,5 +1744,5 @@ H5FD_log_unlock(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_log_unlock() */
+} /* end H5FD__log_unlock() */
diff --git a/src/H5FDlog.h b/src/H5FDlog.h
index a69bb18..db51f3d 100644
--- a/src/H5FDlog.h
+++ b/src/H5FDlog.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Monday, April 17, 2000
*
* Purpose: The public header file for the log driver.
diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c
index ef035c1..6bee4a7 100644
--- a/src/H5FDmirror.c
+++ b/src/H5FDmirror.c
@@ -25,6 +25,7 @@
#include "H5Fprivate.h" /* File access */
#include "H5FDprivate.h" /* File drivers */
#include "H5FDmirror.h" /* "Mirror" definitions */
+#include "H5FDmirror_priv.h" /* Private header for the mirror VFD */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
@@ -136,32 +137,32 @@ typedef struct H5FD_mirror_t {
#if MIRROR_DEBUG_OP_CALLS
#define LOG_OP_CALL(name) do { \
HDprintf("called %s()\n", (name)); \
- fflush(stdout); \
+ HDfflush(stdout); \
} while (0)
#else
#define LOG_OP_CALL(name) /* no-op */
#endif /* MIRROR_DEBUG_OP_CALLS */
/* Prototypes */
-static herr_t H5FD_mirror_term(void);
-static void *H5FD_mirror_fapl_get(H5FD_t *_file);
-static void *H5FD_mirror_fapl_copy(const void *_old_fa);
-static herr_t H5FD_mirror_fapl_free(void *_fa);
-static haddr_t H5FD_mirror_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_mirror_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
-static haddr_t H5FD_mirror_get_eof(const H5FD_t *_file, H5FD_mem_t type);
-static H5FD_t *H5FD_mirror_open(const char *name, unsigned flags, \
+static herr_t H5FD__mirror_term(void);
+static void *H5FD__mirror_fapl_get(H5FD_t *_file);
+static void *H5FD__mirror_fapl_copy(const void *_old_fa);
+static herr_t H5FD__mirror_fapl_free(void *_fa);
+static haddr_t H5FD__mirror_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__mirror_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static haddr_t H5FD__mirror_get_eof(const H5FD_t *_file, H5FD_mem_t type);
+static H5FD_t *H5FD__mirror_open(const char *name, unsigned flags,
hid_t fapl_id, haddr_t maxaddr);
-static herr_t H5FD_mirror_close(H5FD_t *_file);
-static herr_t H5FD_mirror_query(const H5FD_t *_file, unsigned long *flags);
-static herr_t H5FD_mirror_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, \
+static herr_t H5FD__mirror_close(H5FD_t *_file);
+static herr_t H5FD__mirror_query(const H5FD_t *_file, unsigned long *flags);
+static herr_t H5FD__mirror_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
haddr_t addr, size_t size, const void *buf);
-static herr_t H5FD_mirror_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
+static herr_t H5FD__mirror_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
haddr_t addr, size_t size, void *buf);
-static herr_t H5FD_mirror_truncate(H5FD_t *_file, hid_t dxpl_id, \
+static herr_t H5FD__mirror_truncate(H5FD_t *_file, hid_t dxpl_id,
hbool_t closing);
-static herr_t H5FD_mirror_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_mirror_unlock(H5FD_t *_file);
+static herr_t H5FD__mirror_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__mirror_unlock(H5FD_t *_file);
static herr_t H5FD__mirror_verify_reply(H5FD_mirror_t *file);
@@ -169,40 +170,46 @@ static const H5FD_class_t H5FD_mirror_g = {
"mirror", /* name */
MAXADDR, /* maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
- H5FD_mirror_term, /* terminate */
+ H5FD__mirror_term, /* terminate */
NULL, /* sb_size */
NULL, /* sb_encode */
NULL, /* sb_decode */
0, /* fapl_size */
- H5FD_mirror_fapl_get, /* fapl_get */
- H5FD_mirror_fapl_copy, /* fapl_copy */
- H5FD_mirror_fapl_free, /* fapl_free */
+ H5FD__mirror_fapl_get, /* fapl_get */
+ H5FD__mirror_fapl_copy, /* fapl_copy */
+ H5FD__mirror_fapl_free, /* fapl_free */
0, /* dxpl_size */
NULL, /* dxpl_copy */
NULL, /* dxpl_free */
- H5FD_mirror_open, /* open */
- H5FD_mirror_close, /* close */
+ H5FD__mirror_open, /* open */
+ H5FD__mirror_close, /* close */
NULL, /* cmp */
- H5FD_mirror_query, /* query */
+ H5FD__mirror_query, /* query */
NULL, /* get_type_map */
NULL, /* alloc */
NULL, /* free */
- H5FD_mirror_get_eoa, /* get_eoa */
- H5FD_mirror_set_eoa, /* set_eoa */
- H5FD_mirror_get_eof, /* get_eof */
+ H5FD__mirror_get_eoa, /* get_eoa */
+ H5FD__mirror_set_eoa, /* set_eoa */
+ H5FD__mirror_get_eof, /* get_eof */
NULL, /* get_handle */
- H5FD_mirror_read, /* read */
- H5FD_mirror_write, /* write */
+ H5FD__mirror_read, /* read */
+ H5FD__mirror_write, /* write */
NULL, /* flush */
- H5FD_mirror_truncate, /* truncate */
- H5FD_mirror_lock, /* lock */
- H5FD_mirror_unlock, /* unlock */
+ H5FD__mirror_truncate, /* truncate */
+ H5FD__mirror_lock, /* lock */
+ H5FD__mirror_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
+/* Declare a free list to manage the transmission buffers */
+H5FL_BLK_DEFINE_STATIC(xmit);
+
/* Declare a free list to manage the H5FD_mirror_t struct */
H5FL_DEFINE_STATIC(H5FD_mirror_t);
+/* Declare a free list to manage the H5FD_mirror_xmit_open_t struct */
+H5FL_DEFINE_STATIC(H5FD_mirror_xmit_open_t);
+
/*-------------------------------------------------------------------------
* Function: H5FD__init_package
@@ -219,12 +226,10 @@ H5FD__init_package(void)
FUNC_ENTER_STATIC
- LOG_OP_CALL("H5FD__init_package");
+ LOG_OP_CALL(FUNC);
- if (H5FD_mirror_init() < 0) {
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL,
- "unable to initialize mirror VFD");
- }
+ if(H5FD_mirror_init() < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize mirror VFD");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -248,12 +253,10 @@ H5FD_mirror_init(void)
FUNC_ENTER_NOAPI(FAIL)
- LOG_OP_CALL("H5FD_mirror_init");
+ LOG_OP_CALL(FUNC);
- if (H5I_VFL != H5I_get_type(H5FD_MIRROR_g)) {
- H5FD_MIRROR_g = H5FD_register(&H5FD_mirror_g, sizeof(H5FD_class_t),
- FALSE);
- }
+ if(H5I_VFL != H5I_get_type(H5FD_MIRROR_g))
+ H5FD_MIRROR_g = H5FD_register(&H5FD_mirror_g, sizeof(H5FD_class_t), FALSE);
ret_value = H5FD_MIRROR_g;
@@ -263,7 +266,7 @@ done:
/* ---------------------------------------------------------------------------
- * Function: H5FD_mirror_term
+ * Function: H5FD__mirror_term
*
* Purpose: Shut down the VFD
*
@@ -271,17 +274,17 @@ done:
* ---------------------------------------------------------------------------
*/
static herr_t
-H5FD_mirror_term(void)
+H5FD__mirror_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Reset VFL ID */
H5FD_MIRROR_g = 0;
- LOG_OP_CALL("H5FD_mirror_term");
+ LOG_OP_CALL(FUNC);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_mirror_term() */
+} /* end H5FD__mirror_term() */
/* ---------------------------------------------------------------------------
@@ -301,10 +304,14 @@ size_t
H5FD__mirror_xmit_decode_uint16(uint16_t *out, const unsigned char *_buf)
{
uint16_t n = 0;
- LOG_OP_CALL("H5FD__mirror_xmit_decode_uint16");
+
+ LOG_OP_CALL(__func__);
+
HDassert(_buf && out);
+
HDmemcpy(&n, _buf, sizeof(n));
*out = (uint16_t)HDntohs(n);
+
return 2; /* number of bytes eaten */
} /* end H5FD__mirror_xmit_decode_uint16() */
@@ -326,14 +333,17 @@ size_t
H5FD__mirror_xmit_decode_uint32(uint32_t *out, const unsigned char *_buf)
{
uint32_t n = 0;
- LOG_OP_CALL("H5FD__mirror_xmit_decode_uint32");
+
+ LOG_OP_CALL(__func__);
+
HDassert(_buf && out);
+
HDmemcpy(&n, _buf, sizeof(n));
*out = (uint32_t)HDntohl(n);
+
return 4; /* number of bytes eaten */
} /* end H5FD__mirror_xmit_decode_uint32() */
-
/* ---------------------------------------------------------------------------
* Function: is_host_little_endian
@@ -357,12 +367,11 @@ is_host_little_endian(void)
uint8_t u8[4];
} echeck;
echeck.u32 = 0xA1B2C3D4;
- if (echeck.u8[0] == 0xD4) {
+
+ if(echeck.u8[0] == 0xD4)
return TRUE;
- }
- else {
+ else
return FALSE;
- }
} /* end is_host_little_endian() */
@@ -385,15 +394,17 @@ size_t
H5FD__mirror_xmit_decode_uint64(uint64_t *out, const unsigned char *_buf)
{
uint64_t n = 0;
- LOG_OP_CALL("H5FD__mirror_xmit_decode_uint64");
+
+ LOG_OP_CALL(__func__);
+
HDassert(_buf && out);
+
HDmemcpy(&n, _buf, sizeof(n));
- if (TRUE == is_host_little_endian()) {
+ if(TRUE == is_host_little_endian())
*out = BSWAP_64(n);
- }
- else {
+ else
*out = n;
- }
+
return 8;
} /* end H5FD__mirror_xmit_decode_uint64() */
@@ -412,9 +423,12 @@ H5FD__mirror_xmit_decode_uint64(uint64_t *out, const unsigned char *_buf)
size_t
H5FD__mirror_xmit_decode_uint8(uint8_t *out, const unsigned char *_buf)
{
- LOG_OP_CALL("H5FD__mirror_xmit_decode_uint8");
+ LOG_OP_CALL(__func__);
+
HDassert(_buf && out);
+
HDmemcpy(out, _buf, sizeof(uint8_t));
+
return 1; /* number of bytes eaten */
} /* end H5FD__mirror_xmit_decode_uint8() */
@@ -435,10 +449,14 @@ size_t
H5FD__mirror_xmit_encode_uint16(unsigned char *_dest, uint16_t v)
{
uint16_t n = 0;
- LOG_OP_CALL("H5FD__mirror_xmit_encode_uint16");
+
+ LOG_OP_CALL(__func__);
+
HDassert(_dest);
+
n = (uint16_t)HDhtons(v);
HDmemcpy(_dest, &n, sizeof(n));
+
return 2;
} /* end H5FD__mirror_xmit_encode_uint16() */
@@ -459,10 +477,14 @@ size_t
H5FD__mirror_xmit_encode_uint32(unsigned char *_dest, uint32_t v)
{
uint32_t n = 0;
- LOG_OP_CALL("H5FD__mirror_xmit_encode_uint32");
+
+ LOG_OP_CALL(__func__);
+
HDassert(_dest);
+
n = (uint32_t)HDhtonl(v);
HDmemcpy(_dest, &n, sizeof(n));
+
return 4;
} /* end H5FD__mirror_xmit_encode_uint32() */
@@ -483,12 +505,15 @@ size_t
H5FD__mirror_xmit_encode_uint64(unsigned char *_dest, uint64_t v)
{
uint64_t n = v;
- LOG_OP_CALL("H5FD__mirror_xmit_decode_uint64");
+
+ LOG_OP_CALL(__func__);
+
HDassert(_dest);
- if (TRUE == is_host_little_endian()) {
+
+ if(TRUE == is_host_little_endian())
n = BSWAP_64(v);
- }
HDmemcpy(_dest, &n, sizeof(n));
+
return 8;
} /* H5FD__mirror_xmit_encode_uint64() */
@@ -509,9 +534,12 @@ H5FD__mirror_xmit_encode_uint64(unsigned char *_dest, uint64_t v)
size_t
H5FD__mirror_xmit_encode_uint8(unsigned char *dest, uint8_t v)
{
- LOG_OP_CALL("H5FD__mirror_xmit_encode_uint8");
+ LOG_OP_CALL(__func__);
+
HDassert(dest);
+
HDmemcpy(dest, &v, sizeof(v));
+
return 1;
} /* end H5FD__mirror_xmit_encode_uint8() */
@@ -540,8 +568,11 @@ H5FD_mirror_xmit_decode_header(H5FD_mirror_xmit_t *out,
const unsigned char *buf)
{
size_t n_eaten = 0;
- LOG_OP_CALL("H5FD_mirror_xmit_decode_header");
+
+ LOG_OP_CALL(__func__);
+
HDassert(out && buf);
+
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->magic), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint8(&(out->version), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->session_token),
@@ -550,6 +581,7 @@ H5FD_mirror_xmit_decode_header(H5FD_mirror_xmit_t *out,
&buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint8(&(out->op), &buf[n_eaten]);
HDassert(n_eaten == H5FD_MIRROR_XMIT_HEADER_SIZE);
+
return n_eaten;
} /* end H5FD_mirror_xmit_decode_header() */
@@ -578,11 +610,15 @@ H5FD_mirror_xmit_decode_lock(H5FD_mirror_xmit_lock_t *out,
const unsigned char *buf)
{
size_t n_eaten = 0;
- LOG_OP_CALL("H5FD_mirror_xmit_decode_lock");
+
+ LOG_OP_CALL(__func__);
+
HDassert(out && buf);
+
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->rw), &buf[n_eaten]);
HDassert(n_eaten == H5FD_MIRROR_XMIT_LOCK_SIZE);
+
return n_eaten;
} /* end H5FD_mirror_xmit_decode_lock() */
@@ -612,8 +648,11 @@ H5FD_mirror_xmit_decode_open(H5FD_mirror_xmit_open_t *out,
const unsigned char *buf)
{
size_t n_eaten = 0;
- LOG_OP_CALL("H5FD_mirror_xmit_decode_open");
+
+ LOG_OP_CALL(__func__);
+
HDassert(out && buf);
+
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->flags), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->maxaddr), &buf[n_eaten]);
@@ -622,8 +661,9 @@ H5FD_mirror_xmit_decode_open(H5FD_mirror_xmit_open_t *out,
HDassert((H5FD_MIRROR_XMIT_OPEN_SIZE - H5FD_MIRROR_XMIT_FILEPATH_MAX)
== n_eaten);
HDstrncpy(out->filename, (const char *)&buf[n_eaten],
- H5FD_MIRROR_XMIT_FILEPATH_MAX-1);
- out->filename[H5FD_MIRROR_XMIT_FILEPATH_MAX-1] = 0; /* force final NULL */
+ H5FD_MIRROR_XMIT_FILEPATH_MAX - 1);
+ out->filename[H5FD_MIRROR_XMIT_FILEPATH_MAX - 1] = 0; /* force final NULL */
+
return H5FD_MIRROR_XMIT_OPEN_SIZE;
} /* end H5FD_mirror_xmit_decode_open() */
@@ -653,15 +693,19 @@ H5FD_mirror_xmit_decode_reply(H5FD_mirror_xmit_reply_t *out,
const unsigned char *buf)
{
size_t n_eaten = 0;
- LOG_OP_CALL("H5FD_mirror_xmit_decode_reply");
+
+ LOG_OP_CALL(__func__);
+
HDassert(out && buf);
+
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint32(&(out->status), &buf[n_eaten]);
HDassert((H5FD_MIRROR_XMIT_REPLY_SIZE - H5FD_MIRROR_STATUS_MESSAGE_MAX)
== n_eaten);
HDstrncpy(out->message, (const char *)&buf[n_eaten],
- H5FD_MIRROR_STATUS_MESSAGE_MAX-1);
- out->message[H5FD_MIRROR_STATUS_MESSAGE_MAX-1] = 0; /* force NULL term */
+ H5FD_MIRROR_STATUS_MESSAGE_MAX - 1);
+ out->message[H5FD_MIRROR_STATUS_MESSAGE_MAX - 1] = 0; /* force NULL term */
+
return H5FD_MIRROR_XMIT_REPLY_SIZE;
} /* end H5FD_mirror_xmit_decode_reply() */
@@ -690,12 +734,16 @@ H5FD_mirror_xmit_decode_set_eoa(H5FD_mirror_xmit_eoa_t *out,
const unsigned char *buf)
{
size_t n_eaten = 0;
- LOG_OP_CALL("H5FD_mirror_xmit_decode_set_eoa");
+
+ LOG_OP_CALL(__func__);
+
HDassert(out && buf);
+
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint8(&(out->type), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->eoa_addr), &buf[n_eaten]);
HDassert(n_eaten == H5FD_MIRROR_XMIT_EOA_SIZE);
+
return n_eaten;
} /* end H5FD_mirror_xmit_decode_set_eoa() */
@@ -724,13 +772,17 @@ H5FD_mirror_xmit_decode_write(H5FD_mirror_xmit_write_t *out,
const unsigned char *buf)
{
size_t n_eaten = 0;
- LOG_OP_CALL("H5FD_mirror_xmit_decode_write");
+
+ LOG_OP_CALL(__func__);
+
HDassert(out && buf);
+
n_eaten += H5FD_mirror_xmit_decode_header(&(out->pub), buf);
n_eaten += H5FD__mirror_xmit_decode_uint8(&(out->type), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->offset), &buf[n_eaten]);
n_eaten += H5FD__mirror_xmit_decode_uint64(&(out->size), &buf[n_eaten]);
HDassert(n_eaten == H5FD_MIRROR_XMIT_WRITE_SIZE);
+
return n_eaten;
} /* end H5FD_mirror_xmit_decode_write() */
@@ -754,14 +806,18 @@ H5FD_mirror_xmit_encode_header(unsigned char *dest,
const H5FD_mirror_xmit_t *x)
{
size_t n_writ = 0;
- LOG_OP_CALL("H5FD_mirror_xmit_encode_header");
+
+ LOG_OP_CALL(__func__);
+
HDassert(dest && x);
+
n_writ += H5FD__mirror_xmit_encode_uint32((dest+n_writ), x->magic);
n_writ += H5FD__mirror_xmit_encode_uint8((dest+n_writ), x->version);
n_writ += H5FD__mirror_xmit_encode_uint32((dest+n_writ), x->session_token);
n_writ += H5FD__mirror_xmit_encode_uint32((dest+n_writ), x->xmit_count);
n_writ += H5FD__mirror_xmit_encode_uint8((dest+n_writ), x->op);
HDassert(n_writ == H5FD_MIRROR_XMIT_HEADER_SIZE);
+
return n_writ;
} /* end H5FD_mirror_xmit_encode_header() */
@@ -784,12 +840,16 @@ H5FD_mirror_xmit_encode_lock(unsigned char *dest,
const H5FD_mirror_xmit_lock_t *x)
{
size_t n_writ = 0;
- LOG_OP_CALL("H5FD_mirror_xmit_encode_lock");
+
+ LOG_OP_CALL(__func__);
+
HDassert(dest && x);
+
n_writ += H5FD_mirror_xmit_encode_header(dest,
(const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->rw);
HDassert(n_writ == H5FD_MIRROR_XMIT_LOCK_SIZE);
+
return n_writ;
} /* end H5FD_mirror_xmit_encode_lock() */
@@ -813,13 +873,14 @@ H5FD_mirror_xmit_encode_open(unsigned char *dest,
const H5FD_mirror_xmit_open_t *x)
{
size_t n_writ = 0;
- LOG_OP_CALL("H5FD_mirror_xmit_encode_open");
+
+ LOG_OP_CALL(__func__);
+
HDassert(dest && x);
+
/* clear entire structure, but especially its filepath string area */
- for (n_writ = 0; n_writ < H5FD_MIRROR_XMIT_OPEN_SIZE; n_writ++) {
- *(dest+n_writ) = 0;
- }
- n_writ = 0;
+ HDmemset(dest, 0, H5FD_MIRROR_XMIT_OPEN_SIZE);
+
n_writ += H5FD_mirror_xmit_encode_header(dest,
(const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint32(&dest[n_writ], x->flags);
@@ -827,8 +888,8 @@ H5FD_mirror_xmit_encode_open(unsigned char *dest,
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->size_t_blob);
HDassert((H5FD_MIRROR_XMIT_OPEN_SIZE - H5FD_MIRROR_XMIT_FILEPATH_MAX)
== n_writ);
- HDstrncpy((char *)&dest[n_writ], x->filename,
- H5FD_MIRROR_XMIT_FILEPATH_MAX);
+ HDstrncpy((char *)&dest[n_writ], x->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX);
+
return H5FD_MIRROR_XMIT_OPEN_SIZE;
} /* end H5FD_mirror_xmit_encode_open() */
@@ -853,20 +914,21 @@ H5FD_mirror_xmit_encode_reply(unsigned char *dest,
const H5FD_mirror_xmit_reply_t *x)
{
size_t n_writ = 0;
- LOG_OP_CALL("H5FD_mirror_xmit_encode_reply");
+
+ LOG_OP_CALL(__func__);
+
HDassert(dest && x);
+
/* clear entire structure, but especially its message string area */
- for (n_writ = 0; n_writ < H5FD_MIRROR_XMIT_REPLY_SIZE; n_writ++) {
- *(dest+n_writ) = 0;
- }
- n_writ = 0;
+ HDmemset(dest, 0, H5FD_MIRROR_XMIT_REPLY_SIZE);
+
n_writ += H5FD_mirror_xmit_encode_header(dest,
(const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint32(&dest[n_writ], x->status);
HDassert((H5FD_MIRROR_XMIT_REPLY_SIZE - H5FD_MIRROR_STATUS_MESSAGE_MAX)
== n_writ);
- HDstrncpy((char *)&dest[n_writ], x->message,
- H5FD_MIRROR_STATUS_MESSAGE_MAX);
+ HDstrncpy((char *)&dest[n_writ], x->message, H5FD_MIRROR_STATUS_MESSAGE_MAX);
+
return H5FD_MIRROR_XMIT_REPLY_SIZE;
} /* end H5FD_mirror_xmit_encode_reply() */
@@ -890,13 +952,17 @@ H5FD_mirror_xmit_encode_set_eoa(unsigned char *dest,
const H5FD_mirror_xmit_eoa_t *x)
{
size_t n_writ = 0;
- LOG_OP_CALL("H5FD_mirror_xmit_encode_set_eoa");
+
+ LOG_OP_CALL(__func__);
+
HDassert(dest && x);
+
n_writ += H5FD_mirror_xmit_encode_header(dest,
(const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint8(&dest[n_writ], x->type);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->eoa_addr);
HDassert(n_writ == H5FD_MIRROR_XMIT_EOA_SIZE);
+
return n_writ;
} /* end H5FD_mirror_xmit_encode_set_eoa() */
@@ -920,14 +986,18 @@ H5FD_mirror_xmit_encode_write(unsigned char *dest,
const H5FD_mirror_xmit_write_t *x)
{
size_t n_writ = 0;
- LOG_OP_CALL("H5FD_mirror_xmit_encode_write");
+
+ LOG_OP_CALL(__func__);
+
HDassert(dest && x);
+
n_writ += H5FD_mirror_xmit_encode_header(dest,
(const H5FD_mirror_xmit_t *)&(x->pub));
n_writ += H5FD__mirror_xmit_encode_uint8(&dest[n_writ], x->type);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->offset);
n_writ += H5FD__mirror_xmit_encode_uint64(&dest[n_writ], x->size);
HDassert(n_writ == H5FD_MIRROR_XMIT_WRITE_SIZE);
+
return n_writ;
} /* end H5FD_mirror_xmit_encode_write() */
@@ -942,16 +1012,16 @@ H5FD_mirror_xmit_encode_write(unsigned char *dest,
* Return: TRUE if valid; else FALSE.
* ---------------------------------------------------------------------------
*/
-hbool_t
+H5_ATTR_PURE hbool_t
H5FD_mirror_xmit_is_close(const H5FD_mirror_xmit_t *xmit)
{
- LOG_OP_CALL("H5FD_mirror_xmit_is_close");
+ LOG_OP_CALL(__func__);
+
HDassert(xmit);
- if ( (TRUE == H5FD_mirror_xmit_is_xmit(xmit)) &&
- (H5FD_MIRROR_OP_CLOSE == xmit->op) )
- {
+
+ if((TRUE == H5FD_mirror_xmit_is_xmit(xmit)) && (H5FD_MIRROR_OP_CLOSE == xmit->op))
return TRUE;
- }
+
return FALSE;
} /* end H5FD_mirror_xmit_is_close() */
@@ -966,16 +1036,16 @@ H5FD_mirror_xmit_is_close(const H5FD_mirror_xmit_t *xmit)
* Return: TRUE if valid; else FALSE.
* ---------------------------------------------------------------------------
*/
-hbool_t
+H5_ATTR_PURE hbool_t
H5FD_mirror_xmit_is_lock(const H5FD_mirror_xmit_lock_t *xmit)
{
- LOG_OP_CALL("H5FD_mirror_xmit_is_lock");
+ LOG_OP_CALL(__func__);
+
HDassert(xmit);
- if ( (TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) &&
- (H5FD_MIRROR_OP_LOCK == xmit->pub.op) )
- {
+
+ if((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_LOCK == xmit->pub.op))
return TRUE;
- }
+
return FALSE;
} /* end H5FD_mirror_xmit_is_lock() */
@@ -990,16 +1060,17 @@ H5FD_mirror_xmit_is_lock(const H5FD_mirror_xmit_lock_t *xmit)
* Return: TRUE if valid; else FALSE.
* ---------------------------------------------------------------------------
*/
-hbool_t
+H5_ATTR_PURE hbool_t
H5FD_mirror_xmit_is_open(const H5FD_mirror_xmit_open_t *xmit)
{
- LOG_OP_CALL("H5FD_mirror_xmit_is_open");
+ LOG_OP_CALL(__func__);
+
HDassert(xmit);
- if ( (TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) &&
- (H5FD_MIRROR_OP_OPEN == xmit->pub.op) )
- {
+
+ if((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_OPEN == xmit->pub.op))
+
return TRUE;
- }
+
return FALSE;
} /* end H5FD_mirror_xmit_is_open() */
@@ -1014,16 +1085,16 @@ H5FD_mirror_xmit_is_open(const H5FD_mirror_xmit_open_t *xmit)
* Return: TRUE if valid; else FALSE.
* ---------------------------------------------------------------------------
*/
-hbool_t
+H5_ATTR_PURE hbool_t
H5FD_mirror_xmit_is_set_eoa(const H5FD_mirror_xmit_eoa_t *xmit)
{
- LOG_OP_CALL("H5FD_mirror_xmit_is_set_eoa");
+ LOG_OP_CALL(__func__);
+
HDassert(xmit);
- if ( (TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) &&
- (H5FD_MIRROR_OP_SET_EOA == xmit->pub.op) )
- {
+
+ if((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_SET_EOA == xmit->pub.op))
return TRUE;
- }
+
return FALSE;
} /* end H5FD_mirror_xmit_is_eoa() */
@@ -1038,16 +1109,16 @@ H5FD_mirror_xmit_is_set_eoa(const H5FD_mirror_xmit_eoa_t *xmit)
* Return: TRUE if valid; else FALSE.
* ---------------------------------------------------------------------------
*/
-hbool_t
+H5_ATTR_PURE hbool_t
H5FD_mirror_xmit_is_reply(const H5FD_mirror_xmit_reply_t *xmit)
{
- LOG_OP_CALL("H5FD_mirror_xmit_is_reply");
+ LOG_OP_CALL(__func__);
+
HDassert(xmit);
- if ( (TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) &&
- (H5FD_MIRROR_OP_REPLY == xmit->pub.op) )
- {
+
+ if((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_REPLY == xmit->pub.op))
return TRUE;
- }
+
return FALSE;
} /* end H5FD_mirror_xmit_is_reply() */
@@ -1062,16 +1133,16 @@ H5FD_mirror_xmit_is_reply(const H5FD_mirror_xmit_reply_t *xmit)
* Return: TRUE if valid; else FALSE.
* ---------------------------------------------------------------------------
*/
-hbool_t
+H5_ATTR_PURE hbool_t
H5FD_mirror_xmit_is_write(const H5FD_mirror_xmit_write_t *xmit)
{
- LOG_OP_CALL("H5FD_mirror_xmit_is_write");
+ LOG_OP_CALL(__func__);
+
HDassert(xmit);
- if ( (TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) &&
- (H5FD_MIRROR_OP_WRITE == xmit->pub.op) )
- {
+
+ if((TRUE == H5FD_mirror_xmit_is_xmit(&(xmit->pub))) && (H5FD_MIRROR_OP_WRITE == xmit->pub.op))
return TRUE;
- }
+
return FALSE;
} /* end H5FD_mirror_xmit_is_write() */
@@ -1086,16 +1157,16 @@ H5FD_mirror_xmit_is_write(const H5FD_mirror_xmit_write_t *xmit)
* Return: TRUE if valid; else FALSE.
* ---------------------------------------------------------------------------
*/
-hbool_t
+H5_ATTR_PURE hbool_t
H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit)
{
- LOG_OP_CALL("H5FD_mirror_xmit_is_xmit");
+ LOG_OP_CALL(__func__);
+
HDassert(xmit);
- if ( (H5FD_MIRROR_XMIT_MAGIC != xmit->magic) ||
- (H5FD_MIRROR_XMIT_CURR_VERSION != xmit->version) )
- {
+
+ if((H5FD_MIRROR_XMIT_MAGIC != xmit->magic) || (H5FD_MIRROR_XMIT_CURR_VERSION != xmit->version))
return FALSE;
- }
+
return TRUE;
} /* end H5FD_mirror_xmit_is_xmit() */
@@ -1111,60 +1182,55 @@ H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit)
* Return: SUCCEED if ok, else FAIL.
* ----------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5FD__mirror_verify_reply(H5FD_mirror_t *file)
{
- char xmit_buf[H5FD_MIRROR_XMIT_REPLY_SIZE];
+ unsigned char *xmit_buf = NULL;
struct H5FD_mirror_xmit_reply_t reply;
ssize_t read_ret = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT;
+ FUNC_ENTER_STATIC
- LOG_OP_CALL("H5FD__mirror_verify_reply");
+ LOG_OP_CALL(FUNC);
HDassert(file && file->sock_fd);
+ xmit_buf = H5FL_BLK_MALLOC(xmit, H5FD_MIRROR_XMIT_BUFFER_MAX);
+ if(NULL == xmit_buf)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate xmit buffer");
+
read_ret = HDread(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_REPLY_SIZE);
- if (read_ret < 0) {
+ if(read_ret < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "unable to read reply");
- }
- if (read_ret != H5FD_MIRROR_XMIT_REPLY_SIZE) {
+ if(read_ret != H5FD_MIRROR_XMIT_REPLY_SIZE)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "unexpected read size");
- }
LOG_XMIT_BYTES("reply", xmit_buf, read_ret);
- if (H5FD_mirror_xmit_decode_reply(&reply, (const unsigned char *)xmit_buf)
- != H5FD_MIRROR_XMIT_REPLY_SIZE)
- {
+ if(H5FD_mirror_xmit_decode_reply(&reply, xmit_buf) != H5FD_MIRROR_XMIT_REPLY_SIZE)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "unable to decode reply xmit");
- }
- if (H5FD_mirror_xmit_is_reply(&reply) != TRUE) {
+ if(H5FD_mirror_xmit_is_reply(&reply) != TRUE)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "xmit op code was not REPLY");
- }
- if (reply.pub.session_token != file->xmit.session_token) {
+ if(reply.pub.session_token != file->xmit.session_token)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "wrong session");
- }
-
- if (reply.pub.xmit_count != (file->xmit_i)++) {
+ if(reply.pub.xmit_count != (file->xmit_i)++)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "xmit out of sync");
- }
-
- if (reply.status != H5FD_MIRROR_STATUS_OK) {
- HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL,
- "%s", (const char *)(reply.message));
- }
+ if(reply.status != H5FD_MIRROR_STATUS_OK)
+ HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "%s", (const char *)(reply.message));
done:
+ if(xmit_buf)
+ xmit_buf = H5FL_BLK_FREE(xmit, xmit_buf);
+
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5FD__mirror_verify_reply() */
/* -------------------------------------------------------------------------
- * Function: H5FD_mirror_fapl_get
+ * Function: H5FD__mirror_fapl_get
*
* Purpose: Get the file access propety list which could be used to create
* an identical file.
@@ -1174,37 +1240,35 @@ done:
* -------------------------------------------------------------------------
*/
static void *
-H5FD_mirror_fapl_get(H5FD_t *_file)
+H5FD__mirror_fapl_get(H5FD_t *_file)
{
H5FD_mirror_t *file = (H5FD_mirror_t *)_file;
H5FD_mirror_fapl_t *fa = NULL;
void *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- LOG_OP_CALL("H5FD_mirror_fapl_get");
+ LOG_OP_CALL(FUNC);
fa = (H5FD_mirror_fapl_t *)H5MM_calloc(sizeof(H5FD_mirror_fapl_t));
- if (NULL == fa) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "calloc failed");
- }
+ if(NULL == fa)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "calloc failed");
HDmemcpy(fa, &(file->fa), sizeof(H5FD_mirror_fapl_t));
ret_value = fa;
done:
- if (ret_value == NULL) {
- if (fa != NULL) {
+ if(ret_value == NULL)
+ if(fa != NULL)
H5MM_xfree(fa);
- }
- }
+
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_mirror_fapl_get() */
+} /* end H5FD__mirror_fapl_get() */
/* -------------------------------------------------------------------------
- * Function: H5FD_mirror_fapl_copy
+ * Function: H5FD__mirror_fapl_copy
*
* Purpose: Copies the mirror vfd-specific file access properties.
*
@@ -1213,37 +1277,34 @@ done:
* -------------------------------------------------------------------------
*/
static void *
-H5FD_mirror_fapl_copy(const void *_old_fa)
+H5FD__mirror_fapl_copy(const void *_old_fa)
{
const H5FD_mirror_fapl_t *old_fa = (const H5FD_mirror_fapl_t *)_old_fa;
H5FD_mirror_fapl_t *new_fa = NULL;
void *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- LOG_OP_CALL("H5FD_mirror_fapl_copy");
+ LOG_OP_CALL(FUNC);
new_fa = (H5FD_mirror_fapl_t *)H5MM_malloc(sizeof(H5FD_mirror_fapl_t));
- if (new_fa == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
- "memory allocation failed");
- }
+ if(new_fa == NULL)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "memory allocation failed");
HDmemcpy(new_fa, old_fa, sizeof(H5FD_mirror_fapl_t));
ret_value = new_fa;
done:
- if (ret_value == NULL) {
- if (new_fa != NULL) {
+ if(ret_value == NULL)
+ if(new_fa != NULL)
H5MM_xfree(new_fa);
- }
- }
+
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_mirror_fapl_copy() */
+} /* end H5FD__mirror_fapl_copy() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mirror_fapl_free
+ * Function: H5FD__mirror_fapl_free
*
* Purpose: Frees the mirror VFD-specific file access properties.
*
@@ -1251,13 +1312,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mirror_fapl_free(void *_fa)
+H5FD__mirror_fapl_free(void *_fa)
{
H5FD_mirror_fapl_t *fa = (H5FD_mirror_fapl_t*)_fa;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
- LOG_OP_CALL("H5FD_mirror_fapl_free");
+ LOG_OP_CALL(FUNC);
/* sanity check */
HDassert(fa != NULL);
@@ -1267,7 +1328,7 @@ H5FD_mirror_fapl_free(void *_fa)
H5MM_xfree(fa);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_mirror_fapl_free() */
+} /* end H5FD__mirror_fapl_free() */
/* -------------------------------------------------------------------------
@@ -1289,26 +1350,20 @@ H5Pget_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa_out)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", fapl_id, fa_out);
- LOG_OP_CALL("H5Pget_fapl_mirror");
+ LOG_OP_CALL(FUNC);
- if (NULL == fa_out) {
+ if(NULL == fa_out)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_out is NULL");
- }
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
- if (NULL == plist) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
-
- if (H5P_peek_driver(plist) != H5FD_MIRROR) {
+ if(NULL == plist)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
+ if(H5P_peek_driver(plist) != H5FD_MIRROR)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
- }
fa = (const H5FD_mirror_fapl_t *)H5P_peek_driver_info(plist);
- if (NULL == fa) {
+ if(NULL == fa)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info");
- }
HDassert(fa->magic == H5FD_MIRROR_FAPL_MAGIC); /* sanity check */
@@ -1337,22 +1392,17 @@ H5Pset_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*x", fapl_id, fa);
- LOG_OP_CALL("H5Pset_fapl_mirror");
+ LOG_OP_CALL(FUNC);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
- if (NULL == plist) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
- if (NULL == fa) {
+ if(NULL == plist)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
+ if(NULL == fa)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null fapl_t pointer");
- }
- if (H5FD_MIRROR_FAPL_MAGIC != fa->magic) {
+ if(H5FD_MIRROR_FAPL_MAGIC != fa->magic)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fapl_t magic");
- }
- if (H5FD_MIRROR_CURR_FAPL_T_VERSION != fa->version) {
+ if(H5FD_MIRROR_CURR_FAPL_T_VERSION != fa->version)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown fapl_t version");
- }
ret_value = H5P_set_driver(plist, H5FD_MIRROR, (const void *)fa);
@@ -1362,7 +1412,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_mirror_open
+ * Function: H5FD__mirror_open
*
* Purpose: Create and/or opens a file as an HDF5 file.
*
@@ -1376,64 +1426,51 @@ done:
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_mirror_open(const char *name,
+H5FD__mirror_open(const char *name,
unsigned flags,
hid_t fapl_id,
haddr_t maxaddr)
{
-#define MIRR_OPEN_MAXBUF 16 /* local symbol to give meaning to magic number */
- /* #defined because it is needed at compile time */
- /* Large enough to hold a port number string */
int live_socket = -1;
struct sockaddr_in target_addr;
socklen_t addr_size;
- char xmit_buf[H5FD_MIRROR_XMIT_OPEN_SIZE];
+ unsigned char *xmit_buf = NULL;
H5FD_mirror_fapl_t fa;
H5FD_mirror_t *file = NULL;
- H5FD_mirror_xmit_open_t open_xmit;
+ H5FD_mirror_xmit_open_t *open_xmit = NULL;
H5FD_t *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- LOG_OP_CALL("H5FD_mirror_open");
+ LOG_OP_CALL(FUNC);
/* --------------- */
/* Check arguments */
/* --------------- */
- if (!name || !*name) {
+ if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name");
- }
- if (HDstrlen(name) >= H5FD_MIRROR_XMIT_FILEPATH_MAX) {
+ if(HDstrlen(name) >= H5FD_MIRROR_XMIT_FILEPATH_MAX)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "filename is too long");
- }
- if (0 == maxaddr || HADDR_UNDEF == maxaddr) {
+ if(0 == maxaddr || HADDR_UNDEF == maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr");
- }
- if (ADDR_OVERFLOW(maxaddr)) {
+ if(ADDR_OVERFLOW(maxaddr))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr");
- }
- if (H5Pget_fapl_mirror(fapl_id, &fa) == FAIL) {
+ if(H5Pget_fapl_mirror(fapl_id, &fa) == FAIL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "can't get config info");
- }
-
- if (H5FD_MIRROR_FAPL_MAGIC != fa.magic) {
+ if(H5FD_MIRROR_FAPL_MAGIC != fa.magic)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid fapl magic");
- }
-
- if (H5FD_MIRROR_CURR_FAPL_T_VERSION != fa.version) {
+ if(H5FD_MIRROR_CURR_FAPL_T_VERSION != fa.version)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid fapl version");
- }
/* --------------------- */
/* Handshake with remote */
/* --------------------- */
live_socket = HDsocket(AF_INET, SOCK_STREAM, 0);
- if (live_socket < 0) {
+ if(live_socket < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "can't create socket");
- }
target_addr.sin_family = AF_INET;
target_addr.sin_port = HDhtons((uint16_t)fa.handshake_port);
@@ -1441,21 +1478,16 @@ H5FD_mirror_open(const char *name,
HDmemset(target_addr.sin_zero, '\0', sizeof target_addr.sin_zero);
addr_size = sizeof(target_addr);
- if (HDconnect(live_socket, (struct sockaddr *)&target_addr, addr_size) < 0)
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "can't connect to remote server");
- }
+ if(HDconnect(live_socket, (struct sockaddr *)&target_addr, addr_size) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "can't connect to remote server");
/* ------------- */
/* Open the file */
/* ------------- */
file = (H5FD_mirror_t *)H5FL_CALLOC(H5FD_mirror_t);
- if (NULL == file) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
- "unable to allocate file struct");
- }
+ if(NULL == file)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file struct");
file->sock_fd = live_socket;
file->xmit_i = 0;
@@ -1466,49 +1498,53 @@ H5FD_mirror_open(const char *name,
file->xmit.session_token = (uint32_t)(0x01020304 ^ file->sock_fd); /* TODO: hashing? */
/* int --> uint32_t may truncate on some systems... shouldn't matter? */
+ open_xmit = (H5FD_mirror_xmit_open_t *)H5FL_CALLOC(H5FD_mirror_xmit_open_t);
+ if(NULL == open_xmit)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate open_xmit struct");
+
file->xmit.op = H5FD_MIRROR_OP_OPEN;
- open_xmit.pub = file->xmit;
- open_xmit.flags = (uint32_t)flags;
- open_xmit.maxaddr = (uint64_t)maxaddr;
- open_xmit.size_t_blob = (uint64_t)((size_t)(-1));
- HDsnprintf(open_xmit.filename, H5FD_MIRROR_XMIT_FILEPATH_MAX-1, "%s", name);
-
- if (H5FD_mirror_xmit_encode_open((unsigned char *)xmit_buf,
- (const H5FD_mirror_xmit_open_t *)&open_xmit)
- != H5FD_MIRROR_XMIT_OPEN_SIZE)
- {
+ open_xmit->pub = file->xmit;
+ open_xmit->flags = (uint32_t)flags;
+ open_xmit->maxaddr = (uint64_t)maxaddr;
+ open_xmit->size_t_blob = (uint64_t)((size_t)(-1));
+ HDsnprintf(open_xmit->filename, H5FD_MIRROR_XMIT_FILEPATH_MAX-1, "%s", name);
+
+ xmit_buf = H5FL_BLK_MALLOC(xmit, H5FD_MIRROR_XMIT_BUFFER_MAX);
+ if(NULL == xmit_buf)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate xmit buffer");
+
+ if(H5FD_mirror_xmit_encode_open(xmit_buf, open_xmit) != H5FD_MIRROR_XMIT_OPEN_SIZE)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, NULL, "unable to encode open");
- }
LOG_XMIT_BYTES("open", xmit_buf, H5FD_MIRROR_XMIT_OPEN_SIZE);
- if (HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_OPEN_SIZE) < 0) {
+ if(HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_OPEN_SIZE) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, NULL, "unable to transmit open");
- }
- if (H5FD__mirror_verify_reply(file) == FAIL) {
+ if(H5FD__mirror_verify_reply(file) == FAIL)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "invalid reply");
- }
ret_value = (H5FD_t *)file;
done:
- if (NULL == ret_value) {
- if (file) {
+ if(NULL == ret_value) {
+ if(file)
file = H5FL_FREE(H5FD_mirror_t, file);
- }
- if (live_socket >= 0 && HDclose(live_socket) < 0) {
- HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL,
- "can't close socket");
- }
+ if(live_socket >= 0 && HDclose(live_socket) < 0)
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL, "can't close socket");
}
+
+ if(open_xmit)
+ open_xmit = H5FL_FREE(H5FD_mirror_xmit_open_t, open_xmit);
+ if(xmit_buf)
+ xmit_buf = H5FL_BLK_FREE(xmit, xmit_buf);
+
FUNC_LEAVE_NOAPI(ret_value)
-#undef MIRR_OPEN_MAXBUF
-} /* end H5FD_mirror_open() */
+} /* end H5FD__mirror_open() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mirror_close
+ * Function: H5FD__mirror_close
*
* Purpose: Closes the HDF5 file.
*
@@ -1523,16 +1559,16 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mirror_close(H5FD_t *_file)
+H5FD__mirror_close(H5FD_t *_file)
{
H5FD_mirror_t *file = (H5FD_mirror_t *)_file;
- unsigned char xmit_buf[H5FD_MIRROR_XMIT_HEADER_SIZE];
+ unsigned char *xmit_buf = NULL;
int xmit_encoded = 0; /* monitor point of failure */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- LOG_OP_CALL("H5FD_mirror_close");
+ LOG_OP_CALL(FUNC);
/* Sanity check */
HDassert(file);
@@ -1541,68 +1577,59 @@ H5FD_mirror_close(H5FD_t *_file)
file->xmit.xmit_count = (file->xmit_i)++;
file->xmit.op = H5FD_MIRROR_OP_CLOSE;
- if (H5FD_mirror_xmit_encode_header(xmit_buf,
- (const H5FD_mirror_xmit_t *)&(file->xmit))
- != H5FD_MIRROR_XMIT_HEADER_SIZE)
- {
+ xmit_buf = H5FL_BLK_MALLOC(xmit, H5FD_MIRROR_XMIT_BUFFER_MAX);
+ if(NULL == xmit_buf)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate xmit buffer");
+
+ if(H5FD_mirror_xmit_encode_header(xmit_buf, &(file->xmit)) != H5FD_MIRROR_XMIT_HEADER_SIZE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to encode close");
- }
xmit_encoded = 1;
LOG_XMIT_BYTES("close", xmit_buf, H5FD_MIRROR_XMIT_HEADER_SIZE);
- if (HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_HEADER_SIZE) < 0) {
+ if(HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_HEADER_SIZE) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to transmit close");
- }
- if (H5FD__mirror_verify_reply(file) == FAIL) {
+ if(H5FD__mirror_verify_reply(file) == FAIL)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid reply");
- }
- if (HDclose(file->sock_fd) < 0) {
+ if(HDclose(file->sock_fd) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "can't close socket");
- }
done:
- if (ret_value == FAIL) {
- if (xmit_encoded == 0) {
+ if(ret_value == FAIL) {
+ if(xmit_encoded == 0) {
/* Encode failed; send GOODBYE to force writer halt.
* We can ignore any response from the writer, if we receive
* any reply at all.
*/
- if (HDwrite(file->sock_fd, "GOODBYE", HDstrlen("GOODBYE")) < 0) {
- HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to transmit close");
- if (HDclose(file->sock_fd) < 0) {
- HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL,
- "can't close socket");
- }
+ if(HDwrite(file->sock_fd, "GOODBYE", HDstrlen("GOODBYE")) < 0) {
+ HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to transmit close");
+ if(HDclose(file->sock_fd) < 0)
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "can't close socket");
file->sock_fd = -1; /* invalidate for later */
} /* end if problem writing goodbye; go down hard */
else
- if (HDshutdown(file->sock_fd, SHUT_WR) < 0) {
- HDONE_ERROR(H5E_VFL, H5E_BADVALUE, FAIL,
- "can't shutdown socket write: %s",
- HDstrerror(errno));
- } /* end else-if problem shutting down socket */
+ if(HDshutdown(file->sock_fd, SHUT_WR) < 0)
+ HDONE_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "can't shutdown socket write: %s", HDstrerror(errno));
} /* end if xmit encode failed */
- if (file->sock_fd >= 0) {
- if (HDclose(file->sock_fd) < 0) {
- HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL,
- "can't close socket");
- }
- } /* end if socket not closed by going down hard */
+ if(file->sock_fd >= 0)
+ if(HDclose(file->sock_fd) < 0)
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "can't close socket");
} /* end if error */
file = H5FL_FREE(H5FD_mirror_t, file); /* always release resources */
+ if(xmit_buf)
+ xmit_buf = H5FL_BLK_FREE(xmit, xmit_buf);
+
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_mirror_close() */
+} /* end H5FD__mirror_close() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mirror_query
+ * Function: H5FD__mirror_query
*
* Purpose: Get the driver feature flags implemented by the driver.
*
@@ -1610,11 +1637,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mirror_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
+H5FD__mirror_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR;
+ FUNC_ENTER_STATIC_NOERR;
- LOG_OP_CALL("H5FD_mirror_query");
+ LOG_OP_CALL(FUNC);
/* Notice: the Mirror VFD Writer currently uses only the Sec2 driver as
* the underying driver -- as such, the Mirror VFD implementation copies
@@ -1624,23 +1651,21 @@ H5FD_mirror_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
* is never included.
* -- JOS 2020-01-13
*/
- if (flags) {
- *flags = 0 \
- | H5FD_FEAT_AGGREGATE_METADATA \
+ if(flags)
+ *flags = H5FD_FEAT_AGGREGATE_METADATA \
| H5FD_FEAT_ACCUMULATE_METADATA \
| H5FD_FEAT_DATA_SIEVE \
| H5FD_FEAT_AGGREGATE_SMALLDATA \
| H5FD_FEAT_POSIX_COMPAT_HANDLE \
| H5FD_FEAT_SUPPORTS_SWMR_IO \
| H5FD_FEAT_DEFAULT_VFD_COMPATIBLE;
- }
FUNC_LEAVE_NOAPI(SUCCEED);
-} /* end H5FD_mirror_query() */
+} /* end H5FD__mirror_query() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mirror_get_eoa
+ * Function: H5FD__mirror_get_eoa
*
* Purpose: Gets the end-of-address marker for the file. The EOA marker
* is the first address past the last byte allocated in the
@@ -1652,22 +1677,22 @@ H5FD_mirror_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_mirror_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__mirror_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_mirror_t *file = (const H5FD_mirror_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
- LOG_OP_CALL("H5FD_mirror_get_eoa");
+ LOG_OP_CALL(FUNC);
HDassert(file);
FUNC_LEAVE_NOAPI(file->eoa)
-} /* end H5FD_mirror_get_eoa() */
+} /* end H5FD__mirror_get_eoa() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mirror_set_eoa
+ * Function: H5FD__mirror_set_eoa
*
* Purpose: Set the end-of-address marker for the file. This function is
* called shortly after an existing HDF5 file is opened in order
@@ -1677,16 +1702,16 @@ H5FD_mirror_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mirror_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
+H5FD__mirror_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
{
H5FD_mirror_xmit_eoa_t xmit_eoa;
- unsigned char xmit_buf[H5FD_MIRROR_XMIT_EOA_SIZE];
+ unsigned char *xmit_buf = NULL;
H5FD_mirror_t *file = (H5FD_mirror_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- LOG_OP_CALL("H5FD_mirror_set_eoa");
+ LOG_OP_CALL(FUNC);
HDassert(file);
@@ -1699,31 +1724,31 @@ H5FD_mirror_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
xmit_eoa.type = (uint8_t)type;
xmit_eoa.eoa_addr = (uint64_t)addr;
- if (H5FD_mirror_xmit_encode_set_eoa(xmit_buf,
- (const H5FD_mirror_xmit_eoa_t *)&xmit_eoa)
- != H5FD_MIRROR_XMIT_EOA_SIZE)
- {
+ xmit_buf = H5FL_BLK_MALLOC(xmit, H5FD_MIRROR_XMIT_BUFFER_MAX);
+ if(NULL == xmit_buf)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate xmit buffer");
+
+ if(H5FD_mirror_xmit_encode_set_eoa(xmit_buf, &xmit_eoa) != H5FD_MIRROR_XMIT_EOA_SIZE)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to encode set-eoa");
- }
LOG_XMIT_BYTES("set-eoa", xmit_buf, H5FD_MIRROR_XMIT_EOA_SIZE);
- if (HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_EOA_SIZE) < 0) {
- HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL,
- "unable to transmit set-eoa");
- }
+ if(HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_EOA_SIZE) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to transmit set-eoa");
- if (H5FD__mirror_verify_reply(file) == FAIL) {
+ if(H5FD__mirror_verify_reply(file) == FAIL)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid reply");
- }
done:
+ if(xmit_buf)
+ xmit_buf = H5FL_BLK_FREE(xmit, xmit_buf);
+
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_mirror_set_eoa() */
+} /* end H5FD__mirror_set_eoa() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mirror_get_eof
+ * Function: H5FD__mirror_get_eof
*
* Purpose: Returns the end-of-file marker, which is the greater of
* either the filesystem end-of-file or the HDF5 end-of-address
@@ -1736,49 +1761,43 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_mirror_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__mirror_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_mirror_t *file = (const H5FD_mirror_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
- LOG_OP_CALL("H5FD_mirror_get_eof");
+ LOG_OP_CALL(FUNC);
HDassert(file);
FUNC_LEAVE_NOAPI(file->eof)
-} /* end H5FD_mirror_get_eof() */
+} /* end H5FD__mirror_get_eof() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mirror_read
+ * Function: H5FD__mirror_read
*
- * Purpose: Required to register the driver.
- * If called, MUST fail.
+ * Purpose: Required to register the driver, but if called, MUST fail.
*
* Return: FAIL
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mirror_read(H5FD_t H5_ATTR_UNUSED *_file,
- H5FD_mem_t H5_ATTR_UNUSED type,
- hid_t H5_ATTR_UNUSED fapl_id,
- haddr_t H5_ATTR_UNUSED addr,
- size_t H5_ATTR_UNUSED size,
- void H5_ATTR_UNUSED *buf)
+H5FD__mirror_read(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type,
+ hid_t H5_ATTR_UNUSED fapl_id, haddr_t H5_ATTR_UNUSED addr,
+ size_t H5_ATTR_UNUSED size, void H5_ATTR_UNUSED *buf)
{
- herr_t ret_value = FAIL;
+ FUNC_ENTER_STATIC_NOERR
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ LOG_OP_CALL(FUNC);
- LOG_OP_CALL("H5FD_mirror_read");
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_mirror_read() */
+ FUNC_LEAVE_NOAPI(FAIL)
+} /* end H5FD__mirror_read() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mirror_write
+ * Function: H5FD__mirror_write
*
* Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
* from buffer BUF according to data transfer properties in
@@ -1795,21 +1814,17 @@ H5FD_mirror_read(H5FD_t H5_ATTR_UNUSED *_file,
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mirror_write(H5FD_t *_file,
- H5FD_mem_t type,
- hid_t H5_ATTR_UNUSED dxpl_id,
- haddr_t addr,
- size_t size,
- const void *buf)
+H5FD__mirror_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
+ haddr_t addr, size_t size, const void *buf)
{
H5FD_mirror_xmit_write_t xmit_write;
- unsigned char xmit_buf[H5FD_MIRROR_XMIT_WRITE_SIZE];
+ unsigned char *xmit_buf = NULL;
H5FD_mirror_t *file = (H5FD_mirror_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- LOG_OP_CALL("H5FD_mirror_write");
+ LOG_OP_CALL(FUNC);
HDassert(file);
HDassert(buf);
@@ -1822,43 +1837,41 @@ H5FD_mirror_write(H5FD_t *_file,
xmit_write.offset = (uint64_t)addr;
xmit_write.type = (uint8_t)type;
+ xmit_buf = H5FL_BLK_MALLOC(xmit, H5FD_MIRROR_XMIT_BUFFER_MAX);
+ if(NULL == xmit_buf)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate xmit buffer");
/* Notify Writer of incoming data to write. */
- if (H5FD_mirror_xmit_encode_write(xmit_buf,
- (const H5FD_mirror_xmit_write_t *)&xmit_write)
- != H5FD_MIRROR_XMIT_WRITE_SIZE)
- {
+ if(H5FD_mirror_xmit_encode_write(xmit_buf, &xmit_write) != H5FD_MIRROR_XMIT_WRITE_SIZE)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to encode write");
- }
LOG_XMIT_BYTES("write", xmit_buf, H5FD_MIRROR_XMIT_WRITE_SIZE);
- if (HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_WRITE_SIZE) < 0) {
+ if(HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_WRITE_SIZE) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to transmit write");
- }
/* Check that our write xmission was received */
- if (H5FD__mirror_verify_reply(file) == FAIL) {
+ if(H5FD__mirror_verify_reply(file) == FAIL)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid reply");
- }
/* Send the data to be written */
- if (HDwrite(file->sock_fd, buf, size) < 0) {
+ if(HDwrite(file->sock_fd, buf, size) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to transmit data");
- }
/* Writer should reply that it got the data and is still okay/ready */
- if (H5FD__mirror_verify_reply(file) == FAIL) {
+ if(H5FD__mirror_verify_reply(file) == FAIL)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid reply");
- }
done:
+ if(xmit_buf)
+ xmit_buf = H5FL_BLK_FREE(xmit, xmit_buf);
+
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_mirror_write() */
+} /* end H5FD__mirror_write() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mirror_truncate
+ * Function: H5FD__mirror_truncate
*
* Purpose: Makes sure that the true file size is the same (or larger)
* than the end-of-address.
@@ -1867,45 +1880,45 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mirror_truncate(H5FD_t *_file,
- hid_t H5_ATTR_UNUSED dxpl_id,
- hbool_t H5_ATTR_UNUSED closing)
+H5FD__mirror_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id,
+ hbool_t H5_ATTR_UNUSED closing)
{
- unsigned char xmit_buf[H5FD_MIRROR_XMIT_HEADER_SIZE];
+ unsigned char *xmit_buf = NULL;
H5FD_mirror_t *file = (H5FD_mirror_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- LOG_OP_CALL("H5FD_mirror_truncate");
+ LOG_OP_CALL(FUNC);
file->xmit.xmit_count = (file->xmit_i)++;
file->xmit.op = H5FD_MIRROR_OP_TRUNCATE;
- if (H5FD_mirror_xmit_encode_header(xmit_buf, &(file->xmit))
- != H5FD_MIRROR_XMIT_HEADER_SIZE)
- {
+ xmit_buf = H5FL_BLK_MALLOC(xmit, H5FD_MIRROR_XMIT_BUFFER_MAX);
+ if(NULL == xmit_buf)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate xmit buffer");
+
+ if(H5FD_mirror_xmit_encode_header(xmit_buf, &(file->xmit)) != H5FD_MIRROR_XMIT_HEADER_SIZE)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to encode truncate");
- }
LOG_XMIT_BYTES("truncate", xmit_buf, H5FD_MIRROR_XMIT_HEADER_SIZE);
- if (HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_HEADER_SIZE) < 0) {
- HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL,
- "unable to transmit truncate");
- }
+ if(HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_HEADER_SIZE) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to transmit truncate");
- if (H5FD__mirror_verify_reply(file) == FAIL) {
+ if(H5FD__mirror_verify_reply(file) == FAIL)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid reply");
- }
done:
+ if(xmit_buf)
+ xmit_buf = H5FL_BLK_FREE(xmit, xmit_buf);
+
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_mirror_truncate() */
+} /* end H5FD__mirror_truncate() */
/*-------------------------------------------------------------------------
- * Function: H5FD_mirror_lock
+ * Function: H5FD__mirror_lock
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
@@ -1916,16 +1929,16 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mirror_lock(H5FD_t *_file, hbool_t rw)
+H5FD__mirror_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_mirror_xmit_lock_t xmit_lock;
- unsigned char xmit_buf[H5FD_MIRROR_XMIT_LOCK_SIZE];
+ unsigned char *xmit_buf = NULL;
H5FD_mirror_t *file = (H5FD_mirror_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT;
+ FUNC_ENTER_STATIC
- LOG_OP_CALL("H5FD_mirror_lock");
+ LOG_OP_CALL(FUNC);
file->xmit.xmit_count = (file->xmit_i)++;
file->xmit.op = H5FD_MIRROR_OP_LOCK;
@@ -1933,30 +1946,31 @@ H5FD_mirror_lock(H5FD_t *_file, hbool_t rw)
xmit_lock.pub = file->xmit;
xmit_lock.rw = (uint64_t)rw;
- if (H5FD_mirror_xmit_encode_lock(xmit_buf,
- (const H5FD_mirror_xmit_lock_t *)&xmit_lock)
- != H5FD_MIRROR_XMIT_LOCK_SIZE)
- {
+ xmit_buf = H5FL_BLK_MALLOC(xmit, H5FD_MIRROR_XMIT_BUFFER_MAX);
+ if(NULL == xmit_buf)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate xmit buffer");
+
+ if(H5FD_mirror_xmit_encode_lock(xmit_buf, &xmit_lock) != H5FD_MIRROR_XMIT_LOCK_SIZE)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to encode lock");
- }
LOG_XMIT_BYTES("lock", xmit_buf, H5FD_MIRROR_XMIT_LOCK_SIZE);
- if (HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_LOCK_SIZE) < 0) {
+ if(HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_LOCK_SIZE) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to transmit lock");
- }
- if (H5FD__mirror_verify_reply(file) == FAIL) {
+ if(H5FD__mirror_verify_reply(file) == FAIL)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid reply");
- }
done:
+ if(xmit_buf)
+ xmit_buf = H5FL_BLK_FREE(xmit, xmit_buf);
+
FUNC_LEAVE_NOAPI(ret_value);
-} /* end H5FD_mirror_lock */
+} /* end H5FD__mirror_lock */
/*-------------------------------------------------------------------------
- * Function: H5FD_mirror_unlock
+ * Function: H5FD__mirror_unlock
*
* Purpose: Remove the existing lock on the file.
*
@@ -1964,38 +1978,40 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mirror_unlock(H5FD_t *_file)
+H5FD__mirror_unlock(H5FD_t *_file)
{
- unsigned char xmit_buf[H5FD_MIRROR_XMIT_HEADER_SIZE];
+ unsigned char *xmit_buf = NULL;
H5FD_mirror_t *file = (H5FD_mirror_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT;
+ FUNC_ENTER_STATIC
- LOG_OP_CALL("H5FD_mirror_unlock");
+ LOG_OP_CALL(FUNC);
file->xmit.xmit_count = (file->xmit_i)++;
file->xmit.op = H5FD_MIRROR_OP_UNLOCK;
- if (H5FD_mirror_xmit_encode_header(xmit_buf, &(file->xmit))
- != H5FD_MIRROR_XMIT_HEADER_SIZE)
- {
+ xmit_buf = H5FL_BLK_MALLOC(xmit, H5FD_MIRROR_XMIT_BUFFER_MAX);
+ if(NULL == xmit_buf)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate xmit buffer");
+
+ if(H5FD_mirror_xmit_encode_header(xmit_buf, &(file->xmit)) != H5FD_MIRROR_XMIT_HEADER_SIZE)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to encode unlock");
- }
LOG_XMIT_BYTES("unlock", xmit_buf, H5FD_MIRROR_XMIT_HEADER_SIZE);
- if (HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_HEADER_SIZE) < 0) {
+ if(HDwrite(file->sock_fd, xmit_buf, H5FD_MIRROR_XMIT_HEADER_SIZE) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "unable to transmit unlock");
- }
- if (H5FD__mirror_verify_reply(file) == FAIL) {
+ if(H5FD__mirror_verify_reply(file) == FAIL)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid reply");
- }
done:
+ if(xmit_buf)
+ xmit_buf = H5FL_BLK_FREE(xmit, xmit_buf);
+
FUNC_LEAVE_NOAPI(ret_value);
-} /* end H5FD_mirror_unlock */
+} /* end H5FD__mirror_unlock */
#endif /* H5_HAVE_MIRROR_VFD */
diff --git a/src/H5FDmirror.h b/src/H5FDmirror.h
index fb66b7b..7d15c1b 100644
--- a/src/H5FDmirror.h
+++ b/src/H5FDmirror.h
@@ -65,297 +65,6 @@ H5_DLL hid_t H5FD_mirror_init(void);
H5_DLL herr_t H5Pget_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa_out);
H5_DLL herr_t H5Pset_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa);
-/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
- * IPC - Mirror VFD and Remote Worker application.
- * = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
- */
-
-
-/* The maximum allowed size for a receiving buffer when accepting bytes to
- * write. Writes larger than this size are performed by multiple accept-write
- * steps by the Writer. */
-#define H5FD_MIRROR_DATA_BUFFER_MAX H5_GB /* 1 Gigabyte */
-
-#define H5FD_MIRROR_XMIT_CURR_VERSION 1
-#define H5FD_MIRROR_XMIT_MAGIC 0x87F8005B
-
-#define H5FD_MIRROR_OP_OPEN 1
-#define H5FD_MIRROR_OP_CLOSE 2
-#define H5FD_MIRROR_OP_WRITE 3
-#define H5FD_MIRROR_OP_TRUNCATE 4
-#define H5FD_MIRROR_OP_REPLY 5
-#define H5FD_MIRROR_OP_SET_EOA 6
-#define H5FD_MIRROR_OP_LOCK 7
-#define H5FD_MIRROR_OP_UNLOCK 8
-
-#define H5FD_MIRROR_STATUS_OK 0
-#define H5FD_MIRROR_STATUS_ERROR 1
-#define H5FD_MIRROR_STATUS_MESSAGE_MAX 256 /* Dedicated error message size */
-
-/* Maximum length of a path/filename string, including the NULL-terminator.
- * Must not be smaller than H5FD_SPLITTER_PATH_MAX. */
-#define H5FD_MIRROR_XMIT_FILEPATH_MAX 4097
-
-/* Define the exact sizes of the various xmit blobs as sent over the wire.
- * This is used to minimize the number of bytes transmitted as well as to
- * sanity-check received bytes.
- * Any modifications to the xmit structures and/or the encode/decode functions
- * must be reflected here.
- * */
-#define H5FD_MIRROR_XMIT_HEADER_SIZE 14
-#define H5FD_MIRROR_XMIT_EOA_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 9)
-#define H5FD_MIRROR_XMIT_LOCK_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 8)
-#define H5FD_MIRROR_XMIT_OPEN_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 20 + H5FD_MIRROR_XMIT_FILEPATH_MAX)
-#define H5FD_MIRROR_XMIT_REPLY_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 4 + H5FD_MIRROR_STATUS_MESSAGE_MAX)
-#define H5FD_MIRROR_XMIT_WRITE_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 17)
-
-/* Maximum length of any xmit. */
-#define H5FD_MIRROR_XMIT_BUFFER_MAX MAX2( MAX3(H5FD_MIRROR_XMIT_HEADER_SIZE, \
- H5FD_MIRROR_XMIT_EOA_SIZE, \
- H5FD_MIRROR_XMIT_LOCK_SIZE), \
- MAX3(H5FD_MIRROR_XMIT_OPEN_SIZE, \
- H5FD_MIRROR_XMIT_REPLY_SIZE, \
- H5FD_MIRROR_XMIT_WRITE_SIZE) ) \
-
-/* ---------------------------------------------------------------------------
- * Structure: H5FD_mirror_xmit_t
- *
- * Common structure 'header' for all mirror VFD/worker IPC.
- * Must be the first component of a derived operation xmit structure,
- * such as file-open or write command.
- *
- * `magic` (uint32_t)
- * A "unique" number identifying the structure and endianness of
- * transmitting maching.
- * Must be set to H5FD_MIRROR_XMIT_MAGIC native to the VFD "sender".
- *
- * `version` (uint8_t)
- * Number used to identify the structure membership.
- * Allows sane modifications to this structure in the future.
- * Must be set to H5FD_MIRROR_XMIT_CURR_VERSION.
- *
- * `session_token` (uint32_t)
- * A "unique" number identifying the session between VFD sender and
- * remote receiver/worker/writer. Exists to help sanity-check.
- *
- * `xmit_count` (uint32_t)
- * Which transmission this is since the session began.
- * Used to sanity-check transmission errors.
- * First xmit (file-open) must be 0.
- *
- * `op` (uint8_t)
- * Number identifying which operation to perform.
- * Corresponds with the extended structure outside of this xmit header.
- * Possible values are all defined H5FD_MIRROR_OP_* constants.
- *
- * ---------------------------------------------------------------------------
- */
-typedef struct H5FD_mirror_xmit_t {
- uint32_t magic;
- uint8_t version;
- uint32_t session_token;
- uint32_t xmit_count;
- uint8_t op;
-} H5FD_mirror_xmit_t;
-
-/* ---------------------------------------------------------------------------
- * Structure: H5FD_mirror_xmit_eoa_t
- *
- * Structure containing eoa-set information from VFD sender.
- *
- * `pub` (H5FD_mirror_xmit_t)
- * Common transmission header, containing session information.
- * Must be first.
- *
- * `type` (uint8_t)
- * System-independent alias for H5F[D]_mem_t.
- * Specifies datatype to be written.
- *
- * `eoa_addr` (uint64_t)
- * New address for eoa.
- * (Natively 'haddr_t', always a 64-bit field)
- *
- * ---------------------------------------------------------------------------
- */
-typedef struct H5FD_mirror_xmit_eoa_t {
- H5FD_mirror_xmit_t pub;
- uint8_t type;
- uint64_t eoa_addr;
-} H5FD_mirror_xmit_eoa_t;
-
-/* ---------------------------------------------------------------------------
- * Structure: H5FD_mirror_xmit_lock_t
- *
- * Structure containing eoa-set information from VFD sender.
- *
- * `pub` (H5FD_mirror_xmit_t)
- * Common transmission header, containing session information.
- * Must be first.
- *
- * `rw` (uint64_t)
- * The Read/Write mode flag passed into H5FDlock().
- * (Natively `hbool_t`, an 'int') TODO: native int may be 64-bit?
- *
- * ---------------------------------------------------------------------------
- */
-typedef struct H5FD_mirror_xmit_lock_t {
- H5FD_mirror_xmit_t pub;
- uint64_t rw;
-} H5FD_mirror_xmit_lock_t;
-
-/* ---------------------------------------------------------------------------
- * Structure: H5FD_mirror_xmit_open_t
- *
- * Structure containing file-open information from the VFD sender.
- *
- * `pub` (H5FD_mirror_xmit_t)
- * Common transmission header, containing session information.
- * Must be first.
- *
- * `flags` (uint32_t)
- * VFL-layer file-open flags passed directly to H5FDopen().
- * (Natively 'unsigned [int]') TODO: native int may be 64-bit?
- *
- * `maxaddr` (uint64_t)
- * VFL-layer maximum allowed address space for the file to open passed
- * directly to H5FDopen().
- * (Natively 'haddr_t', always a 64-bit field)
- *
- * `size_t_blob` (uint64_t)
- * A number indicating how large a size_t is on the sending system.
- * Must be set to (uint64_t)((size_t)(-1))
- * (maximum possible value of size_t, cast to uint64_t).
- * The receiving system inspects this value -- if the local (remote)
- * size_t is smaller than that of the Sender, issues a warning.
- * Not an error, as:
- * 1. It is assumed that underlying file systems/drivers have become
- * smart enough to handle file sizes that otherwise might be
- * constrained.
- * 2. The Mirror Writer ingests bytes to write multiple 'slices' if the
- * size is greater than H5FD_MIRROR_DATA_BUFFER_MAX, regardless of
- * any size_t storage size disparity.
- *
- * `filename` (char[])
- * String giving the filename and path of file to open.
- *
- * ---------------------------------------------------------------------------
- */
-typedef struct H5FD_mirror_xmit_open_t {
- H5FD_mirror_xmit_t pub;
- uint32_t flags;
- uint64_t maxaddr;
- uint64_t size_t_blob;
- char filename[H5FD_MIRROR_XMIT_FILEPATH_MAX];
-} H5FD_mirror_xmit_open_t;
-
-/* ---------------------------------------------------------------------------
- * Structure: H5FD_mirror_xmit_reply_t
- *
- * Structure used by the remote receiver/worker/writer to respond to
- * a command from the VFD sender.
- *
- * `pub` (H5FD_mirror_xmit_t)
- * Common transmission header, containing session information.
- * Must be first.
- *
- * `status` (uint32_t)
- * Number indicating whether the command was successful or if an
- * occured.
- * Allowed values are H5FD_MIRROR_STATUS_OK and
- * H5FD_MIRROR_STATUS_ERROR.
- *
- * `message` (char[])
- * Error message. Populated if and only if there was a problem.
- * It is possible that a message may reach the end of the alloted
- * space without a NULL terminator -- the onus is on the programmer to
- * handle this situation.
- *
- * ---------------------------------------------------------------------------
- */
-typedef struct H5FD_mirror_xmit_reply_t {
- H5FD_mirror_xmit_t pub;
- uint32_t status;
- char message[H5FD_MIRROR_STATUS_MESSAGE_MAX];
-} H5FD_mirror_xmit_reply_t;
-
-/* ---------------------------------------------------------------------------
- * Structure: H5FD_mirror_xmit_write_t
- *
- * Structure containing data-write information from VFD sender.
- *
- * The data to be written is transmitted in subsequent, packets
- * and may be broken up into more than one transmission buffer.
- * The VFD sender and remote receiver/worker/writer must coordinate
- * the receipt of data.
- *
- * `pub` (H5FD_mirror_xmit_t)
- * Common transmission header, containing session information.
- * Must be first.
- *
- * `type` (uint8_t)
- * Specifies datatype to be written.
- * (Natively 'H5FD_mem_t', an enumerated type in H5Fpublic.h)
- *
- * `offset` (uint64_t)
- * Start location of write in file.
- * (Natively 'haddr_t', always a 64-bit field)
- *
- * `size` (uint64_t)
- * Size of the data to be written, in bytes.
- * (Natively 'size_t', accommodate the largest possible as 64-bits)
- *
- * ---------------------------------------------------------------------------
- */
-typedef struct H5FD_mirror_xmit_write_t {
- H5FD_mirror_xmit_t pub;
- uint8_t type;
- uint64_t offset;
- uint64_t size;
-} H5FD_mirror_xmit_write_t;
-
-
-
-/* Encode/decode routines are required to "pack" the xmit data into a known
- * byte format for transmission over the wire.
- *
- * All component numbers must be stored in "network" word order (Big-Endian).
- *
- * All components must be packed in the order given in the structure definition.
- *
- * All components must be packed with zero padding between.
- */
-
-H5_DLL size_t H5FD__mirror_xmit_decode_uint16(uint16_t *out, const unsigned char *buf);
-H5_DLL size_t H5FD__mirror_xmit_decode_uint32(uint32_t *out, const unsigned char *buf);
-H5_DLL size_t H5FD__mirror_xmit_decode_uint64(uint64_t *out, const unsigned char *buf);
-H5_DLL size_t H5FD__mirror_xmit_decode_uint8(uint8_t *out, const unsigned char *buf);
-H5_DLL size_t H5FD__mirror_xmit_encode_uint16(unsigned char *dest, uint16_t v);
-H5_DLL size_t H5FD__mirror_xmit_encode_uint32(unsigned char *dest, uint32_t v);
-H5_DLL size_t H5FD__mirror_xmit_encode_uint64(unsigned char *dest, uint64_t v);
-H5_DLL size_t H5FD__mirror_xmit_encode_uint8(unsigned char *dest, uint8_t v);
-
-H5_DLL size_t H5FD_mirror_xmit_decode_header(H5FD_mirror_xmit_t *out, const unsigned char *buf);
-H5_DLL size_t H5FD_mirror_xmit_decode_lock(H5FD_mirror_xmit_lock_t *out, const unsigned char *buf);
-H5_DLL size_t H5FD_mirror_xmit_decode_open(H5FD_mirror_xmit_open_t *out, const unsigned char *buf);
-H5_DLL size_t H5FD_mirror_xmit_decode_reply(H5FD_mirror_xmit_reply_t *out, const unsigned char *buf);
-H5_DLL size_t H5FD_mirror_xmit_decode_set_eoa(H5FD_mirror_xmit_eoa_t *out, const unsigned char *buf);
-H5_DLL size_t H5FD_mirror_xmit_decode_write(H5FD_mirror_xmit_write_t *out, const unsigned char *buf);
-
-H5_DLL size_t H5FD_mirror_xmit_encode_header(unsigned char *dest, const H5FD_mirror_xmit_t *x);
-H5_DLL size_t H5FD_mirror_xmit_encode_lock(unsigned char *dest, const H5FD_mirror_xmit_lock_t *x);
-H5_DLL size_t H5FD_mirror_xmit_encode_open(unsigned char *dest, const H5FD_mirror_xmit_open_t *x);
-H5_DLL size_t H5FD_mirror_xmit_encode_reply(unsigned char *dest, const H5FD_mirror_xmit_reply_t *x);
-H5_DLL size_t H5FD_mirror_xmit_encode_set_eoa(unsigned char *dest, const H5FD_mirror_xmit_eoa_t *x);
-H5_DLL size_t H5FD_mirror_xmit_encode_write(unsigned char *dest, const H5FD_mirror_xmit_write_t *x);
-
-H5_DLL hbool_t H5FD_mirror_xmit_is_close(const H5FD_mirror_xmit_t *xmit);
-H5_DLL hbool_t H5FD_mirror_xmit_is_lock(const H5FD_mirror_xmit_lock_t *xmit);
-H5_DLL hbool_t H5FD_mirror_xmit_is_open(const H5FD_mirror_xmit_open_t *xmit);
-H5_DLL hbool_t H5FD_mirror_xmit_is_reply(const H5FD_mirror_xmit_reply_t *xmit);
-H5_DLL hbool_t H5FD_mirror_xmit_is_set_eoa(const H5FD_mirror_xmit_eoa_t *xmit);
-H5_DLL hbool_t H5FD_mirror_xmit_is_write(const H5FD_mirror_xmit_write_t *xmit);
-H5_DLL hbool_t H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit);
-
#ifdef __cplusplus
}
#endif
@@ -368,4 +77,3 @@ H5_DLL hbool_t H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit);
#endif /* H5FDmirror_H */
-
diff --git a/src/H5FDmirror_priv.h b/src/H5FDmirror_priv.h
new file mode 100644
index 0000000..dc15441
--- /dev/null
+++ b/src/H5FDmirror_priv.h
@@ -0,0 +1,323 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: Public, shared definitions for Mirror VFD & remote Writer.
+ */
+
+#ifndef H5FDmirror_priv_H
+#define H5FDmirror_priv_H
+
+#ifdef H5_HAVE_MIRROR_VFD
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+ * IPC - Mirror VFD and Remote Worker application.
+ * = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+ */
+
+/* The maximum allowed size for a receiving buffer when accepting bytes to
+ * write. Writes larger than this size are performed by multiple accept-write
+ * steps by the Writer. */
+#define H5FD_MIRROR_DATA_BUFFER_MAX H5_GB /* 1 Gigabyte */
+
+#define H5FD_MIRROR_XMIT_CURR_VERSION 1
+#define H5FD_MIRROR_XMIT_MAGIC 0x87F8005B
+
+#define H5FD_MIRROR_OP_OPEN 1
+#define H5FD_MIRROR_OP_CLOSE 2
+#define H5FD_MIRROR_OP_WRITE 3
+#define H5FD_MIRROR_OP_TRUNCATE 4
+#define H5FD_MIRROR_OP_REPLY 5
+#define H5FD_MIRROR_OP_SET_EOA 6
+#define H5FD_MIRROR_OP_LOCK 7
+#define H5FD_MIRROR_OP_UNLOCK 8
+
+#define H5FD_MIRROR_STATUS_OK 0
+#define H5FD_MIRROR_STATUS_ERROR 1
+#define H5FD_MIRROR_STATUS_MESSAGE_MAX 256 /* Dedicated error message size */
+
+/* Maximum length of a path/filename string, including the NULL-terminator.
+ * Must not be smaller than H5FD_SPLITTER_PATH_MAX. */
+#define H5FD_MIRROR_XMIT_FILEPATH_MAX 4097
+
+/* Define the exact sizes of the various xmit blobs as sent over the wire.
+ * This is used to minimize the number of bytes transmitted as well as to
+ * sanity-check received bytes.
+ * Any modifications to the xmit structures and/or the encode/decode functions
+ * must be reflected here.
+ * */
+#define H5FD_MIRROR_XMIT_HEADER_SIZE 14
+#define H5FD_MIRROR_XMIT_EOA_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 9)
+#define H5FD_MIRROR_XMIT_LOCK_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 8)
+#define H5FD_MIRROR_XMIT_OPEN_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 20 + H5FD_MIRROR_XMIT_FILEPATH_MAX)
+#define H5FD_MIRROR_XMIT_REPLY_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 4 + H5FD_MIRROR_STATUS_MESSAGE_MAX)
+#define H5FD_MIRROR_XMIT_WRITE_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 17)
+
+/* Maximum length of any xmit. */
+#define H5FD_MIRROR_XMIT_BUFFER_MAX MAX2( MAX3(H5FD_MIRROR_XMIT_HEADER_SIZE, \
+ H5FD_MIRROR_XMIT_EOA_SIZE, \
+ H5FD_MIRROR_XMIT_LOCK_SIZE), \
+ MAX3(H5FD_MIRROR_XMIT_OPEN_SIZE, \
+ H5FD_MIRROR_XMIT_REPLY_SIZE, \
+ H5FD_MIRROR_XMIT_WRITE_SIZE) ) \
+
+/* ---------------------------------------------------------------------------
+ * Structure: H5FD_mirror_xmit_t
+ *
+ * Common structure 'header' for all mirror VFD/worker IPC.
+ * Must be the first component of a derived operation xmit structure,
+ * such as file-open or write command.
+ *
+ * `magic` (uint32_t)
+ * A "unique" number identifying the structure and endianness of
+ * transmitting maching.
+ * Must be set to H5FD_MIRROR_XMIT_MAGIC native to the VFD "sender".
+ *
+ * `version` (uint8_t)
+ * Number used to identify the structure membership.
+ * Allows sane modifications to this structure in the future.
+ * Must be set to H5FD_MIRROR_XMIT_CURR_VERSION.
+ *
+ * `session_token` (uint32_t)
+ * A "unique" number identifying the session between VFD sender and
+ * remote receiver/worker/writer. Exists to help sanity-check.
+ *
+ * `xmit_count` (uint32_t)
+ * Which transmission this is since the session began.
+ * Used to sanity-check transmission errors.
+ * First xmit (file-open) must be 0.
+ *
+ * `op` (uint8_t)
+ * Number identifying which operation to perform.
+ * Corresponds with the extended structure outside of this xmit header.
+ * Possible values are all defined H5FD_MIRROR_OP_* constants.
+ *
+ * ---------------------------------------------------------------------------
+ */
+typedef struct H5FD_mirror_xmit_t {
+ uint32_t magic;
+ uint8_t version;
+ uint32_t session_token;
+ uint32_t xmit_count;
+ uint8_t op;
+} H5FD_mirror_xmit_t;
+
+/* ---------------------------------------------------------------------------
+ * Structure: H5FD_mirror_xmit_eoa_t
+ *
+ * Structure containing eoa-set information from VFD sender.
+ *
+ * `pub` (H5FD_mirror_xmit_t)
+ * Common transmission header, containing session information.
+ * Must be first.
+ *
+ * `type` (uint8_t)
+ * System-independent alias for H5F[D]_mem_t.
+ * Specifies datatype to be written.
+ *
+ * `eoa_addr` (uint64_t)
+ * New address for eoa.
+ * (Natively 'haddr_t', always a 64-bit field)
+ *
+ * ---------------------------------------------------------------------------
+ */
+typedef struct H5FD_mirror_xmit_eoa_t {
+ H5FD_mirror_xmit_t pub;
+ uint8_t type;
+ uint64_t eoa_addr;
+} H5FD_mirror_xmit_eoa_t;
+
+/* ---------------------------------------------------------------------------
+ * Structure: H5FD_mirror_xmit_lock_t
+ *
+ * Structure containing eoa-set information from VFD sender.
+ *
+ * `pub` (H5FD_mirror_xmit_t)
+ * Common transmission header, containing session information.
+ * Must be first.
+ *
+ * `rw` (uint64_t)
+ * The Read/Write mode flag passed into H5FDlock().
+ * (Natively `hbool_t`, an 'int') TODO: native int may be 64-bit?
+ *
+ * ---------------------------------------------------------------------------
+ */
+typedef struct H5FD_mirror_xmit_lock_t {
+ H5FD_mirror_xmit_t pub;
+ uint64_t rw;
+} H5FD_mirror_xmit_lock_t;
+
+/* ---------------------------------------------------------------------------
+ * Structure: H5FD_mirror_xmit_open_t
+ *
+ * Structure containing file-open information from the VFD sender.
+ *
+ * `pub` (H5FD_mirror_xmit_t)
+ * Common transmission header, containing session information.
+ * Must be first.
+ *
+ * `flags` (uint32_t)
+ * VFL-layer file-open flags passed directly to H5FDopen().
+ * (Natively 'unsigned [int]') TODO: native int may be 64-bit?
+ *
+ * `maxaddr` (uint64_t)
+ * VFL-layer maximum allowed address space for the file to open passed
+ * directly to H5FDopen().
+ * (Natively 'haddr_t', always a 64-bit field)
+ *
+ * `size_t_blob` (uint64_t)
+ * A number indicating how large a size_t is on the sending system.
+ * Must be set to (uint64_t)((size_t)(-1))
+ * (maximum possible value of size_t, cast to uint64_t).
+ * The receiving system inspects this value -- if the local (remote)
+ * size_t is smaller than that of the Sender, issues a warning.
+ * Not an error, as:
+ * 1. It is assumed that underlying file systems/drivers have become
+ * smart enough to handle file sizes that otherwise might be
+ * constrained.
+ * 2. The Mirror Writer ingests bytes to write multiple 'slices' if the
+ * size is greater than H5FD_MIRROR_DATA_BUFFER_MAX, regardless of
+ * any size_t storage size disparity.
+ *
+ * `filename` (char[])
+ * String giving the filename and path of file to open.
+ *
+ * ---------------------------------------------------------------------------
+ */
+typedef struct H5FD_mirror_xmit_open_t {
+ H5FD_mirror_xmit_t pub;
+ uint32_t flags;
+ uint64_t maxaddr;
+ uint64_t size_t_blob;
+ char filename[H5FD_MIRROR_XMIT_FILEPATH_MAX];
+} H5FD_mirror_xmit_open_t;
+
+/* ---------------------------------------------------------------------------
+ * Structure: H5FD_mirror_xmit_reply_t
+ *
+ * Structure used by the remote receiver/worker/writer to respond to
+ * a command from the VFD sender.
+ *
+ * `pub` (H5FD_mirror_xmit_t)
+ * Common transmission header, containing session information.
+ * Must be first.
+ *
+ * `status` (uint32_t)
+ * Number indicating whether the command was successful or if an
+ * occured.
+ * Allowed values are H5FD_MIRROR_STATUS_OK and
+ * H5FD_MIRROR_STATUS_ERROR.
+ *
+ * `message` (char[])
+ * Error message. Populated if and only if there was a problem.
+ * It is possible that a message may reach the end of the alloted
+ * space without a NULL terminator -- the onus is on the programmer to
+ * handle this situation.
+ *
+ * ---------------------------------------------------------------------------
+ */
+typedef struct H5FD_mirror_xmit_reply_t {
+ H5FD_mirror_xmit_t pub;
+ uint32_t status;
+ char message[H5FD_MIRROR_STATUS_MESSAGE_MAX];
+} H5FD_mirror_xmit_reply_t;
+
+/* ---------------------------------------------------------------------------
+ * Structure: H5FD_mirror_xmit_write_t
+ *
+ * Structure containing data-write information from VFD sender.
+ *
+ * The data to be written is transmitted in subsequent, packets
+ * and may be broken up into more than one transmission buffer.
+ * The VFD sender and remote receiver/worker/writer must coordinate
+ * the receipt of data.
+ *
+ * `pub` (H5FD_mirror_xmit_t)
+ * Common transmission header, containing session information.
+ * Must be first.
+ *
+ * `type` (uint8_t)
+ * Specifies datatype to be written.
+ * (Natively 'H5FD_mem_t', an enumerated type in H5Fpublic.h)
+ *
+ * `offset` (uint64_t)
+ * Start location of write in file.
+ * (Natively 'haddr_t', always a 64-bit field)
+ *
+ * `size` (uint64_t)
+ * Size of the data to be written, in bytes.
+ * (Natively 'size_t', accommodate the largest possible as 64-bits)
+ *
+ * ---------------------------------------------------------------------------
+ */
+typedef struct H5FD_mirror_xmit_write_t {
+ H5FD_mirror_xmit_t pub;
+ uint8_t type;
+ uint64_t offset;
+ uint64_t size;
+} H5FD_mirror_xmit_write_t;
+
+
+
+/* Encode/decode routines are required to "pack" the xmit data into a known
+ * byte format for transmission over the wire.
+ *
+ * All component numbers must be stored in "network" word order (Big-Endian).
+ *
+ * All components must be packed in the order given in the structure definition.
+ *
+ * All components must be packed with zero padding between.
+ */
+
+H5_DLL size_t H5FD__mirror_xmit_decode_uint16(uint16_t *out, const unsigned char *buf);
+H5_DLL size_t H5FD__mirror_xmit_decode_uint32(uint32_t *out, const unsigned char *buf);
+H5_DLL size_t H5FD__mirror_xmit_decode_uint64(uint64_t *out, const unsigned char *buf);
+H5_DLL size_t H5FD__mirror_xmit_decode_uint8(uint8_t *out, const unsigned char *buf);
+H5_DLL size_t H5FD__mirror_xmit_encode_uint16(unsigned char *dest, uint16_t v);
+H5_DLL size_t H5FD__mirror_xmit_encode_uint32(unsigned char *dest, uint32_t v);
+H5_DLL size_t H5FD__mirror_xmit_encode_uint64(unsigned char *dest, uint64_t v);
+H5_DLL size_t H5FD__mirror_xmit_encode_uint8(unsigned char *dest, uint8_t v);
+
+H5_DLL size_t H5FD_mirror_xmit_decode_header(H5FD_mirror_xmit_t *out, const unsigned char *buf);
+H5_DLL size_t H5FD_mirror_xmit_decode_lock(H5FD_mirror_xmit_lock_t *out, const unsigned char *buf);
+H5_DLL size_t H5FD_mirror_xmit_decode_open(H5FD_mirror_xmit_open_t *out, const unsigned char *buf);
+H5_DLL size_t H5FD_mirror_xmit_decode_reply(H5FD_mirror_xmit_reply_t *out, const unsigned char *buf);
+H5_DLL size_t H5FD_mirror_xmit_decode_set_eoa(H5FD_mirror_xmit_eoa_t *out, const unsigned char *buf);
+H5_DLL size_t H5FD_mirror_xmit_decode_write(H5FD_mirror_xmit_write_t *out, const unsigned char *buf);
+
+H5_DLL size_t H5FD_mirror_xmit_encode_header(unsigned char *dest, const H5FD_mirror_xmit_t *x);
+H5_DLL size_t H5FD_mirror_xmit_encode_lock(unsigned char *dest, const H5FD_mirror_xmit_lock_t *x);
+H5_DLL size_t H5FD_mirror_xmit_encode_open(unsigned char *dest, const H5FD_mirror_xmit_open_t *x);
+H5_DLL size_t H5FD_mirror_xmit_encode_reply(unsigned char *dest, const H5FD_mirror_xmit_reply_t *x);
+H5_DLL size_t H5FD_mirror_xmit_encode_set_eoa(unsigned char *dest, const H5FD_mirror_xmit_eoa_t *x);
+H5_DLL size_t H5FD_mirror_xmit_encode_write(unsigned char *dest, const H5FD_mirror_xmit_write_t *x);
+
+H5_DLL hbool_t H5FD_mirror_xmit_is_close(const H5FD_mirror_xmit_t *xmit);
+H5_DLL hbool_t H5FD_mirror_xmit_is_lock(const H5FD_mirror_xmit_lock_t *xmit);
+H5_DLL hbool_t H5FD_mirror_xmit_is_open(const H5FD_mirror_xmit_open_t *xmit);
+H5_DLL hbool_t H5FD_mirror_xmit_is_reply(const H5FD_mirror_xmit_reply_t *xmit);
+H5_DLL hbool_t H5FD_mirror_xmit_is_set_eoa(const H5FD_mirror_xmit_eoa_t *xmit);
+H5_DLL hbool_t H5FD_mirror_xmit_is_write(const H5FD_mirror_xmit_write_t *xmit);
+H5_DLL hbool_t H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H5_HAVE_MIRROR_VFD */
+
+#endif /* H5FDmirror_priv_H */
+
diff --git a/src/H5FDmodule.h b/src/H5FDmodule.h
index ea1a9fd..11686be 100644
--- a/src/H5FDmodule.h
+++ b/src/H5FDmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index b2959a5..43fa340 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, January 30, 2004
*
* Purpose: Common routines for all MPI-based VFL drivers.
@@ -43,8 +43,6 @@
* Programmer: Quincey Koziol
* Friday, January 30, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
@@ -82,8 +80,6 @@ done:
* Programmer: Quincey Koziol
* Friday, January 30, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
@@ -120,8 +116,6 @@ done:
* Programmer: Quincey Koziol
* Friday, January 30, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
MPI_Comm
@@ -158,8 +152,6 @@ done:
* Programmer: John Mainzer
* 4/4/17
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -197,13 +189,6 @@ done:
* Programmer: Unknown
* January 30, 1998
*
- * Modifications:
- * Robb Matzke, 1999-04-23
- * An error is reported for address overflows. The ADDR output
- * argument is optional.
- *
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
*-------------------------------------------------------------------------
*/
haddr_t
@@ -235,16 +220,6 @@ H5FD_mpi_MPIOff_to_haddr(MPI_Offset mpi_off)
* Programmer: Unknown
* January 30, 1998
*
- * Modifications:
- * Robb Matzke, 1999-04-23
- * An error is reported for address overflows. The ADDR output
- * argument is optional.
- *
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
- *
- * Robb Matzke, 1999-08-06
- * Modified to work with the virtual file layer.
*-------------------------------------------------------------------------
*/
herr_t
@@ -290,9 +265,6 @@ H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/)
* Programmer: rky
* 19981207
*
- * Modifications:
- * Robb Matzke, 1999-08-09
- * Modified to work with the virtual file layer.
*-------------------------------------------------------------------------
*/
herr_t
@@ -345,9 +317,6 @@ done:
* Programmer: rky
* 19981207
*
- * Modifications:
- * Robb Matzke, 1999-08-09
- * Modified to work with the virtual file layer.
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5FDmpi.h b/src/H5FDmpi.h
index 2d62c79..da9f59b 100644
--- a/src/H5FDmpi.h
+++ b/src/H5FDmpi.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, January 30, 2004
*
* Purpose: The public header file for common items for all MPI VFL drivers
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 3d2e0cf..9475093 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
* Purpose: This is the MPI-2 I/O driver.
diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h
index 6ee0a1a..9d02153 100644
--- a/src/H5FDmpio.h
+++ b/src/H5FDmpio.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the mpio driver.
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index f80cac5..d183511 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, November 10, 1997
*
* Purpose: Implements a file driver which dispatches I/O requests to
@@ -1234,14 +1234,6 @@ H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 21 Dec. 2006
- * Added the parameter TYPE. It's only used for MULTI driver.
- * If the TYPE is H5FD_MEM_DEFAULT, simply find the biggest
- * EOA of individual file because the EOA for the whole file
- * is meaningless.
- *
*-------------------------------------------------------------------------
*/
static haddr_t
@@ -1334,17 +1326,6 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
- * Modifications:
- * Raymond Lu
- * 10 January 2007
- * EOA for the whole file is discarded because it's meaningless
- * for MULTI file. This function only sets eoa for individual
- * file.
- *
- * Raymond Lu
- * 21 June 2011
- * Backward compatibility of EOA. Please the comment in the
- * code.
*-------------------------------------------------------------------------
*/
static herr_t
diff --git a/src/H5FDmulti.h b/src/H5FDmulti.h
index 0bd5718..b3c3c62 100644
--- a/src/H5FDmulti.h
+++ b/src/H5FDmulti.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the "multi" driver.
diff --git a/src/H5FDpkg.h b/src/H5FDpkg.h
index 22b5d17..8ffffd1 100644
--- a/src/H5FDpkg.h
+++ b/src/H5FDpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Thursday, January 3, 2008
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 2e3d3ce..7d5b66d 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, July 26, 1999
*/
#ifndef _H5FDprivate_H
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h
index 61bf212..7297cf8 100644
--- a/src/H5FDpublic.h
+++ b/src/H5FDpublic.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, July 26, 1999
*/
#ifndef _H5FDpublic_H
diff --git a/src/H5FDros3.c b/src/H5FDros3.c
index d99272c..c024716 100644
--- a/src/H5FDros3.c
+++ b/src/H5FDros3.c
@@ -13,7 +13,7 @@
/*
* Read-Only S3 Virtual File Driver (VFD)
*
- * Programmer: Jacob Smith <jake.smith@hdfgroup.org>
+ * Programmer: Jacob Smith
* 2017-10-13
*
* Purpose:
@@ -212,66 +212,67 @@ typedef struct H5FD_ros3_t {
* Only included if it may be used -- ROS3 VFD is enabled.
*
*/
-#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
/* Prototypes */
-static herr_t H5FD_ros3_term(void);
-static void *H5FD_ros3_fapl_get(H5FD_t *_file);
-static void *H5FD_ros3_fapl_copy(const void *_old_fa);
-static herr_t H5FD_ros3_fapl_free(void *_fa);
-static H5FD_t *H5FD_ros3_open(const char *name, unsigned flags, hid_t fapl_id,
+static herr_t H5FD__ros3_term(void);
+static void *H5FD__ros3_fapl_get(H5FD_t *_file);
+static void *H5FD__ros3_fapl_copy(const void *_old_fa);
+static herr_t H5FD__ros3_fapl_free(void *_fa);
+static H5FD_t *H5FD__ros3_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
-static herr_t H5FD_ros3_close(H5FD_t *_file);
-static int H5FD_ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_ros3_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_ros3_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_ros3_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
-static haddr_t H5FD_ros3_get_eof(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_ros3_get_handle(H5FD_t *_file, hid_t fapl,
+static herr_t H5FD__ros3_close(H5FD_t *_file);
+static int H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD__ros3_query(const H5FD_t *_f1, unsigned long *flags);
+static haddr_t H5FD__ros3_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__ros3_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static haddr_t H5FD__ros3_get_eof(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__ros3_get_handle(H5FD_t *_file, hid_t fapl,
void** file_handle);
-static herr_t H5FD_ros3_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
+static herr_t H5FD__ros3_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
haddr_t addr, size_t size, void *buf);
-static herr_t H5FD_ros3_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
+static herr_t H5FD__ros3_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id,
haddr_t addr, size_t size, const void *buf);
-static herr_t H5FD_ros3_truncate(H5FD_t *_file, hid_t dxpl_id,
+static herr_t H5FD__ros3_truncate(H5FD_t *_file, hid_t dxpl_id,
hbool_t closing);
-static herr_t H5FD_ros3_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_ros3_unlock(H5FD_t *_file);
-static herr_t H5FD_ros3_validate_config(const H5FD_ros3_fapl_t * fa);
+static herr_t H5FD__ros3_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__ros3_unlock(H5FD_t *_file);
+
+static herr_t H5FD__ros3_validate_config(const H5FD_ros3_fapl_t * fa);
static const H5FD_class_t H5FD_ros3_g = {
"ros3", /* name */
MAXADDR, /* maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
- H5FD_ros3_term, /* terminate */
+ H5FD__ros3_term, /* terminate */
NULL, /* sb_size */
NULL, /* sb_encode */
NULL, /* sb_decode */
sizeof(H5FD_ros3_fapl_t), /* fapl_size */
- H5FD_ros3_fapl_get, /* fapl_get */
- H5FD_ros3_fapl_copy, /* fapl_copy */
- H5FD_ros3_fapl_free, /* fapl_free */
+ H5FD__ros3_fapl_get, /* fapl_get */
+ H5FD__ros3_fapl_copy, /* fapl_copy */
+ H5FD__ros3_fapl_free, /* fapl_free */
0, /* dxpl_size */
NULL, /* dxpl_copy */
NULL, /* dxpl_free */
- H5FD_ros3_open, /* open */
- H5FD_ros3_close, /* close */
- H5FD_ros3_cmp, /* cmp */
- H5FD_ros3_query, /* query */
+ H5FD__ros3_open, /* open */
+ H5FD__ros3_close, /* close */
+ H5FD__ros3_cmp, /* cmp */
+ H5FD__ros3_query, /* query */
NULL, /* get_type_map */
NULL, /* alloc */
NULL, /* free */
- H5FD_ros3_get_eoa, /* get_eoa */
- H5FD_ros3_set_eoa, /* set_eoa */
- H5FD_ros3_get_eof, /* get_eof */
- H5FD_ros3_get_handle, /* get_handle */
- H5FD_ros3_read, /* read */
- H5FD_ros3_write, /* write */
+ H5FD__ros3_get_eoa, /* get_eoa */
+ H5FD__ros3_set_eoa, /* set_eoa */
+ H5FD__ros3_get_eof, /* get_eof */
+ H5FD__ros3_get_handle, /* get_handle */
+ H5FD__ros3_read, /* read */
+ H5FD__ros3_write, /* write */
NULL, /* flush */
- H5FD_ros3_truncate, /* truncate */
- H5FD_ros3_lock, /* lock */
- H5FD_ros3_unlock, /* unlock */
+ H5FD__ros3_truncate, /* truncate */
+ H5FD__ros3_lock, /* lock */
+ H5FD__ros3_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
@@ -297,14 +298,11 @@ H5FD__init_package(void)
FUNC_ENTER_STATIC
- if (H5FD_ros3_init() < 0) {
- HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL,
- "unable to initialize ros3 VFD")
- }
+ if(H5FD_ros3_init() < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize ros3 VFD")
done:
FUNC_LEAVE_NOAPI(ret_value)
-
} /* end H5FD__init_package() */
@@ -335,7 +333,7 @@ H5FD_ros3_init(void)
HDfprintf(stdout, "H5FD_ros3_init() called.\n");
#endif
- if (H5I_VFL != H5I_get_type(H5FD_ROS3_g))
+ if(H5I_VFL != H5I_get_type(H5FD_ROS3_g))
H5FD_ROS3_g = H5FD_register(&H5FD_ros3_g, sizeof(H5FD_class_t), FALSE);
#if ROS3_STATS
@@ -343,6 +341,7 @@ H5FD_ros3_init(void)
*/
for (bin_i = 0; bin_i < ROS3_STATS_BIN_COUNT; bin_i++) {
unsigned long long value = 0;
+
ROS3_STATS_POW(bin_i, &value)
ros3_stats_boundaries[bin_i] = value;
}
@@ -353,12 +352,11 @@ H5FD_ros3_init(void)
done:
FUNC_LEAVE_NOAPI(ret_value)
-
} /* end H5FD_ros3_init() */
/*---------------------------------------------------------------------------
- * Function: H5FD_ros3_term
+ * Function: H5FD__ros3_term
*
* Purpose: Shut down the VFD
*
@@ -369,20 +367,19 @@ done:
*---------------------------------------------------------------------------
*/
static herr_t
-H5FD_ros3_term(void)
+H5FD__ros3_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_term() called.\n");
+ HDfprintf(stdout, "H5FD__ros3_term() called.\n");
#endif
/* Reset VFL ID */
H5FD_ROS3_g = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
-
-} /* end H5FD_ros3_term() */
+} /* end H5FD__ros3_term() */
/*-------------------------------------------------------------------------
@@ -401,8 +398,7 @@ H5FD_ros3_term(void)
*-------------------------------------------------------------------------
*/
herr_t
-H5Pset_fapl_ros3(hid_t fapl_id,
- H5FD_ros3_fapl_t *fa)
+H5Pset_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa)
{
H5P_genplist_t *plist = NULL; /* Property list pointer */
herr_t ret_value = FAIL;
@@ -417,25 +413,21 @@ H5Pset_fapl_ros3(hid_t fapl_id,
#endif
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
- if (plist == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, \
- "not a file access property list")
- }
+ if(plist == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- if (FAIL == H5FD_ros3_validate_config(fa)) {
+ if(FAIL == H5FD__ros3_validate_config(fa))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid ros3 config")
- }
ret_value = H5P_set_driver(plist, H5FD_ROS3, (void *)fa);
done:
FUNC_LEAVE_API(ret_value)
-
} /* end H5Pset_fapl_ros3() */
/*-------------------------------------------------------------------------
- * Function: H5FD_ros3_validate_config()
+ * Function: H5FD__ros3_validate_config()
*
* Purpose: Test to see if the supplied instance of H5FD_ros3_fapl_t
* contains internally consistant data. Return SUCCEED if so,
@@ -455,34 +447,25 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_ros3_validate_config(const H5FD_ros3_fapl_t * fa)
+H5FD__ros3_validate_config(const H5FD_ros3_fapl_t * fa)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(fa != NULL);
- if ( fa->version != H5FD_CURR_ROS3_FAPL_T_VERSION ) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "Unknown H5FD_ros3_fapl_t version");
- }
+ if(fa->version != H5FD_CURR_ROS3_FAPL_T_VERSION)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown H5FD_ros3_fapl_t version");
- /* if set to authenticate, region and id cannot be empty strings
- */
- if (fa->authenticate == TRUE) {
- if ((fa->aws_region[0] == '\0') ||
- (fa->secret_id[0] == '\0'))
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "Inconsistent authentication information");
- }
- }
+ /* if set to authenticate, region and id cannot be empty strings */
+ if(fa->authenticate == TRUE)
+ if((fa->aws_region[0] == '\0') || (fa->secret_id[0] == '\0'))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Inconsistent authentication information");
done:
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* end H5FD_ros3_validate_config() */
+} /* end H5FD__ros3_validate_config() */
/*-------------------------------------------------------------------------
@@ -498,13 +481,10 @@ done:
* Programmer: John Mainzer
* 9/10/17
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5Pget_fapl_ros3(hid_t fapl_id,
- H5FD_ros3_fapl_t *fa_out)
+H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_out)
{
const H5FD_ros3_fapl_t *fa = NULL;
H5P_genplist_t *plist = NULL;
@@ -517,35 +497,30 @@ H5Pget_fapl_ros3(hid_t fapl_id,
HDfprintf(stdout, "H5Pget_fapl_ros3() called.\n");
#endif
- if (fa_out == NULL) {
+ if(fa_out == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_out is NULL")
- }
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
- if (plist == NULL) {
+ if(plist == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list")
- }
- if (H5FD_ROS3 != H5P_peek_driver(plist)) {
+ if(H5FD_ROS3 != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
- }
fa = (const H5FD_ros3_fapl_t *)H5P_peek_driver_info(plist);
- if (fa == NULL) {
+ if(fa == NULL)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
- }
/* Copy the ros3 fapl data out */
HDmemcpy(fa_out, fa, sizeof(H5FD_ros3_fapl_t));
done:
FUNC_LEAVE_API(ret_value)
-
} /* end H5Pget_fapl_ros3() */
/*-------------------------------------------------------------------------
- * Function: H5FD_ros3_fapl_get
+ * Function: H5FD__ros3_fapl_get
*
* Purpose: Gets a file access property list which could be used to
* create an identical file.
@@ -557,24 +532,20 @@ done:
* Programmer: John Mainzer
* 9/8/17
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
-H5FD_ros3_fapl_get(H5FD_t *_file)
+H5FD__ros3_fapl_get(H5FD_t *_file)
{
H5FD_ros3_t *file = (H5FD_ros3_t*)_file;
H5FD_ros3_fapl_t *fa = NULL;
void *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
fa = (H5FD_ros3_fapl_t *)H5MM_calloc(sizeof(H5FD_ros3_fapl_t));
- if (fa == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
- "memory allocation failed")
- }
+ if(fa == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy the fields of the structure */
HDmemcpy(fa, &(file->fa), sizeof(H5FD_ros3_fapl_t));
@@ -583,18 +554,16 @@ H5FD_ros3_fapl_get(H5FD_t *_file)
ret_value = fa;
done:
- if (ret_value == NULL) {
- if (fa != NULL) {
+ if(ret_value == NULL)
+ if(fa != NULL)
H5MM_xfree(fa);
- }
- }
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_ros3_fapl_get() */
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD__ros3_fapl_get() */
/*-------------------------------------------------------------------------
- * Function: H5FD_ros3_fapl_copy
+ * Function: H5FD__ros3_fapl_copy
*
* Purpose: Copies the ros3-specific file access properties.
*
@@ -605,41 +574,35 @@ done:
* Programmer: John Mainzer
* 9/8/17
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
-H5FD_ros3_fapl_copy(const void *_old_fa)
+H5FD__ros3_fapl_copy(const void *_old_fa)
{
const H5FD_ros3_fapl_t *old_fa = (const H5FD_ros3_fapl_t*)_old_fa;
H5FD_ros3_fapl_t *new_fa = NULL;
void *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
new_fa = (H5FD_ros3_fapl_t *)H5MM_malloc(sizeof(H5FD_ros3_fapl_t));
- if (new_fa == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
- "memory allocation failed");
- }
+ if(new_fa == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
HDmemcpy(new_fa, old_fa, sizeof(H5FD_ros3_fapl_t));
ret_value = new_fa;
done:
- if (ret_value == NULL) {
- if (new_fa != NULL) {
+ if(ret_value == NULL)
+ if(new_fa != NULL)
H5MM_xfree(new_fa);
- }
- }
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_ros3_fapl_copy() */
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD__ros3_fapl_copy() */
/*-------------------------------------------------------------------------
- * Function: H5FD_ros3_fapl_free
+ * Function: H5FD__ros3_fapl_free
*
* Purpose: Frees the ros3-specific file access properties.
*
@@ -648,27 +611,23 @@ done:
* Programmer: John Mainzer
* 9/8/17
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_ros3_fapl_free(void *_fa)
+H5FD__ros3_fapl_free(void *_fa)
{
H5FD_ros3_fapl_t *fa = (H5FD_ros3_fapl_t*)_fa;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(fa != NULL); /* sanity check */
H5MM_xfree(fa);
FUNC_LEAVE_NOAPI(SUCCEED)
-
-} /* end H5FD_ros3_fapl_free() */
+} /* end H5FD__ros3_fapl_free() */
#if ROS3_STATS
-
/*----------------------------------------------------------------------------
*
* Function: ros3_reset_stats()
@@ -696,18 +655,16 @@ ros3_reset_stats(H5FD_ros3_t *file)
unsigned i = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if ROS3_DEBUG
HDprintf("ros3_reset_stats() called\n");
#endif
- if (file == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "file was null");
- }
+ if(file == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file was null");
- for (i = 0; i <= ROS3_STATS_BIN_COUNT; i++) {
+ for(i = 0; i <= ROS3_STATS_BIN_COUNT; i++) {
file->raw[i].bytes = 0;
file->raw[i].count = 0;
file->raw[i].min = (unsigned long long)ROS3_STATS_STARTING_MIN;
@@ -721,15 +678,13 @@ ros3_reset_stats(H5FD_ros3_t *file)
done:
FUNC_LEAVE_NOAPI(ret_value);
-
} /* end ros3_reset_stats() */
-
#endif /* ROS3_STATS */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_ros3_open()
+ * Function: H5FD__ros3_open()
*
* Purpose:
*
@@ -759,11 +714,7 @@ done:
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_ros3_open(
- const char *url,
- unsigned flags,
- hid_t fapl_id,
- haddr_t maxaddr)
+H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
H5FD_ros3_t *file = NULL;
struct tm *now = NULL;
@@ -773,117 +724,89 @@ H5FD_ros3_open(
H5FD_ros3_fapl_t fa;
H5FD_t *ret_value = NULL;
-
-
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_open() called.\n");
+ HDfprintf(stdout, "H5FD__ros3_open() called.\n");
#endif
/* Sanity check on file offsets */
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
/* Check arguments */
- if (!url || !*url)
+ if(!url || !*url)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
- if (0 == maxaddr || HADDR_UNDEF == maxaddr)
+ if(0 == maxaddr || HADDR_UNDEF == maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
- if (ADDR_OVERFLOW(maxaddr))
+ if(ADDR_OVERFLOW(maxaddr))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr")
- if (flags != H5F_ACC_RDONLY)
- HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL,
- "only Read-Only access allowed")
+ if(flags != H5F_ACC_RDONLY)
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL, "only Read-Only access allowed")
- if (FAIL == H5Pget_fapl_ros3(fapl_id, &fa)) {
+ if(FAIL == H5Pget_fapl_ros3(fapl_id, &fa))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "can't get property list")
- }
- if (CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "unable to initialize curl global (placeholder flags)")
- }
+ if(CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to initialize curl global (placeholder flags)")
/* open file; procedure depends on whether or not the fapl instructs to
* authenticate requests or not.
*/
- if (fa.authenticate == TRUE) {
+ if(fa.authenticate == TRUE) {
/* compute signing key (part of AWS/S3 REST API)
* can be re-used by user/key for 7 days after creation.
* find way to re-use/share
*/
now = gmnow();
HDassert( now != NULL );
- if (ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "problem while writing iso8601 timestamp")
- }
- if (FAIL == H5FD_s3comms_signing_key(signing_key,
- (const char *)fa.secret_key,
- (const char *)fa.aws_region,
- (const char *)iso8601now) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "problem while computing signing key")
- }
-
- handle = H5FD_s3comms_s3r_open(
- url,
- (const char *)fa.aws_region,
- (const char *)fa.secret_id,
- (const unsigned char *)signing_key);
- } else {
+ if(ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem while writing iso8601 timestamp")
+ if(FAIL == H5FD_s3comms_signing_key(signing_key, (const char *)fa.secret_key,
+ (const char *)fa.aws_region, (const char *)iso8601now))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem while computing signing key")
+
+ handle = H5FD_s3comms_s3r_open( url, (const char *)fa.aws_region,
+ (const char *)fa.secret_id, (const unsigned char *)signing_key);
+ }
+ else
handle = H5FD_s3comms_s3r_open(url, NULL, NULL, NULL);
- } /* if/else should authenticate */
- if (handle == NULL) {
+ if(handle == NULL)
/* If we want to check CURL's say on the matter in a controlled
* fashion, this is the place to do it, but would need to make a
* few minor changes to s3comms `s3r_t` and `s3r_read()`.
*/
HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "could not open");
- }
- /* create new file struct
- */
+ /* create new file struct */
file = H5FL_CALLOC(H5FD_ros3_t);
- if (file == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
- "unable to allocate file struct")
- }
+ if(file == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct")
file->s3r_handle = handle;
HDmemcpy(&(file->fa), &fa, sizeof(H5FD_ros3_fapl_t));
#if ROS3_STATS
- if (FAIL == ros3_reset_stats(file)) {
- HGOTO_ERROR(H5E_INTERNAL, H5E_UNINITIALIZED, NULL,
- "unable to reset file statistics")
- }
+ if(FAIL == ros3_reset_stats(file))
+ HGOTO_ERROR(H5E_INTERNAL, H5E_UNINITIALIZED, NULL, "unable to reset file statistics")
#endif /* ROS3_STATS */
ret_value = (H5FD_t*)file;
done:
- if (ret_value == NULL) {
- if (handle != NULL) {
- if (FAIL == H5FD_s3comms_s3r_close(handle)) {
- HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL,
- "unable to close s3 file handle")
- }
- }
- if (file != NULL) {
+ if(ret_value == NULL) {
+ if(handle != NULL)
+ if(FAIL == H5FD_s3comms_s3r_close(handle))
+ HDONE_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, NULL, "unable to close s3 file handle")
+ if(file != NULL)
file = H5FL_FREE(H5FD_ros3_t, file);
- }
curl_global_cleanup(); /* early cleanup because open failed */
} /* end if null return value (error) */
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* end H5FD_ros3_open() */
+} /* end H5FD__ros3_open() */
#if ROS3_STATS
-
/*----------------------------------------------------------------------------
*
* Function: ros3_fprint_stats()
@@ -939,8 +862,7 @@ done:
*----------------------------------------------------------------------------
*/
static herr_t
-ros3_fprint_stats(FILE *stream,
- const H5FD_ros3_t *file)
+ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file)
{
herr_t ret_value = SUCCEED;
parsed_url_t *purl = NULL;
@@ -959,26 +881,16 @@ ros3_fprint_stats(FILE *stream,
unsigned suffix_i = 0;
const char suffixes[] = { ' ', 'K', 'M', 'G', 'T', 'P' };
+ FUNC_ENTER_STATIC
-
- FUNC_ENTER_NOAPI_NOINIT
-
- if (stream == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "file stream cannot be null" );
- }
- if (file == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "file cannot be null");
- }
- if (file->s3r_handle == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "s3 request handle cannot be null");
- }
- if (file->s3r_handle->purl == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "parsed url structure cannot be null");
- }
+ if(stream == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file stream cannot be null" );
+ if(file == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file cannot be null");
+ if(file->s3r_handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "s3 request handle cannot be null");
+ if(file->s3r_handle->purl == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "parsed url structure cannot be null");
purl = file->s3r_handle->purl;
/******************
@@ -986,9 +898,9 @@ ros3_fprint_stats(FILE *stream,
******************/
HDfprintf(stream, "stats for %s://%s", purl->scheme, purl->host);
- if (purl->port != NULL && purl->port[0] != '\0')
+ if(purl->port != NULL && purl->port[0] != '\0')
HDfprintf(stream, ":%s", purl->port);
- if (purl->query != NULL && purl->query[0] != '\0') {
+ if(purl->query != NULL && purl->query[0] != '\0') {
if (purl->path != NULL && purl->path[0] != '\0')
HDfprintf(stream, "/%s", purl->path);
else
@@ -1003,23 +915,27 @@ ros3_fprint_stats(FILE *stream,
* AGGREGATE STATS *
*******************/
- for (i = 0; i <= ROS3_STATS_BIN_COUNT; i++) {
+ for(i = 0; i <= ROS3_STATS_BIN_COUNT; i++) {
const ros3_statsbin *r = &file->raw[i];
const ros3_statsbin *m = &file->meta[i];
- if (m->min < min_meta) min_meta = m->min;
- if (r->min < min_raw) min_raw = r->min;
- if (m->max > max_meta) max_meta = m->max;
- if (r->max > max_raw) max_raw = r->max;
+ if(m->min < min_meta)
+ min_meta = m->min;
+ if(r->min < min_raw)
+ min_raw = r->min;
+ if(m->max > max_meta)
+ max_meta = m->max;
+ if(r->max > max_raw)
+ max_raw = r->max;
count_raw += r->count;
count_meta += m->count;
bytes_raw += r->bytes;
bytes_meta += m->bytes;
}
- if (count_raw > 0)
+ if(count_raw > 0)
average_raw = (double)bytes_raw / (double)count_raw;
- if (count_meta > 0)
+ if(count_meta > 0)
average_meta = (double)bytes_meta / (double)count_meta;
/******************
@@ -1031,7 +947,7 @@ ros3_fprint_stats(FILE *stream,
HDfprintf(stream, "TOTAL BYTES: %llu (%llu meta, %llu raw)\n",
bytes_raw + bytes_meta, bytes_meta, bytes_raw);
- if (count_raw + count_meta == 0)
+ if(count_raw + count_meta == 0)
goto done;
/*************************
@@ -1040,21 +956,21 @@ ros3_fprint_stats(FILE *stream,
HDfprintf(stream, "SIZES meta raw\n");
HDfprintf(stream, " min ");
- if (count_meta == 0) {
+ if(count_meta == 0)
HDfprintf(stream, " 0.000 ");
- } else {
+ else {
re_dub = (double)min_meta;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
}
- if (count_raw == 0) {
+ if(count_raw == 0)
HDfprintf(stream, " 0.000 \n");
- } else {
+ else {
re_dub = (double)min_raw;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
@@ -1062,26 +978,26 @@ ros3_fprint_stats(FILE *stream,
HDfprintf(stream, " avg ");
re_dub = (double)average_meta;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
re_dub = (double)average_raw;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
HDfprintf(stream, " max ");
re_dub = (double)max_meta;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(stream, "%8.3lf%c ", re_dub, suffixes[suffix_i]);
re_dub = (double)max_raw;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
HDassert(suffix_i < sizeof(suffixes));
HDfprintf(stream, "%8.3lf%c\n", re_dub, suffixes[suffix_i]);
@@ -1095,7 +1011,7 @@ ros3_fprint_stats(FILE *stream,
HDfprintf(stream,
" up-to meta raw meta raw meta raw\n");
- for (i = 0; i <= ROS3_STATS_BIN_COUNT; i++) {
+ for(i = 0; i <= ROS3_STATS_BIN_COUNT; i++) {
const ros3_statsbin *m;
const ros3_statsbin *r;
unsigned long long range_end = 0;
@@ -1110,46 +1026,46 @@ ros3_fprint_stats(FILE *stream,
m = &file->meta[i];
r = &file->raw[i];
- if (r->count == 0 && m->count == 0)
+ if(r->count == 0 && m->count == 0)
continue;
range_end = ros3_stats_boundaries[i];
- if (i == ROS3_STATS_BIN_COUNT) {
+ if(i == ROS3_STATS_BIN_COUNT) {
range_end = ros3_stats_boundaries[i-1];
HDfprintf(stream, ">");
- } else {
- HDfprintf(stream, " ");
}
+ else
+ HDfprintf(stream, " ");
bm_val = (double)m->bytes;
- for (suffix_i = 0; bm_val >= 1024.0; suffix_i++)
+ for(suffix_i = 0; bm_val >= 1024.0; suffix_i++)
bm_val /= 1024.0;
HDassert(suffix_i < sizeof(suffixes));
bm_suffix = suffixes[suffix_i];
br_val = (double)r->bytes;
- for (suffix_i = 0; br_val >= 1024.0; suffix_i++)
+ for(suffix_i = 0; br_val >= 1024.0; suffix_i++)
br_val /= 1024.0;
HDassert(suffix_i < sizeof(suffixes));
br_suffix = suffixes[suffix_i];
- if (m->count > 0)
+ if(m->count > 0)
am_val = (double)(m->bytes) / (double)(m->count);
- for (suffix_i = 0; am_val >= 1024.0; suffix_i++)
+ for(suffix_i = 0; am_val >= 1024.0; suffix_i++)
am_val /= 1024.0;
HDassert(suffix_i < sizeof(suffixes));
am_suffix = suffixes[suffix_i];
- if (r->count > 0)
+ if(r->count > 0)
ar_val = (double)(r->bytes) / (double)(r->count);
- for (suffix_i = 0; ar_val >= 1024.0; suffix_i++)
+ for(suffix_i = 0; ar_val >= 1024.0; suffix_i++)
ar_val /= 1024.0;
HDassert(suffix_i < sizeof(suffixes));
ar_suffix = suffixes[suffix_i];
re_dub = (double)range_end;
- for (suffix_i = 0; re_dub >= 1024.0; suffix_i++)
+ for(suffix_i = 0; re_dub >= 1024.0; suffix_i++)
re_dub /= 1024.0;
HDassert(suffix_i < sizeof(suffixes));
@@ -1163,7 +1079,7 @@ ros3_fprint_stats(FILE *stream,
am_val, am_suffix, /* metadata average */
ar_val, ar_suffix); /* rawdata average */
- fflush(stream);
+ HDfflush(stream);
}
done:
@@ -1175,7 +1091,7 @@ done:
/*-------------------------------------------------------------------------
*
- * Function: H5FD_ros3_close()
+ * Function: H5FD__ros3_close()
*
* Purpose:
*
@@ -1191,52 +1107,45 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_ros3_close(H5FD_t H5_ATTR_UNUSED *_file)
+H5FD__ros3_close(H5FD_t H5_ATTR_UNUSED *_file)
{
H5FD_ros3_t *file = (H5FD_ros3_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_close() called.\n");
+ HDfprintf(stdout, "H5FD__ros3_close() called.\n");
#endif
- /* Sanity checks
- */
+ /* Sanity checks */
HDassert(file != NULL);
HDassert(file->s3r_handle != NULL);
/* Close the underlying request handle
*/
- if (FAIL == H5FD_s3comms_s3r_close(file->s3r_handle)) {
- HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL,
- "unable to close S3 request handle")
- }
+ if(FAIL == H5FD_s3comms_s3r_close(file->s3r_handle))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close S3 request handle")
#if ROS3_STATS
/* TODO: mechanism to re-target stats printout */
- if (ros3_fprint_stats(stdout, file) == FAIL) {
- HGOTO_ERROR(H5E_INTERNAL, H5E_ERROR, FAIL,
- "problem while writing file statistics")
- }
+ if(ros3_fprint_stats(stdout, file) == FAIL)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_ERROR, FAIL, "problem while writing file statistics")
#endif /* ROS3_STATS */
- /* Release the file info
- */
+ /* Release the file info */
file = H5FL_FREE(H5FD_ros3_t, file);
done:
curl_global_cleanup(); /* cleanup to answer init on open */
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* end H5FD_ros3_close() */
+} /* end H5FD__ros3_close() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_ros3_cmp()
+ * Function: H5FD__ros3_cmp()
*
* Purpose:
*
@@ -1265,9 +1174,7 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5FD_ros3_cmp(
- const H5FD_t *_f1,
- const H5FD_t *_f2)
+H5FD__ros3_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_ros3_t *f1 = (const H5FD_ros3_t *)_f1;
const H5FD_ros3_t *f2 = (const H5FD_ros3_t *)_f2;
@@ -1275,10 +1182,10 @@ H5FD_ros3_cmp(
const parsed_url_t *purl2 = NULL;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_cmp() called.\n");
+ HDfprintf(stdout, "H5FD__ros3_cmp() called.\n");
#endif
HDassert(f1->s3r_handle != NULL);
@@ -1294,113 +1201,80 @@ H5FD_ros3_cmp(
HDassert(purl2->host != NULL);
/* URL: SCHEME */
- if (HDstrcmp(purl1->scheme, purl2->scheme)) {
- HGOTO_DONE(-1);
- }
+ if(HDstrcmp(purl1->scheme, purl2->scheme))
+ HGOTO_DONE(-1)
/* URL: HOST */
- if (HDstrcmp(purl1->host, purl2->host)) {
- HGOTO_DONE(-1);
- }
+ if(HDstrcmp(purl1->host, purl2->host))
+ HGOTO_DONE(-1)
/* URL: PORT */
- if (purl1->port && purl2->port) {
- if (HDstrcmp(purl1->port, purl2->port)) {
- HGOTO_DONE(-1);
- }
- }
- else
- if (purl1->port) {
- HGOTO_DONE(-1);
- }
- else
- if (purl2->port) {
- HGOTO_DONE(-1);
+ if(purl1->port && purl2->port) {
+ if(HDstrcmp(purl1->port, purl2->port))
+ HGOTO_DONE(-1)
}
+ else if(purl1->port)
+ HGOTO_DONE(-1)
+ else if(purl2->port)
+ HGOTO_DONE(-1)
/* URL: PATH */
- if (purl1->path && purl2->path) {
- if (HDstrcmp(purl1->path, purl2->path)) {
- HGOTO_DONE(-1);
- }
- }
- else
- if (purl1->path && !purl2->path) {
- HGOTO_DONE(-1);
- }
- else
- if (purl2->path && !purl1->path) {
- HGOTO_DONE(-1);
+ if(purl1->path && purl2->path) {
+ if(HDstrcmp(purl1->path, purl2->path))
+ HGOTO_DONE(-1)
}
+ else if(purl1->path && !purl2->path)
+ HGOTO_DONE(-1)
+ else if(purl2->path && !purl1->path)
+ HGOTO_DONE(-1)
/* URL: QUERY */
- if (purl1->query && purl2->query) {
- if (HDstrcmp(purl1->query, purl2->query)) {
- HGOTO_DONE(-1);
- }
- }
- else
- if (purl1->query && !purl2->query) {
- HGOTO_DONE(-1);
- }
- else
- if (purl2->query && !purl1->query) {
- HGOTO_DONE(-1);
+ if(purl1->query && purl2->query) {
+ if(HDstrcmp(purl1->query, purl2->query))
+ HGOTO_DONE(-1)
}
+ else if(purl1->query && !purl2->query)
+ HGOTO_DONE(-1)
+ else if(purl2->query && !purl1->query)
+ HGOTO_DONE(-1)
/* FAPL: AWS_REGION */
- if (f1->fa.aws_region[0] != '\0' && f2->fa.aws_region[0] != '\0') {
- if (HDstrcmp(f1->fa.aws_region, f2->fa.aws_region)) {
- HGOTO_DONE(-1);
- }
- }
- else
- if (f1->fa.aws_region[0] != '\0') {
- HGOTO_DONE(-1);
- }
- else
- if (f2->fa.aws_region[0] != '\0') {
- HGOTO_DONE(-1);
+ if(f1->fa.aws_region[0] != '\0' && f2->fa.aws_region[0] != '\0') {
+ if(HDstrcmp(f1->fa.aws_region, f2->fa.aws_region))
+ HGOTO_DONE(-1)
}
+ else if(f1->fa.aws_region[0] != '\0')
+ HGOTO_DONE(-1)
+ else if(f2->fa.aws_region[0] != '\0')
+ HGOTO_DONE(-1)
/* FAPL: SECRET_ID */
- if (f1->fa.secret_id[0] != '\0' && f2->fa.secret_id[0] != '\0') {
- if (HDstrcmp(f1->fa.secret_id, f2->fa.secret_id)) {
- HGOTO_DONE(-1);
- }
- }
- else
- if (f1->fa.secret_id[0] != '\0') {
- HGOTO_DONE(-1);
- }
- else
- if (f2->fa.secret_id[0] != '\0') {
- HGOTO_DONE(-1);
+ if(f1->fa.secret_id[0] != '\0' && f2->fa.secret_id[0] != '\0') {
+ if(HDstrcmp(f1->fa.secret_id, f2->fa.secret_id))
+ HGOTO_DONE(-1)
}
+ else if(f1->fa.secret_id[0] != '\0')
+ HGOTO_DONE(-1)
+ else if(f2->fa.secret_id[0] != '\0')
+ HGOTO_DONE(-1)
/* FAPL: SECRET_KEY */
- if (f1->fa.secret_key[0] != '\0' && f2->fa.secret_key[0] != '\0') {
- if (HDstrcmp(f1->fa.secret_key, f2->fa.secret_key)) {
- HGOTO_DONE(-1);
- }
- }
- else
- if (f1->fa.secret_key[0] != '\0') {
- HGOTO_DONE(-1);
- }
- else
- if (f2->fa.secret_key[0] != '\0') {
- HGOTO_DONE(-1);
+ if(f1->fa.secret_key[0] != '\0' && f2->fa.secret_key[0] != '\0') {
+ if(HDstrcmp(f1->fa.secret_key, f2->fa.secret_key))
+ HGOTO_DONE(-1)
}
+ else if(f1->fa.secret_key[0] != '\0')
+ HGOTO_DONE(-1)
+ else if(f2->fa.secret_key[0] != '\0')
+ HGOTO_DONE(-1)
done:
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5FD_ros3_cmp() */
+} /* H5FD__ros3_cmp() */
/*-------------------------------------------------------------------------
- * Function: H5FD_ros3_query
+ * Function: H5FD__ros3_query
*
* Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
@@ -1419,30 +1293,28 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_ros3_query(const H5FD_t H5_ATTR_UNUSED *_file,
- unsigned long *flags /* out */)
+H5FD__ros3_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_query() called.\n");
+ HDfprintf(stdout, "H5FD__ros3_query() called.\n");
#endif
/* Set the VFL feature flags that this driver supports */
- if (flags) {
+ if(flags) {
*flags = 0;
/* OK to perform data sieving for faster raw data reads & writes */
*flags |= H5FD_FEAT_DATA_SIEVE;
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-
-} /* H5FD_ros3_query() */
+} /* H5FD__ros3_query() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_ros3_get_eoa()
+ * Function: H5FD__ros3_get_eoa()
*
* Purpose:
*
@@ -1460,25 +1332,23 @@ H5FD_ros3_query(const H5FD_t H5_ATTR_UNUSED *_file,
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_ros3_get_eoa(const H5FD_t *_file,
- H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__ros3_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_ros3_t *file = (const H5FD_ros3_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_get_eoa() called.\n");
+ HDfprintf(stdout, "H5FD__ros3_get_eoa() called.\n");
#endif
FUNC_LEAVE_NOAPI(file->eoa)
-
-} /* end H5FD_ros3_get_eoa() */
+} /* end H5FD__ros3_get_eoa() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_ros3_set_eoa()
+ * Function: H5FD__ros3_set_eoa()
*
* Purpose:
*
@@ -1494,28 +1364,25 @@ H5FD_ros3_get_eoa(const H5FD_t *_file,
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_ros3_set_eoa(H5FD_t *_file,
- H5FD_mem_t H5_ATTR_UNUSED type,
- haddr_t addr)
+H5FD__ros3_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
H5FD_ros3_t *file = (H5FD_ros3_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_set_eoa() called.\n");
+ HDfprintf(stdout, "H5FD__ros3_set_eoa() called.\n");
#endif
file->eoa = addr;
FUNC_LEAVE_NOAPI(SUCCEED)
-
-} /* H5FD_ros3_set_eoa() */
+} /* H5FD__ros3_set_eoa() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_ros3_get_eof()
+ * Function: H5FD__ros3_get_eof()
*
* Purpose:
*
@@ -1532,25 +1399,23 @@ H5FD_ros3_set_eoa(H5FD_t *_file,
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_ros3_get_eof(const H5FD_t *_file,
- H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__ros3_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_ros3_t *file = (const H5FD_ros3_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_get_eof() called.\n");
+ HDfprintf(stdout, "H5FD__ros3_get_eof() called.\n");
#endif
FUNC_LEAVE_NOAPI(H5FD_s3comms_s3r_get_filesize(file->s3r_handle))
-
-} /* end H5FD_ros3_get_eof() */
+} /* end H5FD__ros3_get_eof() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_ros3_get_handle()
+ * Function: H5FD__ros3_get_handle()
*
* Purpose:
*
@@ -1566,34 +1431,31 @@ H5FD_ros3_get_eof(const H5FD_t *_file,
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_ros3_get_handle(H5FD_t *_file,
- hid_t H5_ATTR_UNUSED fapl,
- void **file_handle)
+H5FD__ros3_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl,
+ void **file_handle)
{
H5FD_ros3_t *file = (H5FD_ros3_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_get_handle() called.\n");
+ HDfprintf(stdout, "H5FD__ros3_get_handle() called.\n");
#endif
- if (!file_handle) {
+ if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
- }
*file_handle = file->s3r_handle;
done:
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* end H5FD_ros3_get_handle() */
+} /* end H5FD__ros3_get_handle() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_ros3_read()
+ * Function: H5FD__ros3_read()
*
* Purpose
*
@@ -1614,12 +1476,9 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_ros3_read(H5FD_t *_file,
- H5FD_mem_t H5_ATTR_UNUSED type,
- hid_t H5_ATTR_UNUSED dxpl_id,
- haddr_t addr, /* start offset */
- size_t size, /* length of read */
- void *buf) /* out */
+H5FD__ros3_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type,
+ hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, size_t size,
+ void *buf)
{
H5FD_ros3_t *file = (H5FD_ros3_t *)_file;
size_t filesize = 0;
@@ -1631,10 +1490,10 @@ H5FD_ros3_read(H5FD_t *_file,
#endif /* ROS3_STATS */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_read() called.\n");
+ HDfprintf(stdout, "H5FD__ros3_read() called.\n");
#endif
HDassert(file != NULL);
@@ -1643,40 +1502,32 @@ H5FD_ros3_read(H5FD_t *_file,
filesize = H5FD_s3comms_s3r_get_filesize(file->s3r_handle);
- if ((addr > filesize) || ((addr + size) > filesize)) {
+ if((addr > filesize) || ((addr + size) > filesize))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "range exceeds file address")
- }
- if (H5FD_s3comms_s3r_read(file->s3r_handle, addr, size, buf) == FAIL) {
+ if(H5FD_s3comms_s3r_read(file->s3r_handle, addr, size, buf) == FAIL)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "unable to execute read")
- }
#if ROS3_STATS
- /* Find which "bin" this read fits in. Can be "overflow" bin.
- */
- for (bin_i = 0; bin_i < ROS3_STATS_BIN_COUNT; bin_i++) {
- if ((unsigned long long)size < ros3_stats_boundaries[bin_i]) {
+ /* Find which "bin" this read fits in. Can be "overflow" bin. */
+ for(bin_i = 0; bin_i < ROS3_STATS_BIN_COUNT; bin_i++)
+ if((unsigned long long)size < ros3_stats_boundaries[bin_i])
break;
- }
- }
bin = (type == H5FD_MEM_DRAW)
? &file->raw[bin_i]
: &file->meta[bin_i];
- /* Store collected stats in appropriate bin
- */
- if (bin->count == 0) {
+ /* Store collected stats in appropriate bin */
+ if(bin->count == 0) {
bin->min = size;
bin->max = size;
}
else {
- if (size < bin->min) {
+ if(size < bin->min)
bin->min = size;
- }
- if (size > bin->max) {
+ if(size > bin->max)
bin->max = size;
- }
}
bin->count++;
bin->bytes += (unsigned long long)size;
@@ -1685,13 +1536,12 @@ H5FD_ros3_read(H5FD_t *_file,
done:
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* end H5FD_ros3_read() */
+} /* end H5FD__ros3_read() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_ros3_write()
+ * Function: H5FD__ros3_write()
*
* Purpose:
*
@@ -1708,33 +1558,28 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_ros3_write(H5FD_t H5_ATTR_UNUSED *_file,
- H5FD_mem_t H5_ATTR_UNUSED type,
- hid_t H5_ATTR_UNUSED dxpl_id,
- haddr_t H5_ATTR_UNUSED addr,
- size_t H5_ATTR_UNUSED size,
- const void H5_ATTR_UNUSED *buf)
+H5FD__ros3_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type,
+ hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr,
+ size_t H5_ATTR_UNUSED size, const void H5_ATTR_UNUSED *buf)
{
herr_t ret_value = FAIL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_write() called.\n");
+ HDfprintf(stdout, "H5FD__ros3_write() called.\n");
#endif
- HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL,
- "cannot write to read-only file.")
+ HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot write to read-only file.")
done:
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5FD_ros3_write() */
+} /* H5FD__ros3_write() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_ros3_truncate()
+ * Function: H5FD__ros3_truncate()
*
* Purpose:
*
@@ -1753,30 +1598,27 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_ros3_truncate(H5FD_t H5_ATTR_UNUSED *_file,
- hid_t H5_ATTR_UNUSED dxpl_id,
- hbool_t H5_ATTR_UNUSED closing)
+H5FD__ros3_truncate(H5FD_t H5_ATTR_UNUSED *_file, hid_t H5_ATTR_UNUSED dxpl_id,
+ hbool_t H5_ATTR_UNUSED closing)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if ROS3_DEBUG
- HDfprintf(stdout, "H5FD_ros3_truncate() called.\n");
+ HDfprintf(stdout, "H5FD__ros3_truncate() called.\n");
#endif
- HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL,
- "cannot truncate read-only file.")
+ HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, FAIL, "cannot truncate read-only file.")
done:
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* end H5FD_ros3_truncate() */
+} /* end H5FD__ros3_truncate() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_ros3_lock()
+ * Function: H5FD__ros3_lock()
*
* Purpose:
*
@@ -1796,18 +1638,18 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_ros3_lock(H5FD_t H5_ATTR_UNUSED *_file,
+H5FD__ros3_lock(H5FD_t H5_ATTR_UNUSED *_file,
hbool_t H5_ATTR_UNUSED rw)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
- FUNC_LEAVE_NOAPI(SUCCEED)
+ FUNC_ENTER_STATIC_NOERR
-} /* end H5FD_ros3_lock() */
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5FD__ros3_lock() */
/*-------------------------------------------------------------------------
*
- * Function: H5FD_ros3_unlock()
+ * Function: H5FD__ros3_unlock()
*
* Purpose:
*
@@ -1824,12 +1666,12 @@ H5FD_ros3_lock(H5FD_t H5_ATTR_UNUSED *_file,
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_ros3_unlock(H5FD_t H5_ATTR_UNUSED *_file)
+H5FD__ros3_unlock(H5FD_t H5_ATTR_UNUSED *_file)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
- FUNC_LEAVE_NOAPI(SUCCEED)
+ FUNC_ENTER_STATIC_NOERR
-} /* end H5FD_ros3_unlock() */
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5FD__ros3_unlock() */
#endif /* H5_HAVE_ROS3_VFD */
diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c
index d9d4c88..4c762d1 100644
--- a/src/H5FDs3comms.c
+++ b/src/H5FDs3comms.c
@@ -148,9 +148,8 @@ curlwritecallback(char *ptr,
size_t product = (size * nmemb);
size_t written = 0;
- if (sds->magic != S3COMMS_CALLBACK_DATASTRUCT_MAGIC) {
+ if(sds->magic != S3COMMS_CALLBACK_DATASTRUCT_MAGIC)
return written;
- }
if (size > 0) {
HDmemcpy(&(sds->data[sds->size]), ptr, product);
@@ -159,7 +158,6 @@ curlwritecallback(char *ptr,
}
return written;
-
} /* end curlwritecallback() */
@@ -236,22 +234,19 @@ H5FD_s3comms_hrb_node_set(
FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
- HDfprintf(stdout, "called H5FD_s3comms_hrb_node_set.\n");
+ HDfprintf(stdout, "called H5FD_s3comms_hrb_node_set.");
HDprintf("NAME: %s\n", name);
HDprintf("VALUE: %s\n", value);
HDprintf("LIST:\n->");
- for (node_ptr = (*L); node_ptr != NULL; node_ptr = node_ptr->next) {
+ for(node_ptr = (*L); node_ptr != NULL; node_ptr = node_ptr->next)
HDfprintf(stdout, "{%s}\n->", node_ptr->cat);
- }
HDprintf("(null)\n");
- fflush(stdout);
+ HDfflush(stdout);
node_ptr = NULL;
#endif
- if (name == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to operate on null name.\n");
- }
+ if(name == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to operate on null name");
namelen = HDstrlen(name);
/***********************
@@ -261,20 +256,17 @@ H5FD_s3comms_hrb_node_set(
/* copy and lowercase name
*/
lowername = (char *)H5MM_malloc(sizeof(char) * (namelen + 1));
- if (lowername == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
- "cannot make space for lowercase name copy.\n");
- }
- for (i = 0; i < namelen; i++) {
- lowername[i] = (char)tolower((int)name[i]);
- }
+ if(lowername == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for lowercase name copy.");
+ for(i = 0; i < namelen; i++)
+ lowername[i] = (char)HDtolower((int)name[i]);
lowername[namelen] = 0;
/* If value supplied, copy name, value, and concatenated "name: value".
* If NULL, we will be removing a node or doing nothing, so no need for
* copies
*/
- if (value != NULL) {
+ if(value != NULL) {
int ret = 0;
size_t valuelen = HDstrlen(value);
size_t catlen = namelen + valuelen + 2; /* +2 from ": " */
@@ -282,38 +274,28 @@ H5FD_s3comms_hrb_node_set(
namecpy = (char *)H5MM_malloc(sizeof(char) * (namelen + 1));
- if (namecpy == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
- "cannot make space for name copy.\n");
- }
+ if(namecpy == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for name copy.");
HDmemcpy(namecpy, name, (namelen + 1));
valuecpy = (char *)H5MM_malloc(sizeof(char) * (valuelen + 1));
- if (valuecpy == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
- "cannot make space for value copy.\n");
- }
+ if(valuecpy == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for value copy.");
HDmemcpy(valuecpy, value, (valuelen + 1));
nvcat = (char *)H5MM_malloc(sizeof(char) * catwrite);
- if (nvcat == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
- "cannot make space for concatenated string.\n");
- }
+ if(nvcat == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for concatenated string.");
ret = HDsnprintf(nvcat, catwrite, "%s: %s", name, value);
- if (ret < 0 || (size_t)ret > catlen) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "cannot concatenate `%s: %s", name, value);
- }
+ if(ret < 0 || (size_t)ret > catlen)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot concatenate `%s: %s", name, value);
HDassert( catlen == HDstrlen(nvcat) );
/* create new_node, should we need it
*/
new_node = (hrb_node_t *)H5MM_malloc(sizeof(hrb_node_t));
- if (new_node == NULL) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
- "cannot make space for new set.\n");
- }
+ if(new_node == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot make space for new set.");
new_node->magic = S3COMMS_HRB_NODE_MAGIC;
new_node->name = NULL;
@@ -327,14 +309,12 @@ H5FD_s3comms_hrb_node_set(
* ACT ON LIST *
***************/
- if (*L == NULL) {
- if (value == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "trying to remove node from empty list");
- }
+ if(*L == NULL) {
+ if(value == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove node from empty list")
else {
#if S3COMMS_DEBUG
-HDprintf("CREATE NEW\n"); fflush(stdout);
+HDprintf("CREATE NEW\n"); HDfflush(stdout);
#endif
/*******************
* CREATE NEW LIST *
@@ -358,13 +338,13 @@ HDprintf("CREATE NEW\n"); fflush(stdout);
/* Check whether to modify/remove first node in list
*/
- if (strcmp(lowername, node_ptr->lowername) == 0) {
+ if(HDstrcmp(lowername, node_ptr->lowername) == 0) {
is_looking = FALSE;
if (value == NULL) {
#if S3COMMS_DEBUG
-HDprintf("REMOVE HEAD\n"); fflush(stdout);
+HDprintf("REMOVE HEAD\n"); HDfflush(stdout);
#endif
/***************
* REMOVE HEAD *
@@ -373,41 +353,41 @@ HDprintf("REMOVE HEAD\n"); fflush(stdout);
*L = node_ptr->next;
#if S3COMMS_DEBUG
-HDprintf("FREEING CAT (node)\n"); fflush(stdout);
+HDprintf("FREEING CAT (node)\n"); HDfflush(stdout);
#endif
H5MM_xfree(node_ptr->cat);
#if S3COMMS_DEBUG
-HDprintf("FREEING LOWERNAME (node)\n"); fflush(stdout);
+HDprintf("FREEING LOWERNAME (node)\n"); HDfflush(stdout);
#endif
H5MM_xfree(node_ptr->lowername);
#if S3COMMS_DEBUG
-HDprintf("FREEING NAME (node)\n"); fflush(stdout);
+HDprintf("FREEING NAME (node)\n"); HDfflush(stdout);
#endif
H5MM_xfree(node_ptr->name);
#if S3COMMS_DEBUG
-HDprintf("FREEING VALUE (node)\n"); fflush(stdout);
+HDprintf("FREEING VALUE (node)\n"); HDfflush(stdout);
#endif
H5MM_xfree(node_ptr->value);
#if S3COMMS_DEBUG
HDprintf("MAGIC OK? %s\n",
(node_ptr->magic == S3COMMS_HRB_NODE_MAGIC) ? "YES" : "NO");
-fflush(stdout);
+HDfflush(stdout);
#endif
HDassert( node_ptr->magic == S3COMMS_HRB_NODE_MAGIC );
node_ptr->magic += 1ul;
#if S3COMMS_DEBUG
-HDprintf("FREEING POINTER\n"); fflush(stdout);
+HDprintf("FREEING POINTER\n"); HDfflush(stdout);
#endif
H5MM_xfree(node_ptr);
#if S3COMMS_DEBUG
-HDprintf("FREEING WORKING LOWERNAME\n"); fflush(stdout);
+HDprintf("FREEING WORKING LOWERNAME\n"); HDfflush(stdout);
#endif
H5MM_xfree(lowername); lowername = NULL;
}
else {
#if S3COMMS_DEBUG
-HDprintf("MODIFY HEAD\n"); fflush(stdout);
+HDprintf("MODIFY HEAD\n"); HDfflush(stdout);
#endif
/***************
* MODIFY HEAD *
@@ -429,17 +409,15 @@ HDprintf("MODIFY HEAD\n"); fflush(stdout);
}
}
else
- if (strcmp(lowername, node_ptr->lowername) < 0) {
+ if (HDstrcmp(lowername, node_ptr->lowername) < 0) {
is_looking = FALSE;
- if (value == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "trying to remove a node 'before' head");
- }
+ if(value == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove a node 'before' head")
else {
#if S3COMMS_DEBUG
-HDprintf("PREPEND NEW HEAD\n"); fflush(stdout);
+HDprintf("PREPEND NEW HEAD\n"); HDfflush(stdout);
#endif
/*******************
* INSERT NEW HEAD *
@@ -458,24 +436,22 @@ HDprintf("PREPEND NEW HEAD\n"); fflush(stdout);
* SEARCH LIST *
***************/
- while (is_looking) {
- if (node_ptr->next == NULL) {
+ while(is_looking) {
+ if(node_ptr->next == NULL) {
is_looking = FALSE;
- if (value == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "trying to remove absent node");
- }
+ if(value == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node")
else {
#if S3COMMS_DEBUG
-HDprintf("APPEND A NODE\n"); fflush(stdout);
+HDprintf("APPEND A NODE\n"); HDfflush(stdout);
#endif
/*******************
* APPEND NEW NODE *
*******************/
- HDassert( strcmp(lowername, node_ptr->lowername) > 0 );
+ HDassert( HDstrcmp(lowername, node_ptr->lowername) > 0 );
new_node->name = namecpy;
new_node->value = valuecpy;
new_node->lowername = lowername;
@@ -484,23 +460,21 @@ HDprintf("APPEND A NODE\n"); fflush(stdout);
}
}
else
- if (strcmp(lowername, node_ptr->next->lowername) < 0) {
+ if(HDstrcmp(lowername, node_ptr->next->lowername) < 0) {
is_looking = FALSE;
- if (value == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "trying to remove absent node");
- }
+ if(value == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "trying to remove absent node")
else {
#if S3COMMS_DEBUG
-HDprintf("INSERT A NODE\n"); fflush(stdout);
+HDprintf("INSERT A NODE\n"); HDfflush(stdout);
#endif
/*******************
* INSERT NEW NODE *
*******************/
- HDassert( strcmp(lowername, node_ptr->lowername) > 0 );
+ HDassert( HDstrcmp(lowername, node_ptr->lowername) > 0 );
new_node->name = namecpy;
new_node->value = valuecpy;
new_node->lowername = lowername;
@@ -510,11 +484,11 @@ HDprintf("INSERT A NODE\n"); fflush(stdout);
}
}
else
- if (strcmp(lowername, node_ptr->next->lowername) == 0) {
+ if(HDstrcmp(lowername, node_ptr->next->lowername) == 0) {
is_looking = FALSE;
- if (value == NULL) {
+ if(value == NULL) {
/*****************
* REMOVE A NODE *
*****************/
@@ -523,7 +497,7 @@ HDprintf("INSERT A NODE\n"); fflush(stdout);
node_ptr->next = tmp->next;
#if S3COMMS_DEBUG
-HDprintf("REMOVE A NODE\n"); fflush(stdout);
+HDprintf("REMOVE A NODE\n"); HDfflush(stdout);
#endif
H5MM_xfree(tmp->cat);
H5MM_xfree(tmp->lowername);
@@ -539,7 +513,7 @@ HDprintf("REMOVE A NODE\n"); fflush(stdout);
}
else {
#if S3COMMS_DEBUG
-HDprintf("MODIFY A NODE\n"); fflush(stdout);
+HDprintf("MODIFY A NODE\n"); HDfflush(stdout);
#endif
/*****************
* MODIFY A NODE *
@@ -572,14 +546,17 @@ HDprintf("MODIFY A NODE\n"); fflush(stdout);
} /* end while is_looking */
done:
- if (ret_value == FAIL) {
- /* clean up
- */
- if (nvcat != NULL) { H5MM_xfree(nvcat); }
- if (namecpy != NULL) { H5MM_xfree(namecpy); }
- if (lowername != NULL) { H5MM_xfree(lowername); }
- if (valuecpy != NULL) { H5MM_xfree(valuecpy); }
- if (new_node != NULL) {
+ if(ret_value == FAIL) {
+ /* clean up */
+ if(nvcat != NULL)
+ H5MM_xfree(nvcat);
+ if(namecpy != NULL)
+ H5MM_xfree(namecpy);
+ if(lowername != NULL)
+ H5MM_xfree(lowername);
+ if(valuecpy != NULL)
+ H5MM_xfree(valuecpy);
+ if(new_node != NULL) {
HDassert( new_node->magic == S3COMMS_HRB_NODE_MAGIC );
new_node->magic += 1ul;
H5MM_xfree(new_node);
@@ -638,12 +615,10 @@ H5FD_s3comms_hrb_destroy(hrb_t **_buf)
HDfprintf(stdout, "called H5FD_s3comms_hrb_destroy.\n");
#endif
- if (_buf != NULL && *_buf != NULL) {
+ if(_buf != NULL && *_buf != NULL) {
buf = *_buf;
- if (buf->magic != S3COMMS_HRB_MAGIC) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "pointer's magic does not match.\n");
- }
+ if(buf->magic != S3COMMS_HRB_MAGIC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "pointer's magic does not match.");
H5MM_xfree(buf->verb);
H5MM_xfree(buf->version);
@@ -707,53 +682,38 @@ H5FD_s3comms_hrb_init_request(const char *_verb,
HDfprintf(stdout, "called H5FD_s3comms_hrb_init_request.\n");
#endif
- if (_resource == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "resource string cannot be null.\n");
- }
+ if(_resource == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "resource string cannot be null.");
- /* populate valid NULLs with defaults
- */
- if (_verb == NULL) {
+ /* populate valid NULLs with defaults */
+ if(_verb == NULL)
_verb = "GET";
- }
-
- if (_http_version == NULL) {
+ if(_http_version == NULL)
_http_version = "HTTP/1.1";
- }
- /* malloc space for and prepare structure
- */
+ /* malloc space for and prepare structure */
request = (hrb_t *)H5MM_malloc(sizeof(hrb_t));
- if (request == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL,
- "no space for request structure");
- }
+ if(request == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "no space for request structure");
request->magic = S3COMMS_HRB_MAGIC;
request->body = NULL;
request->body_len = 0;
request->first_header = NULL;
-
- /* malloc and copy strings for the structure
- */
+ /* malloc and copy strings for the structure */
reslen = HDstrlen(_resource);
if (_resource[0] == '/') {
res = (char *)H5MM_malloc(sizeof(char) * (reslen+1));
- if (res == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL,
- "no space for resource string");
- }
+ if(res == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "no space for resource string");
HDmemcpy(res, _resource, (reslen+1));
}
else {
res = (char *)H5MM_malloc(sizeof(char) * (reslen+2));
- if (res == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL,
- "no space for resource string");
- }
+ if(res == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "no space for resource string");
*res = '/';
HDmemcpy((&res[1]), _resource, (reslen+1));
HDassert( (reslen+1) == HDstrlen(res) );
@@ -761,24 +721,18 @@ H5FD_s3comms_hrb_init_request(const char *_verb,
verblen = HDstrlen(_verb) + 1;
verb = (char *)H5MM_malloc(sizeof(char) * verblen);
- if (verb == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "no space for verb string");
- }
+ if(verb == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no space for verb string");
HDstrncpy(verb, _verb, verblen);
vrsnlen = HDstrlen(_http_version) + 1;
vrsn = (char *)H5MM_malloc(sizeof(char) * vrsnlen);
- if (vrsn == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "no space for http-version string");
- }
+ if(vrsn == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no space for http-version string");
HDstrncpy(vrsn, _http_version, vrsnlen);
-
- /* place new copies into structure
- */
+ /* place new copies into structure */
request->resource = res;
request->verb = verb;
request->version = vrsn;
@@ -786,13 +740,16 @@ H5FD_s3comms_hrb_init_request(const char *_verb,
ret_value = request;
done:
- /* if there is an error, clean up after ourselves
- */
+ /* if there is an error, clean up after ourselves */
if (ret_value == NULL) {
- if (request != NULL) H5MM_xfree(request);
- if (vrsn != NULL) H5MM_xfree(vrsn);
- if (verb != NULL) H5MM_xfree(verb);
- if (res != NULL) H5MM_xfree(res);
+ if(request != NULL)
+ H5MM_xfree(request);
+ if(vrsn != NULL)
+ H5MM_xfree(vrsn);
+ if(verb != NULL)
+ H5MM_xfree(verb);
+ if(res != NULL)
+ H5MM_xfree(res);
}
FUNC_LEAVE_NOAPI(ret_value)
@@ -836,14 +793,10 @@ H5FD_s3comms_s3r_close(s3r_t *handle)
HDfprintf(stdout, "called H5FD_s3comms_s3r_close.\n");
#endif
- if (handle == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle cannot be null.\n");
- }
- if (handle->magic != S3COMMS_S3R_MAGIC) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle has invalid magic.\n");
- }
+ if(handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null.");
+ if(handle->magic != S3COMMS_S3R_MAGIC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic.");
curl_easy_cleanup(handle->curlhandle);
@@ -854,10 +807,8 @@ H5FD_s3comms_s3r_close(s3r_t *handle)
HDassert( handle->httpverb != NULL );
H5MM_xfree(handle->httpverb);
- if (FAIL == H5FD_s3comms_free_purl(handle->purl)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to release parsed url structure")
- }
+ if(FAIL == H5FD_s3comms_free_purl(handle->purl))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to release parsed url structure")
H5MM_xfree(handle);
@@ -893,9 +844,8 @@ H5FD_s3comms_s3r_get_filesize(s3r_t *handle)
FUNC_ENTER_NOAPI_NOINIT_NOERR
- if (handle != NULL) {
+ if(handle != NULL)
ret_value = handle->filesize;
- }
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_s3comms_s3r_get_filesize */
@@ -953,58 +903,33 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle)
HDfprintf(stdout, "called H5FD_s3comms_s3r_getsize.\n");
#endif
- if (handle == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle cannot be null.\n");
- }
- if (handle->magic != S3COMMS_S3R_MAGIC) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle has invalid magic.\n");
- }
- if (handle->curlhandle == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle has bad (null) curlhandle.\n")
- }
+ if(handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null.");
+ if(handle->magic != S3COMMS_S3R_MAGIC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic.");
+ if(handle->curlhandle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) curlhandle.")
/********************
* PREPARE FOR HEAD *
********************/
curlh = handle->curlhandle;
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_NOBODY, 1L))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_NOBODY).");
- if ( CURLE_OK !=
- curl_easy_setopt(curlh,
- CURLOPT_NOBODY,
- 1L) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "error while setting CURL option (CURLOPT_NOBODY). "
- "(placeholder flags)");
- }
-
- if ( CURLE_OK !=
- curl_easy_setopt(curlh,
- CURLOPT_HEADERDATA,
- &sds) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "error while setting CURL option (CURLOPT_HEADERDATA). "
- "(placeholder flags)");
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HEADERDATA, &sds))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_HEADERDATA).");
HDassert( handle->httpverb == NULL );
handle->httpverb = (char *)H5MM_malloc(sizeof(char) * 16);
- if (handle->httpverb == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL,
- "unable to allocate space for S3 request HTTP verb");
- }
+ if(handle->httpverb == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "unable to allocate space for S3 request HTTP verb");
HDmemcpy(handle->httpverb, "HEAD", 5);
headerresponse = (char *)H5MM_malloc(sizeof(char) * CURL_MAX_HTTP_HEADER);
- if (headerresponse == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL,
- "unable to allocate space for curl header response");
- }
+ if(headerresponse == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "unable to allocate space for curl header response");
sds.data = headerresponse;
/*******************
@@ -1015,65 +940,43 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle)
* but, with a NULL destination and NOBODY and HEADERDATA supplied above,
* only http metadata will be sent by server and recorded by s3comms
*/
- if (FAIL ==
- H5FD_s3comms_s3r_read(handle, 0, 0, NULL) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem in reading during getsize.\n");
- }
+ if(FAIL == H5FD_s3comms_s3r_read(handle, 0, 0, NULL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem in reading during getsize.");
- if (sds.size > CURL_MAX_HTTP_HEADER) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "HTTP metadata buffer overrun\n");
- } else if (sds.size == 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "No HTTP metadata\n");
+ if(sds.size > CURL_MAX_HTTP_HEADER)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HTTP metadata buffer overrun")
+ else if (sds.size == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "No HTTP metadata")
#if S3COMMS_DEBUG
- } else {
+ else
HDfprintf(stderr, "GETSIZE: OK\n");
#endif
- }
/******************
* PARSE RESPONSE *
******************/
- start = strstr(headerresponse,
- "\r\nContent-Length: ");
- if (start == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "could not find \"Content-Length\" in response.\n");
- }
+ start = HDstrstr(headerresponse, "\r\nContent-Length: ");
+ if(start == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not find \"Content-Length\" in response.");
- /* move "start" to beginning of value in line; find end of line
- */
+ /* move "start" to beginning of value in line; find end of line */
start = start + HDstrlen("\r\nContent-Length: ");
- end = strstr(start, "\r\n");
- if (end == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "could not find end of content length line");
- }
+ end = HDstrstr(start, "\r\n");
+ if(end == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not find end of content length line");
/* place null terminator at end of numbers
*/
*end = '\0';
- content_length = strtoumax((const char *)start,
- NULL,
- 0);
-
- if (UINTMAX_MAX > SIZE_MAX && content_length > SIZE_MAX) {
- HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "content_length overflows size_t\n");
- }
+ content_length = HDstrtoumax((const char *)start, NULL, 0);
+ if(UINTMAX_MAX > SIZE_MAX && content_length > SIZE_MAX)
+ HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "content_length overflows size_t");
- if (content_length == 0 ||
- errno == ERANGE) /* errno set by strtoumax*/
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "could not convert found \"Content-Length\" response (\"%s\")",
- start); /* range is null-terminated, remember */
- }
+ if(content_length == 0 || errno == ERANGE) /* errno set by HDstrtoumax*/
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not convert found \"Content-Length\" response (\"%s\")", start); /* range is null-terminated, remember */
handle->filesize = (size_t)content_length;
@@ -1081,32 +984,17 @@ H5FD_s3comms_s3r_getsize(s3r_t *handle)
* UNDO HEAD SETTINGS *
**********************/
- if ( CURLE_OK !=
- curl_easy_setopt(curlh,
- CURLOPT_NOBODY,
- NULL) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "error while setting CURL option (CURLOPT_NOBODY). "
- "(placeholder flags)");
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_NOBODY, NULL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_NOBODY).");
- if ( CURLE_OK !=
- curl_easy_setopt(curlh,
- CURLOPT_HEADERDATA,
- NULL) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "error while setting CURL option (CURLOPT_HEADERDATA). "
- "(placeholder flags)");
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HEADERDATA, NULL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_HEADERDATA).");
done:
H5MM_xfree(headerresponse);
sds.magic += 1; /* set to bad magic */
FUNC_LEAVE_NOAPI(ret_value);
-
} /* H5FD_s3comms_s3r_getsize */
@@ -1167,26 +1055,19 @@ H5FD_s3comms_s3r_open(const char *url,
HDfprintf(stdout, "called H5FD_s3comms_s3r_open.\n");
#endif
+ if(url == NULL || url[0] == '\0')
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "url cannot be null.");
-
- if (url == NULL || url[0] == '\0') {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "url cannot be null.\n");
- }
-
- if (FAIL == H5FD_s3comms_parse_url(url, &purl)) {
+ if(FAIL == H5FD_s3comms_parse_url(url, &purl))
/* probably a malformed url, but could be internal error */
- HGOTO_ERROR(H5E_ARGS, H5E_CANTCREATE, NULL,
- "unable to create parsed url structure");
- }
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTCREATE, NULL, "unable to create parsed url structure");
+
HDassert( purl != NULL ); /* if above passes, this must be true */
HDassert( purl->magic == S3COMMS_PARSED_URL_MAGIC );
handle = (s3r_t *)H5MM_malloc(sizeof(s3r_t));
- if (handle == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL,
- "could not malloc space for handle.\n");
- }
+ if(handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, NULL, "could not malloc space for handle.");
handle->magic = S3COMMS_S3R_MAGIC;
handle->purl = purl;
@@ -1200,50 +1081,35 @@ H5FD_s3comms_s3r_open(const char *url,
* RECORD AUTHENTICATION INFORMATION *
*************************************/
- if ((region != NULL && *region != '\0') ||
- (id != NULL && *id != '\0') ||
- (signing_key != NULL))
- {
- /* if one exists, all three must exist
- */
- if (region == NULL || region[0] == '\0') {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "region cannot be null.\n");
- }
- if (id == NULL || id[0] == '\0') {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "secret id cannot be null.\n");
- }
- if (signing_key == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "signing key cannot be null.\n");
- }
+ if((region != NULL && *region != '\0') ||
+ (id != NULL && *id != '\0') ||
+ (signing_key != NULL)) {
- /* copy strings
- */
+ /* if one exists, all three must exist */
+ if(region == NULL || region[0] == '\0')
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "region cannot be null.");
+ if(id == NULL || id[0] == '\0')
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "secret id cannot be null.");
+ if(signing_key == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "signing key cannot be null.");
+
+ /* copy strings */
tmplen = HDstrlen(region) + 1;
handle->region = (char *)H5MM_malloc(sizeof(char) * tmplen);
- if (handle->region == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "could not malloc space for handle region copy.\n");
- }
+ if(handle->region == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle region copy.");
HDmemcpy(handle->region, region, tmplen);
tmplen = HDstrlen(id) + 1;
handle->secret_id = (char *)H5MM_malloc(sizeof(char) * tmplen);
- if (handle->secret_id == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "could not malloc space for handle ID copy.\n");
- }
+ if(handle->secret_id == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle ID copy.");
HDmemcpy(handle->secret_id, id, tmplen);
tmplen = SHA256_DIGEST_LENGTH;
- handle->signing_key =
- (unsigned char *)H5MM_malloc(sizeof(unsigned char) * tmplen);
- if (handle->signing_key == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "could not malloc space for handle key copy.\n");
- }
+ handle->signing_key = (unsigned char *)H5MM_malloc(sizeof(unsigned char) * tmplen);
+ if(handle->signing_key == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "could not malloc space for handle key copy.");
HDmemcpy(handle->signing_key, signing_key, tmplen);
} /* if authentication information provided */
@@ -1252,61 +1118,23 @@ H5FD_s3comms_s3r_open(const char *url,
************************/
curlh = curl_easy_init();
+ if(curlh == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem creating curl easy handle!");
- if (curlh == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "problem creating curl easy handle!\n");
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HTTPGET, 1L))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_HTTPGET).");
- if ( CURLE_OK !=
- curl_easy_setopt(curlh,
- CURLOPT_HTTPGET,
- 1L) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "error while setting CURL option (CURLOPT_HTTPGET). "
- "(placeholder flags)");
- }
-
- if ( CURLE_OK !=
- curl_easy_setopt(curlh,
- CURLOPT_HTTP_VERSION,
- CURL_HTTP_VERSION_1_1) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "error while setting CURL option (CURLOPT_HTTP_VERSION). "
- "(placeholder flags)");
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_HTTP_VERSION).");
- if ( CURLE_OK !=
- curl_easy_setopt(curlh,
- CURLOPT_FAILONERROR,
- 1L) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "error while setting CURL option (CURLOPT_FAILONERROR). "
- "(placeholder flags)");
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_FAILONERROR, 1L))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_FAILONERROR).");
- if ( CURLE_OK !=
- curl_easy_setopt(curlh,
- CURLOPT_WRITEFUNCTION,
- curlwritecallback) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "error while setting CURL option (CURLOPT_WRITEFUNCTION). "
- "(placeholder flags)");
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_WRITEFUNCTION, curlwritecallback))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_WRITEFUNCTION).");
- if ( CURLE_OK !=
- curl_easy_setopt(curlh,
- CURLOPT_URL,
- url) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "error while setting CURL option (CURLOPT_URL). "
- "(placeholder flags)");
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_URL, url))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "error while setting CURL option (CURLOPT_URL).");
#if S3COMMS_CURL_VERBOSITY > 1
/* CURL will print (to stdout) information for each operation
@@ -1322,12 +1150,8 @@ H5FD_s3comms_s3r_open(const char *url,
* GET FILE SIZE *
*******************/
- if (FAIL ==
- H5FD_s3comms_s3r_getsize(handle) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "problem in H5FD_s3comms_s3r_getsize.\n");
- }
+ if(FAIL == H5FD_s3comms_s3r_getsize(handle))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "problem in H5FD_s3comms_s3r_getsize.");
/*********************
* FINAL PREPARATION *
@@ -1339,27 +1163,22 @@ H5FD_s3comms_s3r_open(const char *url,
ret_value = handle;
done:
- if (ret_value == NULL) {
- if (curlh != NULL) {
+ if(ret_value == NULL) {
+ if(curlh != NULL)
curl_easy_cleanup(curlh);
- }
- if (FAIL == H5FD_s3comms_free_purl(purl)) {
- HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
- "unable to free parsed url structure")
- }
- if (handle != NULL) {
+ if(FAIL == H5FD_s3comms_free_purl(purl))
+ HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to free parsed url structure")
+ if(handle != NULL) {
H5MM_xfree(handle->region);
H5MM_xfree(handle->secret_id);
H5MM_xfree(handle->signing_key);
- if (handle->httpverb != NULL) {
+ if(handle->httpverb != NULL)
H5MM_xfree(handle->httpverb);
- }
H5MM_xfree(handle);
}
}
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5FD_s3comms_s3r_open */
@@ -1433,27 +1252,17 @@ H5FD_s3comms_s3r_read(s3r_t *handle,
* ABSOLUTELY NECESSARY SANITY-CHECKS *
**************************************/
- if (handle == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle cannot be null.\n");
- }
- if (handle->magic != S3COMMS_S3R_MAGIC) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle has invalid magic.\n");
- }
- if (handle->curlhandle == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle has bad (null) curlhandle.\n")
- }
- if (handle->purl == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle has bad (null) url.\n")
- }
+ if(handle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle cannot be null.");
+ if(handle->magic != S3COMMS_S3R_MAGIC)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has invalid magic.");
+ if(handle->curlhandle == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) curlhandle.")
+ if(handle->purl == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle has bad (null) url.")
HDassert( handle->purl->magic == S3COMMS_PARSED_URL_MAGIC );
- if (offset > handle->filesize || (len + offset) > handle->filesize) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to read past EoF")
- }
+ if(offset > handle->filesize || (len + offset) > handle->filesize)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to read past EoF")
curlh = handle->curlhandle;
@@ -1461,26 +1270,16 @@ H5FD_s3comms_s3r_read(s3r_t *handle,
* PREPARE WRITEDATA *
*********************/
- if (dest != NULL) {
- sds = (struct s3r_datastruct *)H5MM_malloc(
- sizeof(struct s3r_datastruct));
- if (sds == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL,
- "could not malloc destination datastructure.\n");
- }
+ if(dest != NULL) {
+ sds = (struct s3r_datastruct *)H5MM_malloc(sizeof(struct s3r_datastruct));
+ if(sds == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc destination datastructure.");
sds->magic = S3COMMS_CALLBACK_DATASTRUCT_MAGIC;
sds->data = (char *)dest;
sds->size = 0;
- if (CURLE_OK !=
- curl_easy_setopt(curlh,
- CURLOPT_WRITEDATA,
- sds) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL,
- "error while setting CURL option (CURLOPT_WRITEDATA). "
- "(placeholder flags)");
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_WRITEDATA, sds))
+ HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, FAIL, "error while setting CURL option (CURLOPT_WRITEDATA).");
}
/*********************
@@ -1488,34 +1287,22 @@ H5FD_s3comms_s3r_read(s3r_t *handle,
*********************/
if (len > 0) {
- rangebytesstr = (char *)H5MM_malloc(sizeof(char) * \
- (S3COMMS_MAX_RANGE_STRING_SIZE+1) );
- if (rangebytesstr == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL,
- "could not malloc range format string.\n");
- }
- ret = HDsnprintf(rangebytesstr,
- (S3COMMS_MAX_RANGE_STRING_SIZE),
+ rangebytesstr = (char *)H5MM_malloc(sizeof(char) * (S3COMMS_MAX_RANGE_STRING_SIZE+1) );
+ if(rangebytesstr == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc range format string.");
+ ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE),
"bytes="H5_PRINTF_HADDR_FMT"-"H5_PRINTF_HADDR_FMT,
- offset,
- offset + len - 1);
- if (ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to format HTTP Range value");
- } else if (offset > 0) {
- rangebytesstr = (char *)H5MM_malloc(sizeof(char) * \
- (S3COMMS_MAX_RANGE_STRING_SIZE+1));
- if (rangebytesstr == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL,
- "could not malloc range format string.\n");
- }
- ret = HDsnprintf(rangebytesstr,
- (S3COMMS_MAX_RANGE_STRING_SIZE),
- "bytes="H5_PRINTF_HADDR_FMT"-",
- offset);
- if (ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to format HTTP Range value");
+ offset, offset + len - 1);
+ if(ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value");
+ } else if(offset > 0) {
+ rangebytesstr = (char *)H5MM_malloc(sizeof(char) * (S3COMMS_MAX_RANGE_STRING_SIZE+1));
+ if(rangebytesstr == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc range format string.");
+ ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE),
+ "bytes="H5_PRINTF_HADDR_FMT"-", offset);
+ if(ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value");
}
/*******************
@@ -1523,26 +1310,18 @@ H5FD_s3comms_s3r_read(s3r_t *handle,
*******************/
if (handle->signing_key == NULL) {
- /* Do not authenticate.
- */
- if (rangebytesstr != NULL) {
- /* Pass in range directly
- */
+ /* Do not authenticate. */
+ if(rangebytesstr != NULL) {
+ /* Pass in range directly */
char *bytesrange_ptr = NULL; /* pointer past "bytes=" portion */
- bytesrange_ptr = strchr(rangebytesstr, '=');
+ bytesrange_ptr = HDstrchr(rangebytesstr, '=');
HDassert( bytesrange_ptr != NULL );
bytesrange_ptr++; /* move to first char past '=' */
HDassert( *bytesrange_ptr != '\0' );
- if (CURLE_OK !=
- curl_easy_setopt(curlh,
- CURLOPT_RANGE,
- bytesrange_ptr) )
- {
- HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL,
- "error while setting CURL option (CURLOPT_RANGE). ");
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_RANGE, bytesrange_ptr))
+ HGOTO_ERROR(H5E_VFL, H5E_UNINITIALIZED, FAIL, "error while setting CURL option (CURLOPT_RANGE). ");
}
} else {
/* authenticate request
@@ -1575,30 +1354,18 @@ H5FD_s3comms_s3r_read(s3r_t *handle,
/**** VERIFY INFORMATION EXISTS ****/
- if (handle->region == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle must have non-null region.\n");
- }
- if (handle->secret_id == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle must have non-null secret_id.\n");
- }
- if (handle->signing_key == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle must have non-null signing_key.\n");
- }
- if (handle->httpverb == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle must have non-null httpverb.\n");
- }
- if (handle->purl->host == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle must have non-null host.\n");
- }
- if (handle->purl->path == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "handle must have non-null resource.\n");
- }
+ if(handle->region == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null region.");
+ if(handle->secret_id == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null secret_id.");
+ if(handle->signing_key == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null signing_key.");
+ if(handle->httpverb == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null httpverb.");
+ if(handle->purl->host == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null host.");
+ if(handle->purl->path == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "handle must have non-null resource.");
/**** CREATE HTTP REQUEST STRUCTURE (hrb_t) ****/
@@ -1606,198 +1373,93 @@ H5FD_s3comms_s3r_read(s3r_t *handle,
(const char *)handle->httpverb,
(const char *)handle->purl->path,
"HTTP/1.1");
- if (request == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "could not allocate hrb_t request.\n");
- }
+ if(request == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not allocate hrb_t request.");
HDassert( request->magic == S3COMMS_HRB_MAGIC );
now = gmnow();
- if (ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "could not format ISO8601 time.\n");
- }
+ if(ISO8601NOW(iso8601now, now) != (ISO8601_SIZE - 1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not format ISO8601 time.");
- if (FAIL ==
- H5FD_s3comms_hrb_node_set(
- &headers,
- "x-amz-date",
- (const char *)iso8601now) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to set x-amz-date header")
- }
- if (headers == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem building headers list. "
- "(placeholder flags)\n");
- }
+ if(FAIL == H5FD_s3comms_hrb_node_set( &headers, "x-amz-date", (const char *)iso8601now))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-date header")
+ if(headers == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
HDassert( headers->magic == S3COMMS_HRB_NODE_MAGIC );
- if (FAIL ==
- H5FD_s3comms_hrb_node_set(
- &headers,
- "x-amz-content-sha256",
- (const char *)EMPTY_SHA256) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to set x-amz-content-sha256 header")
- }
- if (headers == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem building headers list. "
- "(placeholder flags)\n");
- }
+ if(FAIL == H5FD_s3comms_hrb_node_set(&headers, "x-amz-content-sha256", (const char *)EMPTY_SHA256))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set x-amz-content-sha256 header")
+ if(headers == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
HDassert( headers->magic == S3COMMS_HRB_NODE_MAGIC );
- if (rangebytesstr != NULL) {
- if (FAIL ==
- H5FD_s3comms_hrb_node_set(
- &headers,
- "Range",
- (const char *)rangebytesstr) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to set range header")
- }
- if (headers == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem building headers list. "
- "(placeholder flags)\n");
- }
+ if(rangebytesstr != NULL) {
+ if(FAIL == H5FD_s3comms_hrb_node_set( &headers, "Range", rangebytesstr))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set range header")
+ if(headers == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
HDassert( headers->magic == S3COMMS_HRB_NODE_MAGIC );
}
- if (FAIL ==
- H5FD_s3comms_hrb_node_set(
- &headers,
- "Host",
- (const char *)handle->purl->host) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to set host header")
- }
- if (headers == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem building headers list. "
- "(placeholder flags)\n");
- }
+ if(FAIL == H5FD_s3comms_hrb_node_set(&headers, "Host", handle->purl->host))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set host header")
+ if(headers == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
HDassert( headers->magic == S3COMMS_HRB_NODE_MAGIC );
request->first_header = headers;
/**** COMPUTE AUTHORIZATION ****/
- if (FAIL == /* buffer1 -> canonical request */
- H5FD_s3comms_aws_canonical_request(
- buffer1,
- 512,
- signed_headers,
- 48,
- request) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "(placeholder flags)\n");
- }
- if ( FAIL == /* buffer2->string-to-sign */
- H5FD_s3comms_tostringtosign(buffer2,
- buffer1,
- iso8601now,
- handle->region) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "(placeholder flags)\n");
- }
- if (FAIL == /* buffer1 -> signature */
- H5FD_s3comms_HMAC_SHA256(handle->signing_key,
- SHA256_DIGEST_LENGTH,
- buffer2,
- HDstrlen(buffer2),
- buffer1) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "(placeholder flags)\n");
- }
+ /* buffer1 -> canonical request */
+ if(FAIL == H5FD_s3comms_aws_canonical_request(buffer1, 512, signed_headers, 48, request))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad canonical request");
+ /* buffer2->string-to-sign */
+ if(FAIL == H5FD_s3comms_tostringtosign(buffer2, buffer1, iso8601now, handle->region))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad string-to-sign");
+ /* buffer1 -> signature */
+ if(FAIL == H5FD_s3comms_HMAC_SHA256(handle->signing_key, SHA256_DIGEST_LENGTH, buffer2, HDstrlen(buffer2), buffer1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad signature");
iso8601now[8] = 0; /* trim to yyyyMMDD */
- ret = S3COMMS_FORMAT_CREDENTIAL(buffer2,
- handle->secret_id,
- iso8601now,
- handle->region,
- "s3");
- if (ret == 0 || ret >= S3COMMS_MAX_CREDENTIAL_SIZE)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to format aws4 credential string");
-
- ret = HDsnprintf(
- authorization,
- 512,
+ ret = S3COMMS_FORMAT_CREDENTIAL(buffer2, handle->secret_id, iso8601now, handle->region, "s3");
+ if(ret == 0 || ret >= S3COMMS_MAX_CREDENTIAL_SIZE)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format aws4 credential string");
+
+ ret = HDsnprintf( authorization, 512,
"AWS4-HMAC-SHA256 Credential=%s,SignedHeaders=%s,Signature=%s",
- buffer2,
- signed_headers,
- buffer1);
- if (ret <= 0 || ret >= 512) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to format aws4 authorization string");
- }
+ buffer2, signed_headers, buffer1);
+ if(ret <= 0 || ret >= 512)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format aws4 authorization string");
- /* append authorization header to http request buffer
- */
- if (H5FD_s3comms_hrb_node_set(
- &headers,
- "Authorization",
- (const char *)authorization)
- == FAIL)
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to set Authorization header")
- }
- if (headers == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem building headers list. "
- "(placeholder flags)\n");
- }
+ /* append authorization header to http request buffer */
+ if(H5FD_s3comms_hrb_node_set(&headers, "Authorization", (const char *)authorization) == FAIL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to set Authorization header")
+ if(headers == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem building headers list.");
- /* update hrb's "first header" pointer
- */
+ /* update hrb's "first header" pointer */
request->first_header = headers;
/**** SET CURLHANDLE HTTP HEADERS FROM GENERATED DATA ****/
node = request->first_header;
- while (node != NULL) {
+ while(node != NULL) {
HDassert( node->magic == S3COMMS_HRB_NODE_MAGIC );
- curlheaders = curl_slist_append(curlheaders,
- (const char *)node->cat);
- if (curlheaders == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "could not append header to curl slist. "
- "(placeholder flags)\n");
- }
+ curlheaders = curl_slist_append(curlheaders, (const char *)node->cat);
+ if(curlheaders == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not append header to curl slist.");
node = node->next;
}
- /* sanity-check
- */
- if (curlheaders == NULL) {
+ /* sanity-check */
+ if(curlheaders == NULL)
/* above loop was probably never run */
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "curlheaders was never populated.\n");
- }
-
- /* finally, set http headers in curl handle
- */
- if (curl_easy_setopt(
- curlh,
- CURLOPT_HTTPHEADER,
- curlheaders)
- != CURLE_OK)
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "error while setting CURL option "
- "(CURLOPT_HTTPHEADER). (placeholder flags)");
- }
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "curlheaders was never populated.");
+ /* finally, set http headers in curl handle */
+ if(curl_easy_setopt(curlh, CURLOPT_HTTPHEADER, curlheaders) != CURLE_OK)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while setting CURL option (CURLOPT_HTTPHEADER).");
} /* end if should authenticate (info provided) */
/*******************
@@ -1813,107 +1475,79 @@ H5FD_s3comms_s3r_read(s3r_t *handle,
char curlerrbuf[CURL_ERROR_SIZE];
curlerrbuf[0] = '\0';
- if (CURLE_OK !=
- curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, curlerrbuf) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem setting error buffer")
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, curlerrbuf))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem setting error buffer")
p_status = curl_easy_perform(curlh);
- if (p_status != CURLE_OK) {
- if (CURLE_OK !=
- curl_easy_getinfo(curlh, CURLINFO_RESPONSE_CODE, &httpcode) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem getting response code")
- }
+ if(p_status != CURLE_OK) {
+ if(CURLE_OK != curl_easy_getinfo(curlh, CURLINFO_RESPONSE_CODE, &httpcode))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem getting response code")
HDfprintf(stderr, "CURL ERROR CODE: %d\nHTTP CODE: %d\n",
p_status, httpcode);
HDfprintf(stderr, "%s\n", curl_easy_strerror(p_status));
- HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL,
- "problem while performing request.\n");
- }
- if (CURLE_OK !=
- curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, NULL) )
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem unsetting error buffer")
+ HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "problem while performing request.");
}
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_ERRORBUFFER, NULL))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem unsetting error buffer")
} /* verbose error reporting */
#else
p_status = curl_easy_perform(curlh);
- if (p_status != CURLE_OK) {
- HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL,
- "curl cannot perform request\n")
- }
+ if(p_status != CURLE_OK)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, FAIL, "curl cannot perform request")
#endif
#if S3COMMS_DEBUG
- if (dest != NULL) {
+ if(dest != NULL) {
HDfprintf(stderr, "len: %d\n", (int)len);
HDfprintf(stderr, "CHECKING FOR BUFFER OVERFLOW\n");
- if (sds == NULL) {
+ if(sds == NULL)
HDfprintf(stderr, "sds is NULL!\n");
- }
else {
HDfprintf(stderr, "sds: 0x%lx\n", (long long)sds);
HDfprintf(stderr, "sds->size: %d\n", (int)sds->size);
- if (len > sds->size) {
+ if(len > sds->size)
HDfprintf(stderr, "buffer overwrite\n");
- }
}
}
- else {
+ else
HDfprintf(stderr, "performed on entire file\n");
- }
#endif
done:
/* clean any malloc'd resources
*/
- if (curlheaders != NULL) {
+ if(curlheaders != NULL) {
curl_slist_free_all(curlheaders);
curlheaders = NULL;
}
- if (rangebytesstr != NULL) {
+ if(rangebytesstr != NULL) {
H5MM_xfree(rangebytesstr);
rangebytesstr = NULL;
}
- if (sds != NULL) {
+ if(sds != NULL) {
H5MM_xfree(sds);
sds = NULL;
}
- if (request != NULL) {
- while (headers != NULL)
- if (FAIL ==
- H5FD_s3comms_hrb_node_set(&headers, headers->name, NULL))
- {
- HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "cannot release header node")
- }
+ if(request != NULL) {
+ while(headers != NULL)
+ if(FAIL == H5FD_s3comms_hrb_node_set(&headers, headers->name, NULL))
+ HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot release header node")
HDassert( NULL == headers );
- if (FAIL == H5FD_s3comms_hrb_destroy(&request)) {
- HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "cannot release header request structure")
- }
+ if(FAIL == H5FD_s3comms_hrb_destroy(&request))
+ HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot release header request structure")
HDassert( NULL == request );
}
- if (curlh != NULL) {
+ if(curlh != NULL) {
/* clear any Range */
- if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_RANGE, NULL) ) {
- HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "cannot unset CURLOPT_RANGE")
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_RANGE, NULL))
+ HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot unset CURLOPT_RANGE")
/* clear headers */
- if (CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HTTPHEADER, NULL) ) {
- HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "cannot unset CURLOPT_HTTPHEADER")
- }
+ if(CURLE_OK != curl_easy_setopt(curlh, CURLOPT_HTTPHEADER, NULL))
+ HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot unset CURLOPT_HTTPHEADER")
}
FUNC_LEAVE_NOAPI(ret_value);
@@ -1951,9 +1585,8 @@ gmnow(void)
struct tm *ret_value = NULL;
/* Doctor assert, checks against error in time() */
- if ( (time_t)(-1) != time(now_ptr) ) {
- ret_value = gmtime(now_ptr);
- }
+ if((time_t)(-1) != HDtime(now_ptr))
+ ret_value = HDgmtime(now_ptr);
HDassert( ret_value != NULL );
@@ -2035,102 +1668,66 @@ H5FD_s3comms_aws_canonical_request(
HDfprintf(stdout, "called H5FD_s3comms_aws_canonical_request.\n");
#endif
- if (http_request == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "hrb object cannot be null.\n");
- }
+ if(http_request == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hrb object cannot be null.");
HDassert( http_request->magic == S3COMMS_HRB_MAGIC );
- if (canonical_request_dest == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "canonical request destination cannot be null.\n");
- }
+ if(canonical_request_dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "canonical request destination cannot be null.");
- if (signed_headers_dest == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "signed headers destination cannot be null.\n");
- }
+ if(signed_headers_dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "signed headers destination cannot be null.");
- /* HTTP verb, resource path, and query string lines
- */
+ /* HTTP verb, resource path, and query string lines */
cr_len = (HDstrlen(http_request->verb) +
HDstrlen(http_request->resource) +
HDstrlen(query_params) +
(size_t)3); /* three newline chars */
- if (cr_len >= cr_size) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "not enough space in canonical request");
- }
- ret = HDsnprintf( /* TODO: compiler warning */
- canonical_request_dest,
- (cr_size-1),
+ if(cr_len >= cr_size)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not enough space in canonical request");
+ /* TODO: compiler warning */
+ ret = HDsnprintf(canonical_request_dest, (cr_size - 1),
"%s\n%s\n%s\n",
- http_request->verb,
- http_request->resource,
- query_params);
- if (ret < 0 || (size_t)ret >= cr_size) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to compose canonical request first line");
- }
+ http_request->verb, http_request->resource, query_params);
+ if(ret < 0 || (size_t)ret >= cr_size)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to compose canonical request first line");
- /* write in canonical headers, building signed headers concurrently
- */
+ /* write in canonical headers, building signed headers concurrently */
node = http_request->first_header; /* assumed sorted */
- while (node != NULL) {
+ while(node != NULL) {
HDassert(node->magic == S3COMMS_HRB_NODE_MAGIC);
- ret = HDsnprintf(
- tmpstr,
- 256,
- "%s:%s\n",
- node->lowername,
- node->value);
- if (ret < 0 || ret >= 256) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to concatenate HTTP header %s:%s",
- node->lowername,
- node->value);
- }
+ ret = HDsnprintf( tmpstr, 256, "%s:%s\n", node->lowername, node->value);
+ if(ret < 0 || ret >= 256)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to concatenate HTTP header %s:%s", node->lowername, node->value);
cr_len += HDstrlen(tmpstr);
- if (cr_len + 1 > cr_size) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "not enough space in canonical request");
- }
- strcat(canonical_request_dest, tmpstr);
-
- ret = HDsnprintf(
- tmpstr,
- 256,
- "%s;",
- node->lowername);
- if (ret < 0 || ret >= 256) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to append semicolon to lowername %s",
- node->lowername);
- }
+ if(cr_len + 1 > cr_size)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not enough space in canonical request");
+ HDstrcat(canonical_request_dest, tmpstr);
+
+ ret = HDsnprintf( tmpstr, 256, "%s;", node->lowername);
+ if(ret < 0 || ret >= 256)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to append semicolon to lowername %s", node->lowername);
sh_len += HDstrlen(tmpstr);
- if (sh_len + 1 > sh_size) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "not enough space in signed headers");
- }
- strcat(signed_headers_dest, tmpstr);
+ if(sh_len + 1 > sh_size)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not enough space in signed headers");
+ HDstrcat(signed_headers_dest, tmpstr);
node = node->next;
} /* end while node is not NULL */
- /* remove tailing ';' from signed headers sequence
- */
+ /* remove trailing ';' from signed headers sequence */
signed_headers_dest[HDstrlen(signed_headers_dest) - 1] = '\0';
/* append signed headers and payload hash
* NOTE: at present, no HTTP body is handled, per the nature of
* requests/range-gets
*/
- strcat(canonical_request_dest, "\n");
- strcat(canonical_request_dest, signed_headers_dest);
- strcat(canonical_request_dest, "\n");
- strcat(canonical_request_dest, EMPTY_SHA256);
+ HDstrcat(canonical_request_dest, "\n");
+ HDstrcat(canonical_request_dest, signed_headers_dest);
+ HDstrcat(canonical_request_dest, "\n");
+ HDstrcat(canonical_request_dest, EMPTY_SHA256);
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -2184,30 +1781,20 @@ H5FD_s3comms_bytes_to_hex(
HDfprintf(stdout, "called H5FD_s3comms_bytes_to_hex.\n");
#endif
- if (dest == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "hex destination cannot be null.\n")
- }
- if (msg == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "bytes sequence cannot be null.\n")
- }
+ if(dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hex destination cannot be null.")
+ if(msg == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bytes sequence cannot be null.")
for (i = 0; i < msg_len; i++) {
- int chars_written = HDsnprintf(&(dest[i * 2]),
- 3, /* 'X', 'X', '\n' */
- (lowercase == TRUE) ? "%02x" : "%02X",
- msg[i]);
- if (chars_written != 2) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem while writing hex chars for %c",
- msg[i]);
- }
+ int chars_written = HDsnprintf(&(dest[i * 2]), 3, /* 'X', 'X', '\n' */
+ (lowercase == TRUE) ? "%02x" : "%02X", msg[i]);
+ if(chars_written != 2)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem while writing hex chars for %c", msg[i]);
}
done:
FUNC_LEAVE_NOAPI(ret_value);
-
} /* end H5FD_s3comms_bytes_to_hex() */
@@ -2239,13 +1826,18 @@ H5FD_s3comms_free_purl(parsed_url_t *purl)
HDprintf("called H5FD_s3comms_free_purl.\n");
#endif
- if (purl != NULL) {
+ if(purl != NULL) {
HDassert( purl->magic == S3COMMS_PARSED_URL_MAGIC );
- if (purl->scheme != NULL) { H5MM_xfree(purl->scheme); }
- if (purl->host != NULL) { H5MM_xfree(purl->host); }
- if (purl->port != NULL) { H5MM_xfree(purl->port); }
- if (purl->path != NULL) { H5MM_xfree(purl->path); }
- if (purl->query != NULL) { H5MM_xfree(purl->query); }
+ if(purl->scheme != NULL)
+ H5MM_xfree(purl->scheme);
+ if(purl->host != NULL)
+ H5MM_xfree(purl->host);
+ if(purl->port != NULL)
+ H5MM_xfree(purl->port);
+ if(purl->path != NULL)
+ H5MM_xfree(purl->path);
+ if(purl->query != NULL)
+ H5MM_xfree(purl->query);
purl->magic += 1ul;
H5MM_xfree(purl);
}
@@ -2302,29 +1894,14 @@ H5FD_s3comms_HMAC_SHA256(
HDfprintf(stdout, "called H5FD_s3comms_HMAC_SHA256.\n");
#endif
- if (dest == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "destination cannot be null.");
- }
+ if(dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be null.");
- HMAC(EVP_sha256(),
- key,
- (int)key_len,
- (const unsigned char *)msg,
- msg_len,
- md,
- &md_len);
-
- if (H5FD_s3comms_bytes_to_hex(
- dest,
- (const unsigned char *)md,
- (size_t)md_len,
- true)
- == FAIL)
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "could not convert to hex string.");
- }
+ HMAC(EVP_sha256(), key, (int)key_len, (const unsigned char *)msg,
+ msg_len, md, &md_len);
+
+ if(H5FD_s3comms_bytes_to_hex(dest, (const unsigned char *)md, (size_t)md_len, true) == FAIL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not convert to hex string.");
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -2407,93 +1984,73 @@ H5FD__s3comms_load_aws_creds_from_file(
int found_setting = 0;
char *line_buffer = &(buffer[0]);
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
#if S3COMMS_DEBUG
HDfprintf(stdout, "called load_aws_creds_from_file.\n");
#endif
/* format target line for start of profile */
- if (32 < HDsnprintf(profile_line, 32, "[%s]", profile_name)) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL,
- "unable to format profile label")
- }
+ if(32 < HDsnprintf(profile_line, 32, "[%s]", profile_name))
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format profile label")
/* look for start of profile */
do {
/* clear buffer */
- for (buffer_i=0; buffer_i < 128; buffer_i++) {
+ for(buffer_i=0; buffer_i < 128; buffer_i++)
buffer[buffer_i] = 0;
- }
line_buffer = fgets(line_buffer, 128, file);
- if (line_buffer == NULL) { /* reached end of file */
+ if(line_buffer == NULL) /* reached end of file */
goto done;
- }
- } while (strncmp(line_buffer, profile_line, HDstrlen(profile_line)));
+ } while (HDstrncmp(line_buffer, profile_line, HDstrlen(profile_line)));
/* extract credentials from lines */
do {
/* clear buffer */
- for (buffer_i=0; buffer_i < 128; buffer_i++) {
+ for(buffer_i=0; buffer_i < 128; buffer_i++)
buffer[buffer_i] = 0;
- }
/* collect a line from file */
line_buffer = fgets(line_buffer, 128, file);
- if (line_buffer == NULL) {
+ if(line_buffer == NULL)
goto done; /* end of file */
- }
/* loop over names to see if line looks like assignment */
- for (setting_i = 0; setting_i < setting_count; setting_i++) {
+ for(setting_i = 0; setting_i < setting_count; setting_i++) {
size_t setting_name_len = 0;
const char *setting_name = NULL;
char line_prefix[128];
setting_name = setting_names[setting_i];
setting_name_len = HDstrlen(setting_name);
- if (HDsnprintf(line_prefix, 128, "%s=", setting_name) < 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL,
- "unable to format line prefix")
- }
+ if(HDsnprintf(line_prefix, 128, "%s=", setting_name) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format line prefix")
/* found a matching name? */
- if (!HDstrncmp(line_buffer, line_prefix, setting_name_len + 1)) {
+ if(!HDstrncmp(line_buffer, line_prefix, setting_name_len + 1)) {
found_setting = 1;
/* skip NULL destination buffer */
- if (setting_pointers[setting_i] == NULL) {
+ if(setting_pointers[setting_i] == NULL)
break;
- }
/* advance to end of name in string */
do {
line_buffer++;
} while (*line_buffer != 0 && *line_buffer != '=');
- if (*line_buffer == 0 || *(line_buffer+1) == 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "incomplete assignment in file")
- }
+ if(*line_buffer == 0 || *(line_buffer+1) == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "incomplete assignment in file")
line_buffer++; /* was pointing at '='; advance */
/* copy line buffer into out pointer */
- if (HDstrncpy(
- setting_pointers[setting_i],
- (const char *)line_buffer,
- HDstrlen(line_buffer))
- == NULL)
- {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL,
- "unable to copy line into pointer")
- }
+ HDstrncpy(setting_pointers[setting_i], (const char *)line_buffer, HDstrlen(line_buffer));
/* "trim" tailing whitespace by replacing with null terminator*/
buffer_i = 0;
- while (!isspace(setting_pointers[setting_i][buffer_i])) {
+ while(!HDisspace(setting_pointers[setting_i][buffer_i]))
buffer_i++;
- }
setting_pointers[setting_i][buffer_i] = '\0';
break; /* have read setting; don't compare with others */
@@ -2561,76 +2118,46 @@ H5FD_s3comms_load_aws_profile(const char *profile_name,
#else
ret = HDsnprintf(awspath, 117, "%s/.aws/", getenv("HOME")) ;
#endif
- if (ret < 0 || (size_t)ret >= 117) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL,
- "unable to format home-aws path")
- }
+ if(ret < 0 || (size_t)ret >= 117)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format home-aws path")
ret = HDsnprintf(filepath, 128, "%s%s", awspath, "credentials");
- if (ret < 0 || (size_t)ret >= 128) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL,
- "unable to format credentials path")
- }
-
- credfile = fopen(filepath, "r");
- if (credfile != NULL) {
- if (H5FD__s3comms_load_aws_creds_from_file(
- credfile,
- profile_name,
- key_id_out,
- secret_access_key_out,
- aws_region_out)
- == FAIL)
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to load from aws credentials")
- }
- if (fclose(credfile) == EOF) {
- HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL,
- "unable to close credentials file")
- }
+ if(ret < 0 || (size_t)ret >= 128)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format credentials path")
+
+ credfile = HDfopen(filepath, "r");
+ if(credfile != NULL) {
+ if(H5FD__s3comms_load_aws_creds_from_file(credfile, profile_name, key_id_out,
+ secret_access_key_out, aws_region_out) == FAIL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to load from aws credentials")
+ if(HDfclose(credfile) == EOF)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close credentials file")
credfile = NULL;
} /* end if credential file opened */
ret = HDsnprintf(filepath, 128, "%s%s", awspath, "config");
- if (ret < 0 || (size_t)ret >= 128) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL,
- "unable to format config path")
- }
- credfile = fopen(filepath, "r");
- if (credfile != NULL) {
- if (H5FD__s3comms_load_aws_creds_from_file(
- credfile,
- profile_name,
+ if(ret < 0 || (size_t)ret >= 128)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format config path")
+ credfile = HDfopen(filepath, "r");
+ if(credfile != NULL) {
+ if(H5FD__s3comms_load_aws_creds_from_file( credfile, profile_name,
(*key_id_out == 0) ? key_id_out : NULL,
(*secret_access_key_out == 0) ? secret_access_key_out : NULL,
- (*aws_region_out == 0) ? aws_region_out : NULL)
- == FAIL)
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to load from aws config")
- }
- if (fclose(credfile) == EOF) {
- HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL,
- "unable to close config file")
- }
+ (*aws_region_out == 0) ? aws_region_out : NULL) == FAIL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to load from aws config")
+ if(HDfclose(credfile) == EOF)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "unable to close config file")
credfile = NULL;
} /* end if credential file opened */
/* fail if not all three settings were loaded */
- if (*key_id_out == 0 ||
- *secret_access_key_out == 0 ||
- *aws_region_out == 0)
- {
+ if(*key_id_out == 0 || *secret_access_key_out == 0 || *aws_region_out == 0)
ret_value = FAIL;
- }
done:
- if (credfile != NULL) {
- if (fclose(credfile) == EOF) {
- HDONE_ERROR(H5E_ARGS, H5E_ARGS, FAIL,
- "problem error-closing aws configuration file")
- }
- }
+ if(credfile != NULL)
+ if(HDfclose(credfile) == EOF)
+ HDONE_ERROR(H5E_ARGS, H5E_ARGS, FAIL, "problem error-closing aws configuration file")
+
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5FD_s3comms_load_aws_profile() */
@@ -2675,16 +2202,14 @@ H5FD_s3comms_nlowercase(
HDfprintf(stdout, "called H5FD_s3comms_nlowercase.\n");
#endif
- if (dest == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "destination cannot be null.\n");
- }
+ if(dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be null.");
- if (len > 0) {
+ if(len > 0) {
HDmemcpy(dest, s, len);
do {
len--;
- dest[len] = (char)tolower( (int)dest[len] );
+ dest[len] = (char)HDtolower((int)dest[len]);
} while (len > 0);
}
@@ -2743,18 +2268,14 @@ H5FD_s3comms_parse_url(
HDprintf("called H5FD_s3comms_parse_url.\n");
#endif
- if (str == NULL || *str == '\0') {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "invalid url string");
- }
+ if(str == NULL || *str == '\0')
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid url string");
urllen = (long int)HDstrlen(str);
purl = (parsed_url_t *)H5MM_malloc(sizeof(parsed_url_t));
- if (purl == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL,
- "can't allocate space for parsed_url_t");
- }
+ if(purl == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for parsed_url_t");
purl->magic = S3COMMS_PARSED_URL_MAGIC;
purl->scheme = NULL;
purl->host = NULL;
@@ -2767,38 +2288,27 @@ H5FD_s3comms_parse_url(
***************/
tmpstr = HDstrchr(curstr, ':');
- if (tmpstr == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "invalid SCHEME construction: probably not URL");
- }
+ if(tmpstr == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid SCHEME construction: probably not URL");
len = tmpstr - curstr;
HDassert( (0 <= len) && (len < urllen) );
- /* check for restrictions
- */
- for (i = 0; i < len; i++) {
+ /* check for restrictions */
+ for(i = 0; i < len; i++) {
/* scheme = [a-zA-Z+-.]+ (terminated by ":") */
- if (!isalpha(curstr[i]) &&
- '+' != curstr[i] &&
- '-' != curstr[i] &&
- '.' != curstr[i])
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "invalid SCHEME construction");
- }
+ if(!HDisalpha(curstr[i]) && '+' != curstr[i] && '-' != curstr[i] &&
+ '.' != curstr[i])
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid SCHEME construction");
}
- /* copy lowercased scheme to structure
- */
+
+ /* copy lowercased scheme to structure */
purl->scheme = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
- if (purl->scheme == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL,
- "can't allocate space for SCHEME");
- }
- (void)HDstrncpy(purl->scheme, curstr, (size_t)len);
+ if(purl->scheme == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for SCHEME");
+ HDstrncpy(purl->scheme, curstr, (size_t)len);
purl->scheme[len] = '\0';
- for ( i = 0; i < len; i++ ) {
- purl->scheme[i] = (char)tolower(purl->scheme[i]);
- }
+ for(i = 0; i < len; i++ )
+ purl->scheme[i] = (char)HDtolower(purl->scheme[i]);
/* Skip "://" */
tmpstr += 3;
@@ -2808,84 +2318,59 @@ H5FD_s3comms_parse_url(
* READ HOST *
*************/
- if (*curstr == '[') {
+ if(*curstr == '[') {
/* IPv6 */
- while (']' != *tmpstr) {
- if (tmpstr == 0) { /* end of string reached! */
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "reached end of URL: incomplete IPv6 HOST");
- }
+ while(']' != *tmpstr) {
+ /* end of string reached! */
+ if(tmpstr == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reached end of URL: incomplete IPv6 HOST");
tmpstr++;
}
tmpstr++;
} /* end if (IPv6) */
else {
- while (0 != *tmpstr) {
- if (':' == *tmpstr ||
- '/' == *tmpstr ||
- '?' == *tmpstr)
- {
+ while(0 != *tmpstr) {
+ if(':' == *tmpstr || '/' == *tmpstr || '?' == *tmpstr)
break;
- }
tmpstr++;
}
} /* end else (IPv4) */
len = tmpstr - curstr;
- if (len == 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "HOST substring cannot be empty");
- }
- else
- if (len > urllen) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem with length of HOST substring");
- }
+ if(len == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "HOST substring cannot be empty")
+ else if(len > urllen)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of HOST substring");
- /* copy host
- */
+ /* copy host */
purl->host = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
- if (purl->host == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL,
- "can't allocate space for HOST");
- }
- (void)HDstrncpy(purl->host, curstr, (size_t)len);
+ if(purl->host == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for HOST");
+ HDstrncpy(purl->host, curstr, (size_t)len);
purl->host[len] = 0;
/*************
* READ PORT *
*************/
- if (':' == *tmpstr) {
+ if(':' == *tmpstr) {
tmpstr += 1; /* advance past ':' */
curstr = tmpstr;
- while ((0 != *tmpstr) && ('/' != *tmpstr) && ('?' != *tmpstr)) {
+ while((0 != *tmpstr) && ('/' != *tmpstr) && ('?' != *tmpstr))
tmpstr++;
- }
len = tmpstr - curstr;
- if (len == 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "PORT element cannot be empty");
- }
- else
- if (len > urllen) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem with length of PORT substring");
- }
- for (i = 0; i < len; i ++) {
- if (!isdigit(curstr[i])) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "PORT is not a decimal string");
- }
- }
-
- /* copy port
- */
+ if(len == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "PORT element cannot be empty")
+ else if(len > urllen)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of PORT substring");
+ for(i = 0; i < len; i ++)
+ if(!HDisdigit(curstr[i]))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "PORT is not a decimal string");
+
+ /* copy port */
purl->port = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
- if (purl->port == NULL) { /* cannot malloc */
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL,
- "can't allocate space for PORT");
- }
- (void)HDstrncpy(purl->port, curstr, (size_t)len);
+ if(purl->port == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for PORT");
+ HDstrncpy(purl->port, curstr, (size_t)len);
purl->port[len] = 0;
} /* end if PORT element */
@@ -2893,28 +2378,22 @@ H5FD_s3comms_parse_url(
* READ PATH *
*************/
- if ('/' == *tmpstr) {
+ if('/' == *tmpstr) {
/* advance past '/' */
tmpstr += 1;
curstr = tmpstr;
- /* seek end of PATH
- */
- while ((0 != *tmpstr) && ('?' != *tmpstr)) {
+ /* seek end of PATH */
+ while((0 != *tmpstr) && ('?' != *tmpstr))
tmpstr++;
- }
len = tmpstr - curstr;
- if (len > urllen) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem with length of PATH substring");
- }
- if (len > 0) {
+ if(len > urllen)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of PATH substring");
+ if(len > 0) {
purl->path = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
- if (purl->path == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL,
- "can't allocate space for PATH");
- } /* cannot malloc path pointer */
- (void)HDstrncpy(purl->path, curstr, (size_t)len);
+ if(purl->path == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for PATH");
+ HDstrncpy(purl->path, curstr, (size_t)len);
purl->path[len] = 0;
}
} /* end if PATH element */
@@ -2923,26 +2402,20 @@ H5FD_s3comms_parse_url(
* READ QUERY *
**************/
- if ('?' == *tmpstr) {
+ if('?' == *tmpstr) {
tmpstr += 1;
curstr = tmpstr;
- while (0 != *tmpstr) {
+ while(0 != *tmpstr)
tmpstr++;
- }
len = tmpstr - curstr;
- if (len == 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "QUERY cannot be empty");
- } else if (len > urllen) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem with length of QUERY substring");
- }
+ if(len == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "QUERY cannot be empty")
+ else if(len > urllen)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem with length of QUERY substring");
purl->query = (char *)H5MM_malloc(sizeof(char) * (size_t)(len + 1));
- if (purl->query == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL,
- "can't allocate space for QUERY");
- } /* cannot malloc path pointer */
- (void)HDstrncpy(purl->query, curstr, (size_t)len);
+ if(purl->query == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "can't allocate space for QUERY");
+ HDstrncpy(purl->query, curstr, (size_t)len);
purl->query[len] = 0;
} /* end if QUERY exists */
@@ -2950,9 +2423,9 @@ H5FD_s3comms_parse_url(
ret_value = SUCCEED;
done:
- if (ret_value == FAIL) {
+ if(ret_value == FAIL)
H5FD_s3comms_free_purl(purl);
- }
+
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5FD_s3comms_parse_url() */
@@ -3016,9 +2489,8 @@ H5FD_s3comms_percent_encode_char(
HDfprintf(stdout, "called H5FD_s3comms_percent_encode_char.\n");
#endif
- if (repr == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination `repr`.\n")
- }
+ if(repr == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination `repr`.")
#if S3COMMS_DEBUG
H5FD_s3comms_bytes_to_hex((char *)hex, s, 1, FALSE);
@@ -3026,7 +2498,7 @@ H5FD_s3comms_percent_encode_char(
HDfprintf(stdout, " CHAR-HEX: \"%s\"\n", hex);
#endif
- if (c <= (unsigned char)0x7f) {
+ if(c <= (unsigned char)0x7f) {
/* character represented in a single "byte"
* and single percent-code
*/
@@ -3035,11 +2507,8 @@ H5FD_s3comms_percent_encode_char(
#endif
*repr_len = 3;
chars_written = HDsnprintf(repr, 4, "%%%02X", c);
- if (chars_written < 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "cannot write char %c",
- c);
- }
+ if(chars_written < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot write char %c", c);
} /* end if single-byte unicode char */
else {
/* multi-byte, multi-percent representation
@@ -3092,16 +2561,9 @@ H5FD_s3comms_percent_encode_char(
acc += (stack_size > 2) ? 0x20 : 0; /* 0x00100000 */
acc += (stack_size > 3) ? 0x10 : 0; /* 0x00010000 */
stack_size--;
- chars_written = HDsnprintf(
- repr,
- 4,
- "%%%02X",
- (unsigned char)(acc + stack[stack_size]));
- if (chars_written < 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "cannot write char %c",
- c);
- }
+ chars_written = HDsnprintf( repr, 4, "%%%02X", (unsigned char)(acc + stack[stack_size]));
+ if(chars_written < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot write char %c", c);
*repr_len += 3;
/************************
@@ -3109,17 +2571,11 @@ H5FD_s3comms_percent_encode_char(
************************/
/* 10xxxxxx */
- for (i = 0; i < stack_size; i++) {
- chars_written = HDsnprintf(
- &repr[i*3 + 3],
- 4,
- "%%%02X",
- (unsigned char)(0x80 + stack[stack_size - 1 - i]));
- if (chars_written < 0) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "cannot write char %c",
- c);
- }
+ for(i = 0; i < stack_size; i++) {
+ chars_written = HDsnprintf( &repr[i*3 + 3], 4,
+ "%%%02X", (unsigned char)(0x80 + stack[stack_size - 1 - i]));
+ if(chars_written < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot write char %c", c);
*repr_len += 3;
} /* end for each continuation byte */
} /* end else (multi-byte) */
@@ -3190,38 +2646,24 @@ H5FD_s3comms_signing_key(
HDfprintf(stdout, "called H5FD_s3comms_signing_key.\n");
#endif
- if (md == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "Destination `md` cannot be NULL.\n")
- }
- if (secret == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "`secret` cannot be NULL.\n")
- }
- if (region == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "`region` cannot be NULL.\n")
- }
- if (iso8601now == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "`iso8601now` cannot be NULL.\n")
- }
+ if(md == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Destination `md` cannot be NULL.")
+ if(secret == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`secret` cannot be NULL.")
+ if(region == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`region` cannot be NULL.")
+ if(iso8601now == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`iso8601now` cannot be NULL.")
AWS4_secret_len = 4 + HDstrlen(secret) + 1;
AWS4_secret = (char*)H5MM_malloc(sizeof(char *) * AWS4_secret_len);
- if (AWS4_secret == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "Could not allocate space.\n")
- }
+ if(AWS4_secret == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Could not allocate space.")
- /* prepend "AWS4" to start of the secret key
- */
+ /* prepend "AWS4" to start of the secret key */
ret = HDsnprintf(AWS4_secret, AWS4_secret_len,"%s%s", "AWS4", secret);
- if ((size_t)ret != (AWS4_secret_len - 1)) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem writing AWS4+secret `%s`",
- secret);
- }
+ if((size_t)ret != (AWS4_secret_len - 1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem writing AWS4+secret `%s`", secret);
/* hash_func, key, len(key), msg, len(msg), digest_dest, digest_len_dest
* we know digest length, so ignore via NULL
@@ -3320,37 +2762,26 @@ H5FD_s3comms_tostringtosign(
HDfprintf(stdout, "called H5FD_s3comms_tostringtosign.\n");
#endif
- if (dest == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "destination buffer cannot be null.\n")
- }
- if (req == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "canonical request cannot be null.\n")
- }
- if (now == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "Timestring cannot be NULL.\n")
- }
- if (region == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "Region cannot be NULL.\n")
- }
+ if(dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination buffer cannot be null.")
+ if(req == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "canonical request cannot be null.")
+ if(now == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Timestring cannot be NULL.")
+ if(region == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Region cannot be NULL.")
- for (i = 0; i < 128; i++) {
+ for(i = 0; i < 128; i++)
tmp[i] = '\0';
- }
- for (i = 0; i < SHA256_DIGEST_LENGTH * 2 + 1; i++) {
+ for(i = 0; i < SHA256_DIGEST_LENGTH * 2 + 1; i++) {
checksum[i] = '\0';
hexsum[i] = '\0';
}
HDstrncpy(day, now, 8);
day[8] = '\0';
ret = HDsnprintf(tmp, 127, "%s/%s/s3/aws4_request", day, region);
- if (ret <= 0 || ret >= 127) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "problem adding day and region to string")
- }
+ if(ret <= 0 || ret >= 127)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "problem adding day and region to string")
HDmemcpy((dest + d), "AWS4-HMAC-SHA256\n", 17);
d = 17;
@@ -3363,24 +2794,14 @@ H5FD_s3comms_tostringtosign(
d += HDstrlen(tmp);
dest[d++] = '\n';
- SHA256((const unsigned char *)req,
- HDstrlen(req),
- checksum);
+ SHA256((const unsigned char *)req, HDstrlen(req), checksum);
- if (H5FD_s3comms_bytes_to_hex(
- hexsum,
- (const unsigned char *)checksum,
- SHA256_DIGEST_LENGTH,
- true)
- == FAIL)
- {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "could not create hex string");
- }
+ if(H5FD_s3comms_bytes_to_hex(hexsum, (const unsigned char *)checksum,
+ SHA256_DIGEST_LENGTH, true) == FAIL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not create hex string");
- for (i = 0; i < SHA256_DIGEST_LENGTH * 2; i++) {
+ for(i = 0; i < SHA256_DIGEST_LENGTH * 2; i++)
dest[d++] = hexsum[i];
- }
dest[d] = '\0';
@@ -3432,21 +2853,16 @@ H5FD_s3comms_trim(char *dest,
HDfprintf(stdout, "called H5FD_s3comms_trim.\n");
#endif
- if (dest == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "destination cannot be null.")
- }
- if (s == NULL) {
+ if(dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be null.")
+ if(s == NULL)
s_len = 0;
- }
- if (s_len > 0) {
+ if(s_len > 0) {
/* Find first non-whitespace character from start;
* reduce total length per character.
*/
- while ((s_len > 0) &&
- isspace((unsigned char)s[0]) && s_len > 0)
- {
+ while((s_len > 0) && HDisspace((unsigned char)s[0]) && s_len > 0) {
s++;
s_len--;
}
@@ -3455,14 +2871,13 @@ H5FD_s3comms_trim(char *dest,
* reduce length per-character.
* If length is 0 already, there is no non-whitespace character.
*/
- if (s_len > 0) {
+ if(s_len > 0) {
do {
s_len--;
- } while( isspace((unsigned char)s[s_len]) );
+ } while(HDisspace((unsigned char)s[s_len]));
s_len++;
- /* write output into dest
- */
+ /* write output into dest */
HDmemcpy(dest, s, s_len);
}
}
@@ -3534,54 +2949,36 @@ H5FD_s3comms_uriencode(
HDfprintf(stdout, "H5FD_s3comms_uriencode called.\n");
#endif
- if (s == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "source string cannot be NULL");
- }
- if (dest == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "destination cannot be NULL");
- }
+ if(s == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source string cannot be NULL");
+ if(dest == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "destination cannot be NULL");
/* Write characters to destination, converting to percent-encoded
* "hex-utf-8" strings if necessary.
* e.g., '$' -> "%24"
*/
- for (s_off = 0; s_off < s_len; s_off++) {
+ for(s_off = 0; s_off < s_len; s_off++) {
c = s[s_off];
- if (isalnum(c) ||
- c == '.' ||
- c == '-' ||
- c == '_' ||
- c == '~' ||
- (c == '/' && encode_slash == FALSE))
- {
+ if(HDisalnum(c) || c == '.' || c == '-' || c == '_' ||
+ c == '~' || (c == '/' && encode_slash == FALSE))
dest[dest_off++] = c;
- }
else {
hex_off = 0;
- if (H5FD_s3comms_percent_encode_char(
- hex_buffer,
- (const unsigned char)c,
- &hex_len)
- == FAIL)
- {
+ if(H5FD_s3comms_percent_encode_char(hex_buffer, (const unsigned char)c,
+ &hex_len) == FAIL) {
hex_buffer[0] = c;
hex_buffer[1] = 0;
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to percent-encode character \'%s\' "
- "at %d in \"%s\"", hex_buffer, (int)s_off, s);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to percent-encode character \'%s\' " "at %d in \"%s\"", hex_buffer, (int)s_off, s);
}
- for (hex_off = 0; hex_off < hex_len; hex_off++) {
+ for(hex_off = 0; hex_off < hex_len; hex_off++)
dest[dest_off++] = hex_buffer[hex_off];
- }
} /* end else (not a regular character) */
} /* end for each character */
- if (dest_off < s_len)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "buffer overflow");
+ if(dest_off < s_len)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buffer overflow");
*n_written = dest_off;
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 12e107f..147d08f 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
* Purpose: The POSIX unbuffered file driver using only the HDF5 public
@@ -99,7 +99,6 @@ typedef struct H5FD_sec2_t {
* a single file.
*/
hbool_t fam_to_single;
-
} H5FD_sec2_t;
/*
@@ -117,37 +116,37 @@ typedef struct H5FD_sec2_t {
* which can be addressed entirely by the second
* argument of the file seek function.
*/
-#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (HDoff_t)((A)+(Z))<(HDoff_t)(A))
+ HADDR_UNDEF == (A) + (Z) || \
+ (HDoff_t)((A) + (Z)) < (HDoff_t)(A))
/* Prototypes */
-static herr_t H5FD_sec2_term(void);
-static H5FD_t *H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id,
+static herr_t H5FD__sec2_term(void);
+static H5FD_t *H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
-static herr_t H5FD_sec2_close(H5FD_t *_file);
-static int H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_sec2_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
-static haddr_t H5FD_sec2_get_eof(const H5FD_t *_file, H5FD_mem_t type);
-static herr_t H5FD_sec2_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
+static herr_t H5FD__sec2_close(H5FD_t *_file);
+static int H5FD__sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD__sec2_query(const H5FD_t *_f1, unsigned long *flags);
+static haddr_t H5FD__sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__sec2_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static haddr_t H5FD__sec2_get_eof(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD__sec2_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
+static herr_t H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, void *buf);
-static herr_t H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
+static herr_t H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, const void *buf);
-static herr_t H5FD_sec2_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_sec2_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_sec2_unlock(H5FD_t *_file);
+static herr_t H5FD__sec2_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__sec2_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__sec2_unlock(H5FD_t *_file);
static const H5FD_class_t H5FD_sec2_g = {
"sec2", /* name */
MAXADDR, /* maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
- H5FD_sec2_term, /* terminate */
+ H5FD__sec2_term, /* terminate */
NULL, /* sb_size */
NULL, /* sb_encode */
NULL, /* sb_decode */
@@ -158,23 +157,23 @@ static const H5FD_class_t H5FD_sec2_g = {
0, /* dxpl_size */
NULL, /* dxpl_copy */
NULL, /* dxpl_free */
- H5FD_sec2_open, /* open */
- H5FD_sec2_close, /* close */
- H5FD_sec2_cmp, /* cmp */
- H5FD_sec2_query, /* query */
+ H5FD__sec2_open, /* open */
+ H5FD__sec2_close, /* close */
+ H5FD__sec2_cmp, /* cmp */
+ H5FD__sec2_query, /* query */
NULL, /* get_type_map */
NULL, /* alloc */
NULL, /* free */
- H5FD_sec2_get_eoa, /* get_eoa */
- H5FD_sec2_set_eoa, /* set_eoa */
- H5FD_sec2_get_eof, /* get_eof */
- H5FD_sec2_get_handle, /* get_handle */
- H5FD_sec2_read, /* read */
- H5FD_sec2_write, /* write */
+ H5FD__sec2_get_eoa, /* get_eoa */
+ H5FD__sec2_set_eoa, /* set_eoa */
+ H5FD__sec2_get_eof, /* get_eof */
+ H5FD__sec2_get_handle, /* get_handle */
+ H5FD__sec2_read, /* read */
+ H5FD__sec2_write, /* write */
NULL, /* flush */
- H5FD_sec2_truncate, /* truncate */
- H5FD_sec2_lock, /* lock */
- H5FD_sec2_unlock, /* unlock */
+ H5FD__sec2_truncate, /* truncate */
+ H5FD__sec2_lock, /* lock */
+ H5FD__sec2_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
@@ -249,7 +248,7 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_sec2_term
+ * Function: H5FD__sec2_term
*
* Purpose: Shut down the VFD
*
@@ -261,15 +260,15 @@ done:
*---------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_term(void)
+H5FD__sec2_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Reset VFL ID */
H5FD_SEC2_g = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_sec2_term() */
+} /* end H5FD__sec2_term() */
/*-------------------------------------------------------------------------
@@ -306,7 +305,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_open
+ * Function: H5FD__sec2_open
*
* Purpose: Create and/or opens a file as an HDF5 file.
*
@@ -321,7 +320,7 @@ done:
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
+H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
H5FD_sec2_t *file = NULL; /* sec2 VFD info */
int fd = -1; /* File descriptor */
@@ -333,7 +332,7 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5P_genplist_t *plist; /* Property list pointer */
H5FD_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check on file offsets */
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
@@ -431,11 +430,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_open() */
+} /* end H5FD__sec2_open() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_close
+ * Function: H5FD__sec2_close
*
* Purpose: Closes an HDF5 file.
*
@@ -448,12 +447,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_close(H5FD_t *_file)
+H5FD__sec2_close(H5FD_t *_file)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(file);
@@ -467,11 +466,11 @@ H5FD_sec2_close(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_close() */
+} /* end H5FD__sec2_close() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_cmp
+ * Function: H5FD__sec2_cmp
*
* Purpose: Compares two files belonging to this driver using an
* arbitrary (but consistent) ordering.
@@ -486,13 +485,13 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
+H5FD__sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_sec2_t *f1 = (const H5FD_sec2_t *)_f1;
const H5FD_sec2_t *f2 = (const H5FD_sec2_t *)_f2;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
#ifdef H5_HAVE_WIN32_API
if(f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber) HGOTO_DONE(-1)
@@ -521,11 +520,11 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_cmp() */
+} /* end H5FD__sec2_cmp() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_query
+ * Function: H5FD__sec2_query
*
* Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
@@ -538,11 +537,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
+H5FD__sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file; /* sec2 VFD info */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Set the VFL feature flags that this driver supports */
/* Notice: the Mirror VFD Writer currently uses only the Sec2 driver as
@@ -567,11 +566,11 @@ H5FD_sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_sec2_query() */
+} /* end H5FD__sec2_query() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_get_eoa
+ * Function: H5FD__sec2_get_eoa
*
* Purpose: Gets the end-of-address marker for the file. The EOA marker
* is the first address past the last byte allocated in the
@@ -585,18 +584,18 @@ H5FD_sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
-} /* end H5FD_sec2_get_eoa() */
+} /* end H5FD__sec2_get_eoa() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_set_eoa
+ * Function: H5FD__sec2_set_eoa
*
* Purpose: Set the end-of-address marker for the file. This function is
* called shortly after an existing HDF5 file is opened in order
@@ -610,20 +609,20 @@ H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
+H5FD__sec2_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
file->eoa = addr;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_sec2_set_eoa() */
+} /* end H5FD__sec2_set_eoa() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_get_eof
+ * Function: H5FD__sec2_get_eof
*
* Purpose: Returns the end-of-file marker, which is the greater of
* either the filesystem end-of-file or the HDF5 end-of-address
@@ -638,18 +637,18 @@ H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_sec2_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__sec2_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eof)
-} /* end H5FD_sec2_get_eof() */
+} /* end H5FD__sec2_get_eof() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_get_handle
+ * Function: H5FD__sec2_get_handle
*
* Purpose: Returns the file handle of sec2 file driver.
*
@@ -661,12 +660,12 @@ H5FD_sec2_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
+H5FD__sec2_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@@ -675,11 +674,11 @@ H5FD_sec2_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handl
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_get_handle() */
+} /* end H5FD__sec2_get_handle() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_read
+ * Function: H5FD__sec2_read
*
* Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
* into buffer BUF according to data transfer properties in
@@ -695,14 +694,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id,
+H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id,
haddr_t addr, size_t size, void *buf /*out*/)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
HDoff_t offset = (HDoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -715,17 +714,15 @@ H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUS
#ifndef H5_HAVE_PREADWRITE
/* Seek to the correct location (if we don't have pread) */
- if(addr != file->pos || OP_READ != file->op) {
+ if(addr != file->pos || OP_READ != file->op)
if(HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- }
#endif /* H5_HAVE_PREADWRITE */
/* Read data, being careful of interrupted system calls, partial results,
* and the end of the file.
*/
while(size > 0) {
-
h5_posix_io_t bytes_in = 0; /* # of bytes to read */
h5_posix_io_ret_t bytes_read = -1; /* # of bytes actually read */
@@ -782,11 +779,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_read() */
+} /* end H5FD__sec2_read() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_write
+ * Function: H5FD__sec2_write
*
* Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
* from buffer BUF according to data transfer properties in
@@ -800,14 +797,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id,
+H5FD__sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id,
haddr_t addr, size_t size, const void *buf)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
HDoff_t offset = (HDoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file && file->pub.cls);
HDassert(buf);
@@ -820,17 +817,15 @@ H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
#ifndef H5_HAVE_PREADWRITE
/* Seek to the correct location (if we don't have pwrite) */
- if(addr != file->pos || OP_WRITE != file->op) {
+ if(addr != file->pos || OP_WRITE != file->op)
if(HDlseek(file->fd, (HDoff_t)addr, SEEK_SET) < 0)
HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position")
- }
#endif /* H5_HAVE_PREADWRITE */
/* Write the data, being careful of interrupted system calls and partial
* results
*/
while(size > 0) {
-
h5_posix_io_t bytes_in = 0; /* # of bytes to write */
h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
@@ -883,11 +878,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_write() */
+} /* end H5FD__sec2_write() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_truncate
+ * Function: H5FD__sec2_truncate
*
* Purpose: Makes sure that the true file size is the same (or larger)
* than the end-of-address.
@@ -900,12 +895,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
+H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -952,11 +947,11 @@ H5FD_sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_truncate() */
+} /* end H5FD__sec2_truncate() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_lock
+ * Function: H5FD__sec2_lock
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
@@ -970,13 +965,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_lock(H5FD_t *_file, hbool_t rw)
+H5FD__sec2_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -997,11 +992,11 @@ H5FD_sec2_lock(H5FD_t *_file, hbool_t rw)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_lock() */
+} /* end H5FD__sec2_lock() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_unlock
+ * Function: H5FD__sec2_unlock
*
* Purpose: To remove the existing lock on the file
*
@@ -1012,12 +1007,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_unlock(H5FD_t *_file)
+H5FD__sec2_unlock(H5FD_t *_file)
{
H5FD_sec2_t *file = (H5FD_sec2_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -1034,5 +1029,5 @@ H5FD_sec2_unlock(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sec2_unlock() */
+} /* end H5FD__sec2_unlock() */
diff --git a/src/H5FDsec2.h b/src/H5FDsec2.h
index a4ade0b..d669582 100644
--- a/src/H5FDsec2.h
+++ b/src/H5FDsec2.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the sec2 driver.
diff --git a/src/H5FDspace.c b/src/H5FDspace.c
index e1f0cb2..22d7e22 100644
--- a/src/H5FDspace.c
+++ b/src/H5FDspace.c
@@ -15,7 +15,7 @@
*
* Created: H5FDspace.c
* Jan 3 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Space allocation routines for the file driver code.
*
@@ -84,7 +84,7 @@ H5FL_DEFINE(H5FD_free_t);
/*-------------------------------------------------------------------------
- * Function: H5FD_extend
+ * Function: H5FD__extend
*
* Purpose: Extend the EOA space of a file.
*
@@ -99,12 +99,12 @@ H5FL_DEFINE(H5FD_free_t);
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_extend(H5FD_t *file, H5FD_mem_t type, hsize_t size)
+H5FD__extend(H5FD_t *file, H5FD_mem_t type, hsize_t size)
{
haddr_t eoa; /* Address of end-of-allocated space */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(file);
@@ -129,7 +129,7 @@ H5FD_extend(H5FD_t *file, H5FD_mem_t type, hsize_t size)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_extend() */
+} /* end H5FD__extend() */
/*-------------------------------------------------------------------------
@@ -203,7 +203,7 @@ HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "driver allocation request failed")
} /* end if */
else {
- ret_value = H5FD_extend(file, type, size + extra);
+ ret_value = H5FD__extend(file, type, size + extra);
if(!H5F_addr_defined(ret_value))
HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, HADDR_UNDEF, "driver eoa update request failed")
} /* end else */
@@ -439,7 +439,7 @@ H5FD_try_extend(H5FD_t *file, H5FD_mem_t type, H5F_t *f, haddr_t blk_end, hsize_
/* Check if the block is exactly at the end of the file */
if(H5F_addr_eq(blk_end, eoa)) {
/* Extend the object by extending the underlying file */
- if(HADDR_UNDEF == H5FD_extend(file, type, extra_requested))
+ if(HADDR_UNDEF == H5FD__extend(file, type, extra_requested))
HGOTO_ERROR(H5E_VFL, H5E_CANTEXTEND, FAIL, "driver extend request failed")
/* Mark EOA info dirty in cache, so change will get encoded */
diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c
index eb30b1f..d0ed250d 100644
--- a/src/H5FDsplitter.c
+++ b/src/H5FDsplitter.c
@@ -27,8 +27,6 @@
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
-#include "H5FDsec2.h" /* Generic Functions */
-#include "H5FDstdio.h" /* Generic Functions */
#include "H5Pprivate.h" /* Property lists */
/* The driver identification number, initialized at runtime */
@@ -83,9 +81,8 @@ typedef struct H5FD_splitter_t {
#define H5FD_SPLITTER_WO_ERROR(file, funcname, errmajor, errminor, ret, mesg) \
{ \
H5FD__splitter_log_error((file), (funcname), (mesg)); \
- if (FALSE == (file)->fa.ignore_wo_errs) { \
+ if(FALSE == (file)->fa.ignore_wo_errs) \
HGOTO_ERROR((errmajor), (errminor), (ret), (mesg)) \
- } \
}
#define H5FD_SPLITTER_DEBUG_OP_CALLS 0 /* debugging print toggle; 0 disables */
@@ -93,7 +90,7 @@ typedef struct H5FD_splitter_t {
#if H5FD_SPLITTER_DEBUG_OP_CALLS
#define H5FD_SPLITTER_LOG_CALL(name) do { \
HDprintf("called %s()\n", (name)); \
- fflush(stdout); \
+ HDfflush(stdout); \
} while (0)
#else
#define H5FD_SPLITTER_LOG_CALL(name) /* no-op */
@@ -103,73 +100,75 @@ typedef struct H5FD_splitter_t {
/* Print error messages from W/O channel to log file */
static herr_t H5FD__splitter_log_error(const H5FD_splitter_t *file, const char *atfunc, const char *msg);
-
static int H5FD__copy_plist(hid_t fapl_id, hid_t *id_out_ptr);
/* Prototypes */
-static herr_t H5FD_splitter_term(void);
-static hsize_t H5FD_splitter_sb_size(H5FD_t *_file);
-static herr_t H5FD_splitter_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/);
-static herr_t H5FD_splitter_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf);
-static void *H5FD_splitter_fapl_get(H5FD_t *_file);
-static void *H5FD_splitter_fapl_copy(const void *_old_fa);
-static herr_t H5FD_splitter_fapl_free(void *_fapl);
-static H5FD_t *H5FD_splitter_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
-static herr_t H5FD_splitter_close(H5FD_t *_file);
-static int H5FD_splitter_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
-static herr_t H5FD_splitter_query(const H5FD_t *_file, unsigned long *flags /* out */);
-static herr_t H5FD_splitter_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map);
-static haddr_t H5FD_splitter_alloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
-static herr_t H5FD_splitter_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size);
-static haddr_t H5FD_splitter_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type);
-static herr_t H5FD_splitter_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr);
-static haddr_t H5FD_splitter_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type);
-static herr_t H5FD_splitter_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void** file_handle);
-static herr_t H5FD_splitter_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *buf);
-static herr_t H5FD_splitter_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *buf);
-static herr_t H5FD_splitter_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_splitter_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_splitter_unlock(H5FD_t *_file);
+static herr_t H5FD__splitter_term(void);
+static hsize_t H5FD__splitter_sb_size(H5FD_t *_file);
+static herr_t H5FD__splitter_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/);
+static herr_t H5FD__splitter_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf);
+static void *H5FD__splitter_fapl_get(H5FD_t *_file);
+static void *H5FD__splitter_fapl_copy(const void *_old_fa);
+static herr_t H5FD__splitter_fapl_free(void *_fapl);
+static H5FD_t *H5FD__splitter_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+static herr_t H5FD__splitter_close(H5FD_t *_file);
+static int H5FD__splitter_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD__splitter_query(const H5FD_t *_file, unsigned long *flags /* out */);
+static herr_t H5FD__splitter_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map);
+static haddr_t H5FD__splitter_alloc(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
+static herr_t H5FD__splitter_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size);
+static haddr_t H5FD__splitter_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type);
+static herr_t H5FD__splitter_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr);
+static haddr_t H5FD__splitter_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type);
+static herr_t H5FD__splitter_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void** file_handle);
+static herr_t H5FD__splitter_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *buf);
+static herr_t H5FD__splitter_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *buf);
+static herr_t H5FD__splitter_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+static herr_t H5FD__splitter_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__splitter_unlock(H5FD_t *_file);
static const H5FD_class_t H5FD_splitter_g = {
"splitter", /* name */
MAXADDR, /* maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
- H5FD_splitter_term, /* terminate */
- H5FD_splitter_sb_size, /* sb_size */
- H5FD_splitter_sb_encode, /* sb_encode */
- H5FD_splitter_sb_decode, /* sb_decode */
+ H5FD__splitter_term, /* terminate */
+ H5FD__splitter_sb_size, /* sb_size */
+ H5FD__splitter_sb_encode, /* sb_encode */
+ H5FD__splitter_sb_decode, /* sb_decode */
sizeof(H5FD_splitter_fapl_t), /* fapl_size */
- H5FD_splitter_fapl_get, /* fapl_get */
- H5FD_splitter_fapl_copy, /* fapl_copy */
- H5FD_splitter_fapl_free, /* fapl_free */
+ H5FD__splitter_fapl_get, /* fapl_get */
+ H5FD__splitter_fapl_copy, /* fapl_copy */
+ H5FD__splitter_fapl_free, /* fapl_free */
0, /* dxpl_size */
NULL, /* dxpl_copy */
NULL, /* dxpl_free */
- H5FD_splitter_open, /* open */
- H5FD_splitter_close, /* close */
- H5FD_splitter_cmp, /* cmp */
- H5FD_splitter_query, /* query */
- H5FD_splitter_get_type_map, /* get_type_map */
- H5FD_splitter_alloc, /* alloc */
- H5FD_splitter_free, /* free */
- H5FD_splitter_get_eoa, /* get_eoa */
- H5FD_splitter_set_eoa, /* set_eoa */
- H5FD_splitter_get_eof, /* get_eof */
- H5FD_splitter_get_handle, /* get_handle */
- H5FD_splitter_read, /* read */
- H5FD_splitter_write, /* write */
- H5FD_splitter_flush, /* flush */
- H5FD_splitter_truncate, /* truncate */
- H5FD_splitter_lock, /* lock */
- H5FD_splitter_unlock, /* unlock */
+ H5FD__splitter_open, /* open */
+ H5FD__splitter_close, /* close */
+ H5FD__splitter_cmp, /* cmp */
+ H5FD__splitter_query, /* query */
+ H5FD__splitter_get_type_map, /* get_type_map */
+ H5FD__splitter_alloc, /* alloc */
+ H5FD__splitter_free, /* free */
+ H5FD__splitter_get_eoa, /* get_eoa */
+ H5FD__splitter_set_eoa, /* set_eoa */
+ H5FD__splitter_get_eof, /* get_eof */
+ H5FD__splitter_get_handle, /* get_handle */
+ H5FD__splitter_read, /* read */
+ H5FD__splitter_write, /* write */
+ H5FD__splitter_flush, /* flush */
+ H5FD__splitter_truncate, /* truncate */
+ H5FD__splitter_lock, /* lock */
+ H5FD__splitter_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
/* Declare a free list to manage the H5FD_splitter_t struct */
H5FL_DEFINE_STATIC(H5FD_splitter_t);
+/* Declare a free list to manage the H5FD_splitter_fapl_t struct */
+H5FL_DEFINE_STATIC(H5FD_splitter_fapl_t);
+
/*-------------------------------------------------------------------------
* Function: H5FD__init_package
@@ -186,11 +185,10 @@ H5FD__init_package(void)
FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD__init_package");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
- if (H5FD_splitter_init() < 0) {
+ if(H5FD_splitter_init() < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize splitter VFD")
- }
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -214,11 +212,10 @@ H5FD_splitter_init(void)
FUNC_ENTER_NOAPI(FAIL)
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_init");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
- if (H5I_VFL != H5I_get_type(H5FD_SPLITTER_g)) {
+ if(H5I_VFL != H5I_get_type(H5FD_SPLITTER_g))
H5FD_SPLITTER_g = H5FDregister(&H5FD_splitter_g);
- }
ret_value = H5FD_SPLITTER_g;
@@ -228,7 +225,7 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_splitter_term
+ * Function: H5FD__splitter_term
*
* Purpose: Shut down the splitter VFD.
*
@@ -236,17 +233,17 @@ done:
*---------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_term(void)
+H5FD__splitter_term(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_term");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Reset VFL ID */
H5FD_SPLITTER_g = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5FD_splitter_term() */
+} /* end H5FD__splitter_term() */
/*-------------------------------------------------------------------------
@@ -265,25 +262,22 @@ H5FD__copy_plist(hid_t fapl_id,
int ret_value = 0;
H5P_genplist_t *plist_ptr = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD__copy_plist");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
HDassert(id_out_ptr != NULL);
- if (FALSE == H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) {
+ if(FALSE == H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "not a file access property list");
- }
plist_ptr = (H5P_genplist_t *)H5I_object(fapl_id);
- if (NULL == plist_ptr) {
+ if(NULL == plist_ptr)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, -1, "unable to get property list");
- }
*id_out_ptr = H5P_copy_plist(plist_ptr, FALSE);
- if (H5I_INVALID_HID == *id_out_ptr) {
+ if(H5I_INVALID_HID == *id_out_ptr)
HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, -1, "unable to copy file access property list");
- }
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -302,28 +296,21 @@ done:
herr_t
H5Pset_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *vfd_config)
{
- H5FD_splitter_fapl_t info;
+ H5FD_splitter_fapl_t *info = NULL;
H5P_genplist_t *plist_ptr = NULL;
herr_t ret_value = SUCCEED;
- H5Eclear2(H5E_DEFAULT);
-
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Dr", fapl_id, vfd_config);
- H5FD_SPLITTER_LOG_CALL("H5Pset_fapl_splitter");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
- if (H5FD_SPLITTER_MAGIC != vfd_config->magic) {
+ if(H5FD_SPLITTER_MAGIC != vfd_config->magic)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid configuration (magic number mismatch)")
- }
- if (H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION != vfd_config->version) {
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invlaid config (version number mismatch)")
- }
-
- if (NULL == (plist_ptr = (H5P_genplist_t *)H5I_object(fapl_id))) {
+ if(H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION != vfd_config->version)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid config (version number mismatch)")
+ if(NULL == (plist_ptr = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a valid property list")
- }
-
/* Make sure that the W/O channel supports write-only capability.
* Some drivers (e.g. family or multi) do revision of the superblock
@@ -331,55 +318,54 @@ H5Pset_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *vfd_config)
* Uses the feature flag H5FD_FEAT_DEFAULT_VFD_COMPATIBLE as the
* determining attribute.
*/
- if (H5P_DEFAULT != vfd_config->wo_fapl_id) {
+ if(H5P_DEFAULT != vfd_config->wo_fapl_id) {
H5FD_class_t *wo_driver = NULL;
H5FD_driver_prop_t wo_driver_prop;
H5P_genplist_t *wo_plist_ptr = NULL;
unsigned long wo_driver_flags = 0;
wo_plist_ptr = (H5P_genplist_t *)H5I_object(vfd_config->wo_fapl_id);
- if (NULL == wo_plist_ptr) {
+ if(NULL == wo_plist_ptr)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- }
- if (H5P_peek(wo_plist_ptr, H5F_ACS_FILE_DRV_NAME, &wo_driver_prop) < 0) {
+ if(H5P_peek(wo_plist_ptr, H5F_ACS_FILE_DRV_NAME, &wo_driver_prop) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID & info")
- }
wo_driver = (H5FD_class_t *)H5I_object(wo_driver_prop.driver_id);
- if (NULL == wo_driver) {
+ if(NULL == wo_driver)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid driver ID in file access property list")
- }
- if (H5FD_driver_query(wo_driver, &wo_driver_flags) < 0) {
+ if(H5FD_driver_query(wo_driver, &wo_driver_flags) < 0)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "can't query VFD flags")
- }
- if (0 == (H5FD_FEAT_DEFAULT_VFD_COMPATIBLE & wo_driver_flags)) {
+ if(0 == (H5FD_FEAT_DEFAULT_VFD_COMPATIBLE & wo_driver_flags))
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "unsuitable W/O driver")
- }
} /* end if W/O VFD is non-default */
+ info = H5FL_CALLOC(H5FD_splitter_fapl_t);
+ if(NULL == info)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "unable to allocate file access property list struct")
- info.ignore_wo_errs = vfd_config->ignore_wo_errs;
- HDstrncpy(info.wo_path, vfd_config->wo_path, H5FD_SPLITTER_PATH_MAX);
- HDstrncpy(info.log_file_path, vfd_config->log_file_path, H5FD_SPLITTER_PATH_MAX);
- info.rw_fapl_id = H5P_FILE_ACCESS_DEFAULT; /* pre-set value */
- info.wo_fapl_id = H5P_FILE_ACCESS_DEFAULT; /* pre-set value */
+ info->ignore_wo_errs = vfd_config->ignore_wo_errs;
+ HDstrncpy(info->wo_path, vfd_config->wo_path, H5FD_SPLITTER_PATH_MAX);
+ HDstrncpy(info->log_file_path, vfd_config->log_file_path, H5FD_SPLITTER_PATH_MAX);
+ info->rw_fapl_id = H5P_FILE_ACCESS_DEFAULT; /* pre-set value */
+ info->wo_fapl_id = H5P_FILE_ACCESS_DEFAULT; /* pre-set value */
/* Set non-default channel FAPL IDs in splitter configuration info */
- if (H5P_DEFAULT != vfd_config->rw_fapl_id) {
- if (FALSE == H5P_isa_class(vfd_config->rw_fapl_id, H5P_FILE_ACCESS)) {
+ if(H5P_DEFAULT != vfd_config->rw_fapl_id) {
+ if(FALSE == H5P_isa_class(vfd_config->rw_fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list")
- }
- info.rw_fapl_id = vfd_config->rw_fapl_id;
+ info->rw_fapl_id = vfd_config->rw_fapl_id;
}
- if (H5P_DEFAULT != vfd_config->wo_fapl_id) {
- if (FALSE == H5P_isa_class(vfd_config->wo_fapl_id, H5P_FILE_ACCESS)) {
+ if(H5P_DEFAULT != vfd_config->wo_fapl_id) {
+ if(FALSE == H5P_isa_class(vfd_config->wo_fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list")
- }
- info.wo_fapl_id = vfd_config->wo_fapl_id;
+ info->wo_fapl_id = vfd_config->wo_fapl_id;
}
- ret_value = H5P_set_driver(plist_ptr, H5FD_SPLITTER, &info);
+ ret_value = H5P_set_driver(plist_ptr, H5FD_SPLITTER, info);
done:
+ if(info)
+ info = H5FL_FREE(H5FD_splitter_fapl_t, info);
+
FUNC_LEAVE_API(ret_value)
} /* end H5Pset_fapl_splitter() */
@@ -406,48 +392,39 @@ H5Pget_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config_out)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*Dr", fapl_id, config_out);
- H5FD_SPLITTER_LOG_CALL("H5Pget_fapl_splitter");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Check arguments */
- if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) {
+ if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- }
- if (config_out == NULL) {
+ if(config_out == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config_out pointer is null")
- }
- if (H5FD_SPLITTER_MAGIC != config_out->magic) {
+ if(H5FD_SPLITTER_MAGIC != config_out->magic)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "info-out pointer invalid (magic number mismatch)")
- }
- if (H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION != config_out->version) {
+ if(H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION != config_out->version)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "info-out pointer invalid (version unsafe)")
- }
/* Pre-set out FAPL IDs with intent to replace these values */
config_out->rw_fapl_id = H5I_INVALID_HID;
config_out->wo_fapl_id = H5I_INVALID_HID;
/* Check and get the splitter fapl */
- if (NULL == (plist_ptr = H5P_object_verify(fapl_id, H5P_FILE_ACCESS))) {
+ if(NULL == (plist_ptr = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- }
- if (H5FD_SPLITTER != H5P_peek_driver(plist_ptr)) {
+ if(H5FD_SPLITTER != H5P_peek_driver(plist_ptr))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
- }
- if (NULL == (fapl_ptr = (const H5FD_splitter_fapl_t *)H5P_peek_driver_info(plist_ptr))) {
+ if(NULL == (fapl_ptr = (const H5FD_splitter_fapl_t *)H5P_peek_driver_info(plist_ptr)))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unable to get specific-driver info")
- }
HDstrncpy(config_out->wo_path, fapl_ptr->wo_path, H5FD_SPLITTER_PATH_MAX);
HDstrncpy(config_out->log_file_path, fapl_ptr->log_file_path, H5FD_SPLITTER_PATH_MAX);
config_out->ignore_wo_errs = fapl_ptr->ignore_wo_errs;
/* Copy R/W and W/O FAPLs */
- if (H5FD__copy_plist(fapl_ptr->rw_fapl_id, &(config_out->rw_fapl_id)) < 0) {
+ if(H5FD__copy_plist(fapl_ptr->rw_fapl_id, &(config_out->rw_fapl_id)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "can't copy R/W FAPL");
- }
- if (H5FD__copy_plist(fapl_ptr->wo_fapl_id, &(config_out->wo_fapl_id)) < 0) {
+ if(H5FD__copy_plist(fapl_ptr->wo_fapl_id, &(config_out->wo_fapl_id)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "can't copy W/O FAPL");
- }
done:
FUNC_LEAVE_API(ret_value)
@@ -455,7 +432,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_flush
+ * Function: H5FD__splitter_flush
*
* Purpose: Flushes all data to disk for both channels.
*
@@ -463,32 +440,28 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
+H5FD__splitter_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_flush");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Public API for dxpl "context" */
- if (H5FDflush(file->rw_file, dxpl_id, closing) < 0) {
+ if(H5FDflush(file->rw_file, dxpl_id, closing) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTFLUSH, FAIL, "unable to flush R/W file")
- }
- if (H5FDflush(file->wo_file, dxpl_id, closing) < 0) {
- H5FD_SPLITTER_WO_ERROR(file, "H5FD_splitter_flush",
- H5E_VFL, H5E_CANTFLUSH, FAIL,
- "unable to flush W/O file")
- }
+ if(H5FDflush(file->wo_file, dxpl_id, closing) < 0)
+ H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTFLUSH, FAIL, "unable to flush W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_flush() */
+} /* end H5FD__splitter_flush() */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_read
+ * Function: H5FD__splitter_read
*
* Purpose: Reads SIZE bytes of data from the R/W channel, beginning at
* address ADDR into buffer BUF according to data transfer
@@ -502,45 +475,37 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_read(
- H5FD_t *_file,
- H5FD_mem_t H5_ATTR_UNUSED type,
- hid_t H5_ATTR_UNUSED dxpl_id,
- haddr_t addr,
- size_t size,
- void *buf /*out*/)
+H5FD__splitter_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type,
+ hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, size_t size, void *buf)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_read");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
HDassert(file && file->pub.cls);
HDassert(buf);
/* Check for overflow conditions */
- if (!H5F_addr_defined(addr)) {
+ if(!H5F_addr_defined(addr))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr)
- }
- if (REGION_OVERFLOW(addr, size)) {
+ if(REGION_OVERFLOW(addr, size))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu", (unsigned long long)addr)
- }
/* Only read from R/W channel */
/* Public API for dxpl "context" */
- if (H5FDread(file->rw_file, type, dxpl_id, addr, size, buf) < 0) {
+ if(H5FDread(file->rw_file, type, dxpl_id, addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "Reading from R/W channel failed")
- }
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_read() */
+} /* end H5FD__splitter_read() */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_write
+ * Function: H5FD__splitter_write
*
* Purpose: Writes SIZE bytes of data to R/W and W/O channels, beginning
* at address ADDR from buffer BUF according to data transfer
@@ -550,38 +515,34 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *buf)
+H5FD__splitter_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id,
+ haddr_t addr, size_t size, const void *buf)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
H5P_genplist_t *plist_ptr = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_write");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
- if (NULL == (plist_ptr = (H5P_genplist_t *)H5I_object(dxpl_id))) {
+ if(NULL == (plist_ptr = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
- }
/* Write to each file */
/* Public API for dxpl "context" */
- if (H5FDwrite(file->rw_file, type, dxpl_id, addr, size, buf) < 0) {
+ if(H5FDwrite(file->rw_file, type, dxpl_id, addr, size, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "R/W file write failed")
- }
- if (H5FDwrite(file->wo_file, type, dxpl_id, addr, size, buf) < 0) {
- H5FD_SPLITTER_WO_ERROR(file, "H5FD_splitter_write",
- H5E_VFL, H5E_WRITEERROR, FAIL,
- "unable to write W/O file")
- }
+ if(H5FDwrite(file->wo_file, type, dxpl_id, addr, size, buf) < 0)
+ H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_write() */
+} /* end H5FD__splitter_write() */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_fapl_get
+ * Function: H5FD__splitter_fapl_get
*
* Purpose: Returns a file access property list which indicates how the
* specified file is being accessed. The return list could be
@@ -593,23 +554,23 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5FD_splitter_fapl_get(H5FD_t *_file)
+H5FD__splitter_fapl_get(H5FD_t *_file)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
void *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_fapl_get");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
- ret_value = H5FD_splitter_fapl_copy(&(file->fa));
+ ret_value = H5FD__splitter_fapl_copy(&(file->fa));
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD__splitter_fapl_get() */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_fapl_copy
+ * Function: H5FD__splitter_fapl_copy
*
* Purpose: Copies the file access properties.
*
@@ -618,56 +579,45 @@ H5FD_splitter_fapl_get(H5FD_t *_file)
*-------------------------------------------------------------------------
*/
static void *
-H5FD_splitter_fapl_copy(const void *_old_fa)
+H5FD__splitter_fapl_copy(const void *_old_fa)
{
const H5FD_splitter_fapl_t *old_fa_ptr = (const H5FD_splitter_fapl_t *)_old_fa;
H5FD_splitter_fapl_t *new_fa_ptr = NULL;
void *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_fapl_copy");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
HDassert(old_fa_ptr);
- new_fa_ptr = (H5FD_splitter_fapl_t *)H5MM_calloc(sizeof(H5FD_splitter_fapl_t));
- if (NULL == new_fa_ptr) {
+ new_fa_ptr = H5FL_CALLOC(H5FD_splitter_fapl_t);
+ if(NULL == new_fa_ptr)
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate log file FAPL")
- }
- if (HDmemcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_splitter_fapl_t)) == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, NULL, "unable to shallow-copy info")
- }
- if (HDstrncpy(new_fa_ptr->wo_path, old_fa_ptr->wo_path, H5FD_SPLITTER_PATH_MAX) == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, NULL, "unable to copy write-only channel file path")
- }
- if (HDstrncpy(new_fa_ptr->log_file_path, old_fa_ptr->log_file_path, H5FD_SPLITTER_PATH_MAX) == NULL) {
- HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, NULL, "unable to copy log file path")
- }
+ HDmemcpy(new_fa_ptr, old_fa_ptr, sizeof(H5FD_splitter_fapl_t));
+ HDstrncpy(new_fa_ptr->wo_path, old_fa_ptr->wo_path, H5FD_SPLITTER_PATH_MAX);
+ HDstrncpy(new_fa_ptr->log_file_path, old_fa_ptr->log_file_path, H5FD_SPLITTER_PATH_MAX);
/* Copy R/W and W/O FAPLs */
- if (H5FD__copy_plist(old_fa_ptr->rw_fapl_id, &(new_fa_ptr->rw_fapl_id)) < 0) {
+ if(H5FD__copy_plist(old_fa_ptr->rw_fapl_id, &(new_fa_ptr->rw_fapl_id)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't copy R/W FAPL");
- }
- if (H5FD__copy_plist(old_fa_ptr->wo_fapl_id, &(new_fa_ptr->wo_fapl_id)) < 0) {
+ if(H5FD__copy_plist(old_fa_ptr->wo_fapl_id, &(new_fa_ptr->wo_fapl_id)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't copy W/O FAPL");
- }
ret_value = (void *)new_fa_ptr;
done:
- if (NULL == ret_value) {
- if (new_fa_ptr) {
- H5MM_free(new_fa_ptr);
- }
- }
+ if(NULL == ret_value)
+ if(new_fa_ptr)
+ new_fa_ptr = H5FL_FREE(H5FD_splitter_fapl_t, new_fa_ptr);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_fapl_copy() */
+} /* end H5FD__splitter_fapl_copy() */
/*--------------------------------------------------------------------------
- * Function: H5FD_splitter_fapl_free
+ * Function: H5FD__splitter_fapl_free
*
* Purpose: Releases the file access lists
*
@@ -675,35 +625,33 @@ done:
*--------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_fapl_free(void *_fapl)
+H5FD__splitter_fapl_free(void *_fapl)
{
H5FD_splitter_fapl_t *fapl = (H5FD_splitter_fapl_t*)_fapl;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_fapl_free");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Check arguments */
HDassert(fapl);
- if (H5I_dec_ref(fapl->rw_fapl_id) < 0) {
+ if(H5I_dec_ref(fapl->rw_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close R/W FAPL ID")
- }
- if (H5I_dec_ref(fapl->wo_fapl_id) < 0) {
+ if(H5I_dec_ref(fapl->wo_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close W/O FAPL ID")
- }
/* Free the property list */
- H5MM_free(fapl);
+ fapl = H5FL_FREE(H5FD_splitter_fapl_t, fapl);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_fapl_free() */
+} /* end H5FD__splitter_fapl_free() */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_open
+ * Function: H5FD__splitter_open
*
* Purpose: Create and/or opens a file as an HDF5 file.
*
@@ -714,123 +662,99 @@ done:
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_splitter_open(const char *name, unsigned flags, hid_t splitter_fapl_id, haddr_t maxaddr)
+H5FD__splitter_open(const char *name, unsigned flags, hid_t splitter_fapl_id, haddr_t maxaddr)
{
H5FD_splitter_t *file_ptr = NULL; /* Splitter VFD info */
const H5FD_splitter_fapl_t *fapl_ptr = NULL; /* Driver-specific property list */
H5P_genplist_t *plist_ptr = NULL;
H5FD_t *ret_value = NULL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_open");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Check arguments */
- if (!name || !*name) {
+ if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid file name")
- }
- if (0 == maxaddr || HADDR_UNDEF == maxaddr) {
+ if(0 == maxaddr || HADDR_UNDEF == maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
- }
- if (ADDR_OVERFLOW(maxaddr)) {
+ if(ADDR_OVERFLOW(maxaddr))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr")
- }
- if ( (H5P_FILE_ACCESS_DEFAULT == splitter_fapl_id) ||
- (H5FD_SPLITTER != H5Pget_driver(splitter_fapl_id)) )
- {
+ if((H5P_FILE_ACCESS_DEFAULT == splitter_fapl_id) ||
+ (H5FD_SPLITTER != H5Pget_driver(splitter_fapl_id)) )
/* presupposes that H5P_FILE_ACCESS_DEFAULT is not a splitter */
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "driver is not splitter")
- }
file_ptr = (H5FD_splitter_t *)H5FL_CALLOC(H5FD_splitter_t);
- if (NULL == file_ptr) {
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct")
- }
+ if(NULL == file_ptr)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, "unable to allocate file struct")
file_ptr->fa.rw_fapl_id = H5I_INVALID_HID;
file_ptr->fa.wo_fapl_id = H5I_INVALID_HID;
/* Get the driver-specific file access properties */
plist_ptr = (H5P_genplist_t *)H5I_object(splitter_fapl_id);
- if (NULL == plist_ptr) {
+ if(NULL == plist_ptr)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
- }
fapl_ptr = (const H5FD_splitter_fapl_t *)H5P_peek_driver_info(plist_ptr);
- if (NULL == fapl_ptr) {
+ if(NULL == fapl_ptr)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "unable to get VFL driver info")
- }
/* Copy simpler info */
- if (HDstrncpy(file_ptr->fa.wo_path, fapl_ptr->wo_path, H5FD_SPLITTER_PATH_MAX) == NULL) {
- HGOTO_ERROR(H5E_VFL, H5E_CANTCOPY, NULL, "unable to copy write-only path")
- }
- if (HDstrncpy(file_ptr->fa.log_file_path, fapl_ptr->log_file_path, H5FD_SPLITTER_PATH_MAX) == NULL) {
- HGOTO_ERROR(H5E_VFL, H5E_CANTCOPY, NULL, "unable to copy logfile path")
- }
+ HDstrncpy(file_ptr->fa.wo_path, fapl_ptr->wo_path, H5FD_SPLITTER_PATH_MAX);
+ HDstrncpy(file_ptr->fa.log_file_path, fapl_ptr->log_file_path, H5FD_SPLITTER_PATH_MAX);
file_ptr->fa.ignore_wo_errs = fapl_ptr->ignore_wo_errs;
/* Copy R/W and W/O channel FAPLs. */
- if (H5FD__copy_plist(fapl_ptr->rw_fapl_id, &(file_ptr->fa.rw_fapl_id)) < 0) {
+ if(H5FD__copy_plist(fapl_ptr->rw_fapl_id, &(file_ptr->fa.rw_fapl_id)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't copy R/W FAPL");
- }
- if (H5FD__copy_plist(fapl_ptr->wo_fapl_id, &(file_ptr->fa.wo_fapl_id)) < 0) {
+ if(H5FD__copy_plist(fapl_ptr->wo_fapl_id, &(file_ptr->fa.wo_fapl_id)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, NULL, "can't copy W/O FAPL");
- }
/* Prepare log file if necessary.
* If application wants to ignore the errors from W/O channel and
* provided a name for the log file, then open it
*/
- if (!file_ptr->logfp) {
- if (file_ptr->fa.log_file_path[0] != '\0') {
+ if(!file_ptr->logfp) {
+ if(file_ptr->fa.log_file_path[0] != '\0') {
file_ptr->logfp = HDfopen(file_ptr->fa.log_file_path, "w");
- if (file_ptr->logfp == NULL) {
+ if(file_ptr->logfp == NULL)
HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open log file")
- }
} /* end if logfile path given */
} /* end if logfile pointer/handle does not exist */
file_ptr->rw_file = H5FD_open(name, flags, fapl_ptr->rw_fapl_id, HADDR_UNDEF);
- if (!file_ptr->rw_file) {
+ if(!file_ptr->rw_file)
HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open R/W file")
- }
file_ptr->wo_file = H5FD_open(fapl_ptr->wo_path, flags, fapl_ptr->wo_fapl_id, HADDR_UNDEF);
- if (!file_ptr->wo_file) {
- H5FD_SPLITTER_WO_ERROR(file_ptr, "H5FD_splitter_open",
- H5E_VFL, H5E_CANTOPENFILE, NULL,
- "unable to open W/O file")
- }
+ if(!file_ptr->wo_file)
+ H5FD_SPLITTER_WO_ERROR(file_ptr, FUNC, H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open W/O file")
ret_value = (H5FD_t*)file_ptr;
done:
- if (NULL == ret_value) {
- if (file_ptr) {
- if (H5I_INVALID_HID != file_ptr->fa.rw_fapl_id) {
+ if(NULL == ret_value) {
+ if(file_ptr) {
+ if(H5I_INVALID_HID != file_ptr->fa.rw_fapl_id)
H5I_dec_ref(file_ptr->fa.rw_fapl_id);
- }
- if (H5I_INVALID_HID != file_ptr->fa.wo_fapl_id) {
+ if(H5I_INVALID_HID != file_ptr->fa.wo_fapl_id)
H5I_dec_ref(file_ptr->fa.wo_fapl_id);
- }
- if (file_ptr->rw_file) {
+ if(file_ptr->rw_file)
H5FD_close(file_ptr->rw_file);
- }
- if (file_ptr->wo_file) {
+ if(file_ptr->wo_file)
H5FD_close(file_ptr->wo_file);
- }
- if (file_ptr->logfp) {
+ if(file_ptr->logfp)
HDfclose(file_ptr->logfp);
- }
H5FL_FREE(H5FD_splitter_t, file_ptr);
}
} /* end if error */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_open() */
+} /* end H5FD__splitter_open() */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_close
+ * Function: H5FD__splitter_close
*
* Purpose: Closes files on both read-write and write-only channels.
*
@@ -839,39 +763,31 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_close(H5FD_t *_file)
+H5FD__splitter_close(H5FD_t *_file)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_close");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Sanity check */
HDassert(file);
- if (H5I_dec_ref(file->fa.rw_fapl_id) < 0) {
+ if(H5I_dec_ref(file->fa.rw_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_ARGS, FAIL, "can't close R/W FAPL")
- }
- if (H5I_dec_ref(file->fa.wo_fapl_id) < 0) {
+ if(H5I_dec_ref(file->fa.wo_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_ARGS, FAIL, "can't close W/O FAPL")
- }
- if (file->rw_file) {
- if (H5FD_close(file->rw_file) == FAIL) {
+ if(file->rw_file)
+ if(H5FD_close(file->rw_file) == FAIL)
HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close R/W file")
- }
- }
- if (file->wo_file) {
- if (H5FD_close(file->wo_file) == FAIL) {
- H5FD_SPLITTER_WO_ERROR(file, "H5FD_splitter_close",
- H5E_VFL, H5E_CANTCLOSEFILE, FAIL,
- "unable to close W/O file")
- }
- }
+ if(file->wo_file)
+ if(H5FD_close(file->wo_file) == FAIL)
+ H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close W/O file")
- if (file->logfp) {
+ if(file->logfp) {
HDfclose(file->logfp);
file->logfp = NULL;
}
@@ -882,11 +798,11 @@ H5FD_splitter_close(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_close() */
+} /* end H5FD__splitter_close() */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_get_eoa
+ * Function: H5FD__splitter_get_eoa
*
* Purpose: Returns the end-of-address marker for the file. The EOA
* marker is the first address past the last byte allocated in
@@ -898,30 +814,29 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_splitter_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__splitter_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_splitter_t *file = (const H5FD_splitter_t *)_file;
haddr_t ret_value = HADDR_UNDEF;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_get_eoa");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Sanity check */
HDassert(file);
HDassert(file->rw_file);
- if ((ret_value = H5FD_get_eoa(file->rw_file, type)) == HADDR_UNDEF) {
+ if((ret_value = H5FD_get_eoa(file->rw_file, type)) == HADDR_UNDEF)
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, HADDR_UNDEF, "unable to get eoa")
- }
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_get_eoa */
+} /* end H5FD__splitter_get_eoa */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_set_eoa
+ * Function: H5FD__splitter_set_eoa
*
* Purpose: Set the end-of-address marker for the file. This function is
* called shortly after an existing HDF5 file is opened in order
@@ -931,37 +846,33 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
+H5FD__splitter_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_set_eoa";)
+ H5FD_SPLITTER_LOG_CALL(FUNC)
/* Sanity check */
HDassert(file);
HDassert(file->rw_file);
HDassert(file->wo_file);
- if (H5FD_set_eoa(file->rw_file, type, addr) < 0) {
+ if(H5FD_set_eoa(file->rw_file, type, addr) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "H5FDset_eoa failed for R/W file")
- }
- if (H5FD_set_eoa(file->wo_file, type, addr) < 0) {
- H5FD_SPLITTER_WO_ERROR(file, "H5FD_splitter_set_eoa",
- H5E_VFL, H5E_CANTSET, FAIL,
- "unable to set EOA for W/O file")
- }
+ if(H5FD_set_eoa(file->wo_file, type, addr) < 0)
+ H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTSET, FAIL, "unable to set EOA for W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_set_eoa() */
+} /* end H5FD__splitter_set_eoa() */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_get_eof
+ * Function: H5FD__splitter_get_eof
*
* Purpose: Returns the end-of-address marker for the file. The EOA
* marker is the first address past the last byte allocated in
@@ -973,30 +884,29 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_splitter_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
+H5FD__splitter_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_splitter_t *file = (const H5FD_splitter_t *)_file;
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_get_eof");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Sanity check */
HDassert(file);
HDassert(file->rw_file);
- if (HADDR_UNDEF == (ret_value = H5FD_get_eof(file->rw_file, type))) {
+ if(HADDR_UNDEF == (ret_value = H5FD_get_eof(file->rw_file, type)))
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, HADDR_UNDEF, "unable to get eof")
- }
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_get_eof */
+} /* end H5FD__splitter_get_eof */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_truncate
+ * Function: H5FD__splitter_truncate
*
* Purpose: Notify driver to truncate the file back to the allocated size.
*
@@ -1004,36 +914,32 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
+H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_truncate");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
HDassert(file);
HDassert(file->rw_file);
HDassert(file->wo_file);
- if (H5FDtruncate(file->rw_file, dxpl_id, closing) < 0) {
+ if(H5FDtruncate(file->rw_file, dxpl_id, closing) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "unable to truncate R/W file")
- }
- if (H5FDtruncate(file->wo_file, dxpl_id, closing) < 0) {
- H5FD_SPLITTER_WO_ERROR(file, "H5FD_splitter_truncate",
- H5E_VFL, H5E_CANTUPDATE, FAIL,
- "unable to truncate W/O file")
- }
+ if(H5FDtruncate(file->wo_file, dxpl_id, closing) < 0)
+ H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTUPDATE, FAIL, "unable to truncate W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_truncate */
+} /* end H5FD__splitter_truncate */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_sb_size
+ * Function: H5FD__splitter_sb_size
*
* Purpose: Obtains the number of bytes required to store the driver file
* access data in the HDF5 superblock.
@@ -1047,29 +953,28 @@ done:
*-------------------------------------------------------------------------
*/
static hsize_t
-H5FD_splitter_sb_size(H5FD_t *_file)
+H5FD__splitter_sb_size(H5FD_t *_file)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
hsize_t ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_sb_size");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Sanity check */
HDassert(file);
HDassert(file->rw_file);
- if (file->rw_file) {
+ if(file->rw_file)
ret_value = H5FD_sb_size(file->rw_file);
- }
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_sb_size */
+} /* end H5FD__splitter_sb_size */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_sb_encode
+ * Function: H5FD__splitter_sb_encode
*
* Purpose: Encode driver-specific data into the output arguments.
*
@@ -1077,30 +982,29 @@ H5FD_splitter_sb_size(H5FD_t *_file)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/)
+H5FD__splitter_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_sb_encode");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Sanity check */
HDassert(file);
HDassert(file->rw_file);
- if (file->rw_file && H5FD_sb_encode(file->rw_file, name, buf) < 0) {
+ if(file->rw_file && H5FD_sb_encode(file->rw_file, name, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTENCODE, FAIL, "unable to encode the superblock in R/W file")
- }
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_sb_encode */
+} /* end H5FD__splitter_sb_encode */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_sb_decode
+ * Function: H5FD__splitter_sb_decode
*
* Purpose: Decodes the driver information block.
*
@@ -1110,30 +1014,29 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
+H5FD__splitter_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_sb_decode");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Sanity check */
HDassert(file);
HDassert(file->rw_file);
- if (H5FD_sb_load(file->rw_file, name, buf) < 0) {
+ if(H5FD_sb_load(file->rw_file, name, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "unable to decode the superblock in R/W file")
- }
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_sb_decode */
+} /* end H5FD__splitter_sb_decode */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_cmp
+ * Function: H5FD__splitter_cmp
*
* Purpose: Compare the keys of two files.
*
@@ -1142,15 +1045,15 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5FD_splitter_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
+H5FD__splitter_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_splitter_t *f1 = (const H5FD_splitter_t *)_f1;
const H5FD_splitter_t *f2 = (const H5FD_splitter_t *)_f2;
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_cmp");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
HDassert(f1);
HDassert(f2);
@@ -1158,11 +1061,11 @@ H5FD_splitter_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
ret_value = H5FD_cmp(f1->rw_file, f2->rw_file);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_cmp */
+} /* end H5FD__splitter_cmp */
/*--------------------------------------------------------------------------
- * Function: H5FD_splitter_get_handle
+ * Function: H5FD__splitter_get_handle
*
* Purpose: Returns a pointer to the file handle of low-level virtual
* file driver.
@@ -1171,17 +1074,15 @@ H5FD_splitter_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*--------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_get_handle(
- H5FD_t *_file,
- hid_t H5_ATTR_UNUSED fapl,
- void **file_handle)
+H5FD__splitter_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl,
+ void **file_handle)
{
H5FD_splitter_t *file = (H5FD_splitter_t*)_file;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_get_handle");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Check arguments */
HDassert(file);
@@ -1189,18 +1090,16 @@ H5FD_splitter_get_handle(
HDassert(file_handle);
/* Only do for R/W channel */
- if (H5FD_get_vfd_handle(file->rw_file, file->fa.rw_fapl_id, file_handle) < 0)
- {
+ if(H5FD_get_vfd_handle(file->rw_file, file->fa.rw_fapl_id, file_handle) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "unable to get handle of R/W file")
- }
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_get_handle */
+} /* end H5FD__splitter_get_handle */
/*--------------------------------------------------------------------------
- * Function: H5FD_splitter_lock
+ * Function: H5FD__splitter_lock
*
* Purpose: Sets a file lock.
*
@@ -1208,33 +1107,33 @@ done:
*--------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_lock(H5FD_t *_file, hbool_t rw)
+H5FD__splitter_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_lock");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
HDassert(file);
HDassert(file->rw_file);
/* Place the lock on each file */
- if (H5FD_lock(file->rw_file, rw) < 0)
+ if(H5FD_lock(file->rw_file, rw) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock R/W file")
- if (file->wo_file != NULL)
- if (H5FD_lock(file->wo_file, rw) < 0)
- H5FD_SPLITTER_WO_ERROR(file, "H5FD_splitter_lock", H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock W/O file")
+ if(file->wo_file != NULL)
+ if(H5FD_lock(file->wo_file, rw) < 0)
+ H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_lock */
+} /* end H5FD__splitter_lock */
/*--------------------------------------------------------------------------
- * Function: H5FD_splitter_unlock
+ * Function: H5FD__splitter_unlock
*
* Purpose: Removes a file lock.
*
@@ -1242,34 +1141,34 @@ done:
*--------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_unlock(H5FD_t *_file)
+H5FD__splitter_unlock(H5FD_t *_file)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_unlock");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Check arguments */
HDassert(file);
HDassert(file->rw_file);
/* Remove the lock on each file */
- if (H5FD_unlock(file->rw_file) < 0)
+ if(H5FD_unlock(file->rw_file) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock R/W file")
- if (file->wo_file != NULL)
- if (H5FD_unlock(file->wo_file) < 0)
+ if(file->wo_file != NULL)
+ if(H5FD_unlock(file->wo_file) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTUNLOCKFILE, FAIL, "unable to unlock W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_unlock */
+} /* end H5FD__splitter_unlock */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_query
+ * Function: H5FD__splitter_query
*
* Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
@@ -1278,40 +1177,37 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_query(const H5FD_t *_file, unsigned long *flags /* out */)
+H5FD__splitter_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
const H5FD_splitter_t *file = (const H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_query");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
- if (file) {
+ if(file) {
HDassert(file);
HDassert(file->rw_file);
- if (H5FDquery(file->rw_file, flags) < 0) {
- HGOTO_ERROR(H5E_VFL, H5E_CANTLOCK, FAIL,
- "unable to query R/W file");
- }
+ if(H5FDquery(file->rw_file, flags) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTLOCK, FAIL, "unable to query R/W file");
}
else {
/* There is no file. Because this is a pure passthrough VFD,
* it has no features of its own.
*/
- if (flags) {
+ if(flags)
*flags = 0;
- }
}
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_query() */
+} /* end H5FD__splitter_query() */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_alloc
+ * Function: H5FD__splitter_alloc
*
* Purpose: Allocate file memory.
*
@@ -1319,37 +1215,33 @@ done:
*-------------------------------------------------------------------------
*/
static haddr_t
-H5FD_splitter_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
+H5FD__splitter_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file; /* VFD file struct */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_alloc");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Check arguments */
HDassert(file);
HDassert(file->rw_file);
/* Allocate memory for each file, only return the return value for R/W file. */
- if ((ret_value = H5FDalloc(file->rw_file, type, dxpl_id, size)) == HADDR_UNDEF) {
+ if((ret_value = H5FDalloc(file->rw_file, type, dxpl_id, size)) == HADDR_UNDEF)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate for R/W file")
- }
- if (H5FDalloc(file->wo_file, type, dxpl_id, size) == HADDR_UNDEF) {
- H5FD_SPLITTER_WO_ERROR(file, "H5FD_splitter_alloc",
- H5E_VFL, H5E_CANTINIT, HADDR_UNDEF,
- "unable to alloc for W/O file")
- }
+ if(H5FDalloc(file->wo_file, type, dxpl_id, size) == HADDR_UNDEF)
+ H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to alloc for W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_alloc() */
+} /* end H5FD__splitter_alloc() */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_get_type_map
+ * Function: H5FD__splitter_get_type_map
*
* Purpose: Retrieve the memory type mapping for this file
*
@@ -1357,31 +1249,30 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
+H5FD__splitter_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
{
const H5FD_splitter_t *file = (const H5FD_splitter_t *)_file;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_get_type_map");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Check arguments */
HDassert(file);
HDassert(file->rw_file);
/* Retrieve memory type mapping for R/W channel only */
- if (H5FD_get_fs_type_map(file->rw_file, type_map) < 0) {
+ if(H5FD_get_fs_type_map(file->rw_file, type_map) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "unable to allocate for R/W file")
- }
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_get_type_map() */
+} /* end H5FD__splitter_get_type_map() */
/*-------------------------------------------------------------------------
- * Function: H5FD_splitter_free
+ * Function: H5FD__splitter_free
*
* Purpose: Free the resources for the splitter VFD.
*
@@ -1389,32 +1280,28 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_splitter_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size)
+H5FD__splitter_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size)
{
H5FD_splitter_t *file = (H5FD_splitter_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- H5FD_SPLITTER_LOG_CALL("H5FD_splitter_free");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Check arguments */
HDassert(file);
HDassert(file->rw_file);
- if (H5FDfree(file->rw_file, type, dxpl_id, addr, size) < 0) {
+ if(H5FDfree(file->rw_file, type, dxpl_id, addr, size) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free for R/W file")
- }
- if (H5FDfree(file->wo_file, type, dxpl_id, addr, size) < 0) {
- H5FD_SPLITTER_WO_ERROR(file, "H5FD_splitter_free",
- H5E_VFL, H5E_CANTINIT, FAIL,
- "unable to free for W/O file")
- }
+ if(H5FDfree(file->wo_file, type, dxpl_id, addr, size) < 0)
+ H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTINIT, FAIL, "unable to free for W/O file")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_splitter_free() */
+} /* end H5FD__splitter_free() */
/*-------------------------------------------------------------------------
@@ -1428,33 +1315,29 @@ done:
static herr_t
H5FD__splitter_log_error(const H5FD_splitter_t *file, const char *atfunc, const char *msg)
{
- size_t size = 0;
- char *s = NULL;
herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC_NOERR
- H5FD_SPLITTER_LOG_CALL("H5FD__splitter_log_error");
+ H5FD_SPLITTER_LOG_CALL(FUNC);
/* Check arguments */
HDassert(file);
HDassert(atfunc && *atfunc);
HDassert(msg && *msg);
- if (file->logfp != NULL) {
- size = strlen(atfunc) + strlen(msg) + 3; /* ':', ' ', '\n' */
- s = (char *)malloc(sizeof(char) * (size+1));
- if (NULL == s) {
+ if(file->logfp != NULL) {
+ size_t size;
+ char *s;
+
+ size = HDstrlen(atfunc) + HDstrlen(msg) + 3; /* ':', ' ', '\n' */
+ s = (char *)HDmalloc(sizeof(char) * (size + 1));
+ if(NULL == s)
ret_value = FAIL;
- }
- else
- if (size < (size_t)HDsnprintf(s, size+1, "%s: %s\n", atfunc, msg)) {
+ else if(size < (size_t)HDsnprintf(s, size+1, "%s: %s\n", atfunc, msg))
ret_value = FAIL;
- }
- else
- if (size != HDfwrite(s, 1, size, file->logfp)) {
+ else if(size != HDfwrite(s, 1, size, file->logfp))
ret_value = FAIL;
- }
HDfree(s);
}
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index a769e86..68b2861 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Wednesday, October 22, 1997
*
* Purpose: The C STDIO virtual file driver which only uses calls from stdio.h.
diff --git a/src/H5FDstdio.h b/src/H5FDstdio.h
index f99aacf..9a5bc78 100644
--- a/src/H5FDstdio.h
+++ b/src/H5FDstdio.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the sec2 driver.
diff --git a/src/H5FDtest.c b/src/H5FDtest.c
index 2eb176d..7afc1bf 100644
--- a/src/H5FDtest.c
+++ b/src/H5FDtest.c
@@ -110,6 +110,5 @@ H5FD__supports_swmr_test(const char *vfd_name)
ret_value = !HDstrcmp(vfd_name, "log") || !HDstrcmp(vfd_name, "sec2");
FUNC_LEAVE_NOAPI(ret_value)
-
} /* end H5FD__supports_swmr_test() */
diff --git a/src/H5FDwindows.h b/src/H5FDwindows.h
index 5cf68a1..5e23712 100644
--- a/src/H5FDwindows.h
+++ b/src/H5FDwindows.h
@@ -12,8 +12,8 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Scott Wegner <swegner@hdfgroup.org>
- * Based on code by Robb Matzke
+ * Programmer: Scott Wegner
+ * Based on code by Robb Matzke
* Thursday, May 24 2007
*
* Purpose: The public header file for the windows driver.
diff --git a/src/H5FL.c b/src/H5FL.c
index 66d27fb..e50616a 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, March 23, 2000
*
* Purpose: Manage priority queues of free-lists (of blocks of bytes).
diff --git a/src/H5FLmodule.h b/src/H5FLmodule.h
index 48b8d2b..dbce75c 100644
--- a/src/H5FLmodule.h
+++ b/src/H5FLmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h
index 94a51e5..a2c019a 100644
--- a/src/H5FLprivate.h
+++ b/src/H5FLprivate.h
@@ -15,12 +15,10 @@
*
* Created: H5FLprivate.h
* Mar 23 2000
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Private non-prototype header.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef _H5FLprivate_H
diff --git a/src/H5FS.c b/src/H5FS.c
index 6d574c0..cb60c0e 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Tuesday, May 2, 2006
*
* Purpose: Free space tracking functions.
@@ -787,9 +787,6 @@ H5FS__dirty(H5FS_t *fspace)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
-#ifdef QAK
-HDfprintf(stderr, "%s: Marking free space header as dirty\n", FUNC);
-#endif /* QAK */
/* Sanity check */
HDassert(fspace);
@@ -1206,9 +1203,6 @@ void
H5FS__assert(const H5FS_t *fspace)
{
FUNC_ENTER_PACKAGE_NOERR
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS__assert", fspace->tot_sect_count);
-#endif /* QAK */
/* Checks for section info, if it's available */
if(fspace->sinfo) {
@@ -1224,9 +1218,6 @@ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS__assert", fspace->
HDassert(fspace->tot_sect_count >= fspace->serial_sect_count);
HDassert(fspace->tot_sect_count >= fspace->ghost_sect_count);
HDassert(fspace->tot_sect_count == (fspace->serial_sect_count + fspace->ghost_sect_count));
-#ifdef QAK
- HDassert(fspace->serial_sect_count > 0 || fspace->ghost_sect_count == 0);
-#endif /* QAK */
FUNC_LEAVE_NOAPI_VOID
} /* end H5FS__assert() */
diff --git a/src/H5FScache.c b/src/H5FScache.c
index c3e3998..4c75fb1 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -15,7 +15,7 @@
*
* Created: H5FScache.c
* May 2 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement file free space metadata cache methods.
*
@@ -163,7 +163,6 @@ const H5AC_class_t H5AC_FSPACE_SINFO[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -235,7 +234,6 @@ H5FS__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 18 2013
*
*-------------------------------------------------------------------------
@@ -350,7 +348,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@@ -796,7 +793,6 @@ H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG_UN
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* January 3, 2017
*
*-------------------------------------------------------------------------
@@ -860,7 +856,6 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2006
*
*-------------------------------------------------------------------------
@@ -1132,7 +1127,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c
index c615b68..9708e9e 100644
--- a/src/H5FSdbg.c
+++ b/src/H5FSdbg.c
@@ -15,7 +15,7 @@
*
* Created: H5FSdbg.c
* May 9 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Dump debugging information about a free space manager
*
diff --git a/src/H5FSint.c b/src/H5FSint.c
index 6ba5748..926b818 100644
--- a/src/H5FSint.c
+++ b/src/H5FSint.c
@@ -15,7 +15,7 @@
*
* Created: H5FSint.c
* Fall 2012
- * Dana Robinson <derobins@hdfgroup.org>
+ * Dana Robinson
*
* Purpose: Internal routines for free space managers.
*
diff --git a/src/H5FSmodule.h b/src/H5FSmodule.h
index b2869dd..88c663b 100644
--- a/src/H5FSmodule.h
+++ b/src/H5FSmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h
index 2c56ab6..0cc328e 100644
--- a/src/H5FSpkg.h
+++ b/src/H5FSpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Tuesday, May 2, 2006
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h
index d2e1f90..e02a8e2 100644
--- a/src/H5FSprivate.h
+++ b/src/H5FSprivate.h
@@ -15,7 +15,7 @@
*
* Created: H5FSprivate.h
* May 2 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Private header for library accessible file free space routines.
*
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index d783901..51233a0 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Monday, July 31, 2006
*
* Purpose: Free space tracking functions.
@@ -518,12 +518,6 @@ H5FS__sect_serialize_size(H5FS_t *fspace)
/* Check arguments. */
HDassert(fspace);
-#ifdef QAK
-HDfprintf(stderr, "%s: Check 1.0 - fspace->sect_size = %Hu\n", "H5FS__sect_serialize_size", fspace->sect_size);
-HDfprintf(stderr, "%s: fspace->serial_sect_count = %Zu\n", "H5FS__sect_serialize_size", fspace->serial_sect_count);
-HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu\n", "H5FS__sect_serialize_size", fspace->alloc_sect_size);
-HDfprintf(stderr, "%s: fspace->sinfo->serial_size_count = %Zu\n", "H5FS__sect_serialize_size", fspace->sinfo->serial_size_count);
-#endif /* QAK */
/* Compute the size of the buffer required to serialize all the sections */
if(fspace->serial_sect_count > 0) {
@@ -533,10 +527,6 @@ HDfprintf(stderr, "%s: fspace->sinfo->serial_size_count = %Zu\n", "H5FS__sect_se
sect_buf_size = fspace->sinfo->sect_prefix_size;
/* Count for each differently sized serializable section */
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->sinfo->serial_size_count = %Zu\n", "H5FS__sect_serialize_size", fspace->sinfo->serial_size_count);
-HDfprintf(stderr, "%s: fspace->serial_sect_count = %Hu\n", "H5FS__sect_serialize_size", fspace->serial_sect_count);
-#endif /* QAK */
sect_buf_size += fspace->sinfo->serial_size_count * H5VM_limit_enc_size((uint64_t)fspace->serial_sect_count);
/* Size for each differently sized serializable section */
@@ -604,10 +594,6 @@ H5FS__sect_increase(H5FS_t *fspace, const H5FS_section_class_t *cls,
fspace->serial_sect_count++;
/* Increment amount of space required to serialize all sections */
-#ifdef QAK
-HDfprintf(stderr, "%s: sinfo->serial_size = %Zu\n", FUNC, fspace->sinfo->serial_size);
-HDfprintf(stderr, "%s: cls->serial_size = %Zu\n", FUNC, cls->serial_size);
-#endif /* QAK */
fspace->sinfo->serial_size += cls->serial_size;
/* Update the free space sections' serialized size */
@@ -664,10 +650,6 @@ H5FS__sect_decrease(H5FS_t *fspace, const H5FS_section_class_t *cls)
fspace->serial_sect_count--;
/* Decrement amount of space required to serialize all sections */
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->serial_size = %Zu\n", FUNC, fspace->sinfo->serial_size);
-HDfprintf(stderr, "%s: cls->serial_size = %Zu\n", FUNC, cls->serial_size);
-#endif /* QAK */
fspace->sinfo->serial_size -= cls->serial_size;
/* Update the free space sections' serialized size */
@@ -710,9 +692,6 @@ H5FS__size_node_decr(H5FS_sinfo_t *sinfo, unsigned bin, H5FS_node_t *fspace_node
* the bin's skiplist is also a skiplist...)
*/
sinfo->bins[bin].tot_sect_count--;
-#ifdef QAK
-HDfprintf(stderr, "%s: sinfo->bins[%u].sect_count = %Zu\n", FUNC, bin, sinfo->bins[bin].sect_count);
-#endif /* QAK */
/* Check for 'ghost' or 'serializable' section */
if(cls->flags & H5FS_CLS_GHOST_OBJ) {
@@ -853,9 +832,6 @@ H5FS__sect_unlink_rest(H5FS_t *fspace, const H5FS_section_class_t *cls,
if(!(cls->flags & H5FS_CLS_SEPAR_OBJ)) {
H5FS_section_info_t *tmp_sect_node; /* Temporary section node */
-#ifdef QAK
-HDfprintf(stderr, "%s: removing object from merge list, sect->type = %u\n", FUNC, (unsigned)sect->type);
-#endif /* QAK */
tmp_sect_node = (H5FS_section_info_t *)H5SL_remove(fspace->sinfo->merge_list, &sect->addr);
if(tmp_sect_node == NULL || tmp_sect_node != sect)
HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section node on size list")
@@ -866,9 +842,6 @@ HDfprintf(stderr, "%s: removing object from merge list, sect->type = %u\n", FUNC
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't increase free space section size on disk")
/* Decrement amount of free space managed */
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->tot_space = %Hu\n", FUNC, fspace->tot_space);
-#endif /* QAK */
fspace->tot_space -= sect->size;
done:
@@ -982,9 +955,6 @@ H5FS__sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls,
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
-#ifdef QAK
-HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a\n", FUNC, sect->size, sect->addr);
-#endif /* QAK */
/* Check arguments. */
HDassert(sinfo);
@@ -999,10 +969,9 @@ HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a\n", FUNC, sect->size, s
if(NULL == (sinfo->bins[bin].bin_list = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes")
} /* end if */
- else {
+ else
/* Check for node list of the correct size already */
fspace_node = (H5FS_node_t *)H5SL_search(sinfo->bins[bin].bin_list, &sect->size);
- } /* end else */
/* Check if we need to create a new skip list for nodes of this size */
if(fspace_node == NULL) {
@@ -1030,9 +999,6 @@ HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a\n", FUNC, sect->size, s
/* (Different from the # of items in the bin's skiplist, since each node on
* the bin's skiplist is also a skiplist...)
*/
-#ifdef QAK
-HDfprintf(stderr, "%s: sinfo->bins[%u].sect_count = %Zu\n", FUNC, bin, sinfo->bins[bin].sect_count);
-#endif /* QAK */
sinfo->bins[bin].tot_sect_count++;
if(cls->flags & H5FS_CLS_GHOST_OBJ) {
sinfo->bins[bin].ghost_sect_count++;
@@ -1095,9 +1061,6 @@ H5FS__sect_link_rest(H5FS_t *fspace, const H5FS_section_class_t *cls,
/* Add section to the address-ordered list of sections, if allowed */
if(!(cls->flags & H5FS_CLS_SEPAR_OBJ)) {
-#ifdef QAK
-HDfprintf(stderr, "%s: inserting object into merge list, sect->type = %u\n", FUNC, (unsigned)sect->type);
-#endif /* QAK */
if(fspace->sinfo->merge_list == NULL)
if(NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for merging free space sections")
@@ -1146,21 +1109,12 @@ H5FS__sect_link(H5FS_t *fspace, H5FS_section_info_t *sect, unsigned flags)
cls = &fspace->sect_cls[sect->type];
/* Add section to size tracked data structures */
-#ifdef QAK
-HDfprintf(stderr, "%s: Check 1.0 - fspace->tot_space = %Hu\n", FUNC, fspace->tot_space);
-#endif /* QAK */
if(H5FS__sect_link_size(fspace->sinfo, cls, sect) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't add section to size tracking data structures")
-#ifdef QAK
-HDfprintf(stderr, "%s: Check 2.0 - fspace->tot_space = %Hu\n", FUNC, fspace->tot_space);
-#endif /* QAK */
/* Update rest of free space manager data structures for section addition */
if(H5FS__sect_link_rest(fspace, cls, sect, flags) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't add section to non-size tracking data structures")
-#ifdef QAK
-HDfprintf(stderr, "%s: Check 3.0 - fspace->tot_space = %Hu\n", FUNC, fspace->tot_space);
-#endif /* QAK */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1304,9 +1258,6 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data)
} while(modified);
} /* end if */
HDassert(*sect);
-#ifdef QAK
-HDfprintf(stderr, "%s: Done merging, (*sect) = {%a, %Hu, %u, %s}\n", FUNC, (*sect)->addr, (*sect)->size, (*sect)->type, ((*sect)->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
-#endif /* QAK */
/* Loop until no more shrinking */
do {
@@ -1319,10 +1270,6 @@ HDfprintf(stderr, "%s: Done merging, (*sect) = {%a, %Hu, %u, %s}\n", FUNC, (*sec
if((status = (*sect_cls->can_shrink)(*sect, op_data)) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTSHRINK, FAIL, "can't check for shrinking container")
if(status > 0) {
-#ifdef QAK
-HDfprintf(stderr, "%s: Can shrink!\n", FUNC);
-#endif /* QAK */
-
/* Remove SECT from free-space manager */
/* (only possible to happen on second+ pass through loop) */
if(remove_sect) {
@@ -1365,18 +1312,7 @@ HDfprintf(stderr, "%s: Can shrink!\n", FUNC);
if(remove_sect && (*sect != NULL))
*sect = NULL;
-#ifdef QAK
-HDfprintf(stderr, "%s: Done shrinking\n", FUNC);
-if(*sect)
- HDfprintf(stderr, "%s: (*sect) = {%a, %Hu, %u, %s}\n", FUNC, (*sect)->addr, (*sect)->size, (*sect)->type, ((*sect)->state == H5FS_SECT_LIVE ? "H5FS_SECT_LIVE" : "H5FS_SECT_SERIALIZED"));
-else
- HDfprintf(stderr, "%s: *sect = %p\n", FUNC, *sect);
-#endif /* QAK */
-
done:
-#ifdef QAK
-HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
-#endif /* QAK */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS__sect_merge() */
@@ -1706,10 +1642,6 @@ H5FS__sect_find_node(H5FS_t *fspace, hsize_t request, H5FS_section_info_t **node
/* Determine correct bin which holds items of at least the section's size */
bin = H5VM_log2_gen(request);
HDassert(bin < fspace->sinfo->nbins);
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->sinfo->nbins = %u\n", FUNC, fspace->sinfo->nbins);
-HDfprintf(stderr, "%s: bin = %u\n", FUNC, bin);
-#endif /* QAK */
alignment = fspace->alignment;
if(!((alignment > 1) && (request >= fspace->align_thres)))
alignment = 0; /* no alignment */
@@ -1841,10 +1773,6 @@ H5FS_sect_find(H5F_t *f, H5FS_t *fspace, hsize_t request, H5FS_section_info_t **
FUNC_ENTER_NOAPI(FAIL)
-#ifdef QAK
-HDfprintf(stderr, "%s: request = %Hu\n", FUNC, request);
-#endif /* QAK */
-
/* Check arguments. */
HDassert(fspace);
HDassert(fspace->nclasses);
@@ -1852,11 +1780,6 @@ HDfprintf(stderr, "%s: request = %Hu\n", FUNC, request);
HDassert(node);
/* Check for any sections on free space list */
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", FUNC, fspace->tot_sect_count);
-HDfprintf(stderr, "%s: fspace->serial_sect_count = %Hu\n", FUNC, fspace->serial_sect_count);
-HDfprintf(stderr, "%s: fspace->ghost_sect_count = %Hu\n", FUNC, fspace->ghost_sect_count);
-#endif /* QAK */
if(fspace->tot_sect_count > 0) {
/* Get a pointer to the section info */
if(H5FS__sinfo_lock(f, fspace, H5AC__NO_FLAGS_SET) < 0)
@@ -1871,9 +1794,6 @@ HDfprintf(stderr, "%s: fspace->ghost_sect_count = %Hu\n", FUNC, fspace->ghost_se
if(ret_value > 0) {
/* Note that we've modified the section info */
sinfo_modified = TRUE;
-#ifdef QAK
-HDfprintf(stderr, "%s: (*node)->size = %Hu, (*node)->addr = %a, (*node)->type = %u\n", FUNC, (*node)->size, (*node)->addr, (*node)->type);
-#endif /* QAK */
} /* end if */
} /* end if */
@@ -1890,7 +1810,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FS_iterate_sect_cb
+ * Function: H5FS__iterate_sect_cb
*
* Purpose: Skip list iterator callback to iterate over free space sections
* of a particular size
@@ -1903,13 +1823,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS_iterate_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
+H5FS__iterate_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
{
H5FS_section_info_t *sect_info = (H5FS_section_info_t *)_item; /* Free space section to work on */
H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments. */
HDassert(sect_info);
@@ -1922,11 +1842,11 @@ H5FS_iterate_sect_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5FS_iterate_sect_cb() */
+} /* H5FS__iterate_sect_cb() */
/*-------------------------------------------------------------------------
- * Function: H5FS_iterate_node_cb
+ * Function: H5FS__iterate_node_cb
*
* Purpose: Skip list iterator callback to iterate over free space sections
* in a bin
@@ -1939,13 +1859,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FS_iterate_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
+H5FS__iterate_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
{
H5FS_node_t *fspace_node = (H5FS_node_t *)_item; /* Free space size node to work on */
H5FS_iter_ud_t *udata = (H5FS_iter_ud_t *)_udata; /* Callback info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments. */
HDassert(fspace_node);
@@ -1954,12 +1874,12 @@ H5FS_iterate_node_cb(void *_item, void H5_ATTR_UNUSED *key, void *_udata)
/* Iterate through all the sections of this size */
HDassert(fspace_node->sect_list);
- if(H5SL_iterate(fspace_node->sect_list, H5FS_iterate_sect_cb, udata) < 0)
+ if(H5SL_iterate(fspace_node->sect_list, H5FS__iterate_sect_cb, udata) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section nodes")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5FS_iterate_node_cb() */
+} /* H5FS__iterate_node_cb() */
/*-------------------------------------------------------------------------
@@ -1987,10 +1907,6 @@ H5FS_sect_iterate(H5F_t *f, H5FS_t *fspace, H5FS_operator_t op, void *op_data)
HDassert(fspace);
HDassert(op);
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", FUNC, fspace->tot_sect_count);
-#endif /* QAK */
-
/* Set up user data for iterator */
udata.fspace = fspace;
udata.op = op;
@@ -2006,14 +1922,11 @@ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", FUNC, fspace->tot_sect_c
sinfo_valid = TRUE;
/* Iterate over all the bins */
-#ifdef QAK
-HDfprintf(stderr, "%s: Iterate over section bins\n", FUNC);
-#endif /* QAK */
for(bin = 0; bin < fspace->sinfo->nbins; bin++) {
/* Check if there are any sections in this bin */
if(fspace->sinfo->bins[bin].bin_list) {
/* Iterate over list of section size nodes for bin */
- if(H5SL_iterate(fspace->sinfo->bins[bin].bin_list, H5FS_iterate_node_cb, &udata) < 0)
+ if(H5SL_iterate(fspace->sinfo->bins[bin].bin_list, H5FS__iterate_node_cb, &udata) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section size nodes")
} /* end if */
} /* end for */
@@ -2098,10 +2011,6 @@ H5FS_sect_change_class(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect,
old_class = sect->type;
old_cls = &fspace->sect_cls[sect->type];
new_cls = &fspace->sect_cls[new_class];
-#ifdef QAK
-HDfprintf(stderr, "%s: old_cls->flags = %x\n", FUNC, old_cls->flags);
-HDfprintf(stderr, "%s: new_cls->flags = %x\n", FUNC, new_cls->flags);
-#endif /* QAK */
/* Check if the section's class change will affect the # of serializable or ghost sections */
if((old_cls->flags & H5FS_CLS_GHOST_OBJ) != (new_cls->flags & H5FS_CLS_GHOST_OBJ)) {
@@ -2114,9 +2023,6 @@ HDfprintf(stderr, "%s: new_cls->flags = %x\n", FUNC, new_cls->flags);
to_ghost = FALSE;
else
to_ghost = TRUE;
-#ifdef QAK
-HDfprintf(stderr, "%s: to_ghost = %u\n", FUNC, to_ghost);
-#endif /* QAK */
/* Sanity check */
HDassert(fspace->sinfo->bins);
@@ -2180,15 +2086,9 @@ HDfprintf(stderr, "%s: to_ghost = %u\n", FUNC, to_ghost);
to_mergable = TRUE;
else
to_mergable = FALSE;
-#ifdef QAK
-HDfprintf(stderr, "%s: to_mergable = %u\n", FUNC, to_mergable);
-#endif /* QAK */
/* Add or remove section from merge list, as appropriate */
if(to_mergable) {
-#ifdef QAK
-HDfprintf(stderr, "%s: inserting object into merge list, sect->type = %u\n", FUNC, (unsigned)sect->type);
-#endif /* QAK */
if(fspace->sinfo->merge_list == NULL)
if(NULL == (fspace->sinfo->merge_list = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for merging free space sections")
@@ -2198,9 +2098,6 @@ HDfprintf(stderr, "%s: inserting object into merge list, sect->type = %u\n", FUN
else {
H5FS_section_info_t *tmp_sect_node; /* Temporary section node */
-#ifdef QAK
-HDfprintf(stderr, "%s: removing object from merge list, sect->type = %u\n", FUNC, (unsigned)sect->type);
-#endif /* QAK */
tmp_sect_node = (H5FS_section_info_t *)H5SL_remove(fspace->sinfo->merge_list, &sect->addr);
if(tmp_sect_node == NULL || tmp_sect_node != sect)
HGOTO_ERROR(H5E_FSPACE, H5E_NOTFOUND, FAIL, "can't find section node on size list")
@@ -2246,9 +2143,6 @@ H5FS__sect_assert(const H5FS_t *fspace)
hsize_t separate_obj; /* The number of separate objects managed */
FUNC_ENTER_PACKAGE_NOERR
-#ifdef QAK
-HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS__sect_assert", fspace->tot_sect_count);
-#endif /* QAK */
/* Initialize state */
separate_obj = 0;
@@ -2305,9 +2199,6 @@ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS__sect_assert", fsp
/* Get section node & it's class */
sect = (H5FS_section_info_t *)H5SL_item(curr_sect_node);
cls = &fspace->sect_cls[sect->type];
-#ifdef QAK
-HDfprintf(stderr, "%s: sect->size = %Hu, sect->addr = %a, sect->type = %u\n", "H5FS__sect_assert", sect->size, sect->addr, sect->type);
-#endif /* QAK */
/* Sanity check section */
HDassert(H5F_addr_defined(sect->addr));
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index 74a170b..02f475d 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -15,7 +15,7 @@
*
* Created: H5Faccum.c
* Jan 10 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: File metadata "accumulator" routines. (Used to
* cache small metadata I/Os and group them into a
@@ -105,7 +105,6 @@ H5FL_BLK_DEFINE_STATIC(meta_accum);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 10 2008
*
*-------------------------------------------------------------------------
@@ -274,7 +273,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jun 11 2009
*
*-------------------------------------------------------------------------
@@ -413,7 +411,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 10 2008
*
*-------------------------------------------------------------------------
@@ -841,7 +838,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 10 2008
*
*-------------------------------------------------------------------------
@@ -1007,7 +1003,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 10 2008
*
*-------------------------------------------------------------------------
@@ -1050,7 +1045,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 10 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5Fcwfs.c b/src/H5Fcwfs.c
index 26452b6..2b368d5 100644
--- a/src/H5Fcwfs.c
+++ b/src/H5Fcwfs.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Tuesday, July 19, 2011
*
* Purpose: Each file has a small cache of global heap collections called
diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c
index 535b43d..09f6829 100644
--- a/src/H5Fdbg.c
+++ b/src/H5Fdbg.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Wednesday, July 9, 2003
*
* Purpose: File object debugging functions.
@@ -39,7 +39,6 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 1 1997
*
*-------------------------------------------------------------------------
diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c
index a047161..76a0991 100644
--- a/src/H5Fdeprec.c
+++ b/src/H5Fdeprec.c
@@ -15,7 +15,7 @@
*
* Created: H5Fdeprec.c
* October 1 2009
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Deprecated functions from the H5F interface. These
* functions are here for compatibility purposes and may be
diff --git a/src/H5Fefc.c b/src/H5Fefc.c
index 77d29f5..c9a3a00 100644
--- a/src/H5Fefc.c
+++ b/src/H5Fefc.c
@@ -15,7 +15,7 @@
*
* Created: H5Defc.c
* December 13, 2010
- * Neil Fortner <nfortne2@hdfgroup.org>
+ * Neil Fortner
*
* Purpose: External file caching routines - implements a
* cache of external files to minimize the number of
diff --git a/src/H5Ffake.c b/src/H5Ffake.c
index 67bd180..36fea5b 100644
--- a/src/H5Ffake.c
+++ b/src/H5Ffake.c
@@ -34,7 +34,6 @@
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 2, 2006
*
*-------------------------------------------------------------------------
@@ -79,7 +78,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 2, 2006
*
*-------------------------------------------------------------------------
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 7b1ea40..1431be0 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -2084,7 +2084,7 @@ H5F__post_open(H5F_t *f)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F__flush() */
+} /* end H5F__post_open() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Fio.c b/src/H5Fio.c
index 34dd0d6..7a901aa 100644
--- a/src/H5Fio.c
+++ b/src/H5Fio.c
@@ -15,7 +15,7 @@
*
* Created: H5Fio.c
* Jan 10 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: File I/O routines.
*
@@ -86,7 +86,6 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 10 1997
*
*-------------------------------------------------------------------------
@@ -130,7 +129,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 10 1997
*
*-------------------------------------------------------------------------
@@ -175,7 +173,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 10 1997
*
*-------------------------------------------------------------------------
@@ -220,7 +217,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 10 1997
*
*-------------------------------------------------------------------------
diff --git a/src/H5Fmodule.h b/src/H5Fmodule.h
index 0481512..fb362fc 100644
--- a/src/H5Fmodule.h
+++ b/src/H5Fmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Fmount.c b/src/H5Fmount.c
index 5e6b899..9d32fa5 100644
--- a/src/H5Fmount.c
+++ b/src/H5Fmount.c
@@ -627,7 +627,7 @@ H5F__mount_count_ids(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs)
/*-------------------------------------------------------------------------
- * Function: H5F_flush_mounts_recurse
+ * Function: H5F__flush_mounts_recurse
*
* Purpose: Flush a mount hierarchy, recursively
*
@@ -639,20 +639,20 @@ H5F__mount_count_ids(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs)
*-------------------------------------------------------------------------
*/
static herr_t
-H5F_flush_mounts_recurse(H5F_t *f)
+H5F__flush_mounts_recurse(H5F_t *f)
{
unsigned nerrors = 0; /* Errors from recursive flushes */
unsigned u; /* Index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(f);
/* Flush all child files, not stopping for errors */
for(u = 0; u < f->shared->mtab.nmounts; u++)
- if(H5F_flush_mounts_recurse(f->shared->mtab.child[u].file) < 0)
+ if(H5F__flush_mounts_recurse(f->shared->mtab.child[u].file) < 0)
nerrors++;
/* Call the "real" flush routine, for this file */
@@ -665,7 +665,7 @@ H5F_flush_mounts_recurse(H5F_t *f)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5F_flush_mounts_recurse() */
+} /* end H5F__flush_mounts_recurse() */
/*-------------------------------------------------------------------------
@@ -695,7 +695,7 @@ H5F_flush_mounts(H5F_t *f)
f = f->parent;
/* Flush the mounted file hierarchy */
- if(H5F_flush_mounts_recurse(f) < 0)
+ if(H5F__flush_mounts_recurse(f) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush mounted file hierarchy")
done:
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index 0c46f59..8189821 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -15,7 +15,7 @@
*
* Created: H5Fmpi.c
* Jan 10 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: MPI-related routines.
*
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 3a39e67..ff44536 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, September 28, 2000
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 5fa4f7f..384a781 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -116,16 +116,16 @@ typedef struct H5F_t H5F_t;
/* Encode a 64-bit unsigned integer and its length into a variable-sized buffer */
/* (Assumes that the high bits of the integer are zero) */
# define UINT64ENCODE_VARLEN(p, n) { \
- uint64_t __n = (uint64_t)(n); \
- unsigned _s = H5VM_limit_enc_size(__n); \
- \
- *(p)++ = (uint8_t)_s; \
- UINT64ENCODE_VAR(p, __n, _s); \
+ uint64_t __n = (uint64_t)(n); \
+ unsigned _s = H5VM_limit_enc_size(__n); \
+ \
+ *(p)++ = (uint8_t)_s; \
+ UINT64ENCODE_VAR(p, __n, _s); \
}
# define H5_ENCODE_UNSIGNED(p, n) { \
- HDcompile_assert(sizeof(unsigned) == sizeof(uint32_t)); \
- UINT32ENCODE(p, n) \
+ HDcompile_assert(sizeof(unsigned) == sizeof(uint32_t)); \
+ UINT32ENCODE(p, n) \
}
/* Assumes the endianness of uint64_t is the same as double */
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index e1b11c8..565f492 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -15,7 +15,7 @@
*
* Created: H5Fquery.c
* Jan 10 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: File structure query routines.
*
@@ -763,7 +763,6 @@ H5F_sieve_buf_size(const H5F_t *f)
* Failure: (should not happen)
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jul 8 2005
*
*-------------------------------------------------------------------------
diff --git a/src/H5Fspace.c b/src/H5Fspace.c
index 6baf163..3d969f9 100644
--- a/src/H5Fspace.c
+++ b/src/H5Fspace.c
@@ -15,7 +15,7 @@
*
* Created: H5Fspace.c
* Dec 30 2013
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Space allocation routines for the file.
*
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 9fd2831..cf3f72a 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -318,7 +318,6 @@ done:
* Failure: FAIL
*
* Programmer: Bill Wendling
- * wendling@ncsa.uiuc.edu
* Sept 12, 2003
*
*-------------------------------------------------------------------------
@@ -896,8 +895,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "error in writing fsinfo message to superblock extension")
}
else {
- if(H5F__super_ext_remove_msg(f, H5O_FSINFO_ID) < 0)
- {
+ if(H5F__super_ext_remove_msg(f, H5O_FSINFO_ID) < 0) {
#if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */
f->shared->sblock = NULL;
#endif /* JRM */
@@ -1067,7 +1065,6 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sept 15, 2003
*
*-------------------------------------------------------------------------
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 119548c..329bf21 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -15,7 +15,7 @@
*
* Created: H5Fsuper_cache.c
* Aug 15 2009
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement file superblock & driver info metadata cache methods.
*
@@ -309,7 +309,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@@ -338,7 +337,6 @@ H5F__cache_superblock_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* November 17, 2016
*
*-------------------------------------------------------------------------
@@ -428,7 +426,6 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 18 2013
*
*-------------------------------------------------------------------------
@@ -621,7 +618,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 19, 2013
*
*-------------------------------------------------------------------------
@@ -654,7 +650,6 @@ H5F__cache_superblock_image_len(const void *_thing, size_t *image_len)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 19 2013
*
*-------------------------------------------------------------------------
@@ -798,7 +793,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 20, 2013
*
*-------------------------------------------------------------------------
@@ -833,7 +827,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 20, 2013
*
*-------------------------------------------------------------------------
@@ -861,7 +854,6 @@ H5F__cache_drvrinfo_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *i
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* November 17, 2016
*
*-------------------------------------------------------------------------
@@ -905,7 +897,6 @@ done:
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 20 2013
*
*-------------------------------------------------------------------------
@@ -966,7 +957,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 20, 2013
*
*-------------------------------------------------------------------------
@@ -1000,7 +990,6 @@ H5F__cache_drvrinfo_image_len(const void *_thing, size_t *image_len)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 20 2013
*
*-------------------------------------------------------------------------
@@ -1064,7 +1053,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 20, 2013
*
*-------------------------------------------------------------------------
diff --git a/src/H5Ftest.c b/src/H5Ftest.c
index f17af2f..50a31cf 100644
--- a/src/H5Ftest.c
+++ b/src/H5Ftest.c
@@ -15,7 +15,7 @@
*
* Created: H5Ftest.c
* Jan 3 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: File testing routines.
*
diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c
index 71e0b2d..918e18c 100644
--- a/src/H5Gbtree2.c
+++ b/src/H5Gbtree2.c
@@ -15,7 +15,7 @@
*
* Created: H5Gbtree2.c
* Sep 9 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: v2 B-tree callbacks for indexing fields on links
*
@@ -75,27 +75,27 @@ typedef struct H5G_fh_ud_cmp_t {
/* v2 B-tree function callbacks */
/* v2 B-tree driver callbacks for 'creation order' index */
-static herr_t H5G_dense_btree2_corder_store(void *native, const void *udata);
-static herr_t H5G_dense_btree2_corder_compare(const void *rec1, const void *rec2, int *result);
-static herr_t H5G_dense_btree2_corder_encode(uint8_t *raw, const void *native,
+static herr_t H5G__dense_btree2_corder_store(void *native, const void *udata);
+static herr_t H5G__dense_btree2_corder_compare(const void *rec1, const void *rec2, int *result);
+static herr_t H5G__dense_btree2_corder_encode(uint8_t *raw, const void *native,
void *ctx);
-static herr_t H5G_dense_btree2_corder_decode(const uint8_t *raw, void *native,
+static herr_t H5G__dense_btree2_corder_decode(const uint8_t *raw, void *native,
void *ctx);
-static herr_t H5G_dense_btree2_corder_debug(FILE *stream, int indent, int fwidth,
+static herr_t H5G__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth,
const void *record, const void *_udata);
/* v2 B-tree driver callbacks for 'name' index */
-static herr_t H5G_dense_btree2_name_store(void *native, const void *udata);
+static herr_t H5G__dense_btree2_name_store(void *native, const void *udata);
static herr_t H5G__dense_btree2_name_compare(const void *rec1, const void *rec2, int *result);
-static herr_t H5G_dense_btree2_name_encode(uint8_t *raw, const void *native,
+static herr_t H5G__dense_btree2_name_encode(uint8_t *raw, const void *native,
void *ctx);
-static herr_t H5G_dense_btree2_name_decode(const uint8_t *raw, void *native,
+static herr_t H5G__dense_btree2_name_decode(const uint8_t *raw, void *native,
void *ctx);
-static herr_t H5G_dense_btree2_name_debug(FILE *stream, int indent, int fwidth,
+static herr_t H5G__dense_btree2_name_debug(FILE *stream, int indent, int fwidth,
const void *record, const void *_udata);
/* Fractal heap function callbacks */
-static herr_t H5G_dense_fh_name_cmp(const void *obj, size_t obj_len, void *op_data);
+static herr_t H5G__dense_fh_name_cmp(const void *obj, size_t obj_len, void *op_data);
/*********************/
@@ -108,11 +108,11 @@ const H5B2_class_t H5G_BT2_NAME[1]={{ /* B-tree class information */
sizeof(H5G_dense_bt2_name_rec_t), /* Size of native record */
NULL, /* Create client callback context */
NULL, /* Destroy client callback context */
- H5G_dense_btree2_name_store, /* Record storage callback */
- H5G__dense_btree2_name_compare, /* Record comparison callback */
- H5G_dense_btree2_name_encode, /* Record encoding callback */
- H5G_dense_btree2_name_decode, /* Record decoding callback */
- H5G_dense_btree2_name_debug /* Record debugging callback */
+ H5G__dense_btree2_name_store, /* Record storage callback */
+ H5G__dense_btree2_name_compare, /* Record comparison callback */
+ H5G__dense_btree2_name_encode, /* Record encoding callback */
+ H5G__dense_btree2_name_decode, /* Record decoding callback */
+ H5G__dense_btree2_name_debug /* Record debugging callback */
}};
/* v2 B-tree class for indexing 'creation order' field of links */
@@ -122,11 +122,11 @@ const H5B2_class_t H5G_BT2_CORDER[1]={{ /* B-tree class information */
sizeof(H5G_dense_bt2_corder_rec_t), /* Size of native record */
NULL, /* Create client callback context */
NULL, /* Destroy client callback context */
- H5G_dense_btree2_corder_store, /* Record storage callback */
- H5G_dense_btree2_corder_compare, /* Record comparison callback */
- H5G_dense_btree2_corder_encode, /* Record encoding callback */
- H5G_dense_btree2_corder_decode, /* Record decoding callback */
- H5G_dense_btree2_corder_debug /* Record debugging callback */
+ H5G__dense_btree2_corder_store, /* Record storage callback */
+ H5G__dense_btree2_corder_compare, /* Record comparison callback */
+ H5G__dense_btree2_corder_encode, /* Record encoding callback */
+ H5G__dense_btree2_corder_decode, /* Record decoding callback */
+ H5G__dense_btree2_corder_debug /* Record debugging callback */
}};
/*****************************/
@@ -141,7 +141,7 @@ const H5B2_class_t H5G_BT2_CORDER[1]={{ /* B-tree class information */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_fh_name_cmp
+ * Function: H5G__dense_fh_name_cmp
*
* Purpose: Compares the name of a link in a fractal heap to another
* name
@@ -149,19 +149,18 @@ const H5B2_class_t H5G_BT2_CORDER[1]={{ /* B-tree class information */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata)
+H5G__dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata)
{
H5G_fh_ud_cmp_t *udata = (H5G_fh_ud_cmp_t *)_udata; /* User data for 'op' callback */
H5O_link_t *lnk; /* Pointer to link created from heap object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Decode link information */
if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
@@ -181,11 +180,11 @@ H5G_dense_fh_name_cmp(const void *obj, size_t obj_len, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_fh_name_cmp() */
+} /* end H5G__dense_fh_name_cmp() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_btree2_name_store
+ * Function: H5G__dense_btree2_name_store
*
* Purpose: Store user information into native record for v2 B-tree
*
@@ -198,19 +197,19 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_btree2_name_store(void *_nrecord, const void *_udata)
+H5G__dense_btree2_name_store(void *_nrecord, const void *_udata)
{
const H5G_bt2_ud_ins_t *udata = (const H5G_bt2_ud_ins_t *)_udata;
H5G_dense_bt2_name_rec_t *nrecord = (H5G_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Copy user information info native record */
nrecord->hash = udata->common.name_hash;
H5MM_memcpy(nrecord->id, udata->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5G_dense_btree2_name_store() */
+} /* H5G__dense_btree2_name_store() */
/*-------------------------------------------------------------------------
@@ -240,16 +239,6 @@ H5G__dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec, int
HDassert(bt2_udata);
HDassert(bt2_rec);
-#ifdef QAK
-{
-unsigned u;
-
-HDfprintf(stderr, "%s: bt2_udata = {'%s', %x}\n", "H5G__dense_btree2_name_compare", bt2_udata->name, (unsigned)bt2_udata->name_hash);
-HDfprintf(stderr, "%s: bt2_rec = {%x, ", "H5G__dense_btree2_name_compare", (unsigned)bt2_rec->hash);
-for(u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
- HDfprintf(stderr, "%02x%s", bt2_rec->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
-}
-#endif /* QAK */
/* Check hash value */
if(bt2_udata->name_hash < bt2_rec->hash)
*result = (-1);
@@ -272,7 +261,7 @@ for(u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
fh_udata.cmp = 0;
/* Check if the user's link and the B-tree's link have the same name */
- if(H5HF_op(bt2_udata->fheap, bt2_rec->id, H5G_dense_fh_name_cmp, &fh_udata) < 0)
+ if(H5HF_op(bt2_udata->fheap, bt2_rec->id, H5G__dense_fh_name_cmp, &fh_udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
/* Callback will set comparison value */
@@ -285,7 +274,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_btree2_name_encode
+ * Function: H5G__dense_btree2_name_encode
*
* Purpose: Encode native information into raw form for storing on disk
*
@@ -298,22 +287,22 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_UNUSED *ctx)
+H5G__dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_UNUSED *ctx)
{
const H5G_dense_bt2_name_rec_t *nrecord = (const H5G_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Encode the record's fields */
UINT32ENCODE(raw, nrecord->hash)
H5MM_memcpy(raw, nrecord->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5G_dense_btree2_name_encode() */
+} /* H5G__dense_btree2_name_encode() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_btree2_name_decode
+ * Function: H5G__dense_btree2_name_decode
*
* Purpose: Decode raw disk form of record into native form
*
@@ -326,22 +315,22 @@ H5G_dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_UN
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_UNUSED *ctx)
+H5G__dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_UNUSED *ctx)
{
H5G_dense_bt2_name_rec_t *nrecord = (H5G_dense_bt2_name_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Decode the record's fields */
UINT32DECODE(raw, nrecord->hash)
H5MM_memcpy(nrecord->id, raw, (size_t)H5G_DENSE_FHEAP_ID_LEN);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5G_dense_btree2_name_decode() */
+} /* H5G__dense_btree2_name_decode() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_btree2_name_debug
+ * Function: H5G__dense_btree2_name_debug
*
* Purpose: Debug native form of record
*
@@ -354,13 +343,13 @@ H5G_dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_UN
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_btree2_name_debug(FILE *stream, int indent, int fwidth,
+H5G__dense_btree2_name_debug(FILE *stream, int indent, int fwidth,
const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
{
const H5G_dense_bt2_name_rec_t *nrecord = (const H5G_dense_bt2_name_rec_t *)_nrecord;
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDfprintf(stream, "%*s%-*s {%x, ", indent, "", fwidth, "Record:",
(unsigned)nrecord->hash);
@@ -368,11 +357,11 @@ H5G_dense_btree2_name_debug(FILE *stream, int indent, int fwidth,
HDfprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5G_dense_btree2_name_debug() */
+} /* H5G__dense_btree2_name_debug() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_btree2_corder_store
+ * Function: H5G__dense_btree2_corder_store
*
* Purpose: Store user information into native record for v2 B-tree
*
@@ -385,23 +374,23 @@ H5G_dense_btree2_name_debug(FILE *stream, int indent, int fwidth,
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_btree2_corder_store(void *_nrecord, const void *_udata)
+H5G__dense_btree2_corder_store(void *_nrecord, const void *_udata)
{
const H5G_bt2_ud_ins_t *udata = (const H5G_bt2_ud_ins_t *)_udata;
H5G_dense_bt2_corder_rec_t *nrecord = (H5G_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Copy user information info native record */
nrecord->corder = udata->common.corder;
H5MM_memcpy(nrecord->id, udata->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5G_dense_btree2_corder_store() */
+} /* H5G__dense_btree2_corder_store() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_btree2_corder_compare
+ * Function: H5G__dense_btree2_corder_compare
*
* Purpose: Compare two native information records, according to some key
*
@@ -415,27 +404,17 @@ H5G_dense_btree2_corder_store(void *_nrecord, const void *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, int *result)
+H5G__dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec, int *result)
{
const H5G_bt2_ud_common_t *bt2_udata = (const H5G_bt2_ud_common_t *)_bt2_udata;
const H5G_dense_bt2_corder_rec_t *bt2_rec = (const H5G_dense_bt2_corder_rec_t *)_bt2_rec;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(bt2_udata);
HDassert(bt2_rec);
-#ifdef QAK
-{
-unsigned u;
-
-HDfprintf(stderr, "%s: bt2_udata->corder = %Hd\n", "H5G_dense_btree2_corder_compare", (hsize_t)bt2_udata->corder);
-HDfprintf(stderr, "%s: bt2_rec = {%Hu, ", "H5G_dense_btree2_corder_compare", (hsize_t)bt2_rec->corder);
-for(u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
- HDfprintf(stderr, "%02x%s", bt2_rec->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
-}
-#endif /* QAK */
/* Check creation order value */
if(bt2_udata->corder < bt2_rec->corder)
*result = -1;
@@ -445,11 +424,11 @@ for(u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
*result = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5G_dense_btree2_corder_compare() */
+} /* H5G__dense_btree2_corder_compare() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_btree2_corder_encode
+ * Function: H5G__dense_btree2_corder_encode
*
* Purpose: Encode native information into raw form for storing on disk
*
@@ -462,22 +441,22 @@ for(u = 0; u < H5G_DENSE_FHEAP_ID_LEN; u++)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_UNUSED *ctx)
+H5G__dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_UNUSED *ctx)
{
const H5G_dense_bt2_corder_rec_t *nrecord = (const H5G_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Encode the record's fields */
INT64ENCODE(raw, nrecord->corder)
H5MM_memcpy(raw, nrecord->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5G_dense_btree2_corder_encode() */
+} /* H5G__dense_btree2_corder_encode() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_btree2_corder_decode
+ * Function: H5G__dense_btree2_corder_decode
*
* Purpose: Decode raw disk form of record into native form
*
@@ -490,22 +469,22 @@ H5G_dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_UNUSED *ctx)
+H5G__dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_UNUSED *ctx)
{
H5G_dense_bt2_corder_rec_t *nrecord = (H5G_dense_bt2_corder_rec_t *)_nrecord;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Decode the record's fields */
INT64DECODE(raw, nrecord->corder)
H5MM_memcpy(nrecord->id, raw, (size_t)H5G_DENSE_FHEAP_ID_LEN);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5G_dense_btree2_corder_decode() */
+} /* H5G__dense_btree2_corder_decode() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_btree2_corder_debug
+ * Function: H5G__dense_btree2_corder_debug
*
* Purpose: Debug native form of record
*
@@ -518,13 +497,13 @@ H5G_dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_btree2_corder_debug(FILE *stream, int indent, int fwidth,
+H5G__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth,
const void *_nrecord, const void H5_ATTR_UNUSED *_udata)
{
const H5G_dense_bt2_corder_rec_t *nrecord = (const H5G_dense_bt2_corder_rec_t *)_nrecord;
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDfprintf(stream, "%*s%-*s {%llu, ", indent, "", fwidth, "Record:",
(unsigned long long)nrecord->corder);
@@ -532,5 +511,5 @@ H5G_dense_btree2_corder_debug(FILE *stream, int indent, int fwidth,
HDfprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5G_DENSE_FHEAP_ID_LEN - 1) ? " " : "}\n"));
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5G_dense_btree2_corder_debug() */
+} /* H5G__dense_btree2_corder_debug() */
diff --git a/src/H5Gcache.c b/src/H5Gcache.c
index 13a33a3..22b0488 100644
--- a/src/H5Gcache.c
+++ b/src/H5Gcache.c
@@ -15,7 +15,7 @@
*
* Created: H5Gcache.c
* Feb 5 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement group metadata cache methods.
*
diff --git a/src/H5Gcompact.c b/src/H5Gcompact.c
index 1a76012..d14ec20 100644
--- a/src/H5Gcompact.c
+++ b/src/H5Gcompact.c
@@ -15,7 +15,7 @@
*
* Created: H5Gcompact.c
* Sep 5 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Functions for handling compact storage.
*
@@ -75,7 +75,6 @@ static herr_t H5G__compact_lookup_cb(const void *_mesg, unsigned H5_ATTR_UNUSED
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 5 2005
*
*-------------------------------------------------------------------------
@@ -178,7 +177,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
*-------------------------------------------------------------------------
@@ -257,7 +255,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_compact_remove_common_cb
+ * Function: H5G__compact_remove_common_cb
*
* Purpose: Common callback routine for deleting 'link' message for a
* particular name.
@@ -265,19 +263,18 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 5 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_compact_remove_common_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_udata)
+H5G__compact_remove_common_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_udata)
{
const H5O_link_t *lnk = (const H5O_link_t *)_mesg; /* Pointer to link */
H5G_iter_rm_t *udata = (H5G_iter_rm_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check arguments */
HDassert(lnk);
@@ -295,7 +292,7 @@ H5G_compact_remove_common_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, voi
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_compact_remove_common_cb() */
+} /* end H5G__compact_remove_common_cb() */
/*-------------------------------------------------------------------------
@@ -328,7 +325,7 @@ H5G__compact_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r,
udata.name = name;
/* Iterate over the link messages to delete the right one */
- if(H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G_compact_remove_common_cb, &udata, TRUE) < 0)
+ if(H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G__compact_remove_common_cb, &udata, TRUE) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link message")
done:
@@ -376,7 +373,7 @@ H5G__compact_remove_by_idx(const H5O_loc_t *oloc, const H5O_linfo_t *linfo,
udata.name = ltable.lnks[n].name;
/* Iterate over the link messages to delete the right one */
- if(H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G_compact_remove_common_cb, &udata, TRUE) < 0)
+ if(H5O_msg_remove_op(oloc, H5O_LINK_ID, H5O_FIRST, H5G__compact_remove_common_cb, &udata, TRUE) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link message")
done:
@@ -441,7 +438,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 20 2005
*
*-------------------------------------------------------------------------
@@ -487,7 +483,6 @@ done:
* Return: Non-negative (TRUE/FALSE) on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 20 2005
*
*-------------------------------------------------------------------------
@@ -533,7 +528,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 6 2006
*
*-------------------------------------------------------------------------
diff --git a/src/H5Gdense.c b/src/H5Gdense.c
index a2ef55c..8545d73 100644
--- a/src/H5Gdense.c
+++ b/src/H5Gdense.c
@@ -15,7 +15,7 @@
*
* Created: H5Gdense.c
* Sep 9 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Routines for operating on "dense" link storage for a
* group in a file.
@@ -250,7 +250,6 @@ typedef struct {
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 9 2006
*
*-------------------------------------------------------------------------
@@ -294,17 +293,11 @@ H5G__dense_create(H5F_t *f, H5O_linfo_t *linfo, const H5O_pline_t *pline)
/* Retrieve the heap's address in the file */
if(H5HF_get_heap_addr(fheap, &(linfo->fheap_addr)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get fractal heap address")
-#ifdef QAK
-HDfprintf(stderr, "%s: linfo->fheap_addr = %a\n", FUNC, linfo->fheap_addr);
-#endif /* QAK */
/* Retrieve the heap's ID length in the file */
if(H5HF_get_id_len(fheap, &fheap_id_len) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length")
HDassert(fheap_id_len == H5G_DENSE_FHEAP_ID_LEN);
-#ifdef QAK
-HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
-#endif /* QAK */
/* Create the name index v2 B-tree */
HDmemset(&bt2_cparam, 0, sizeof(bt2_cparam));
@@ -321,9 +314,6 @@ HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
/* Retrieve the v2 B-tree's address in the file */
if(H5B2_get_addr(bt2_name, &(linfo->name_bt2_addr)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get v2 B-tree address for name index")
-#ifdef QAK
-HDfprintf(stderr, "%s: linfo->name_bt2_addr = %a\n", FUNC, linfo->name_bt2_addr);
-#endif /* QAK */
/* Check if we should create a creation order index v2 B-tree */
if(linfo->index_corder) {
@@ -342,9 +332,6 @@ HDfprintf(stderr, "%s: linfo->name_bt2_addr = %a\n", FUNC, linfo->name_bt2_addr)
/* Retrieve the v2 B-tree's address in the file */
if(H5B2_get_addr(bt2_corder, &(linfo->corder_bt2_addr)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get v2 B-tree address for creation order index")
-#ifdef QAK
-HDfprintf(stderr, "%s: linfo->corder_bt2_addr = %a\n", FUNC, linfo->corder_bt2_addr);
-#endif /* QAK */
} /* end if */
done:
@@ -368,7 +355,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
@@ -394,17 +380,10 @@ H5G__dense_insert(H5F_t *f, const H5O_linfo_t *linfo, const H5O_link_t *lnk)
HDassert(f);
HDassert(linfo);
HDassert(lnk);
-#ifdef QAK
-HDfprintf(stderr, "%s: linfo->fheap_addr = %a\n", FUNC, linfo->fheap_addr);
-HDfprintf(stderr, "%s: linfo->name_bt2_addr = %a\n", FUNC, linfo->name_bt2_addr);
-#endif /* QAK */
/* Find out the size of buffer needed for serialized link */
if((link_size = H5O_msg_raw_size(f, H5O_LINK_ID, FALSE, lnk)) == 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get link size")
-#ifdef QAK
-HDfprintf(stderr, "%s: HDstrlen(lnk->name) = %Zu, link_size = %Zu\n", FUNC, HDstrlen(lnk->name), link_size);
-#endif /* QAK */
/* Wrap the local buffer for serialized link */
if(NULL == (wb = H5WB_wrap(link_buf, sizeof(link_buf))))
@@ -472,26 +451,25 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_lookup_cb
+ * Function: H5G__dense_lookup_cb
*
* Purpose: Callback when a link is located in an index
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_lookup_cb(const void *_lnk, void *_user_lnk)
+H5G__dense_lookup_cb(const void *_lnk, void *_user_lnk)
{
const H5O_link_t *lnk = (const H5O_link_t *)_lnk; /* Record from B-tree */
H5O_link_t *user_lnk = (H5O_link_t *)_user_lnk; /* User data from v2 B-tree link lookup */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -505,7 +483,7 @@ H5G_dense_lookup_cb(const void *_lnk, void *_user_lnk)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_lookup_cb() */
+} /* end H5G__dense_lookup_cb() */
/*-------------------------------------------------------------------------
@@ -516,7 +494,6 @@ done:
* Return: Non-negative (TRUE/FALSE) on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
@@ -553,7 +530,7 @@ H5G__dense_lookup(H5F_t *f, const H5O_linfo_t *linfo, const char *name,
udata.fheap = fheap;
udata.name = name;
udata.name_hash = H5_checksum_lookup3(name, HDstrlen(name), 0);
- udata.found_op = H5G_dense_lookup_cb; /* v2 B-tree comparison callback */
+ udata.found_op = H5G__dense_lookup_cb; /* v2 B-tree comparison callback */
udata.found_op_data = lnk;
/* Find & copy the named link in the 'name' index */
@@ -572,7 +549,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_lookup_by_idx_fh_cb
+ * Function: H5G__dense_lookup_by_idx_fh_cb
*
* Purpose: Callback for fractal heap operator, to make copy of link when
* when lookup up a link by index
@@ -580,19 +557,18 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 7 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_lookup_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
+H5G__dense_lookup_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
{
H5G_fh_ud_lbi_t *udata = (H5G_fh_ud_lbi_t *)_udata; /* User data for fractal heap 'op' callback */
H5O_link_t *tmp_lnk = NULL; /* Temporary pointer to link */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Decode link information & keep a copy */
if(NULL == (tmp_lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
@@ -608,31 +584,30 @@ done:
H5O_msg_free(H5O_LINK_ID, tmp_lnk);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_lookup_by_idx_fh_cb() */
+} /* end H5G__dense_lookup_by_idx_fh_cb() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_lookup_by_idx_bt2_cb
+ * Function: H5G__dense_lookup_by_idx_bt2_cb
*
* Purpose: v2 B-tree callback for dense link storage lookup by index
*
* Return: H5_ITER_ERROR/H5_ITER_CONT/H5_ITER_STOP
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 7 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_lookup_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
+H5G__dense_lookup_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
{
const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
H5G_bt2_ud_lbi_t *bt2_udata = (H5G_bt2_ud_lbi_t *)_bt2_udata; /* User data for callback */
H5G_fh_ud_lbi_t fh_udata; /* User data for fractal heap 'op' callback */
int ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Prepare user data for callback */
/* down */
@@ -640,12 +615,12 @@ H5G_dense_lookup_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
fh_udata.lnk = bt2_udata->lnk;
/* Call fractal heap 'op' routine, to copy the link information */
- if(H5HF_op(bt2_udata->fheap, record->id, H5G_dense_lookup_by_idx_fh_cb, &fh_udata) < 0)
+ if(H5HF_op(bt2_udata->fheap, record->id, H5G__dense_lookup_by_idx_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, H5_ITER_ERROR, "link found callback failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_lookup_by_idx_bt2_cb() */
+} /* end H5G__dense_lookup_by_idx_bt2_cb() */
/*-------------------------------------------------------------------------
@@ -657,7 +632,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 7 2006
*
*-------------------------------------------------------------------------
@@ -727,7 +701,7 @@ H5G__dense_lookup_by_idx(H5F_t *f, const H5O_linfo_t *linfo,
udata.lnk = lnk;
/* Find & copy the link in the appropriate index */
- if(H5B2_index(bt2, order, n, H5G_dense_lookup_by_idx_bt2_cb, &udata) < 0)
+ if(H5B2_index(bt2, order, n, H5G__dense_lookup_by_idx_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to locate link in index")
} /* end if */
else { /* Otherwise, we need to build a table of the links and sort it */
@@ -758,7 +732,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_build_table_cb
+ * Function: H5G__dense_build_table_cb
*
* Purpose: Callback routine for building table of links from dense
* link storage.
@@ -767,18 +741,17 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sept 25 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_build_table_cb(const H5O_link_t *lnk, void *_udata)
+H5G__dense_build_table_cb(const H5O_link_t *lnk, void *_udata)
{
H5G_dense_bt_ud_t *udata = (H5G_dense_bt_ud_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check arguments */
HDassert(lnk);
@@ -794,7 +767,7 @@ H5G_dense_build_table_cb(const H5O_link_t *lnk, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_build_table_cb() */
+} /* end H5G__dense_build_table_cb() */
/*-------------------------------------------------------------------------
@@ -843,7 +816,7 @@ H5G__dense_build_table(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type,
udata.curr_lnk = 0;
/* Iterate over the links in the group, building a table of the link messages */
- if(H5G__dense_iterate(f, linfo, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G_dense_build_table_cb, &udata) < 0)
+ if(H5G__dense_iterate(f, linfo, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G__dense_build_table_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links")
/* Sort link table in correct iteration order */
@@ -859,7 +832,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_iterate_fh_cb
+ * Function: H5G__dense_iterate_fh_cb
*
* Purpose: Callback for fractal heap operator, to make user's callback
* when iterating over links
@@ -867,18 +840,17 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_iterate_fh_cb(const void *obj, size_t obj_len, void *_udata)
+H5G__dense_iterate_fh_cb(const void *obj, size_t obj_len, void *_udata)
{
H5G_fh_ud_it_t *udata = (H5G_fh_ud_it_t *)_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Decode link information & keep a copy */
/* (we make a copy instead of calling the user/library callback directly in
@@ -892,30 +864,29 @@ H5G_dense_iterate_fh_cb(const void *obj, size_t obj_len, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_iterate_fh_cb() */
+} /* end H5G__dense_iterate_fh_cb() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_iterate_bt2_cb
+ * Function: H5G__dense_iterate_bt2_cb
*
* Purpose: v2 B-tree callback for dense link storage iterator
*
* Return: H5_ITER_ERROR/H5_ITER_CONT/H5_ITER_STOP
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
+H5G__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
{
const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
H5G_bt2_ud_it_t *bt2_udata = (H5G_bt2_ud_it_t *)_bt2_udata; /* User data for callback */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check for skipping links */
if(bt2_udata->skip > 0)
@@ -928,7 +899,7 @@ H5G_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
fh_udata.f = bt2_udata->f;
/* Call fractal heap 'op' routine, to copy the link information */
- if(H5HF_op(bt2_udata->fheap, record->id, H5G_dense_iterate_fh_cb, &fh_udata) < 0)
+ if(H5HF_op(bt2_udata->fheap, record->id, H5G__dense_iterate_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, H5_ITER_ERROR, "heap op callback failed")
/* Make the callback */
@@ -948,7 +919,7 @@ H5G_dense_iterate_bt2_cb(const void *_record, void *_bt2_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_iterate_bt2_cb() */
+} /* end H5G__dense_iterate_bt2_cb() */
/*-------------------------------------------------------------------------
@@ -959,14 +930,14 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op, void *op_data)
+ H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk, H5G_lib_iterate_t op,
+ void *op_data)
{
H5HF_t *fheap = NULL; /* Fractal heap handle */
H5G_link_table_t ltable = {0, NULL}; /* Table of links */
@@ -1036,7 +1007,7 @@ H5G__dense_iterate(H5F_t *f, const H5O_linfo_t *linfo, H5_index_t idx_type,
/* Iterate over the records in the v2 B-tree's "native" order */
/* (by hash of name) */
- if((ret_value = H5B2_iterate(bt2, H5G_dense_iterate_bt2_cb, &udata)) < 0)
+ if((ret_value = H5B2_iterate(bt2, H5G__dense_iterate_bt2_cb, &udata)) < 0)
HERROR(H5E_SYM, H5E_BADITER, "link iteration failed");
/* Update the last link examined, if requested */
@@ -1067,7 +1038,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_get_name_by_idx_fh_cb
+ * Function: H5G__dense_get_name_by_idx_fh_cb
*
* Purpose: Callback for fractal heap operator, to retrieve name according
* to an index
@@ -1075,19 +1046,18 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 19 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_get_name_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
+H5G__dense_get_name_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
{
H5G_fh_ud_gnbi_t *udata = (H5G_fh_ud_gnbi_t *)_udata; /* User data for fractal heap 'op' callback */
H5O_link_t *lnk; /* Pointer to link created from heap object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Decode link information */
if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
@@ -1108,31 +1078,30 @@ H5G_dense_get_name_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_get_name_by_idx_fh_cb() */
+} /* end H5G__dense_get_name_by_idx_fh_cb() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_get_name_by_idx_bt2_cb
+ * Function: H5G__dense_get_name_by_idx_bt2_cb
*
* Purpose: v2 B-tree callback for dense link storage 'get name by idx' call
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 19 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_get_name_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
+H5G__dense_get_name_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
{
const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
H5G_bt2_ud_gnbi_t *bt2_udata = (H5G_bt2_ud_gnbi_t *)_bt2_udata; /* User data for callback */
H5G_fh_ud_gnbi_t fh_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Prepare user data for callback */
/* down */
@@ -1141,7 +1110,7 @@ H5G_dense_get_name_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
fh_udata.name_size = bt2_udata->name_size;
/* Call fractal heap 'op' routine, to perform user callback */
- if(H5HF_op(bt2_udata->fheap, record->id, H5G_dense_get_name_by_idx_fh_cb, &fh_udata) < 0)
+ if(H5HF_op(bt2_udata->fheap, record->id, H5G__dense_get_name_by_idx_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link found callback failed")
/* Set the name's full length to return */
@@ -1149,7 +1118,7 @@ H5G_dense_get_name_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_get_name_by_idx_bt2_cb() */
+} /* end H5G__dense_get_name_by_idx_bt2_cb() */
/*-------------------------------------------------------------------------
@@ -1161,7 +1130,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 19 2006
*
*-------------------------------------------------------------------------
@@ -1231,7 +1199,7 @@ H5G__dense_get_name_by_idx(H5F_t *f, H5O_linfo_t *linfo, H5_index_t idx_type,
udata.name_size = size;
/* Retrieve the name according to the v2 B-tree's index order */
- if(H5B2_index(bt2, order, n, H5G_dense_get_name_by_idx_bt2_cb, &udata) < 0)
+ if(H5B2_index(bt2, order, n, H5G__dense_get_name_by_idx_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTLIST, FAIL, "can't locate object in v2 B-tree")
/* Set return value */
@@ -1271,27 +1239,26 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_remove_fh_cb
+ * Function: H5G__dense_remove_fh_cb
*
* Purpose: Callback for fractal heap operator when removing links
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 12 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata)
+H5G__dense_remove_fh_cb(const void *obj, size_t obj_len, void *_udata)
{
H5G_fh_ud_rm_t *udata = (H5G_fh_ud_rm_t *)_udata; /* User data for fractal heap 'op' callback */
H5O_link_t *lnk = NULL; /* Pointer to link created from heap object */
H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Decode link information */
if(NULL == (lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
@@ -1332,31 +1299,30 @@ done:
H5O_msg_free(H5O_LINK_ID, lnk);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_remove_fh_cb() */
+} /* end H5G__dense_remove_fh_cb() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_remove_bt2_cb
+ * Function: H5G__dense_remove_bt2_cb
*
* Purpose: v2 B-tree callback for dense link storage record removal
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 12 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_remove_bt2_cb(const void *_record, void *_bt2_udata)
+H5G__dense_remove_bt2_cb(const void *_record, void *_bt2_udata)
{
const H5G_dense_bt2_name_rec_t *record = (const H5G_dense_bt2_name_rec_t *)_record;
H5G_bt2_ud_rm_t *bt2_udata = (H5G_bt2_ud_rm_t *)_bt2_udata; /* User data for callback */
H5G_fh_ud_rm_t fh_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Set up the user data for fractal heap 'op' callback */
fh_udata.f = bt2_udata->common.f;
@@ -1365,7 +1331,7 @@ H5G_dense_remove_bt2_cb(const void *_record, void *_bt2_udata)
fh_udata.replace_names = bt2_udata->replace_names;
/* Call fractal heap 'op' routine, to perform user callback */
- if(H5HF_op(bt2_udata->common.fheap, record->id, H5G_dense_remove_fh_cb, &fh_udata) < 0)
+ if(H5HF_op(bt2_udata->common.fheap, record->id, H5G__dense_remove_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link removal callback failed")
/* Remove record from fractal heap, if requested */
@@ -1375,7 +1341,7 @@ H5G_dense_remove_bt2_cb(const void *_record, void *_bt2_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_remove_bt2_cb() */
+} /* end H5G__dense_remove_bt2_cb() */
/*-------------------------------------------------------------------------
@@ -1386,7 +1352,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 12 2006
*
*-------------------------------------------------------------------------
@@ -1430,7 +1395,7 @@ H5G__dense_remove(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_full_path_
udata.replace_names = TRUE;
/* Remove the record from the name index v2 B-tree */
- if(H5B2_remove(bt2, &udata, H5G_dense_remove_bt2_cb, &udata) < 0)
+ if(H5B2_remove(bt2, &udata, H5G__dense_remove_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from name index v2 B-tree")
done:
@@ -1445,25 +1410,24 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_dense_remove_by_idx_fh_cb
+ * Function: H5G__dense_remove_by_idx_fh_cb
*
* Purpose: Callback for fractal heap operator when removing links by index
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 15 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_remove_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
+H5G__dense_remove_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
{
H5G_fh_ud_rmbi_t *udata = (H5G_fh_ud_rmbi_t *)_udata; /* User data for fractal heap 'op' callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Decode link information */
if(NULL == (udata->lnk = (H5O_link_t *)H5O_msg_decode(udata->f, NULL, H5O_LINK_ID, obj_len, (const unsigned char *)obj)))
@@ -1473,24 +1437,23 @@ H5G_dense_remove_by_idx_fh_cb(const void *obj, size_t obj_len, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_remove_by_idx_fh_cb() */
+} /* end H5G__dense_remove_by_idx_fh_cb() */
/*-------------------------------------------------------------------------
- * Function: H5G_dense_remove_by_idx_bt2_cb
+ * Function: H5G__dense_remove_by_idx_bt2_cb
*
* Purpose: v2 B-tree callback for dense link storage record removal by index
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 15 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
+H5G__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
{
H5G_bt2_ud_rmbi_t *bt2_udata = (H5G_bt2_ud_rmbi_t *)_bt2_udata; /* User data for callback */
H5G_fh_ud_rmbi_t fh_udata; /* User data for fractal heap 'op' callback */
@@ -1498,7 +1461,7 @@ H5G_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
const uint8_t *heap_id; /* Heap ID for link */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Determine the index being used */
if(bt2_udata->idx_type == H5_INDEX_NAME) {
@@ -1521,7 +1484,7 @@ H5G_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
fh_udata.lnk = NULL;
/* Call fractal heap 'op' routine, to perform user callback */
- if(H5HF_op(bt2_udata->fheap, heap_id, H5G_dense_remove_by_idx_fh_cb, &fh_udata) < 0)
+ if(H5HF_op(bt2_udata->fheap, heap_id, H5G__dense_remove_by_idx_fh_cb, &fh_udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPERATE, FAIL, "link removal callback failed")
HDassert(fh_udata.lnk);
@@ -1579,7 +1542,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for 'other' index")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_dense_remove_by_idx_bt2_cb() */
+} /* end H5G__dense_remove_by_idx_bt2_cb() */
/*-------------------------------------------------------------------------
@@ -1591,7 +1554,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 14 2006
*
*-------------------------------------------------------------------------
@@ -1662,7 +1624,7 @@ H5G__dense_remove_by_idx(H5F_t *f, const H5O_linfo_t *linfo, H5RS_str_t *grp_ful
udata.grp_full_path_r = grp_full_path_r;
/* Remove the record from the name index v2 B-tree */
- if(H5B2_remove_by_idx(bt2, order, n, H5G_dense_remove_by_idx_bt2_cb, &udata) < 0)
+ if(H5B2_remove_by_idx(bt2, order, n, H5G__dense_remove_by_idx_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from indexed v2 B-tree")
} /* end if */
else { /* Otherwise, we need to build a table of the links and sort it */
@@ -1700,7 +1662,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 12 2006
*
*-------------------------------------------------------------------------
@@ -1743,7 +1704,7 @@ H5G__dense_delete(H5F_t *f, H5O_linfo_t *linfo, hbool_t adj_link)
udata.replace_names = FALSE;
/* Delete the name index, adjusting the ref. count on links removed */
- if(H5B2_delete(f, linfo->name_bt2_addr, NULL, H5G_dense_remove_bt2_cb, &udata) < 0)
+ if(H5B2_delete(f, linfo->name_bt2_addr, NULL, H5G__dense_remove_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index")
/* Close the fractal heap */
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 126456b..1d85eb7 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -15,7 +15,7 @@
*
* Created: H5Gdeprec.c
* June 21 2006
- * James Laird <jlaird@ncsa.uiuc.edu>
+ * James Laird
*
* Purpose: Deprecated functions from the H5G interface. These
* functions are here for compatibility purposes and may be
@@ -986,7 +986,7 @@ H5G__get_objinfo_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char *name, c
H5G_trav_goi_t *udata = (H5G_trav_goi_t *)_udata; /* User data passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC;
+ FUNC_ENTER_STATIC
/* Check if the name in this group resolved to a valid link */
if(lnk == NULL && obj_loc == NULL)
@@ -1082,7 +1082,7 @@ H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link,
HDassert(name && *name);
/* Reset stat buffer */
- if (statbuf)
+ if(statbuf)
HDmemset(statbuf, 0, sizeof(H5G_stat_t));
/* Set up user data for retrieving information */
@@ -1091,11 +1091,11 @@ H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link,
udata.loc_file = loc->oloc->file;
/* Traverse the group hierarchy to locate the object to get info about */
- if (H5G_traverse(loc, name, (unsigned)(follow_link ? H5G_TARGET_NORMAL : (H5G_TARGET_SLINK | H5G_TARGET_UDLINK)), H5G__get_objinfo_cb, &udata) < 0)
+ if(H5G_traverse(loc, name, (unsigned)(follow_link ? H5G_TARGET_NORMAL : (H5G_TARGET_SLINK | H5G_TARGET_UDLINK)), H5G__get_objinfo_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "name doesn't exist");
/* If we're pointing at a soft or UD link, get the real link length and type */
- if (statbuf && follow_link == 0) {
+ if(statbuf && follow_link == 0) {
H5L_info2_t linfo; /* Link information buffer */
herr_t ret;
diff --git a/src/H5Gent.c b/src/H5Gent.c
index 19aef10..632ffa0 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, September 19, 1997
*/
@@ -86,7 +86,6 @@ H5FL_BLK_EXTERN(str_buf);
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 18 1997
*
*-------------------------------------------------------------------------
@@ -128,7 +127,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 18 1997
*
*-------------------------------------------------------------------------
@@ -194,7 +192,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 18 1997
*
*-------------------------------------------------------------------------
@@ -234,7 +231,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 18 1997
*
*-------------------------------------------------------------------------
@@ -306,7 +302,6 @@ done:
* Failure: Negative
*
* Programmer: Pedro Vicente
- * pvn@ncsa.uiuc.edu
* ???day, August ??, 2002
*
* Notes: 'depth' parameter determines how much of the group entry
@@ -385,7 +380,6 @@ H5G__ent_reset(H5G_entry_t *ent)
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 20 2005
*
*-------------------------------------------------------------------------
@@ -530,7 +524,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 29 1997
*
*-------------------------------------------------------------------------
diff --git a/src/H5Gint.c b/src/H5Gint.c
index 0f9f9cb..c3c8719 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -15,7 +15,7 @@
*
* Created: H5Gint.c
* April 5 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: General use, "internal" routines for groups.
*
@@ -88,6 +88,7 @@ typedef struct {
/********************/
static herr_t H5G__open_oid(H5G_t *grp);
+static herr_t H5G__visit_cb(const H5O_link_t *lnk, void *_udata);
/*********************/
@@ -179,7 +180,6 @@ done:
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 11 1997
*
*-------------------------------------------------------------------------
@@ -719,7 +719,7 @@ H5G_unmount(H5G_t *grp)
/*-------------------------------------------------------------------------
- * Function: H5G_iterate_cb
+ * Function: H5G__iterate_cb
*
* Purpose: Callback function for iterating over links in a group
*
@@ -732,12 +732,12 @@ H5G_unmount(H5G_t *grp)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_iterate_cb(const H5O_link_t *lnk, void *_udata)
+H5G__iterate_cb(const H5O_link_t *lnk, void *_udata)
{
H5G_iter_appcall_ud_t *udata = (H5G_iter_appcall_ud_t *)_udata; /* User data for callback */
herr_t ret_value = H5_ITER_ERROR; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(lnk);
@@ -770,7 +770,7 @@ H5G_iterate_cb(const H5O_link_t *lnk, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_iterate_cb() */
+} /* end H5G__iterate_cb() */
/*-------------------------------------------------------------------------
@@ -818,7 +818,7 @@ H5G_iterate(H5G_loc_t *loc, const char *group_name,
udata.op_data = op_data;
/* Call the real group iteration routine */
- if((ret_value = H5G__obj_iterate(&(grp->oloc), idx_type, order, skip, last_lnk, H5G_iterate_cb, &udata)) < 0)
+ if((ret_value = H5G__obj_iterate(&(grp->oloc), idx_type, order, skip, last_lnk, H5G__iterate_cb, &udata)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "error iterating over links")
done:
@@ -835,7 +835,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_free_visit_visited
+ * Function: H5G__free_visit_visited
*
* Purpose: Free the key for an object visited during a group traversal
*
@@ -847,18 +847,18 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *operator_data/*in,out*/)
+H5G__free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *operator_data/*in,out*/)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
item = H5FL_FREE(H5_obj_t, item);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_free_visit_visited() */
+} /* end H5G__free_visit_visited() */
/*-------------------------------------------------------------------------
- * Function: H5G_visit_cb
+ * Function: H5G__visit_cb
*
* Purpose: Callback function for recursively visiting links from a group
*
@@ -871,7 +871,7 @@ H5G_free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
+H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
{
H5G_iter_visit_ud_t *udata = (H5G_iter_visit_ud_t *)_udata; /* User data for callback */
H5L_info2_t info; /* Link info */
@@ -884,7 +884,7 @@ H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
size_t len_needed; /* Length of path string needed */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(lnk);
@@ -998,7 +998,7 @@ H5G_visit_cb(const H5O_link_t *lnk, void *_udata)
udata->curr_loc = &obj_loc;
/* Iterate over links in group */
- ret_value = H5G__obj_iterate(&obj_oloc, idx_type, udata->order, (hsize_t)0, NULL, H5G_visit_cb, udata);
+ ret_value = H5G__obj_iterate(&obj_oloc, idx_type, udata->order, (hsize_t)0, NULL, H5G__visit_cb, udata);
/* Restore location */
udata->curr_loc = old_loc;
@@ -1016,7 +1016,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, H5_ITER_ERROR, "can't free location")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_visit_cb() */
+} /* end H5G__visit_cb() */
/*-------------------------------------------------------------------------
@@ -1140,14 +1140,14 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type,
} /* end if */
/* Call the link iteration routine */
- if((ret_value = H5G__obj_iterate(&(grp->oloc), idx_type, order, (hsize_t)0, NULL, H5G_visit_cb, &udata)) < 0)
+ if((ret_value = H5G__obj_iterate(&(grp->oloc), idx_type, order, (hsize_t)0, NULL, H5G__visit_cb, &udata)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't visit links")
done:
/* Release user data resources */
H5MM_xfree(udata.path);
if(udata.visited)
- H5SL_destroy(udata.visited, H5G_free_visit_visited, NULL);
+ H5SL_destroy(udata.visited, H5G__free_visit_visited, NULL);
/* Release the group opened */
if(gid != H5I_INVALID_HID) {
diff --git a/src/H5Glink.c b/src/H5Glink.c
index cbe5307..8b8377a 100644
--- a/src/H5Glink.c
+++ b/src/H5Glink.c
@@ -63,10 +63,10 @@
/* Local Prototypes */
/********************/
-static int H5G_link_cmp_name_inc(const void *lnk1, const void *lnk2);
-static int H5G_link_cmp_name_dec(const void *lnk1, const void *lnk2);
-static int H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2);
-static int H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2);
+static int H5G__link_cmp_name_inc(const void *lnk1, const void *lnk2);
+static int H5G__link_cmp_name_dec(const void *lnk1, const void *lnk2);
+static int H5G__link_cmp_corder_inc(const void *lnk1, const void *lnk2);
+static int H5G__link_cmp_corder_dec(const void *lnk1, const void *lnk2);
/*********************/
@@ -86,7 +86,7 @@ static int H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2);
/*-------------------------------------------------------------------------
- * Function: H5G_link_cmp_name_inc
+ * Function: H5G__link_cmp_name_inc
*
* Purpose: Callback routine for comparing two link names, in
* increasing alphabetic order
@@ -103,16 +103,16 @@ static int H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2);
*-------------------------------------------------------------------------
*/
static int
-H5G_link_cmp_name_inc(const void *lnk1, const void *lnk2)
+H5G__link_cmp_name_inc(const void *lnk1, const void *lnk2)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(HDstrcmp(((const H5O_link_t *)lnk1)->name, ((const H5O_link_t *)lnk2)->name))
-} /* end H5G_link_cmp_name_inc() */
+} /* end H5G__link_cmp_name_inc() */
/*-------------------------------------------------------------------------
- * Function: H5G_link_cmp_name_dec
+ * Function: H5G__link_cmp_name_dec
*
* Purpose: Callback routine for comparing two link names, in
* decreasing alphabetic order
@@ -129,16 +129,16 @@ H5G_link_cmp_name_inc(const void *lnk1, const void *lnk2)
*-------------------------------------------------------------------------
*/
static int
-H5G_link_cmp_name_dec(const void *lnk1, const void *lnk2)
+H5G__link_cmp_name_dec(const void *lnk1, const void *lnk2)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(HDstrcmp(((const H5O_link_t *)lnk2)->name, ((const H5O_link_t *)lnk1)->name))
-} /* end H5G_link_cmp_name_dec() */
+} /* end H5G__link_cmp_name_dec() */
/*-------------------------------------------------------------------------
- * Function: H5G_link_cmp_corder_inc
+ * Function: H5G__link_cmp_corder_inc
*
* Purpose: Callback routine for comparing two link creation orders, in
* increasing order
@@ -154,11 +154,11 @@ H5G_link_cmp_name_dec(const void *lnk1, const void *lnk2)
*-------------------------------------------------------------------------
*/
static int
-H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2)
+H5G__link_cmp_corder_inc(const void *lnk1, const void *lnk2)
{
int ret_value = -1; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
if(((const H5O_link_t *)lnk1)->corder < ((const H5O_link_t *)lnk2)->corder)
ret_value = -1;
@@ -168,11 +168,11 @@ H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2)
ret_value = 0;
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_link_cmp_corder_inc() */
+} /* end H5G__link_cmp_corder_inc() */
/*-------------------------------------------------------------------------
- * Function: H5G_link_cmp_corder_dec
+ * Function: H5G__link_cmp_corder_dec
*
* Purpose: Callback routine for comparing two link creation orders, in
* decreasing order
@@ -188,11 +188,11 @@ H5G_link_cmp_corder_inc(const void *lnk1, const void *lnk2)
*-------------------------------------------------------------------------
*/
static int
-H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2)
+H5G__link_cmp_corder_dec(const void *lnk1, const void *lnk2)
{
int ret_value = -1; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
if(((const H5O_link_t *)lnk1)->corder < ((const H5O_link_t *)lnk2)->corder)
ret_value = 1;
@@ -202,7 +202,7 @@ H5G_link_cmp_corder_dec(const void *lnk1, const void *lnk2)
ret_value = 0;
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_link_cmp_corder_dec() */
+} /* end H5G__link_cmp_corder_dec() */
/*-------------------------------------------------------------------------
@@ -434,18 +434,18 @@ H5G__link_sort_table(H5G_link_table_t *ltable, H5_index_t idx_type,
/* Pick appropriate sorting routine */
if(idx_type == H5_INDEX_NAME) {
if(order == H5_ITER_INC)
- HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G_link_cmp_name_inc);
+ HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G__link_cmp_name_inc);
else if(order == H5_ITER_DEC)
- HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G_link_cmp_name_dec);
+ HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G__link_cmp_name_dec);
else
HDassert(order == H5_ITER_NATIVE);
} /* end if */
else {
HDassert(idx_type == H5_INDEX_CRT_ORDER);
if(order == H5_ITER_INC)
- HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G_link_cmp_corder_inc);
+ HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G__link_cmp_corder_inc);
else if(order == H5_ITER_DEC)
- HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G_link_cmp_corder_dec);
+ HDqsort(ltable->lnks, ltable->nlinks, sizeof(H5O_link_t), H5G__link_cmp_corder_dec);
else
HDassert(order == H5_ITER_NATIVE);
} /* end else */
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 2461c51..3109b49 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -621,7 +621,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_loc_exists_cb
+ * Function: H5G__loc_exists_cb
*
* Purpose: Callback for checking if an object exists
*
@@ -633,13 +633,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
+H5G__loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
const H5O_link_t H5_ATTR_UNUSED *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
H5G_own_loc_t *own_loc/*out*/)
{
H5G_loc_exists_t *udata = (H5G_loc_exists_t *)_udata; /* User data passed in */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check if the name in this group resolved to a valid object */
if(obj_loc == NULL)
@@ -655,7 +655,7 @@ H5G_loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UN
*own_loc = H5G_OWN_NONE;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_loc_exists_cb() */
+} /* end H5G__loc_exists_cb() */
/*-------------------------------------------------------------------------
@@ -687,7 +687,7 @@ H5G_loc_exists(const H5G_loc_t *loc, const char *name)
udata.exists = FALSE;
/* Traverse group hierarchy to locate object */
- if(H5G_traverse(loc, name, H5G_TARGET_EXISTS, H5G_loc_exists_cb, &udata) < 0)
+ if(H5G_traverse(loc, name, H5G_TARGET_EXISTS, H5G__loc_exists_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't check if object exists")
/* Set return value */
diff --git a/src/H5Gmodule.h b/src/H5Gmodule.h
index 19ea982..883aa6d 100644
--- a/src/H5Gmodule.h
+++ b/src/H5Gmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Gname.c b/src/H5Gname.c
index e1004de..95b85b4 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -81,14 +81,14 @@ typedef struct H5G_gnba_iter_t {
/* Local Prototypes */
/********************/
-static htri_t H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r);
-static H5RS_str_t *H5G_build_fullpath(const char *prefix, const char *name);
+static htri_t H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r);
+static H5RS_str_t *H5G__build_fullpath(const char *prefix, const char *name);
#ifdef NOT_YET
-static H5RS_str_t *H5G_build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *name_r);
+static H5RS_str_t *H5G__build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *name_r);
#endif /* NOT_YET */
-static herr_t H5G_name_move_path(H5RS_str_t **path_r_ptr,
+static herr_t H5G__name_move_path(H5RS_str_t **path_r_ptr,
const char *full_suffix, const char *src_path, const char *dst_path);
-static int H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key);
+static int H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key);
/*********************/
@@ -208,7 +208,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_common_path
+ * Function: H5G__common_path
*
* Purpose: Determine if one path is a valid prefix of another path
*
@@ -222,14 +222,14 @@ done:
*-------------------------------------------------------------------------
*/
static htri_t
-H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
+H5G__common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
{
const char *fullpath; /* Pointer to actual fullpath string */
const char *prefix; /* Pointer to actual prefix string */
size_t nchars1,nchars2; /* Number of characters in components */
htri_t ret_value=FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Get component of each name */
fullpath=H5RS_get_str(fullpath_r);
@@ -270,11 +270,11 @@ H5G_common_path(const H5RS_str_t *fullpath_r, const H5RS_str_t *prefix_r)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_common_path() */
+} /* end H5G__common_path() */
/*-------------------------------------------------------------------------
- * Function: H5G_build_fullpath
+ * Function: H5G__build_fullpath
*
* Purpose: Build a full path from a prefix & base pair of strings
*
@@ -287,7 +287,7 @@ done:
*-------------------------------------------------------------------------
*/
static H5RS_str_t *
-H5G_build_fullpath(const char *prefix, const char *name)
+H5G__build_fullpath(const char *prefix, const char *name)
{
char *full_path; /* Full user path built */
size_t orig_path_len; /* Original length of the path */
@@ -296,7 +296,7 @@ H5G_build_fullpath(const char *prefix, const char *name)
unsigned need_sep; /* Flag to indicate if separator is needed */
H5RS_str_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(prefix);
@@ -331,7 +331,7 @@ H5G_build_fullpath(const char *prefix, const char *name)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_build_fullpath() */
+} /* end H5G__build_fullpath() */
/*-------------------------------------------------------------------------
@@ -363,7 +363,7 @@ H5G_build_fullpath_refstr_str(H5RS_str_t *prefix_r, const char *name)
HDassert(prefix);
/* Create reference counted string for path */
- ret_value = H5G_build_fullpath(prefix, name);
+ ret_value = H5G__build_fullpath(prefix, name);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_build_fullpath_refstr_str() */
@@ -385,13 +385,13 @@ H5G_build_fullpath_refstr_str(H5RS_str_t *prefix_r, const char *name)
*-------------------------------------------------------------------------
*/
static H5RS_str_t *
-H5G_build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *name_r)
+H5G__build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *name_r)
{
const char *prefix; /* Pointer to raw string of prefix */
const char *name; /* Pointer to raw string of name */
H5RS_str_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Get the pointer to the prefix */
prefix = H5RS_get_str(prefix_r);
@@ -400,10 +400,10 @@ H5G_build_fullpath_refstr_refstr(const H5RS_str_t *prefix_r, const H5RS_str_t *n
name = H5RS_get_str(name_r);
/* Create reference counted string for path */
- ret_value = H5G_build_fullpath(prefix, name);
+ ret_value = H5G__build_fullpath(prefix, name);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_build_fullpath_refstr_refstr() */
+} /* end H5G__build_fullpath_refstr_refstr() */
#endif /* NOT_YET */
@@ -663,7 +663,7 @@ H5G_name_free(H5G_name_t *name)
/*-------------------------------------------------------------------------
- * Function: H5G_name_move_path
+ * Function: H5G__name_move_path
*
* Purpose: Update a user or canonical path after an object moves
*
@@ -676,7 +676,7 @@ H5G_name_free(H5G_name_t *name)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char *src_path,
+H5G__name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char *src_path,
const char *dst_path)
{
const char *path; /* Path to update */
@@ -684,7 +684,7 @@ H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char
size_t full_suffix_len; /* Length of full suffix */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments */
HDassert(path_r_ptr && *path_r_ptr);
@@ -762,11 +762,11 @@ H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_name_move_path() */
+} /* end H5G__name_move_path() */
/*-------------------------------------------------------------------------
- * Function: H5G_name_replace_cb
+ * Function: H5G__name_replace_cb
*
* Purpose: H5I_iterate callback function to replace group entry names
*
@@ -779,7 +779,7 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
+H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
{
const H5G_names_t *names = (const H5G_names_t *)key; /* Get operation's information */
H5O_loc_t *oloc; /* Object location for object that the ID refers to */
@@ -788,7 +788,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
hbool_t obj_in_child = FALSE; /* Flag to indicate that the object is in the child mount hier. */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(obj_ptr);
@@ -907,7 +907,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
else {
/* Check if the source is along the entry's path */
/* (But not actually the entry itself) */
- if(H5G_common_path(obj_path->full_path_r, names->src_full_path_r) &&
+ if(H5G__common_path(obj_path->full_path_r, names->src_full_path_r) &&
H5RS_cmp(obj_path->full_path_r, names->src_full_path_r)) {
/* Hide the user path */
(obj_path->obj_hidden)++;
@@ -957,7 +957,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
} /* end if */
else {
/* Check if file being unmounted was hiding the object */
- if(H5G_common_path(obj_path->full_path_r, names->src_full_path_r) &&
+ if(H5G__common_path(obj_path->full_path_r, names->src_full_path_r) &&
H5RS_cmp(obj_path->full_path_r, names->src_full_path_r)) {
/* Un-hide the user path */
(obj_path->obj_hidden)--;
@@ -971,7 +971,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
*/
case H5G_NAME_DELETE:
/* Check if the location being unlinked is in the path for the current object */
- if(H5G_common_path(obj_path->full_path_r, names->src_full_path_r)) {
+ if(H5G__common_path(obj_path->full_path_r, names->src_full_path_r)) {
/* Free paths for object */
H5G_name_free(obj_path);
} /* end if */
@@ -983,7 +983,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
*/
case H5G_NAME_MOVE: /* Link move case, check for relative names case */
/* Check if the src object moved is in the current object's path */
- if(H5G_common_path(obj_path->full_path_r, names->src_full_path_r)) {
+ if(H5G__common_path(obj_path->full_path_r, names->src_full_path_r)) {
const char *full_path; /* Full path of current object */
const char *full_suffix; /* Suffix of full path, after src_path */
size_t full_suffix_len; /* Length of suffix of full path after src_path*/
@@ -1012,7 +1012,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
/* Update the user path, if one exists */
if(obj_path->user_path_r)
- if(H5G_name_move_path(&(obj_path->user_path_r), full_suffix, src_path, dst_path) < 0)
+ if(H5G__name_move_path(&(obj_path->user_path_r), full_suffix, src_path, dst_path) < 0)
HGOTO_ERROR(H5E_SYM, H5E_PATH, FAIL, "can't build user path name")
/* Build new full path */
@@ -1040,7 +1040,7 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
done:
FUNC_LEAVE_NOAPI(ret_value);
-} /* end H5G_name_replace_cb() */
+} /* end H5G__name_replace_cb() */
/*-------------------------------------------------------------------------
@@ -1166,17 +1166,17 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
/* Search through group IDs */
if(search_group)
- if(H5I_iterate(H5I_GROUP, H5G_name_replace_cb, &names, FALSE) < 0)
+ if(H5I_iterate(H5I_GROUP, H5G__name_replace_cb, &names, FALSE) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over groups")
/* Search through dataset IDs */
if(search_dataset)
- if(H5I_iterate(H5I_DATASET, H5G_name_replace_cb, &names, FALSE) < 0)
+ if(H5I_iterate(H5I_DATASET, H5G__name_replace_cb, &names, FALSE) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datasets")
/* Search through datatype IDs */
if(search_datatype)
- if(H5I_iterate(H5I_DATATYPE, H5G_name_replace_cb, &names, FALSE) < 0)
+ if(H5I_iterate(H5I_DATATYPE, H5G__name_replace_cb, &names, FALSE) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datatypes")
} /* end if */
} /* end if */
@@ -1187,7 +1187,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_get_name_by_addr_cb
+ * Function: H5G__get_name_by_addr_cb
*
* Purpose: Callback for retrieving object's name by address
*
@@ -1201,7 +1201,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo,
+H5G__get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo,
void *_udata)
{
H5G_gnba_iter_t *udata = (H5G_gnba_iter_t *)_udata; /* User data for iteration */
@@ -1211,7 +1211,7 @@ H5G_get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info2_t *linfo,
hbool_t obj_found = FALSE; /* Object at 'path' found */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(path);
@@ -1261,7 +1261,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, H5_ITER_ERROR, "can't free location")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_get_name_by_addr_cb() */
+} /* end H5G__get_name_by_addr_cb() */
/*-------------------------------------------------------------------------
@@ -1310,7 +1310,7 @@ H5G_get_name_by_addr(H5F_t *f, const H5O_loc_t *loc, char *name, size_t size)
udata.path = NULL;
/* Visit all the links in the file */
- if((status = H5G_visit(&root_loc, "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5G_get_name_by_addr_cb, &udata)) < 0)
+ if((status = H5G_visit(&root_loc, "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5G__get_name_by_addr_cb, &udata)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, (-1), "group traversal failed while looking for object name")
else if(status > 0)
found_obj = TRUE;
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 2e7b367..5578f83 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -75,21 +75,21 @@ typedef struct H5G_node_key_t {
/********************/
/* B-tree callbacks */
-static H5UC_t *H5G_node_get_shared(const H5F_t *f, const void *_udata);
+static H5UC_t *H5G__node_get_shared(const H5F_t *f, const void *_udata);
static herr_t H5G__node_create(H5F_t *f, H5B_ins_t op, void *_lt_key,
void *_udata, void *_rt_key, haddr_t *addr_p/*out*/);
-static int H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key);
-static int H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key);
-static htri_t H5G_node_found(H5F_t *f, haddr_t addr, const void *_lt_key,
+static int H5G__node_cmp2(void *_lt_key, void *_udata, void *_rt_key);
+static int H5G__node_cmp3(void *_lt_key, void *_udata, void *_rt_key);
+static htri_t H5G__node_found(H5F_t *f, haddr_t addr, const void *_lt_key,
void *_udata);
static H5B_ins_t H5G__node_insert(H5F_t *f, haddr_t addr, void *_lt_key,
hbool_t *lt_key_changed, void *_md_key, void *_udata, void *_rt_key,
hbool_t *rt_key_changed, haddr_t *new_node_p/*out*/);
-static H5B_ins_t H5G_node_remove(H5F_t *f, haddr_t addr, void *lt_key,
+static H5B_ins_t H5G__node_remove(H5F_t *f, haddr_t addr, void *lt_key,
hbool_t *lt_key_changed, void *udata, void *rt_key, hbool_t *rt_key_changed);
-static herr_t H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key);
-static herr_t H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key);
-static herr_t H5G_node_debug_key(FILE *stream, int indent, int fwidth,
+static herr_t H5G__node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key);
+static herr_t H5G__node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key);
+static herr_t H5G__node_debug_key(FILE *stream, int indent, int fwidth,
const void *key, const void *udata);
@@ -101,19 +101,19 @@ static herr_t H5G_node_debug_key(FILE *stream, int indent, int fwidth,
H5B_class_t H5B_SNODE[1] = {{
H5B_SNODE_ID, /*id */
sizeof(H5G_node_key_t), /*sizeof_nkey */
- H5G_node_get_shared, /*get_shared */
+ H5G__node_get_shared, /*get_shared */
H5G__node_create, /*new */
- H5G_node_cmp2, /*cmp2 */
- H5G_node_cmp3, /*cmp3 */
- H5G_node_found, /*found */
+ H5G__node_cmp2, /*cmp2 */
+ H5G__node_cmp3, /*cmp3 */
+ H5G__node_found, /*found */
H5G__node_insert, /*insert */
TRUE, /*follow min branch? */
TRUE, /*follow max branch? */
H5B_RIGHT, /*critical key */
- H5G_node_remove, /*remove */
- H5G_node_decode_key, /*decode */
- H5G_node_encode_key, /*encode */
- H5G_node_debug_key /*debug */
+ H5G__node_remove, /*remove */
+ H5G__node_decode_key, /*decode */
+ H5G__node_encode_key, /*encode */
+ H5G__node_debug_key /*debug */
}};
/* Declare a free list to manage the H5G_node_t struct */
@@ -134,7 +134,7 @@ H5FL_SEQ_DEFINE(H5G_entry_t);
/*-------------------------------------------------------------------------
- * Function: H5G_node_get_shared
+ * Function: H5G__node_get_shared
*
* Purpose: Returns the shared B-tree info for the specified UDATA.
*
@@ -148,19 +148,19 @@ H5FL_SEQ_DEFINE(H5G_entry_t);
*-------------------------------------------------------------------------
*/
static H5UC_t *
-H5G_node_get_shared(const H5F_t *f, const void H5_ATTR_UNUSED *_udata)
+H5G__node_get_shared(const H5F_t *f, const void H5_ATTR_UNUSED *_udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(f);
/* Return the pointer to the ref-count object */
FUNC_LEAVE_NOAPI(H5F_GRP_BTREE_SHARED(f))
-} /* end H5G_node_get_shared() */
+} /* end H5G__node_get_shared() */
/*-------------------------------------------------------------------------
- * Function: H5G_node_decode_key
+ * Function: H5G__node_decode_key
*
* Purpose: Decodes a raw key into a native key.
*
@@ -172,11 +172,11 @@ H5G_node_get_shared(const H5F_t *f, const void H5_ATTR_UNUSED *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
+H5G__node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(shared);
HDassert(raw);
@@ -185,11 +185,11 @@ H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
H5F_DECODE_LENGTH_LEN(raw, key->offset, shared->sizeof_len);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_node_decode_key() */
+} /* end H5G__node_decode_key() */
/*-------------------------------------------------------------------------
- * Function: H5G_node_encode_key
+ * Function: H5G__node_encode_key
*
* Purpose: Encodes a native key into a raw key.
*
@@ -201,11 +201,11 @@ H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
+H5G__node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
{
const H5G_node_key_t *key = (const H5G_node_key_t *) _key;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(shared);
HDassert(raw);
@@ -214,11 +214,11 @@ H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
H5F_ENCODE_LENGTH_LEN(raw, key->offset, shared->sizeof_len);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_node_encode_key() */
+} /* end H5G__node_encode_key() */
/*-------------------------------------------------------------------------
- * Function: H5G_node_debug_key
+ * Function: H5G__node_debug_key
*
* Purpose: Prints a key.
*
@@ -230,13 +230,13 @@ H5G_node_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
+H5G__node_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
const void *_udata)
{
const H5G_node_key_t *key = (const H5G_node_key_t *) _key;
const H5G_bt_common_t *udata = (const H5G_bt_common_t *) _udata;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(key);
@@ -255,7 +255,7 @@ H5G_node_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cannot get name; heap address not specified\n");
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_node_debug_key() */
+} /* end H5G__node_debug_key() */
/*-------------------------------------------------------------------------
@@ -361,7 +361,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_node_cmp2
+ * Function: H5G__node_cmp2
*
* Purpose: Compares two keys from a B-tree node (LT_KEY and RT_KEY).
* The UDATA pointer supplies extra data not contained in the
@@ -381,7 +381,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key)
+H5G__node_cmp2(void *_lt_key, void *_udata, void *_rt_key)
{
H5G_bt_common_t *udata = (H5G_bt_common_t *) _udata;
H5G_node_key_t *lt_key = (H5G_node_key_t *) _lt_key;
@@ -389,7 +389,7 @@ H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key)
const char *s1, *s2;
int ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity checks */
HDassert(udata && udata->heap);
@@ -407,11 +407,11 @@ H5G_node_cmp2(void *_lt_key, void *_udata, void *_rt_key)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5G_node_cmp2() */
+} /* H5G__node_cmp2() */
/*-------------------------------------------------------------------------
- * Function: H5G_node_cmp3
+ * Function: H5G__node_cmp3
*
* Purpose: Compares two keys from a B-tree node (LT_KEY and RT_KEY)
* against another key (not necessarily the same type)
@@ -435,7 +435,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key)
+H5G__node_cmp3(void *_lt_key, void *_udata, void *_rt_key)
{
H5G_bt_common_t *udata = (H5G_bt_common_t *) _udata;
H5G_node_key_t *lt_key = (H5G_node_key_t *) _lt_key;
@@ -443,7 +443,7 @@ H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key)
const char *s;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity checks */
HDassert(udata && udata->heap);
@@ -465,11 +465,11 @@ H5G_node_cmp3(void *_lt_key, void *_udata, void *_rt_key)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_node_cmp3() */
+} /* end H5G__node_cmp3() */
/*-------------------------------------------------------------------------
- * Function: H5G_node_found
+ * Function: H5G__node_found
*
* Purpose: The B-tree search engine has found the symbol table node
* which contains the requested symbol if the symbol exists.
@@ -494,7 +494,7 @@ done:
*-------------------------------------------------------------------------
*/
static htri_t
-H5G_node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key,
+H5G__node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key,
void *_udata)
{
H5G_bt_lkp_t *udata = (H5G_bt_lkp_t *)_udata;
@@ -504,7 +504,7 @@ H5G_node_found(H5F_t *f, haddr_t addr, const void H5_ATTR_UNUSED *_lt_key,
const char *s;
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -548,7 +548,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to release symbol table node")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_node_found() */
+} /* end H5G__node_found() */
/*-------------------------------------------------------------------------
@@ -720,7 +720,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_node_remove
+ * Function: H5G__node_remove
*
* Purpose: The B-tree removal engine has found the symbol table node
* which should contain the name which is being removed. This
@@ -748,7 +748,7 @@ done:
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5G_node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key/*in,out*/,
+H5G__node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key/*in,out*/,
hbool_t H5_ATTR_UNUSED *lt_key_changed/*out*/,
void *_udata/*in,out*/, void *_rt_key/*in,out*/,
hbool_t *rt_key_changed/*out*/)
@@ -761,7 +761,7 @@ H5G_node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_NDEBUG_UNUSED *_lt_key/*in,
int cmp = 1;
H5B_ins_t ret_value = H5B_INS_ERROR;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments */
HDassert(f);
@@ -926,7 +926,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CANTUNPROTECT, H5B_INS_ERROR, "unable to release symbol table node")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_node_remove() */
+} /* end H5G__node_remove() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index 0a139f9..7366038 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -15,7 +15,7 @@
*
* Created: H5Gobj.c
* Sep 5 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Functions for abstract handling of objects in groups.
*
@@ -85,7 +85,7 @@ typedef struct {
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5G_obj_compact_to_dense_cb(const void *_mesg, unsigned idx,
+static herr_t H5G__obj_compact_to_dense_cb(const void *_mesg, unsigned idx,
void *_udata);
static herr_t H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo);
@@ -114,7 +114,6 @@ static herr_t H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *l
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 29 2005
*
*-------------------------------------------------------------------------
@@ -169,7 +168,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 29 2005
*
*-------------------------------------------------------------------------
@@ -304,7 +302,6 @@ done:
* Failure: FAIL if error occurred
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 11 2007
*
*-------------------------------------------------------------------------
@@ -360,7 +357,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_obj_compact_to_dense_cb
+ * Function: H5G__obj_compact_to_dense_cb
*
* Purpose: Callback routine for converting "compact" to "dense"
* link storage form.
@@ -368,19 +365,18 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 30 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_obj_compact_to_dense_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_udata)
+H5G__obj_compact_to_dense_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_udata)
{
const H5O_link_t *lnk = (const H5O_link_t *)_mesg; /* Pointer to link */
H5G_obj_oh_it_ud1_t *udata = (H5G_obj_oh_it_ud1_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check arguments */
HDassert(lnk);
@@ -392,11 +388,11 @@ H5G_obj_compact_to_dense_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_obj_compact_to_dense_cb() */
+} /* end H5G__obj_compact_to_dense_cb() */
/*-------------------------------------------------------------------------
- * Function: H5G_obj_stab_to_new_cb
+ * Function: H5G__obj_stab_to_new_cb
*
* Purpose: Callback routine for converting "symbol table" link storage to
* "new format" storage (either "compact" or "dense" storage).
@@ -404,18 +400,17 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sept 16 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata)
+H5G__obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata)
{
H5G_obj_stab_it_ud1_t *udata = (H5G_obj_stab_it_ud1_t *)_udata; /* 'User data' passed in */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check arguments */
HDassert(lnk);
@@ -428,7 +423,7 @@ H5G_obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_obj_stab_to_new_cb() */
+} /* end H5G__obj_stab_to_new_cb() */
/*-------------------------------------------------------------------------
@@ -443,7 +438,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
*-------------------------------------------------------------------------
@@ -529,7 +523,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
/* Iterate over the 'link' messages, inserting them into the dense link storage */
op.op_type = H5O_MESG_OP_APP;
- op.u.app_op = H5G_obj_compact_to_dense_cb;
+ op.u.app_op = H5G__obj_compact_to_dense_cb;
if(H5O_msg_iterate(grp_oloc, H5O_LINK_ID, &op, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over links")
@@ -561,7 +555,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
udata.grp_oloc = grp_oloc;
/* Iterate through all links in "old format" group and insert them into new format */
- if(H5G__stab_iterate(grp_oloc, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G_obj_stab_to_new_cb, &udata) < 0)
+ if(H5G__stab_iterate(grp_oloc, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G__obj_stab_to_new_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over old format links")
/* Remove the symbol table message from the group */
@@ -710,7 +704,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 27 2006
*
*-------------------------------------------------------------------------
@@ -1102,7 +1095,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 26 2005
*
*-------------------------------------------------------------------------
@@ -1155,7 +1147,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 6 2006
*
*-------------------------------------------------------------------------
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index 8ad03d0..9289ab5 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, September 18, 1997
*
* Purpose: This file contains declarations which are visible
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index 501c883..96e695d 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -15,7 +15,7 @@
*
* Created: H5Gprivate.h
* Jul 11 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Library-visible declarations.
*
diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h
index 170b74d..3f74d45 100644
--- a/src/H5Gpublic.h
+++ b/src/H5Gpublic.h
@@ -15,7 +15,7 @@
*
* Created: H5Gpublic.h
* Jul 11 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Public declarations for the H5G package
*
diff --git a/src/H5Groot.c b/src/H5Groot.c
index 36aa8f6..79b7075 100644
--- a/src/H5Groot.c
+++ b/src/H5Groot.c
@@ -15,7 +15,7 @@
*
* Created: H5Groot.c
* Apr 8 2009
- * Neil Fortner <nfortne2@hdfgroup.org>
+ * Neil Fortner
*
* Purpose: Functions for operating on the root group.
*
@@ -137,7 +137,6 @@ H5G_rootof(H5F_t *f)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 11 1997
*
*-------------------------------------------------------------------------
@@ -370,7 +369,6 @@ H5G_root_free(H5G_t *grp)
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 5 2007
*
*-------------------------------------------------------------------------
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 674d84d..fafd0bb 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Friday, September 19, 1997
*
*/
@@ -127,7 +127,6 @@ typedef struct H5G_bt_it_lbi_t {
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Nov 7 2005
*
*-------------------------------------------------------------------------
@@ -194,7 +193,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 1 1997
*
*-------------------------------------------------------------------------
@@ -249,7 +247,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@uiuc.edu
* Nov 7 2005
*
*-------------------------------------------------------------------------
@@ -304,7 +301,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 1 1997
*
*-------------------------------------------------------------------------
@@ -683,7 +679,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_stab_get_name_by_idx_cb
+ * Function: H5G__stab_get_name_by_idx_cb
*
* Purpose: Callback for B-tree iteration 'by index' info query to
* retrieve the name of a link
@@ -697,14 +693,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata)
+H5G__stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata)
{
H5G_bt_it_gnbi_t *udata = (H5G_bt_it_gnbi_t *)_udata;
size_t name_off; /* Offset of name in heap */
const char *name; /* Pointer to name string in heap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(ent);
@@ -721,7 +717,7 @@ H5G_stab_get_name_by_idx_cb(const H5G_entry_t *ent, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_stab_get_name_by_idx_cb */
+} /* end H5G__stab_get_name_by_idx_cb */
/*-------------------------------------------------------------------------
@@ -778,7 +774,7 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t
/* Set iteration information */
udata.common.idx = n;
udata.common.num_objs = 0;
- udata.common.op = H5G_stab_get_name_by_idx_cb;
+ udata.common.op = H5G__stab_get_name_by_idx_cb;
udata.heap = heap;
udata.name = NULL;
udata_valid = TRUE;
@@ -815,7 +811,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_stab_lookup_cb
+ * Function: H5G__stab_lookup_cb
*
* Purpose: B-tree 'find' callback to retrieve location for an object
*
@@ -829,12 +825,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_stab_lookup_cb(const H5G_entry_t *ent, void *_udata)
+H5G__stab_lookup_cb(const H5G_entry_t *ent, void *_udata)
{
H5G_stab_fnd_ud_t *udata = (H5G_stab_fnd_ud_t *)_udata; /* 'User data' passed in */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check for setting link info */
if(udata->lnk)
@@ -844,7 +840,7 @@ H5G_stab_lookup_cb(const H5G_entry_t *ent, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_stab_lookup_cb() */
+} /* end H5G__stab_lookup_cb() */
/*-------------------------------------------------------------------------
@@ -855,7 +851,6 @@ done:
* Return: Non-negative (TRUE/FALSE) on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 20 2005
*
*-------------------------------------------------------------------------
@@ -892,7 +887,7 @@ H5G__stab_lookup(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk)
/* Set up the user data for actual B-tree find operation */
bt_udata.common.name = name;
bt_udata.common.heap = heap;
- bt_udata.op = H5G_stab_lookup_cb;
+ bt_udata.op = H5G__stab_lookup_cb;
bt_udata.op_data = &udata;
/* Search the B-tree */
@@ -909,7 +904,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_stab_lookup_by_idx_cb
+ * Function: H5G__stab_lookup_by_idx_cb
*
* Purpose: Callback for B-tree iteration 'by index' info query to
* retrieve the link
@@ -923,13 +918,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata)
+H5G__stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata)
{
H5G_bt_it_lbi_t *udata = (H5G_bt_it_lbi_t *)_udata;
const char *name; /* Pointer to name string in heap */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(ent);
@@ -946,7 +941,7 @@ H5G_stab_lookup_by_idx_cb(const H5G_entry_t *ent, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_stab_lookup_by_idx_cb */
+} /* end H5G__stab_lookup_by_idx_cb */
/*-------------------------------------------------------------------------
@@ -957,7 +952,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 7 2006
*
*-------------------------------------------------------------------------
@@ -1000,7 +994,7 @@ H5G__stab_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_
/* Set iteration information */
udata.common.idx = n;
udata.common.num_objs = 0;
- udata.common.op = H5G_stab_lookup_by_idx_cb;
+ udata.common.op = H5G__stab_lookup_by_idx_cb;
udata.heap = heap;
udata.lnk = lnk;
udata.found = FALSE;
@@ -1040,7 +1034,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
- * nfortne2@hdfgroup.org
* Mar 17, 2009
*
*-------------------------------------------------------------------------
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index f9ab6f2..03efc7e 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Monday, October 17, 2005
*
* Purpose: Group testing functions.
@@ -814,7 +814,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
- * nfortne2@hdfgroup.org
* April 6 2011
*
*-------------------------------------------------------------------------
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index 5a4380d..15088d9 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -15,7 +15,7 @@
*
* Created: H5Gtraverse.c
* Sep 13 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Functions for traversing group hierarchy
*
@@ -355,7 +355,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Nov 20 2006
*
*-------------------------------------------------------------------------
@@ -464,7 +463,6 @@ done:
* resolved.
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 11 1997
*
*-------------------------------------------------------------------------
@@ -811,7 +809,6 @@ done:
* traversed.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 13 2005
*
*-------------------------------------------------------------------------
@@ -835,7 +832,7 @@ H5G_traverse(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traver
/* Retrieve the original # of soft / UD links that are able to be traversed
* (So that multiple calls to H5G_traverse don't incorrectly look
- * like they've traversed too many. Nested calls, like in H5L_move(),
+ * like they've traversed too many. Nested calls, like in H5L__move(),
* may need their own mechanism to set & reset the # of links to traverse)
*/
if(H5CX_get_nlinks(&orig_nlinks) < 0)
diff --git a/src/H5HF.c b/src/H5HF.c
index 5d52ca4..2e437ad 100644
--- a/src/H5HF.c
+++ b/src/H5HF.c
@@ -15,7 +15,7 @@
*
* Created: H5HF.c
* Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Implements a "fractal heap" for storing variable-
* length objects in a file.
@@ -88,53 +88,51 @@ H5FL_DEFINE_STATIC(H5HF_t);
/*-------------------------------------------------------------------------
- * Function: H5HF_op_read
+ * Function: H5HF__op_read
*
* Purpose: Performs a 'read' operation for a heap 'op' callback
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_op_read(const void *obj, size_t obj_len, void *op_data)
+H5HF__op_read(const void *obj, size_t obj_len, void *op_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Perform "read", using memcpy() */
H5MM_memcpy(op_data, obj, obj_len);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_op_read() */
+} /* end H5HF__op_read() */
/*-------------------------------------------------------------------------
- * Function: H5HF_op_write
+ * Function: H5HF__op_write
*
* Purpose: Performs a 'write' operation for a heap 'op' callback
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 18 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_op_write(const void *obj, size_t obj_len, void *op_data)
+H5HF__op_write(const void *obj, size_t obj_len, void *op_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Perform "write", using memcpy() */
H5MM_memcpy((void *)obj, op_data, obj_len); /* Casting away const OK -QAK */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_op_write() */
+} /* end H5HF__op_write() */
/*-------------------------------------------------------------------------
@@ -146,7 +144,6 @@ H5HF_op_write(const void *obj, size_t obj_len, void *op_data)
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 24 2006
*
*-------------------------------------------------------------------------
@@ -168,7 +165,7 @@ H5HF_create(H5F_t *f, const H5HF_create_t *cparam)
HDassert(cparam);
/* Create shared fractal heap header */
- if(HADDR_UNDEF == (fh_addr = H5HF_hdr_create(f, cparam)))
+ if(HADDR_UNDEF == (fh_addr = H5HF__hdr_create(f, cparam)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create fractal heap header")
/* Allocate fractal heap wrapper */
@@ -181,11 +178,11 @@ H5HF_create(H5F_t *f, const H5HF_create_t *cparam)
/* Point fractal heap wrapper at header and bump it's ref count */
fh->hdr = hdr;
- if(H5HF_hdr_incr(fh->hdr) < 0)
+ if(H5HF__hdr_incr(fh->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
/* Increment # of files using this heap header */
- if(H5HF_hdr_fuse_incr(fh->hdr) < 0)
+ if(H5HF__hdr_fuse_incr(fh->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment file reference count on shared heap header")
/* Set file pointer for this heap open context */
@@ -214,7 +211,6 @@ done:
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 18 2006
*
*-------------------------------------------------------------------------
@@ -248,11 +244,11 @@ H5HF_open(H5F_t *f, haddr_t fh_addr)
/* Point fractal heap wrapper at header */
fh->hdr = hdr;
- if(H5HF_hdr_incr(fh->hdr) < 0)
+ if(H5HF__hdr_incr(fh->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
/* Increment # of files using this heap header */
- if(H5HF_hdr_fuse_incr(fh->hdr) < 0)
+ if(H5HF__hdr_fuse_incr(fh->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment file reference count on shared heap header")
/* Set file pointer for this heap open context */
@@ -280,7 +276,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 17 2006
*
*-------------------------------------------------------------------------
@@ -311,7 +306,6 @@ H5HF_get_id_len(H5HF_t *fh, size_t *id_len_p)
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 18 2006
*
*-------------------------------------------------------------------------
@@ -343,7 +337,6 @@ H5HF_get_heap_addr(const H5HF_t *fh, haddr_t *heap_addr_p)
* filled in), negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 24 2006
*
*-------------------------------------------------------------------------
@@ -381,7 +374,7 @@ H5HF_insert(H5HF_t *fh, size_t size, const void *obj, void *id/*out*/)
/* Check for 'tiny' object */
else if(size <= hdr->tiny_max_len) {
/* Store 'tiny' object in heap */
- if(H5HF_tiny_insert(hdr, size, obj, id) < 0)
+ if(H5HF__tiny_insert(hdr, size, obj, id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "can't store 'tiny' object in fractal heap")
} /* end if */
else {
@@ -409,7 +402,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 9 2006
*
*-------------------------------------------------------------------------
@@ -442,7 +434,7 @@ H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p)
/* Check type of object in heap */
if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_MAN) {
- if(H5HF_man_get_obj_len(fh->hdr, id, obj_len_p) < 0)
+ if(H5HF__man_get_obj_len(fh->hdr, id, obj_len_p) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'managed' object's length")
} /* end if */
else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_HUGE) {
@@ -450,7 +442,7 @@ H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'huge' object's length")
} /* end if */
else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
- if(H5HF_tiny_get_obj_len(fh->hdr, id, obj_len_p) < 0)
+ if(H5HF__tiny_get_obj_len(fh->hdr, id, obj_len_p) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'tiny' object's length")
} /* end if */
else {
@@ -471,7 +463,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 20 2015
*
*-------------------------------------------------------------------------
@@ -533,7 +524,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 18 2006
*
*-------------------------------------------------------------------------
@@ -577,7 +567,7 @@ H5HF_read(H5HF_t *fh, const void *_id, void *obj/*out*/)
} /* end if */
else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
/* Read 'tiny' object from file */
- if(H5HF_tiny_read(fh->hdr, id, obj) < 0)
+ if(H5HF__tiny_read(fh->hdr, id, obj) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read 'tiny' object from fractal heap")
} /* end if */
else {
@@ -610,7 +600,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 18 2006
*
*-------------------------------------------------------------------------
@@ -681,7 +670,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sept 11 2006
*
*-------------------------------------------------------------------------
@@ -725,7 +713,7 @@ H5HF_op(H5HF_t *fh, const void *_id, H5HF_operator_t op, void *op_data)
} /* end if */
else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
/* Operate on 'tiny' object from file */
- if(H5HF_tiny_op(fh->hdr, id, op, op_data) < 0)
+ if(H5HF__tiny_op(fh->hdr, id, op, op_data) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on 'tiny' object from fractal heap")
} /* end if */
else {
@@ -746,7 +734,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 15 2006
*
*-------------------------------------------------------------------------
@@ -790,7 +777,7 @@ H5HF_remove(H5HF_t *fh, const void *_id)
} /* end if */
else if((id_flags & H5HF_ID_TYPE_MASK) == H5HF_ID_TYPE_TINY) {
/* Remove 'tiny' object from heap statistics */
- if(H5HF_tiny_remove(fh->hdr, id) < 0)
+ if(H5HF__tiny_remove(fh->hdr, id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove 'tiny' object from fractal heap")
} /* end if */
else {
@@ -811,7 +798,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 17 2006
*
*-------------------------------------------------------------------------
@@ -831,7 +817,7 @@ H5HF_close(H5HF_t *fh)
HDassert(fh);
/* Decrement file reference & check if this is the last open fractal heap using the shared heap header */
- if(0 == H5HF_hdr_fuse_decr(fh->hdr)) {
+ if(0 == H5HF__hdr_fuse_decr(fh->hdr)) {
/* Set the shared heap header's file context for this operation */
fh->hdr->f = fh->f;
@@ -850,8 +836,8 @@ H5HF_close(H5HF_t *fh)
* a reference loop and the objects couldn't be removed from
* the metadata cache - QAK)
*/
- if(H5HF_man_iter_ready(&fh->hdr->next_block))
- if(H5HF_man_iter_reset(&fh->hdr->next_block) < 0)
+ if(H5HF__man_iter_ready(&fh->hdr->next_block))
+ if(H5HF__man_iter_reset(&fh->hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
/* Shut down the huge object information */
@@ -873,10 +859,10 @@ H5HF_close(H5HF_t *fh)
} /* end if */
/* Decrement the reference count on the heap header */
- /* (don't put in H5HF_hdr_fuse_decr() as the heap header may be evicted
+ /* (don't put in H5HF__hdr_fuse_decr() as the heap header may be evicted
* immediately -QAK)
*/
- if(H5HF_hdr_decr(fh->hdr) < 0)
+ if(H5HF__hdr_decr(fh->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
/* Check for pending heap deletion */
@@ -908,7 +894,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 4 2006
*
*-------------------------------------------------------------------------
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
index 479c2bd..756ddb5 100644
--- a/src/H5HFbtree2.c
+++ b/src/H5HFbtree2.c
@@ -15,7 +15,7 @@
*
* Created: H5HFbtree2.c
* Aug 7 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: v2 B-tree callbacks for "huge" object tracker
*
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index 8dbdf25..31430f9 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -15,7 +15,7 @@
*
* Created: H5HFcache.c
* Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Implement fractal heap metadata cache methods.
*
@@ -255,7 +255,6 @@ done:
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
@@ -305,7 +304,6 @@ H5HF__dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
@@ -353,7 +351,7 @@ H5HF__dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable)
*
* Note also that the value returned by this function presumes that
* there is no I/O filtering data in the header. If there is, the
- * size reported will be too small, and H5C_load_entry()
+ * size reported will be too small, and H5C__load_entry()
* will have to make two tries to load the fractal heap header.
*
* Return: Success: SUCCEED
@@ -507,7 +505,7 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata,
HDassert(dirty);
/* Allocate space for the fractal heap data structure */
- if(NULL == (hdr = H5HF_hdr_alloc(udata->f)))
+ if(NULL == (hdr = H5HF__hdr_alloc(udata->f)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Deserialize the fractal heap header's prefix */
@@ -591,7 +589,7 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata,
HDassert((size_t)(image - (const uint8_t *)_image) == hdr->heap_size);
/* Finish initialization of heap header */
- if(H5HF_hdr_finish_init(hdr) < 0)
+ if(H5HF__hdr_finish_init(hdr) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't finish initializing shared fractal heap header")
/* Set return value */
@@ -599,7 +597,7 @@ H5HF__cache_hdr_deserialize(const void *_image, size_t len, void *_udata,
done:
if(!ret_value && hdr)
- if(H5HF_hdr_free(hdr) < 0)
+ if(H5HF__hdr_free(hdr) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to release fractal heap header")
FUNC_LEAVE_NOAPI(ret_value)
@@ -879,7 +877,7 @@ H5HF__cache_hdr_free_icr(void *_thing)
HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
HDassert(hdr->rc == 0);
- if(H5HF_hdr_free(hdr) < 0)
+ if(H5HF__hdr_free(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "unable to release fractal heap header")
done:
@@ -1009,7 +1007,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
/* Share common heap information */
iblock->hdr = hdr;
- if(H5HF_hdr_incr(hdr) < 0)
+ if(H5HF__hdr_incr(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
/* Set block's internal information */
@@ -1049,7 +1047,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
iblock->par_entry = udata->par_info->entry;
if(iblock->parent) {
/* Share parent block */
- if(H5HF_iblock_incr(iblock->parent) < 0)
+ if(H5HF__iblock_incr(iblock->parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared indirect block")
/* Set max. # of rows in this block */
@@ -1144,7 +1142,7 @@ H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED
done:
if(!ret_value && iblock)
- if(H5HF_man_iblock_dest(iblock) < 0)
+ if(H5HF__man_iblock_dest(iblock) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, NULL, "unable to destroy fractal heap indirect block")
FUNC_LEAVE_NOAPI(ret_value)
@@ -1280,7 +1278,7 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr,
hdr->man_dtable.table_addr = iblock_addr;
/* Mark that heap header was modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if(H5HF__hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end if */
else {
@@ -1295,7 +1293,7 @@ H5HF__cache_iblock_pre_serialize(H5F_t *f, void *_thing, haddr_t addr,
par_iblock->ents[par_entry].addr = iblock_addr;
/* Mark that parent was modified */
- if(H5HF_iblock_dirty(par_iblock) < 0)
+ if(H5HF__iblock_dirty(par_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end if */
@@ -1559,7 +1557,7 @@ H5HF__cache_iblock_free_icr(void *thing)
HDassert(iblock->hdr);
/* Destroy fractal heap indirect block */
- if(H5HF_man_iblock_dest(iblock) < 0)
+ if(H5HF__man_iblock_dest(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block")
done:
@@ -1792,7 +1790,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata,
/* Share common heap information */
dblock->hdr = hdr;
- if(H5HF_hdr_incr(hdr) < 0)
+ if(H5HF__hdr_incr(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
/* Set block's internal information */
@@ -1885,7 +1883,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata,
dblock->par_entry = par_info->entry;
if(dblock->parent) {
/* Share parent block */
- if(H5HF_iblock_incr(dblock->parent) < 0)
+ if(H5HF__iblock_incr(dblock->parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared indirect block")
} /* end if */
@@ -1915,7 +1913,7 @@ done:
/* Cleanup on error */
if(!ret_value && dblock)
- if(H5HF_man_dblock_dest(dblock) < 0)
+ if(H5HF__man_dblock_dest(dblock) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, NULL, "unable to destroy fractal heap direct block")
FUNC_LEAVE_NOAPI(ret_value)
@@ -2269,7 +2267,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing,
/* Check if heap header was modified */
if(hdr_changed)
- if(H5HF_hdr_dirty(hdr) < 0)
+ if(H5HF__hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end if */
else { /* the direct block's parent is an indirect block */
@@ -2321,7 +2319,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing,
/* Check if parent was modified */
if(par_changed)
- if(H5HF_iblock_dirty(par_iblock) < 0)
+ if(H5HF__iblock_dirty(par_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end else */
} /* end if */
@@ -2357,7 +2355,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing,
hdr->man_dtable.table_addr = dblock_addr;
/* Mark that heap header was modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if(H5HF__hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end if */
else { /* the direct block's parent is an indirect block */
@@ -2371,7 +2369,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing,
par_iblock->ents[par_entry].addr = dblock_addr;
/* Mark that parent was modified */
- if(H5HF_iblock_dirty(par_iblock) < 0)
+ if(H5HF__iblock_dirty(par_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end else */
} /* end if */
@@ -2574,7 +2572,7 @@ H5HF__cache_dblock_free_icr(void *_thing)
HDassert(dblock->cache_info.type == H5AC_FHEAP_DBLOCK);
/* Destroy fractal heap direct block */
- if(H5HF_man_dblock_dest(dblock) < 0)
+ if(H5HF__man_dblock_dest(dblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block")
done:
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index 22de0c4..e841d78 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -15,7 +15,7 @@
*
* Created: H5HFdbg.c
* Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Dump debugging information about a fractal heap
*
@@ -78,7 +78,7 @@ typedef struct {
/* Local Prototypes */
/********************/
-static herr_t H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream,
+static herr_t H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream,
int indent, int fwidth);
@@ -105,7 +105,6 @@ static herr_t H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 20 2015
*
*-------------------------------------------------------------------------
@@ -172,22 +171,21 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_debug
+ * Function: H5HF__dtable_debug
*
* Purpose: Prints debugging info about a doubling table
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 28 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fwidth)
+H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fwidth)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/*
* Check arguments.
@@ -240,7 +238,7 @@ H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fwi
dtable->num_id_first_row);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_dtable_debug() */
+} /* end H5HF__dtable_debug() */
/*-------------------------------------------------------------------------
@@ -251,7 +249,6 @@ H5HF_dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fwi
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 23 2012
*
*-------------------------------------------------------------------------
@@ -328,7 +325,7 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i
hdr->tiny_nobjs);
HDfprintf(stream, "%*sManaged Objects Doubling-Table Info...\n", indent, "");
- H5HF_dtable_debug(&hdr->man_dtable, stream, indent + 3, MAX(0, fwidth - 3));
+ H5HF__dtable_debug(&hdr->man_dtable, stream, indent + 3, MAX(0, fwidth - 3));
/* Print information about I/O filters */
if(hdr->filter_len > 0) {
@@ -371,7 +368,6 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 24 2006
*
*-------------------------------------------------------------------------
@@ -416,7 +412,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 13 2006
*
*-------------------------------------------------------------------------
@@ -500,7 +495,6 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 28 2006
*
*-------------------------------------------------------------------------
@@ -627,7 +621,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 23 2012
*
*-------------------------------------------------------------------------
@@ -759,7 +752,6 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 7 2006
*
*-------------------------------------------------------------------------
@@ -817,7 +809,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 13 2006
*
*-------------------------------------------------------------------------
@@ -849,11 +840,6 @@ H5HF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
HDfprintf(udata->stream, "%*s%-*s %Hu\n", udata->indent, "", udata->fwidth,
"Section size:",
sect->sect_info.size);
-#ifdef QAK
- HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
- "Section state:",
- (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized"));
-#endif /* QAK */
/* Dump section-specific debugging information */
if(H5FS_sect_debug(udata->fspace, _sect, udata->stream, udata->indent + 3, MAX(0, udata->fwidth - 3)) < 0)
@@ -872,7 +858,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 9 2006
*
*-------------------------------------------------------------------------
diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c
index a6560e2..1e0813c 100644
--- a/src/H5HFdblock.c
+++ b/src/H5HFdblock.c
@@ -15,7 +15,7 @@
*
* Created: H5HFdblock.c
* Apr 10 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Direct block routines for fractal heaps.
*
@@ -86,7 +86,6 @@ H5FL_DEFINE(H5HF_direct_t);
* Return: Pointer to new direct block on success, NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
@@ -119,7 +118,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock,
/* Share common heap information */
dblock->hdr = hdr;
- if(H5HF_hdr_incr(hdr) < 0)
+ if(H5HF__hdr_incr(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header")
/* Set info for direct block */
@@ -162,7 +161,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock,
/* Attach to parent indirect block, if there is one */
dblock->parent = par_iblock;
if(dblock->parent) {
- if(H5HF_man_iblock_attach(dblock->parent, par_entry, dblock_addr) < 0)
+ if(H5HF__man_iblock_attach(dblock->parent, par_entry, dblock_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't attach direct block to parent indirect block")
dblock->fd_parent = par_iblock;
} /* end if */
@@ -171,7 +170,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock,
dblock->par_entry = par_entry;
/* Create a new 'single' section for the free space in the block */
- if(NULL == (sec_node = H5HF_sect_single_new((dblock->block_off + H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr)),
+ if(NULL == (sec_node = H5HF__sect_single_new((dblock->block_off + H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr)),
free_space, dblock->parent, dblock->par_entry)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create section for new direct block's free space")
@@ -190,7 +189,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock,
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap direct block to cache")
/* Increase the allocated heap size */
- if(H5HF_hdr_inc_alloc(hdr, dblock->size) < 0)
+ if(H5HF__hdr_inc_alloc(hdr, dblock->size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't increase allocated heap size")
/* Set the address of of direct block, if requested */
@@ -200,7 +199,7 @@ H5HF__man_dblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock,
done:
if(ret_value < 0)
if(dblock)
- if(H5HF_man_dblock_dest(dblock) < 0)
+ if(H5HF__man_dblock_dest(dblock) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap direct block")
FUNC_LEAVE_NOAPI(ret_value)
@@ -219,7 +218,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 17 2006
*
*-------------------------------------------------------------------------
@@ -272,7 +270,7 @@ H5HF__man_dblock_destroy(H5HF_hdr_t *hdr, H5HF_direct_t *dblock,
HDassert(hdr->man_dtable.cparam.start_block_size == dblock->size);
/* Sanity check block iterator */
- HDassert(!H5HF_man_iter_ready(&hdr->next_block));
+ HDassert(!H5HF__man_iter_ready(&hdr->next_block));
/* Reset header information back to "empty heap" state */
if(H5HF__hdr_empty(hdr) < 0)
@@ -334,7 +332,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 13 2006
*
*-------------------------------------------------------------------------
@@ -383,7 +380,7 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request,
} /* end if */
/* Extend heap to cover new direct block */
- if(H5HF_hdr_adjust_heap(hdr, (hsize_t)hdr->man_dtable.cparam.start_block_size, (hssize_t)hdr->man_dtable.row_tot_dblock_free[0]) < 0)
+ if(H5HF__hdr_adjust_heap(hdr, (hsize_t)hdr->man_dtable.cparam.start_block_size, (hssize_t)hdr->man_dtable.row_tot_dblock_free[0]) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block")
} /* end if */
/* Root entry already exists, allocate direct block from root indirect block */
@@ -398,7 +395,7 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request,
HGOTO_ERROR(H5E_HEAP, H5E_CANTUPDATE, FAIL, "unable to update block iterator")
/* Retrieve information about current iterator position */
- if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
+ if(H5HF__man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
HDassert(next_row < iblock->nrows);
H5_CHECKED_ASSIGN(next_size, size_t, hdr->man_dtable.row_block_size[next_row], hsize_t);
@@ -410,7 +407,7 @@ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "skipping direct block sizes not su
} /* end if */
/* Advance "next block" iterator to next direct block entry */
- if(H5HF_hdr_inc_iter(hdr, (hsize_t)next_size, 1) < 0)
+ if(H5HF__hdr_inc_iter(hdr, (hsize_t)next_size, 1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment 'next block' iterator")
/* Create new direct block at current location*/
@@ -432,7 +429,6 @@ done:
* Return: Pointer to direct block on success, NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 17 2006
*
*-------------------------------------------------------------------------
@@ -515,7 +511,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 8 2006
*
*-------------------------------------------------------------------------
@@ -546,7 +541,7 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off,
HDassert((flags & (unsigned)(~H5AC__READ_ONLY_FLAG)) == 0);
/* Look up row & column for object */
- if(H5HF_dtable_lookup(&hdr->man_dtable, obj_off, &row, &col) < 0)
+ if(H5HF__dtable_lookup(&hdr->man_dtable, obj_off, &row, &col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of object")
/* Set initial indirect block info */
@@ -595,7 +590,7 @@ H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off,
did_protect = new_did_protect;
/* Look up row & column in new indirect block for object */
- if(H5HF_dtable_lookup(&hdr->man_dtable, (obj_off - iblock->block_off), &row, &col) < 0)
+ if(H5HF__dtable_lookup(&hdr->man_dtable, (obj_off - iblock->block_off), &row, &col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of object")
HDassert(row < iblock->nrows); /* child must be smaller than parent */
} /* end while */
@@ -624,7 +619,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 7 2006
*
*-------------------------------------------------------------------------
@@ -682,24 +676,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_man_dblock_dest
+ * Function: H5HF__man_dblock_dest
*
* Purpose: Destroys a fractal heap direct block in memory.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 27 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_dblock_dest(H5HF_direct_t *dblock)
+H5HF__man_dblock_dest(H5HF_direct_t *dblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -708,7 +701,7 @@ H5HF_man_dblock_dest(H5HF_direct_t *dblock)
/* Decrement reference count on shared fractal heap info */
HDassert(dblock->hdr != NULL);
- if(H5HF_hdr_decr(dblock->hdr) < 0)
+ if(H5HF__hdr_decr(dblock->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
if(dblock->parent)
if(H5HF__iblock_decr(dblock->parent) < 0)
@@ -722,5 +715,5 @@ H5HF_man_dblock_dest(H5HF_direct_t *dblock)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_man_dblock_dest() */
+} /* end H5HF__man_dblock_dest() */
diff --git a/src/H5HFdtable.c b/src/H5HFdtable.c
index 6e9429a..4fff348 100644
--- a/src/H5HFdtable.c
+++ b/src/H5HFdtable.c
@@ -15,7 +15,7 @@
*
* Created: H5HFdtable.c
* Apr 10 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: "Doubling table" routines for fractal heaps.
*
@@ -75,27 +75,26 @@
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_init
+ * Function: H5HF__dtable_init
*
* Purpose: Initialize values for doubling table
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_dtable_init(H5HF_dtable_t *dtable)
+H5HF__dtable_init(H5HF_dtable_t *dtable)
{
hsize_t tmp_block_size; /* Temporary block size */
hsize_t acc_block_off; /* Accumulated block offset */
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -133,26 +132,25 @@ H5HF_dtable_init(H5HF_dtable_t *dtable)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_dtable_init() */
+} /* end H5HF__dtable_init() */
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_lookup
+ * Function: H5HF__dtable_lookup
*
* Purpose: Compute the row & col of an offset in a doubling-table
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off, unsigned *row, unsigned *col)
+H5HF__dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off, unsigned *row, unsigned *col)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -160,9 +158,6 @@ H5HF_dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off, unsigned *row, unsi
HDassert(dtable);
HDassert(row);
HDassert(col);
-#ifdef QAK
-HDfprintf(stderr, "%s: off = %Hu\n", "H5HF_dtable_lookup", off);
-#endif /* QAK */
/* Check for offset in first row */
if(off < dtable->num_id_first_row) {
@@ -173,34 +168,30 @@ HDfprintf(stderr, "%s: off = %Hu\n", "H5HF_dtable_lookup", off);
unsigned high_bit = H5VM_log2_gen(off); /* Determine the high bit in the offset */
hsize_t off_mask = ((hsize_t)1) << high_bit; /* Compute mask for determining column */
-#ifdef QAK
-HDfprintf(stderr, "%s: high_bit = %u, off_mask = %Hu\n", "H5HF_dtable_lookup", high_bit, off_mask);
-#endif /* QAK */
*row = (high_bit - dtable->first_row_bits) + 1;
H5_CHECKED_ASSIGN(*col, unsigned, ((off - off_mask) / dtable->row_block_size[*row]), hsize_t);
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_dtable_lookup() */
+} /* end H5HF__dtable_lookup() */
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_dest
+ * Function: H5HF__dtable_dest
*
* Purpose: Release information for doubling table
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_dtable_dest(H5HF_dtable_t *dtable)
+H5HF__dtable_dest(H5HF_dtable_t *dtable)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -220,28 +211,27 @@ H5HF_dtable_dest(H5HF_dtable_t *dtable)
H5MM_xfree(dtable->row_max_dblock_free);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_dtable_dest() */
+} /* end H5HF__dtable_dest() */
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_size_to_row
+ * Function: H5HF__dtable_size_to_row
*
* Purpose: Compute row that can hold block of a certain size
*
* Return: Non-negative on success (can't fail)
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 25 2006
*
*-------------------------------------------------------------------------
*/
unsigned
-H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
+H5HF__dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
{
unsigned row = 0; /* Row where block will fit */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -254,28 +244,27 @@ H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
row = (H5VM_log2_of2((uint32_t)block_size) - H5VM_log2_of2((uint32_t)dtable->cparam.start_block_size)) + 1;
FUNC_LEAVE_NOAPI(row)
-} /* end H5HF_dtable_size_to_row() */
+} /* end H5HF__dtable_size_to_row() */
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_size_to_rows
+ * Function: H5HF__dtable_size_to_rows
*
* Purpose: Compute # of rows of indirect block of a given size
*
* Return: Non-negative on success (can't fail)
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
*/
unsigned
-H5HF_dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size)
+H5HF__dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size)
{
unsigned rows = 0; /* # of rows required for indirect block */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -285,24 +274,23 @@ H5HF_dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size)
rows = (H5VM_log2_gen(size) - dtable->first_row_bits) + 1;
FUNC_LEAVE_NOAPI(rows)
-} /* end H5HF_dtable_size_to_rows() */
+} /* end H5HF__dtable_size_to_rows() */
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_span_size
+ * Function: H5HF__dtable_span_size
*
* Purpose: Compute the size covered by a span of entries
*
* Return: Non-zero span size on success/zero on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 25 2006
*
*-------------------------------------------------------------------------
*/
hsize_t
-H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
+H5HF__dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
unsigned start_col, unsigned num_entries)
{
unsigned start_entry; /* Entry for first block covered */
@@ -311,7 +299,7 @@ H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
unsigned end_entry; /* Entry for last block covered */
hsize_t acc_span_size = 0; /* Accumulated span size */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -326,10 +314,6 @@ H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
end_entry = (start_entry + num_entries) - 1;
end_row = end_entry / dtable->cparam.width;
end_col = end_entry % dtable->cparam.width;
-#ifdef QAK
-HDfprintf(stderr, "%s: start_row = %u, start_col = %u, start_entry = %u\n", "H5HF_sect_indirect_span_size", start_row, start_col, start_entry);
-HDfprintf(stderr, "%s: end_row = %u, end_col = %u, end_entry = %u\n", "H5HF_sect_indirect_span_size", end_row, end_col, end_entry);
-#endif /* QAK */
/* Initialize accumulated span size */
acc_span_size = 0;
@@ -362,9 +346,6 @@ HDfprintf(stderr, "%s: end_row = %u, end_col = %u, end_entry = %u\n", "H5HF_sect
((end_col - start_col) + 1);
} /* end else */
-#ifdef QAK
-HDfprintf(stderr, "%s: acc_span_size = %Hu\n", "H5HF_dtable_span_size", acc_span_size);
-#endif /* QAK */
FUNC_LEAVE_NOAPI(acc_span_size)
-} /* end H5HF_sect_indirect_span_size() */
+} /* end H5HF__dtable_span_size() */
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index 5750a03..043ab87 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -15,7 +15,7 @@
*
* Created: H5HFhdr.c
* Apr 10 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Heap header routines for fractal heaps.
*
@@ -94,25 +94,24 @@ H5FL_DEFINE_STATIC(H5HF_hdr_t);
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_alloc
+ * Function: H5HF__hdr_alloc
*
* Purpose: Allocate shared fractal heap header
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 21 2006
*
*-------------------------------------------------------------------------
*/
H5HF_hdr_t *
-H5HF_hdr_alloc(H5F_t *f)
+H5HF__hdr_alloc(H5F_t *f)
{
H5HF_hdr_t *hdr = NULL; /* Shared fractal heap header */
H5HF_hdr_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -133,7 +132,7 @@ H5HF_hdr_alloc(H5F_t *f)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_alloc() */
+} /* end H5HF__hdr_alloc() */
/*-------------------------------------------------------------------------
@@ -145,13 +144,12 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 21 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
+H5HF__hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
{
hsize_t acc_heap_size; /* Accumumated heap space */
hsize_t iblock_size; /* Size of indirect block to calculate for */
@@ -160,7 +158,7 @@ H5HF_hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
unsigned curr_row; /* Current row in block */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/*
* Check arguments.
@@ -189,28 +187,27 @@ H5HF_hdr_compute_free_space(H5HF_hdr_t *hdr, unsigned iblock_row)
hdr->man_dtable.row_max_dblock_free[iblock_row] = max_dblock_free;
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_compute_free_space() */
+} /* end H5HF__hdr_compute_free_space() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_finish_init_phase1
+ * Function: H5HF__hdr_finish_init_phase1
*
* Purpose: First phase to finish initializing info in shared heap header
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 12 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr)
+H5HF__hdr_finish_init_phase1(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -219,7 +216,7 @@ H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr)
/* Compute/cache some values */
hdr->heap_off_size = (uint8_t)H5HF_SIZEOF_OFFSET_BITS(hdr->man_dtable.cparam.max_index);
- if(H5HF_dtable_init(&hdr->man_dtable) < 0)
+ if(H5HF__dtable_init(&hdr->man_dtable) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize doubling table info")
/* Set the size of heap IDs */
@@ -228,29 +225,28 @@ H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_finish_init_phase1() */
+} /* end H5HF__hdr_finish_init_phase1() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_finish_init_phase2
+ * Function: H5HF__hdr_finish_init_phase2
*
* Purpose: Second phase to finish initializing info in shared heap header
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 12 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr)
+H5HF__hdr_finish_init_phase2(H5HF_hdr_t *hdr)
{
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -265,46 +261,45 @@ H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr)
H5_CHECKED_ASSIGN(hdr->man_dtable.row_max_dblock_free[u], size_t, hdr->man_dtable.row_tot_dblock_free[u], hsize_t);
} /* end if */
else
- if(H5HF_hdr_compute_free_space(hdr, u) < 0)
+ if(H5HF__hdr_compute_free_space(hdr, u) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize direct block free space for indirect block")
} /* end for */
/* Initialize the block iterator for searching for free space */
- if(H5HF_man_iter_init(&hdr->next_block) < 0)
+ if(H5HF__man_iter_init(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize space search block iterator")
/* Initialize the information for tracking 'huge' objects */
- if(H5HF_huge_init(hdr) < 0)
+ if(H5HF__huge_init(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize info for tracking huge objects")
/* Initialize the information for tracking 'tiny' objects */
- if(H5HF_tiny_init(hdr) < 0)
+ if(H5HF__tiny_init(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize info for tracking tiny objects")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_finish_init_phase2() */
+} /* end H5HF__hdr_finish_init_phase2() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_finish_init
+ * Function: H5HF__hdr_finish_init
*
* Purpose: Finish initializing info in shared heap header
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 21 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_finish_init(H5HF_hdr_t *hdr)
+H5HF__hdr_finish_init(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -312,39 +307,38 @@ H5HF_hdr_finish_init(H5HF_hdr_t *hdr)
HDassert(hdr);
/* First phase of header final initialization */
- if(H5HF_hdr_finish_init_phase1(hdr) < 0)
+ if(H5HF__hdr_finish_init_phase1(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #1 of header final initialization")
/* Second phase of header final initialization */
- if(H5HF_hdr_finish_init_phase2(hdr) < 0)
+ if(H5HF__hdr_finish_init_phase2(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't finish phase #2 of header final initialization")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_finish_init() */
+} /* end H5HF__hdr_finish_init() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_create
+ * Function: H5HF__hdr_create
*
* Purpose: Create new fractal heap header
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 21 2006
*
*-------------------------------------------------------------------------
*/
haddr_t
-H5HF_hdr_create(H5F_t *f, const H5HF_create_t *cparam)
+H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam)
{
H5HF_hdr_t *hdr = NULL; /* The new fractal heap header information */
size_t dblock_overhead; /* Direct block's overhead */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -377,7 +371,7 @@ H5HF_hdr_create(H5F_t *f, const H5HF_create_t *cparam)
#endif /* NDEBUG */
/* Allocate & basic initialization for the shared header */
- if(NULL == (hdr = H5HF_hdr_alloc(f)))
+ if(NULL == (hdr = H5HF__hdr_alloc(f)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "can't allocate space for shared heap info")
#ifndef NDEBUG
@@ -401,7 +395,7 @@ H5HF_hdr_create(H5F_t *f, const H5HF_create_t *cparam)
/* First phase of header final initialization */
/* (doesn't need ID length set up) */
- if(H5HF_hdr_finish_init_phase1(hdr) < 0)
+ if(H5HF__hdr_finish_init_phase1(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "can't finish phase #1 of header final initialization")
/* Copy any I/O filter pipeline */
@@ -484,7 +478,7 @@ H5HF_hdr_create(H5F_t *f, const H5HF_create_t *cparam)
/* Second phase of header final initialization */
/* (needs ID and filter lengths set up) */
- if(H5HF_hdr_finish_init_phase2(hdr) < 0)
+ if(H5HF__hdr_finish_init_phase2(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "can't finish phase #2 of header final initialization")
/* Extra checking for possible gap between max. direct block size minus
@@ -506,11 +500,11 @@ H5HF_hdr_create(H5F_t *f, const H5HF_create_t *cparam)
done:
if(!H5F_addr_defined(ret_value) && hdr)
- if(H5HF_hdr_free(hdr) < 0)
+ if(H5HF__hdr_free(hdr) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, HADDR_UNDEF, "unable to release fractal heap header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_create() */
+} /* end H5HF__hdr_create() */
/*-------------------------------------------------------------------------
@@ -521,7 +515,6 @@ done:
* Return: Pointer to indirect block on success, NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 5 2010
*
*-------------------------------------------------------------------------
@@ -564,24 +557,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_incr
+ * Function: H5HF__hdr_incr
*
* Purpose: Increment component reference count on shared heap header
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_incr(H5HF_hdr_t *hdr)
+H5HF__hdr_incr(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(hdr);
@@ -596,28 +588,27 @@ H5HF_hdr_incr(H5HF_hdr_t *hdr)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_incr() */
+} /* end H5HF__hdr_incr() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_decr
+ * Function: H5HF__hdr_decr
*
* Purpose: Decrement component reference count on shared heap header
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_decr(H5HF_hdr_t *hdr)
+H5HF__hdr_decr(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(hdr);
@@ -635,26 +626,25 @@ H5HF_hdr_decr(H5HF_hdr_t *hdr)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_decr() */
+} /* end H5HF__hdr_decr() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_fuse_incr
+ * Function: H5HF__hdr_fuse_incr
*
* Purpose: Increment file reference count on shared heap header
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Oct 1 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_fuse_incr(H5HF_hdr_t *hdr)
+H5HF__hdr_fuse_incr(H5HF_hdr_t *hdr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(hdr);
@@ -663,26 +653,25 @@ H5HF_hdr_fuse_incr(H5HF_hdr_t *hdr)
hdr->file_rc++;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_hdr_fuse_incr() */
+} /* end H5HF__hdr_fuse_incr() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_fuse_decr
+ * Function: H5HF__hdr_fuse_decr
*
* Purpose: Decrement file reference count on shared heap header
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Oct 1 2006
*
*-------------------------------------------------------------------------
*/
size_t
-H5HF_hdr_fuse_decr(H5HF_hdr_t *hdr)
+H5HF__hdr_fuse_decr(H5HF_hdr_t *hdr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(hdr);
@@ -692,37 +681,35 @@ H5HF_hdr_fuse_decr(H5HF_hdr_t *hdr)
hdr->file_rc--;
FUNC_LEAVE_NOAPI(hdr->file_rc)
-} /* end H5HF_hdr_fuse_decr() */
+} /* end H5HF__hdr_fuse_decr() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_dirty
+ * Function: H5HF__hdr_dirty
*
* Purpose: Mark heap header as dirty
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_dirty(H5HF_hdr_t *hdr)
+H5HF__hdr_dirty(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(hdr);
/* Resize pinned header in cache if I/O filter is present. */
- if(hdr->filter_len > 0) {
+ if(hdr->filter_len > 0)
if(H5AC_resize_entry(hdr, (size_t)hdr->heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize fractal heap header")
- } /* end if */
/* Mark header as dirty in cache */
if(H5AC_mark_entry_dirty(hdr) < 0)
@@ -730,28 +717,27 @@ H5HF_hdr_dirty(H5HF_hdr_t *hdr)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_dirty() */
+} /* end H5HF__hdr_dirty() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_adj_free
+ * Function: H5HF__hdr_adj_free
*
* Purpose: Adjust the free space for a heap
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 9 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt)
+H5HF__hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -763,33 +749,32 @@ H5HF_hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt)
hdr->total_man_free = (hsize_t)((hssize_t)hdr->total_man_free + amt);
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if(H5HF__hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_adj_free() */
+} /* end H5HF__hdr_adj_free() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_adjust_heap
+ * Function: H5HF__hdr_adjust_heap
*
* Purpose: Adjust heap space
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 10 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free)
+H5HF__hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -804,31 +789,30 @@ H5HF_hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free)
hdr->total_man_free = (hsize_t)((hssize_t)hdr->total_man_free + extra_free);
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if(H5HF__hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_adjust_heap() */
+} /* end H5HF__hdr_adjust_heap() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_inc_alloc
+ * Function: H5HF__hdr_inc_alloc
*
* Purpose: Increase allocated size of heap
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 23 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size)
+H5HF__hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -840,28 +824,27 @@ H5HF_hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size)
hdr->man_alloc_size += alloc_size;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_hdr_inc_alloc() */
+} /* end H5HF__hdr_inc_alloc() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_start_iter
+ * Function: H5HF__hdr_start_iter
*
* Purpose: Start "next block" iterator at an offset/entry in the heap
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 30 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off, unsigned curr_entry)
+H5HF__hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off, unsigned curr_entry)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -870,7 +853,7 @@ H5HF_hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off,
HDassert(iblock);
/* Set up "next block" iterator at correct location */
- if(H5HF_man_iter_start_entry(hdr, &hdr->next_block, iblock, curr_entry) < 0)
+ if(H5HF__man_iter_start_entry(hdr, &hdr->next_block, iblock, curr_entry) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize block iterator")
/* Set the offset of the iterator in the heap */
@@ -878,28 +861,27 @@ H5HF_hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_start_iter() */
+} /* end H5HF__hdr_start_iter() */
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_reset_iter
+ * Function: H5HF__hdr_reset_iter
*
* Purpose: Reset "next block" iterator
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off)
+H5HF__hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -907,7 +889,7 @@ H5HF_hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off)
HDassert(hdr);
/* Reset "next block" iterator */
- if(H5HF_man_iter_reset(&hdr->next_block) < 0)
+ if(H5HF__man_iter_reset(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
/* Set the offset of the iterator in the heap */
@@ -915,7 +897,7 @@ H5HF_hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_reset_iter() */
+} /* end H5HF__hdr_reset_iter() */
/*-------------------------------------------------------------------------
@@ -926,7 +908,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 3 2006
*
*-------------------------------------------------------------------------
@@ -951,11 +932,11 @@ H5HF__hdr_skip_blocks(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock,
/* Compute the span within the heap to skip */
row = start_entry / hdr->man_dtable.cparam.width;
col = start_entry % hdr->man_dtable.cparam.width;
- sect_size = H5HF_dtable_span_size(&hdr->man_dtable, row, col, nentries);
+ sect_size = H5HF__dtable_span_size(&hdr->man_dtable, row, col, nentries);
HDassert(sect_size > 0);
/* Advance the new block iterator */
- if(H5HF_hdr_inc_iter(hdr, sect_size, nentries) < 0)
+ if(H5HF__hdr_inc_iter(hdr, sect_size, nentries) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't increase allocated heap size")
/* Add 'indirect' section for blocks skipped in this row */
@@ -978,7 +959,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 14 2006
*
*-------------------------------------------------------------------------
@@ -1009,17 +989,17 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
unsigned min_dblock_row; /* Minimum row for direct block size request */
/* Compute min. row for direct block requested */
- min_dblock_row = H5HF_dtable_size_to_row(&hdr->man_dtable, min_dblock_size);
+ min_dblock_row = H5HF__dtable_size_to_row(&hdr->man_dtable, min_dblock_size);
/* Initialize block iterator, if necessary */
- if(!H5HF_man_iter_ready(&hdr->next_block)) {
+ if(!H5HF__man_iter_ready(&hdr->next_block)) {
/* Start iterator with previous offset of iterator */
if(H5HF__man_iter_start_offset(hdr, &hdr->next_block, hdr->man_iter_off) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to set block iterator location")
} /* end if */
/* Get information about current iterator location */
- if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
+ if(H5HF__man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
/* Check for skipping over blocks in the current block */
@@ -1039,7 +1019,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space")
/* Get information about new iterator location */
- if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
+ if(H5HF__man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
} /* end if */
@@ -1057,16 +1037,16 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
} /* end if */
else {
/* Move iterator up one level */
- if(H5HF_man_iter_up(&hdr->next_block) < 0)
+ if(H5HF__man_iter_up(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to advance current block iterator location")
/* Increment location of next block at this level */
- if(H5HF_man_iter_next(hdr, &hdr->next_block, 1) < 0)
+ if(H5HF__man_iter_next(hdr, &hdr->next_block, 1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't advance fractal heap block location")
} /* end else */
/* Get information about new iterator location */
- if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
+ if(H5HF__man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
/* Indicate that we walked up */
@@ -1081,7 +1061,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
HDassert(!H5F_addr_defined(iblock->ents[next_entry].addr));
/* Compute # of rows in next child indirect block to use */
- child_nrows = H5HF_dtable_size_to_rows(&hdr->man_dtable, hdr->man_dtable.row_block_size[next_row]);
+ child_nrows = H5HF__dtable_size_to_rows(&hdr->man_dtable, hdr->man_dtable.row_block_size[next_row]);
/* Check for skipping over indirect blocks */
/* (that don't have direct blocks large enough to hold direct block size requested) */
@@ -1114,7 +1094,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
/* Move iterator down one level (pins indirect block) */
- if(H5HF_man_iter_down(&hdr->next_block, new_iblock) < 0)
+ if(H5HF__man_iter_down(&hdr->next_block, new_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to advance current block iterator location")
/* Check for skipping over rows and add free section for skipped rows */
@@ -1135,7 +1115,7 @@ H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size)
} /* end else */
/* Get information about new iterator location */
- if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
+ if(H5HF__man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
/* Indicate that we walked down */
@@ -1150,24 +1130,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_inc_iter
+ * Function: H5HF__hdr_inc_iter
*
* Purpose: Advance "next block" iterator
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 23 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries)
+H5HF__hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1177,7 +1156,7 @@ H5HF_hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries)
/* Advance the iterator for the current location within the indirect block */
if(hdr->next_block.curr)
- if(H5HF_man_iter_next(hdr, &hdr->next_block, nentries) < 0)
+ if(H5HF__man_iter_next(hdr, &hdr->next_block, nentries) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to advance current block iterator location")
/* Increment the offset of the iterator in the heap */
@@ -1185,7 +1164,7 @@ H5HF_hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_inc_iter() */
+} /* end H5HF__hdr_inc_iter() */
/*-------------------------------------------------------------------------
@@ -1197,7 +1176,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
@@ -1219,7 +1197,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
HDassert(hdr);
/* Initialize block iterator, if necessary */
- if(!H5HF_man_iter_ready(&hdr->next_block))
+ if(!H5HF__man_iter_ready(&hdr->next_block))
/* Start iterator with previous offset of iterator */
if(H5HF__man_iter_start_offset(hdr, &hdr->next_block, hdr->man_iter_off) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to set block iterator location")
@@ -1227,7 +1205,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
/* Walk backwards through heap, looking for direct block to place iterator after */
/* Get information about current iterator location */
- if(H5HF_man_iter_curr(&hdr->next_block, NULL, NULL, &curr_entry, &iblock) < 0)
+ if(H5HF__man_iter_curr(&hdr->next_block, NULL, NULL, &curr_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator information")
/* Move current iterator position backwards once */
@@ -1253,11 +1231,11 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
/* Check for parent of current indirect block */
if(iblock->parent) {
/* Move iterator to parent of current block */
- if(H5HF_man_iter_up(&hdr->next_block) < 0)
+ if(H5HF__man_iter_up(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to move current block iterator location up")
/* Get information about current iterator location */
- if(H5HF_man_iter_curr(&hdr->next_block, NULL, NULL, &curr_entry, &iblock) < 0)
+ if(H5HF__man_iter_curr(&hdr->next_block, NULL, NULL, &curr_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator information")
/* Move current iterator position backwards once */
@@ -1271,7 +1249,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
hdr->man_iter_off = 0;
/* Reset 'next block' iterator */
- if(H5HF_man_iter_reset(&hdr->next_block) < 0)
+ if(H5HF__man_iter_reset(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
} /* end else */
} /* end if */
@@ -1287,7 +1265,7 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
curr_entry++;
/* Set the current location of the iterator to next entry after the existing direct block */
- if(H5HF_man_iter_set_entry(hdr, &hdr->next_block, curr_entry) < 0)
+ if(H5HF__man_iter_set_entry(hdr, &hdr->next_block, curr_entry) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "unable to set current block iterator location")
/* Update iterator offset */
@@ -1301,18 +1279,18 @@ H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr)
unsigned child_nrows; /* # of rows in child block */
/* Compute # of rows in next child indirect block to use */
- child_nrows = H5HF_dtable_size_to_rows(&hdr->man_dtable, hdr->man_dtable.row_block_size[row]);
+ child_nrows = H5HF__dtable_size_to_rows(&hdr->man_dtable, hdr->man_dtable.row_block_size[row]);
/* Lock child indirect block */
if(NULL == (child_iblock = H5HF__man_iblock_protect(hdr, iblock->ents[curr_entry].addr, child_nrows, iblock, curr_entry, FALSE, H5AC__NO_FLAGS_SET, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap indirect block")
/* Set the current location of the iterator */
- if(H5HF_man_iter_set_entry(hdr, &hdr->next_block, curr_entry) < 0)
+ if(H5HF__man_iter_set_entry(hdr, &hdr->next_block, curr_entry) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, FAIL, "unable to set current block iterator location")
/* Walk down into child indirect block (pins child block) */
- if(H5HF_man_iter_down(&hdr->next_block, child_iblock) < 0)
+ if(H5HF__man_iter_down(&hdr->next_block, child_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTNEXT, FAIL, "unable to advance current block iterator location")
/* Update iterator location */
@@ -1342,7 +1320,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 17 2006
*
*-------------------------------------------------------------------------
@@ -1358,10 +1335,9 @@ H5HF__hdr_empty(H5HF_hdr_t *hdr)
HDassert(hdr);
/* Reset block iterator, if necessary */
- if(H5HF_man_iter_ready(&hdr->next_block)) {
- if(H5HF_man_iter_reset(&hdr->next_block) < 0)
+ if(H5HF__man_iter_ready(&hdr->next_block))
+ if(H5HF__man_iter_reset(&hdr->next_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
- } /* end if */
/* Shrink managed heap size */
hdr->man_size = 0;
@@ -1378,7 +1354,7 @@ H5HF__hdr_empty(H5HF_hdr_t *hdr)
hdr->total_man_free = 0;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if(H5HF__hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark header as dirty")
done:
@@ -1387,24 +1363,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_hdr_free
+ * Function: H5HF__hdr_free
*
* Purpose: Free shared fractal heap header
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 27 2009
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_hdr_free(H5HF_hdr_t *hdr)
+H5HF__hdr_free(H5HF_hdr_t *hdr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1412,7 +1387,7 @@ H5HF_hdr_free(H5HF_hdr_t *hdr)
HDassert(hdr);
/* Free the block size lookup table for the doubling table */
- if(H5HF_dtable_dest(&hdr->man_dtable) < 0)
+ if(H5HF__dtable_dest(&hdr->man_dtable) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap doubling table")
/* Release any I/O pipeline filter information */
@@ -1425,7 +1400,7 @@ H5HF_hdr_free(H5HF_hdr_t *hdr)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_hdr_free() */
+} /* end H5HF__hdr_free() */
/*-------------------------------------------------------------------------
@@ -1436,7 +1411,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 5 2007
*
*-------------------------------------------------------------------------
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index d496d62..065e7c3 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -15,7 +15,7 @@
*
* Created: H5HFhuge.c
* Aug 7 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Routines for "huge" objects in fractal heap
*
@@ -67,7 +67,7 @@
static herr_t H5HF__huge_bt2_create(H5HF_hdr_t *hdr);
/* Local 'huge' object support routines */
-static hsize_t H5HF_huge_new_id(H5HF_hdr_t *hdr);
+static hsize_t H5HF__huge_new_id(H5HF_hdr_t *hdr);
static herr_t H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id,
hbool_t is_read, H5HF_operator_t op, void *op_data);
@@ -95,7 +95,6 @@ static herr_t H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id,
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 7 2006
*
*-------------------------------------------------------------------------
@@ -168,22 +167,21 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_huge_init
+ * Function: H5HF__huge_init
*
* Purpose: Initialize information for tracking 'huge' objects
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 7 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_huge_init(H5HF_hdr_t *hdr)
+H5HF__huge_init(H5HF_hdr_t *hdr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -196,10 +194,6 @@ H5HF_huge_init(H5HF_hdr_t *hdr)
* the file in the heap ID (which will speed up accessing it) and we don't
* have any I/O pipeline filters.
*/
-#ifdef QAK
-HDfprintf(stderr, "%s: hdr->id_len = %u\n", "H5HF_huge_init", (unsigned)hdr->id_len);
-HDfprintf(stderr, "%s: hdr->filter_len = %u\n", "H5HF_huge_init", (unsigned)hdr->filter_len);
-#endif /* QAK */
if(hdr->filter_len > 0) {
if((hdr->id_len - 1) >= (unsigned)(hdr->sizeof_addr + hdr->sizeof_size + 4 + hdr->sizeof_size)) {
/* Indicate that v2 B-tree doesn't have to be used to locate object */
@@ -238,11 +232,11 @@ HDfprintf(stderr, "%s: hdr->filter_len = %u\n", "H5HF_huge_init", (unsigned)hdr-
hdr->huge_bt2 = NULL;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_huge_init() */
+} /* end H5HF__huge_init() */
/*-------------------------------------------------------------------------
- * Function: H5HF_huge_new_id
+ * Function: H5HF__huge_new_id
*
* Purpose: Determine a new ID for an indirectly accessed 'huge' object
* (either filtered or not)
@@ -250,18 +244,17 @@ HDfprintf(stderr, "%s: hdr->filter_len = %u\n", "H5HF_huge_init", (unsigned)hdr-
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 15 2006
*
*-------------------------------------------------------------------------
*/
static hsize_t
-H5HF_huge_new_id(H5HF_hdr_t *hdr)
+H5HF__huge_new_id(H5HF_hdr_t *hdr)
{
hsize_t new_id; /* New object's ID */
hsize_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -287,7 +280,7 @@ H5HF_huge_new_id(H5HF_hdr_t *hdr)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_huge_new_id() */
+} /* end H5HF__huge_new_id() */
/*-------------------------------------------------------------------------
@@ -298,7 +291,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 7 2006
*
*-------------------------------------------------------------------------
@@ -314,9 +306,6 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
-#ifdef QAK
-HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
-#endif /* QAK */
/*
* Check arguments.
@@ -362,10 +351,6 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
if(H5Z_pipeline(&(hdr->pline), 0, &filter_mask, H5Z_NO_EDC,
filter_cb, &nbytes, &write_size, &write_buf) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFILTER, FAIL, "output pipeline failed")
-#ifdef QAK
-HDfprintf(stderr, "%s: nbytes = %Zu, write_size = %Zu, write_buf = %p\n", FUNC, nbytes, write_size, write_buf);
-HDfprintf(stderr, "%s: obj_size = %Zu, obj = %p\n", FUNC, obj_size, obj);
-#endif /* QAK */
/* Update size of object on disk */
write_size = nbytes;
@@ -399,9 +384,6 @@ HDfprintf(stderr, "%s: obj_size = %Zu, obj = %p\n", FUNC, obj_size, obj);
obj_rec.len = write_size;
obj_rec.filter_mask = filter_mask;
obj_rec.obj_size = obj_size;
-#ifdef QAK
-HDfprintf(stderr, "%s: obj_rec = {%a, %Hu, %x, %Hu}\n", FUNC, obj_rec.addr, obj_rec.len, obj_rec.filter_mask, obj_rec.obj_size);
-#endif /* QAK */
/* Insert record for object in v2 B-tree */
if(H5B2_insert(hdr->huge_bt2, &obj_rec) < 0)
@@ -420,9 +402,6 @@ HDfprintf(stderr, "%s: obj_rec = {%a, %Hu, %x, %Hu}\n", FUNC, obj_rec.addr, obj_
/* Initialize record for tracking object in v2 B-tree */
obj_rec.addr = obj_addr;
obj_rec.len = write_size;
-#ifdef QAK
-HDfprintf(stderr, "%s: obj_rec = {%a, %Hu}\n", FUNC, obj_rec.addr, obj_rec.len);
-#endif /* QAK */
/* Insert record for object in v2 B-tree */
if(H5B2_insert(hdr->huge_bt2, &obj_rec) < 0)
@@ -441,7 +420,7 @@ HDfprintf(stderr, "%s: obj_rec = {%a, %Hu}\n", FUNC, obj_rec.addr, obj_rec.len);
hsize_t new_id; /* New ID for object */
/* Get new ID for object */
- if(0 == (new_id = H5HF_huge_new_id(hdr)))
+ if(0 == (new_id = H5HF__huge_new_id(hdr)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't generate new ID for object")
if(hdr->filter_len > 0) {
@@ -451,9 +430,6 @@ HDfprintf(stderr, "%s: obj_rec = {%a, %Hu}\n", FUNC, obj_rec.addr, obj_rec.len);
filt_indir_rec.filter_mask = filter_mask;
filt_indir_rec.obj_size = obj_size;
filt_indir_rec.id = new_id;
-#ifdef QAK
-HDfprintf(stderr, "%s: filt_indir_rec = {%a, %Hu, %x, %Hu, %Hu}\n", FUNC, filt_indir_rec.addr, filt_indir_rec.len, filt_indir_rec.filter_mask, filt_indir_rec.obj_size, filt_indir_rec.id);
-#endif /* QAK */
/* Set pointer to record to insert */
ins_rec = &filt_indir_rec;
@@ -463,9 +439,6 @@ HDfprintf(stderr, "%s: filt_indir_rec = {%a, %Hu, %x, %Hu, %Hu}\n", FUNC, filt_i
indir_rec.addr = obj_addr;
indir_rec.len = write_size;
indir_rec.id = new_id;
-#ifdef QAK
-HDfprintf(stderr, "%s: indir_rec = {%a, %Hu, %Hu}\n", FUNC, indir_rec.addr, indir_rec.len, indir_rec.id);
-#endif /* QAK */
/* Set pointer to record to insert */
ins_rec = &indir_rec;
@@ -485,7 +458,7 @@ HDfprintf(stderr, "%s: indir_rec = {%a, %Hu, %Hu}\n", FUNC, indir_rec.addr, indi
hdr->huge_nobjs++;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if(H5HF__hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
done:
@@ -501,7 +474,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 8 2006
*
*-------------------------------------------------------------------------
@@ -592,7 +564,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 8 2006
*
*-------------------------------------------------------------------------
@@ -678,7 +649,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 8 2006
*
*-------------------------------------------------------------------------
@@ -829,7 +799,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 21 2007
*
*-------------------------------------------------------------------------
@@ -907,7 +876,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sept 11 2006
*
*-------------------------------------------------------------------------
@@ -943,7 +911,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sept 11 2006
*
*-------------------------------------------------------------------------
@@ -980,7 +947,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 8 2006
*
*-------------------------------------------------------------------------
@@ -1072,7 +1038,7 @@ H5HF__huge_remove(H5HF_hdr_t *hdr, const uint8_t *id)
hdr->huge_nobjs--;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if(H5HF__hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
done:
@@ -1088,7 +1054,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 8 2006
*
*-------------------------------------------------------------------------
@@ -1134,7 +1099,7 @@ H5HF__huge_term(H5HF_hdr_t *hdr)
hdr->huge_ids_wrapped = FALSE;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if(H5HF__hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
} /* end if */
@@ -1152,7 +1117,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 8 2006
*
*-------------------------------------------------------------------------
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index 07eb9cd..2714ac7 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -15,7 +15,7 @@
*
* Created: H5HFiblock.c
* Apr 10 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Indirect block routines for fractal heaps.
*
@@ -99,7 +99,6 @@ H5FL_SEQ_DEFINE(H5HF_indirect_ptr_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 17 2006
*
*-------------------------------------------------------------------------
@@ -166,7 +165,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 17 2006
*
*-------------------------------------------------------------------------
@@ -191,24 +189,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_iblock_incr
+ * Function: H5HF__iblock_incr
*
* Purpose: Increment reference count on shared indirect block
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_iblock_incr(H5HF_indirect_t *iblock)
+H5HF__iblock_incr(H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(iblock);
@@ -224,7 +221,7 @@ H5HF_iblock_incr(H5HF_indirect_t *iblock)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_iblock_incr() */
+} /* end H5HF__iblock_incr() */
/*-------------------------------------------------------------------------
@@ -235,7 +232,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
@@ -299,8 +295,8 @@ H5HF__iblock_decr(H5HF_indirect_t *iblock)
} /* end if */
else {
/* Destroy the indirect block */
- if(H5HF_man_iblock_dest(iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block")
+ if(H5HF__man_iblock_dest(iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block")
} /* end else */
} /* end if */
@@ -310,24 +306,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_iblock_dirty
+ * Function: H5HF__iblock_dirty
*
* Purpose: Mark indirect block as dirty
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 21 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_iblock_dirty(H5HF_indirect_t *iblock)
+H5HF__iblock_dirty(H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(iblock);
@@ -338,7 +333,7 @@ H5HF_iblock_dirty(H5HF_indirect_t *iblock)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_iblock_dirty() */
+} /* end H5HF__iblock_dirty() */
/*-------------------------------------------------------------------------
@@ -349,7 +344,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2006
*
*-------------------------------------------------------------------------
@@ -418,7 +412,7 @@ H5HF__man_iblock_root_create(H5HF_hdr_t *hdr, size_t min_dblock_size)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency")
dblock->fd_parent = iblock;
- if(H5HF_man_iblock_attach(iblock, 0, hdr->man_dtable.table_addr) < 0)
+ if(H5HF__man_iblock_attach(iblock, 0, hdr->man_dtable.table_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't attach root direct block to parent indirect block")
/* Check for I/O filters on this heap */
@@ -443,7 +437,7 @@ H5HF__man_iblock_root_create(H5HF_hdr_t *hdr, size_t min_dblock_size)
} /* end if */
/* Start iterator at correct location */
- if(H5HF_hdr_start_iter(hdr, iblock, (hsize_t)(have_direct_block ? hdr->man_dtable.cparam.start_block_size : 0), have_direct_block) < 0)
+ if(H5HF__hdr_start_iter(hdr, iblock, (hsize_t)(have_direct_block ? hdr->man_dtable.cparam.start_block_size : 0), have_direct_block) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize block iterator")
/* Check for skipping over direct blocks, in order to get to large enough block */
@@ -454,7 +448,7 @@ H5HF__man_iblock_root_create(H5HF_hdr_t *hdr, size_t min_dblock_size)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't add skipped blocks to heap's free space")
/* Mark indirect block as modified */
- if(H5HF_iblock_dirty(iblock) < 0)
+ if(H5HF__iblock_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty")
/* Unprotect root indirect block (it's pinned by the iterator though) */
@@ -476,7 +470,7 @@ H5HF__man_iblock_root_create(H5HF_hdr_t *hdr, size_t min_dblock_size)
acc_dblock_free -= hdr->man_dtable.row_tot_dblock_free[0];
/* Extend heap to cover new root indirect block */
- if(H5HF_hdr_adjust_heap(hdr, hdr->man_dtable.row_block_off[nrows], (hssize_t)acc_dblock_free) < 0)
+ if(H5HF__hdr_adjust_heap(hdr, hdr->man_dtable.row_block_off[nrows], (hssize_t)acc_dblock_free) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block")
done:
@@ -492,7 +486,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 17 2006
*
*-------------------------------------------------------------------------
@@ -518,7 +511,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size)
FUNC_ENTER_PACKAGE
/* Get "new block" iterator information */
- if(H5HF_man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
+ if(H5HF__man_iter_curr(&hdr->next_block, &next_row, NULL, &next_entry, &iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve current block iterator location")
next_size = hdr->man_dtable.row_block_size[next_row];
@@ -538,7 +531,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size)
skip_direct_rows = TRUE;
/* Make certain we allocate at least the required row for the block requested */
- min_nrows = 1 + H5HF_dtable_size_to_row(&hdr->man_dtable, min_dblock_size);
+ min_nrows = 1 + H5HF__dtable_size_to_row(&hdr->man_dtable, min_dblock_size);
/* Set the information for the next block, of the appropriate size */
new_next_entry = (min_nrows - 1) * hdr->man_dtable.cparam.width;
@@ -644,7 +637,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size)
} /* end if */
/* Mark indirect block as dirty */
- if(H5HF_iblock_dirty(iblock) < 0)
+ if(H5HF__iblock_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty")
/* Update other shared header info */
@@ -652,7 +645,7 @@ H5HF__man_iblock_root_double(H5HF_hdr_t *hdr, size_t min_dblock_size)
hdr->man_dtable.table_addr = new_addr;
/* Extend heap to cover new root indirect block */
- if(H5HF_hdr_adjust_heap(hdr, 2 * hdr->man_dtable.row_block_off[new_nrows - 1], (hssize_t)acc_dblock_free) < 0)
+ if(H5HF__hdr_adjust_heap(hdr, 2 * hdr->man_dtable.row_block_off[new_nrows - 1], (hssize_t)acc_dblock_free) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block")
done:
@@ -668,7 +661,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jun 12 2006
*
*-------------------------------------------------------------------------
@@ -769,7 +761,7 @@ H5HF__man_iblock_root_halve(H5HF_indirect_t *iblock)
} /* end if */
/* Mark indirect block as dirty */
- if(H5HF_iblock_dirty(iblock) < 0)
+ if(H5HF__iblock_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty")
/* Update other shared header info */
@@ -777,7 +769,7 @@ H5HF__man_iblock_root_halve(H5HF_indirect_t *iblock)
hdr->man_dtable.table_addr = new_addr;
/* Shrink heap to only cover new root indirect block */
- if(H5HF_hdr_adjust_heap(hdr, 2 * hdr->man_dtable.row_block_off[new_nrows - 1], -(hssize_t)acc_dblock_free) < 0)
+ if(H5HF__hdr_adjust_heap(hdr, 2 * hdr->man_dtable.row_block_off[new_nrows - 1], -(hssize_t)acc_dblock_free) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSHRINK, FAIL, "can't reduce space to cover root direct block")
done:
@@ -796,7 +788,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
@@ -856,11 +847,11 @@ H5HF__man_iblock_root_revert(H5HF_indirect_t *root_iblock)
hdr->man_dtable.table_addr = dblock_addr;
/* Reset 'next block' iterator */
- if(H5HF_hdr_reset_iter(hdr, (hsize_t)dblock_size) < 0)
+ if(H5HF__hdr_reset_iter(hdr, (hsize_t)dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't reset block iterator")
/* Extend heap to just cover first direct block */
- if(H5HF_hdr_adjust_heap(hdr, (hsize_t)hdr->man_dtable.cparam.start_block_size, (hssize_t)hdr->man_dtable.row_tot_dblock_free[0]) < 0)
+ if(H5HF__hdr_adjust_heap(hdr, (hsize_t)hdr->man_dtable.cparam.start_block_size, (hssize_t)hdr->man_dtable.row_tot_dblock_free[0]) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTEXTEND, FAIL, "can't increase space to cover root direct block")
/* Scan free space sections to reset any 'parent' pointers */
@@ -886,7 +877,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
@@ -919,11 +909,11 @@ H5HF__man_iblock_alloc_row(H5HF_hdr_t *hdr, H5HF_free_section_t **sec_node)
HGOTO_ERROR(H5E_HEAP, H5E_CANTREVIVE, FAIL, "can't revive indirect section")
/* Get a pointer to the indirect block covering the section */
- if(NULL == (iblock = H5HF_sect_row_get_iblock(old_sec_node)))
+ if(NULL == (iblock = H5HF__sect_row_get_iblock(old_sec_node)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve indirect block for row section")
/* Hold indirect block in memory, until direct block can point to it */
- if(H5HF_iblock_incr(iblock) < 0)
+ if(H5HF__iblock_incr(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
iblock_held = TRUE;
@@ -953,7 +943,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
@@ -986,7 +975,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock,
/* Share common heap information */
iblock->hdr = hdr;
- if(H5HF_hdr_incr(hdr) < 0)
+ if(H5HF__hdr_incr(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header")
/* Set info for indirect block */
@@ -1050,7 +1039,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock,
iblock->par_entry = par_entry;
if(iblock->parent) {
/* Attach new block to parent */
- if(H5HF_man_iblock_attach(iblock->parent, par_entry, *addr_p) < 0)
+ if(H5HF__man_iblock_attach(iblock->parent, par_entry, *addr_p) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't attach indirect block to parent indirect block")
/* Compute the indirect block's offset in the heap's address space */
@@ -1080,7 +1069,7 @@ H5HF__man_iblock_create(H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblock,
done:
if(ret_value < 0)
if(iblock)
- if(H5HF_man_iblock_dest(iblock) < 0)
+ if(H5HF__man_iblock_dest(iblock) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy fractal heap indirect block")
FUNC_LEAVE_NOAPI(ret_value)
@@ -1095,7 +1084,6 @@ done:
* Return: Pointer to indirect block on success, NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 17 2006
*
*-------------------------------------------------------------------------
@@ -1226,7 +1214,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 17 2006
*
*-------------------------------------------------------------------------
@@ -1273,24 +1260,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_man_iblock_attach
+ * Function: H5HF__man_iblock_attach
*
* Purpose: Attach a child block (direct or indirect) to an indirect block
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 30 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_addr)
+H5HF__man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_addr)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1300,7 +1286,7 @@ H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_ad
HDassert(!H5F_addr_defined(iblock->ents[entry].addr));
/* Increment the reference count on this indirect block */
- if(H5HF_iblock_incr(iblock) < 0)
+ if(H5HF__iblock_incr(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
/* Point at the child block */
@@ -1329,12 +1315,12 @@ H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry, haddr_t child_ad
iblock->nchildren++;
/* Mark indirect block as modified */
- if(H5HF_iblock_dirty(iblock) < 0)
+ if(H5HF__iblock_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_man_iblock_attach() */
+} /* end H5HF__man_iblock_attach() */
/*-------------------------------------------------------------------------
@@ -1345,7 +1331,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
@@ -1451,7 +1436,7 @@ H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry)
/* If the indirect block wasn't removed already (by reverting it) */
if(!iblock->removed_from_cache) {
/* Mark indirect block as modified */
- if(H5HF_iblock_dirty(iblock) < 0)
+ if(H5HF__iblock_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark indirect block as dirty")
/* Check for last child being removed from indirect block */
@@ -1551,22 +1536,21 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_man_iblock_entry_addr
+ * Function: H5HF__man_iblock_entry_addr
*
* Purpose: Retrieve the address of an indirect block's child
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry, haddr_t *child_addr)
+H5HF__man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry, haddr_t *child_addr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -1578,7 +1562,7 @@ H5HF_man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry, haddr_t *chi
*child_addr = iblock->ents[entry].addr;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_man_iblock_entry_addr() */
+} /* end H5HF__man_iblock_entry_addr() */
/*-------------------------------------------------------------------------
@@ -1593,7 +1577,6 @@ H5HF_man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry, haddr_t *chi
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 7 2006
*
*-------------------------------------------------------------------------
@@ -1653,7 +1636,7 @@ H5HF__man_iblock_delete(H5HF_hdr_t *hdr, haddr_t iblock_addr,
row_block_size = (hsize_t)hdr->man_dtable.row_block_size[row];
/* Compute # of rows in next child indirect block to use */
- child_nrows = H5HF_dtable_size_to_rows(&hdr->man_dtable, row_block_size);
+ child_nrows = H5HF__dtable_size_to_rows(&hdr->man_dtable, row_block_size);
/* Delete child indirect block */
if(H5HF__man_iblock_delete(hdr, iblock->ents[entry].addr, child_nrows, iblock, entry) < 0)
@@ -1774,7 +1757,6 @@ done:
* Return: Non-negative on success / Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* Jan 14 2018
*
*-------------------------------------------------------------------------
@@ -1799,7 +1781,7 @@ H5HF__man_iblock_parent_info(const H5HF_hdr_t *hdr, hsize_t block_off,
HDassert(ret_entry);
/* Look up row & column for object */
- if(H5HF_dtable_lookup(&hdr->man_dtable, block_off, &row, &col) < 0)
+ if(H5HF__dtable_lookup(&hdr->man_dtable, block_off, &row, &col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of block")
/* Sanity check - first lookup must be an indirect block */
@@ -1823,7 +1805,7 @@ H5HF__man_iblock_parent_info(const H5HF_hdr_t *hdr, hsize_t block_off,
prev_col = col;
/* Look up row & column in new indirect block for object */
- if(H5HF_dtable_lookup(&hdr->man_dtable, (block_off - par_block_off), &row, &col) < 0)
+ if(H5HF__dtable_lookup(&hdr->man_dtable, (block_off - par_block_off), &row, &col) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of block")
} /* end while */
@@ -1841,24 +1823,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_man_iblock_dest
+ * Function: H5HF__man_iblock_dest
*
* Purpose: Destroys a fractal heap indirect block in memory.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iblock_dest(H5HF_indirect_t *iblock)
+H5HF__man_iblock_dest(H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1868,7 +1849,7 @@ H5HF_man_iblock_dest(H5HF_indirect_t *iblock)
/* Decrement reference count on shared info */
HDassert(iblock->hdr);
- if(H5HF_hdr_decr(iblock->hdr) < 0)
+ if(H5HF__hdr_decr(iblock->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
if(iblock->parent)
if(H5HF__iblock_decr(iblock->parent) < 0)
@@ -1887,5 +1868,5 @@ H5HF_man_iblock_dest(H5HF_indirect_t *iblock)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_man_iblock_dest() */
+} /* end H5HF__man_iblock_dest() */
diff --git a/src/H5HFiter.c b/src/H5HFiter.c
index ceebc3b..43cb76a 100644
--- a/src/H5HFiter.c
+++ b/src/H5HFiter.c
@@ -15,7 +15,7 @@
*
* Created: H5HFiter.c
* Apr 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Block iteration routines for fractal heaps.
*
@@ -77,7 +77,7 @@ H5FL_DEFINE(H5HF_block_loc_t);
/*-------------------------------------------------------------------------
- * Function: H5HF_man_iter_init
+ * Function: H5HF__man_iter_init
*
* Purpose: Initialize a block iterator for walking over all the blocks
* in a fractal heap. (initialization finishes when iterator is
@@ -86,15 +86,14 @@ H5FL_DEFINE(H5HF_block_loc_t);
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iter_init(H5HF_block_iter_t *biter)
+H5HF__man_iter_init(H5HF_block_iter_t *biter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -105,7 +104,7 @@ H5HF_man_iter_init(H5HF_block_iter_t *biter)
HDmemset(biter, 0, sizeof(H5HF_block_iter_t));
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_man_iter_init() */
+} /* end H5HF__man_iter_init() */
/*-------------------------------------------------------------------------
@@ -117,7 +116,6 @@ H5HF_man_iter_init(H5HF_block_iter_t *biter)
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
@@ -223,7 +221,7 @@ H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
biter->curr->context = iblock;
/* Hold the indirect block with the location */
- if(H5HF_iblock_incr(biter->curr->context) < 0)
+ if(H5HF__iblock_incr(biter->curr->context) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
/* Release the current indirect block */
@@ -265,22 +263,21 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_man_iter_set_entry
+ * Function: H5HF__man_iter_set_entry
*
* Purpose: Set the current entry for the iterator
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iter_set_entry(const H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned entry)
+H5HF__man_iter_set_entry(const H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned entry)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -293,11 +290,11 @@ H5HF_man_iter_set_entry(const H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigne
biter->curr->col = entry % hdr->man_dtable.cparam.width;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_man_iter_set_entry() */
+} /* end H5HF__man_iter_set_entry() */
/*-------------------------------------------------------------------------
- * Function: H5HF_man_iter_start_entry
+ * Function: H5HF__man_iter_start_entry
*
* Purpose: Initialize a block iterator to a particular location within
* an indirect block
@@ -305,19 +302,18 @@ H5HF_man_iter_set_entry(const H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigne
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
+H5HF__man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
H5HF_indirect_t *iblock, unsigned start_entry)
{
H5HF_block_loc_t *new_loc = NULL; /* Pointer to new block location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -339,7 +335,7 @@ H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
new_loc->up = NULL;
/* Increment reference count on indirect block */
- if(H5HF_iblock_incr(new_loc->context) < 0)
+ if(H5HF__iblock_incr(new_loc->context) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
/* Make new location the current location */
@@ -353,11 +349,11 @@ done:
new_loc = H5FL_FREE(H5HF_block_loc_t, new_loc);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_man_iter_start_entry() */
+} /* end H5HF__man_iter_start_entry() */
/*-------------------------------------------------------------------------
- * Function: H5HF_man_iter_reset
+ * Function: H5HF__man_iter_reset
*
* Purpose: Reset a block iterator to it's initial state, freeing any
* location context it currently has
@@ -365,17 +361,16 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iter_reset(H5HF_block_iter_t *biter)
+H5HF__man_iter_reset(H5HF_block_iter_t *biter)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -414,26 +409,25 @@ H5HF_man_iter_reset(H5HF_block_iter_t *biter)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_man_iter_reset() */
+} /* end H5HF__man_iter_reset() */
/*-------------------------------------------------------------------------
- * Function: H5HF_man_iter_next
+ * Function: H5HF__man_iter_next
*
* Purpose: Advance to the next block within the current block of the heap
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned nentries)
+H5HF__man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned nentries)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -450,29 +444,28 @@ H5HF_man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, unsigned nentries)
/* HDassert(biter->curr->row <= biter->curr->context->nrows); */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_man_iter_next() */
+} /* end H5HF__man_iter_next() */
/*-------------------------------------------------------------------------
- * Function: H5HF_man_iter_up
+ * Function: H5HF__man_iter_up
*
* Purpose: Move iterator up one level
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iter_up(H5HF_block_iter_t *biter)
+H5HF__man_iter_up(H5HF_block_iter_t *biter)
{
H5HF_block_loc_t *up_loc; /* Pointer to 'up' block location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -498,29 +491,28 @@ H5HF_man_iter_up(H5HF_block_iter_t *biter)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_man_iter_up() */
+} /* end H5HF__man_iter_up() */
/*-------------------------------------------------------------------------
- * Function: H5HF_man_iter_down
+ * Function: H5HF__man_iter_down
*
* Purpose: Move iterator down one level
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock)
+H5HF__man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock)
{
H5HF_block_loc_t *down_loc = NULL; /* Pointer to new 'down' block location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -542,7 +534,7 @@ H5HF_man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock)
down_loc->up = biter->curr;
/* Increment reference count on indirect block */
- if(H5HF_iblock_incr(down_loc->context) < 0)
+ if(H5HF__iblock_incr(down_loc->context) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
/* Make down location the current location */
@@ -553,27 +545,26 @@ done:
down_loc = H5FL_FREE(H5HF_block_loc_t, down_loc);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_man_iter_down() */
+} /* end H5HF__man_iter_down() */
/*-------------------------------------------------------------------------
- * Function: H5HF_man_iter_curr
+ * Function: H5HF__man_iter_curr
*
* Purpose: Retrieve information about the current block iterator location
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
+H5HF__man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
unsigned *entry, H5HF_indirect_t **block)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -592,66 +583,25 @@ H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
*block = biter->curr->context;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_man_iter_curr() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5HF_man_iter_offset
- *
- * Purpose: Retrieve offset of iterator in heap
- *
- * Return: SUCCEED/FAIL
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Apr 25 2006
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5HF_man_iter_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter, hsize_t *offset)
-{
- hsize_t curr_offset; /* For computing offset in heap */
-
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- /*
- * Check arguments.
- */
- HDassert(biter);
- HDassert(biter->ready);
- HDassert(biter->curr->context);
- HDassert(offset);
-
- /* Compute the offset in the heap */
- curr_offset = biter->curr->context->block_off;
- curr_offset += hdr->man_dtable.row_block_off[biter->curr->row];
- curr_offset += biter->curr->col * hdr->man_dtable.row_block_size[biter->curr->row];
-
- /* Assign the return value */
- *offset = curr_offset;
-
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_man_iter_offset() */
+} /* end H5HF__man_iter_curr() */
/*-------------------------------------------------------------------------
- * Function: H5HF_man_iter_ready
+ * Function: H5HF__man_iter_ready
*
* Purpose: Query if iterator is ready to use
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 25 2006
*
*-------------------------------------------------------------------------
*/
hbool_t
-H5HF_man_iter_ready(H5HF_block_iter_t *biter)
+H5HF__man_iter_ready(H5HF_block_iter_t *biter)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -659,5 +609,5 @@ H5HF_man_iter_ready(H5HF_block_iter_t *biter)
HDassert(biter);
FUNC_LEAVE_NOAPI(biter->ready)
-} /* end H5HF_man_iter_ready() */
+} /* end H5HF__man_iter_ready() */
diff --git a/src/H5HFman.c b/src/H5HFman.c
index ea00546..7a2f93c 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -15,7 +15,7 @@
*
* Created: H5HFman.c
* Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: "Managed" object routines for fractal heaps.
*
@@ -97,7 +97,6 @@ static herr_t H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id,
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 13 2006
*
*-------------------------------------------------------------------------
@@ -154,7 +153,7 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
HDassert(sec_node->sect_info.state == H5FS_SECT_LIVE);
/* Retrieve direct block address from section */
- if(H5HF_sect_single_dblock_info(hdr, sec_node, &dblock_addr, &dblock_size) < 0)
+ if(H5HF__sect_single_dblock_info(hdr, sec_node, &dblock_addr, &dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information")
/* Lock direct block */
@@ -197,7 +196,7 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
hdr->man_nobjs++;
/* Reduce space available in heap (marks header dirty) */
- if(H5HF_hdr_adj_free(hdr, -(ssize_t)obj_size) < 0)
+ if(H5HF__hdr_adj_free(hdr, -(ssize_t)obj_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't adjust free space for heap")
done:
@@ -215,22 +214,22 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_man_get_obj_len
+ * Function: H5HF__man_get_obj_len
*
* Purpose: Get the size of a managed heap object
*
* Return: SUCCEED (Can't fail)
*
- * Programmer: Dana Robinson (derobins@hdfgroup.org)
+ * Programmer: Dana Robinson
* August 2012
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_man_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
+H5HF__man_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -249,7 +248,7 @@ H5HF_man_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
UINT64DECODE_VAR(id, *obj_len_p, hdr->heap_len_size);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_man_get_obj_len() */
+} /* end H5HF__man_get_obj_len() */
/*-------------------------------------------------------------------------
@@ -260,7 +259,6 @@ H5HF_man_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
* Return: SUCCEED (Can't fail)
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 20 2015
*
*-------------------------------------------------------------------------
@@ -296,7 +294,6 @@ H5HF__man_get_obj_off(const H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 17 2006
*
*-------------------------------------------------------------------------
@@ -445,7 +442,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 17 2006
*
*-------------------------------------------------------------------------
@@ -465,7 +461,7 @@ H5HF__man_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
HDassert(obj);
/* Call the internal 'op' routine routine */
- if(H5HF__man_op_real(hdr, id, H5HF_op_read, obj, 0) < 0)
+ if(H5HF__man_op_real(hdr, id, H5HF__op_read, obj, 0) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object")
done:
@@ -481,7 +477,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 18 2006
*
*-------------------------------------------------------------------------
@@ -502,7 +497,7 @@ H5HF__man_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj)
/* Call the internal 'op' routine routine */
/* (Casting away const OK - QAK) */
- if(H5HF__man_op_real(hdr, id, H5HF_op_write, (void *)obj, H5HF_OP_MODIFY) < 0)
+ if(H5HF__man_op_real(hdr, id, H5HF__op_write, (void *)obj, H5HF_OP_MODIFY) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object")
done:
@@ -518,7 +513,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sept 11 2006
*
*-------------------------------------------------------------------------
@@ -554,7 +548,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 15 2006
*
*-------------------------------------------------------------------------
@@ -643,7 +636,7 @@ H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id)
HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "object overruns end of direct block")
/* Create free space section node */
- if(NULL == (sec_node = H5HF_sect_single_new(obj_off, obj_len, iblock, dblock_entry)))
+ if(NULL == (sec_node = H5HF__sect_single_new(obj_off, obj_len, iblock, dblock_entry)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create section for direct block's free space")
/* Unlock indirect block */
@@ -654,7 +647,7 @@ H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id)
} /* end if */
/* Increase space available in heap (marks header dirty) */
- if(H5HF_hdr_adj_free(hdr, (ssize_t)obj_len) < 0)
+ if(H5HF__hdr_adj_free(hdr, (ssize_t)obj_len) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't adjust free space for heap")
/* Update statistics about heap */
diff --git a/src/H5HFmodule.h b/src/H5HFmodule.h
index dd6576a..0334673 100644
--- a/src/H5HFmodule.h
+++ b/src/H5HFmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h
index 83e46fc..5324bc4 100644
--- a/src/H5HFpkg.h
+++ b/src/H5HFpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, February 24, 2006
*
* Purpose: This file contains declarations which are visible only within
@@ -220,9 +220,6 @@ typedef struct H5HF_dtable_t {
/* Fractal heap free list info (forward decl - defined in H5HFflist.c) */
typedef struct H5HF_freelist_t H5HF_freelist_t;
-/* Forward decl indirect block info */
-typedef struct H5HF_indirect_t H5HF_indirect_t;
-
/* Fractal heap block location */
typedef struct H5HF_block_loc_t {
/* Necessary table fields */
@@ -293,7 +290,7 @@ typedef struct H5HF_free_section_t {
/* (Each fractal heap header has certain information that is shared across all
* the instances of blocks in that fractal heap)
*/
-typedef struct H5HF_hdr_t {
+struct H5HF_hdr_t {
/* Information for H5AC cache functions, _must_ be first field in structure */
H5AC_info_t cache_info;
@@ -358,7 +355,7 @@ typedef struct H5HF_hdr_t {
uint8_t heap_off_size; /* Size of heap offsets (in bytes) */
uint8_t heap_len_size; /* Size of heap ID lengths (in bytes) */
hbool_t checked_filters; /* TRUE if pipeline passes can_apply checks */
-} H5HF_hdr_t;
+};
/* Common indirect block doubling table entry */
/* (common between entries pointing to direct & indirect child blocks) */
@@ -606,46 +603,45 @@ H5FL_BLK_EXTERN(direct_block);
/******************************/
/* Doubling table routines */
-H5_DLL herr_t H5HF_dtable_init(H5HF_dtable_t *dtable);
-H5_DLL herr_t H5HF_dtable_dest(H5HF_dtable_t *dtable);
-H5_DLL herr_t H5HF_dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off,
+H5_DLL herr_t H5HF__dtable_init(H5HF_dtable_t *dtable);
+H5_DLL herr_t H5HF__dtable_dest(H5HF_dtable_t *dtable);
+H5_DLL herr_t H5HF__dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off,
unsigned *row, unsigned *col);
-H5_DLL unsigned H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size);
-H5_DLL unsigned H5HF_dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size);
-H5_DLL hsize_t H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
+H5_DLL unsigned H5HF__dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size);
+H5_DLL unsigned H5HF__dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size);
+H5_DLL hsize_t H5HF__dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
unsigned start_col, unsigned num_entries);
/* Heap header routines */
-H5_DLL H5HF_hdr_t * H5HF_hdr_alloc(H5F_t *f);
-H5_DLL haddr_t H5HF_hdr_create(H5F_t *f, const H5HF_create_t *cparam);
+H5_DLL H5HF_hdr_t * H5HF__hdr_alloc(H5F_t *f);
+H5_DLL haddr_t H5HF__hdr_create(H5F_t *f, const H5HF_create_t *cparam);
H5_DLL H5HF_hdr_t *H5HF__hdr_protect(H5F_t *f, haddr_t addr, unsigned flags);
-H5_DLL herr_t H5HF_hdr_finish_init_phase1(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_finish_init_phase2(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_finish_init(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_incr(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_decr(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_fuse_incr(H5HF_hdr_t *hdr);
-H5_DLL size_t H5HF_hdr_fuse_decr(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_dirty(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt);
-H5_DLL herr_t H5HF_hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free);
-H5_DLL herr_t H5HF_hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size);
-H5_DLL herr_t H5HF_hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off, unsigned curr_entry);
+H5_DLL herr_t H5HF__hdr_finish_init_phase1(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF__hdr_finish_init_phase2(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF__hdr_finish_init(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF__hdr_incr(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF__hdr_decr(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF__hdr_fuse_incr(H5HF_hdr_t *hdr);
+H5_DLL size_t H5HF__hdr_fuse_decr(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF__hdr_dirty(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF__hdr_adj_free(H5HF_hdr_t *hdr, ssize_t amt);
+H5_DLL herr_t H5HF__hdr_adjust_heap(H5HF_hdr_t *hdr, hsize_t new_size, hssize_t extra_free);
+H5_DLL herr_t H5HF__hdr_inc_alloc(H5HF_hdr_t *hdr, size_t alloc_size);
+H5_DLL herr_t H5HF__hdr_start_iter(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, hsize_t curr_off, unsigned curr_entry);
H5_DLL herr_t H5HF__hdr_skip_blocks(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock,
unsigned start_entry, unsigned nentries);
H5_DLL herr_t H5HF__hdr_update_iter(H5HF_hdr_t *hdr, size_t min_dblock_size);
-H5_DLL herr_t H5HF_hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries);
+H5_DLL herr_t H5HF__hdr_inc_iter(H5HF_hdr_t *hdr, hsize_t adv_size, unsigned nentries);
H5_DLL herr_t H5HF__hdr_reverse_iter(H5HF_hdr_t *hdr, haddr_t dblock_addr);
-H5_DLL herr_t H5HF_hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off);
+H5_DLL herr_t H5HF__hdr_reset_iter(H5HF_hdr_t *hdr, hsize_t curr_off);
H5_DLL herr_t H5HF__hdr_empty(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_free(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF__hdr_free(H5HF_hdr_t *hdr);
H5_DLL herr_t H5HF__hdr_delete(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_hdr_dest(H5HF_hdr_t *hdr);
/* Indirect block routines */
-H5_DLL herr_t H5HF_iblock_incr(H5HF_indirect_t *iblock);
+H5_DLL herr_t H5HF__iblock_incr(H5HF_indirect_t *iblock);
H5_DLL herr_t H5HF__iblock_decr(H5HF_indirect_t *iblock);
-H5_DLL herr_t H5HF_iblock_dirty(H5HF_indirect_t *iblock);
+H5_DLL herr_t H5HF__iblock_dirty(H5HF_indirect_t *iblock);
H5_DLL herr_t H5HF__man_iblock_root_create(H5HF_hdr_t *hdr,
size_t min_dblock_size);
H5_DLL herr_t H5HF__man_iblock_root_double(H5HF_hdr_t *hdr,
@@ -659,10 +655,10 @@ H5_DLL H5HF_indirect_t *H5HF__man_iblock_protect(H5HF_hdr_t *hdr, haddr_t iblock
hbool_t must_protect, unsigned flags, hbool_t *did_protect);
H5_DLL herr_t H5HF__man_iblock_unprotect(H5HF_indirect_t *iblock, unsigned cache_flags,
hbool_t did_protect);
-H5_DLL herr_t H5HF_man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry,
+H5_DLL herr_t H5HF__man_iblock_attach(H5HF_indirect_t *iblock, unsigned entry,
haddr_t dblock_addr);
H5_DLL herr_t H5HF__man_iblock_detach(H5HF_indirect_t *iblock, unsigned entry);
-H5_DLL herr_t H5HF_man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry,
+H5_DLL herr_t H5HF__man_iblock_entry_addr(H5HF_indirect_t *iblock, unsigned entry,
haddr_t *child_addr);
H5_DLL herr_t H5HF__man_iblock_delete(H5HF_hdr_t *hdr, haddr_t iblock_addr,
unsigned iblock_nrows, H5HF_indirect_t *par_iblock, unsigned par_entry);
@@ -670,7 +666,7 @@ H5_DLL herr_t H5HF__man_iblock_size(H5F_t *f, H5HF_hdr_t *hdr,
haddr_t iblock_addr, unsigned nrows, H5HF_indirect_t *par_iblock, unsigned par_entry, hsize_t *heap_size/*out*/);
H5_DLL herr_t H5HF__man_iblock_parent_info(const H5HF_hdr_t *hdr,
hsize_t block_off, hsize_t *ret_par_block_off, unsigned *ret_entry);
-H5_DLL herr_t H5HF_man_iblock_dest(H5HF_indirect_t *iblock);
+H5_DLL herr_t H5HF__man_iblock_dest(H5HF_indirect_t *iblock);
/* Direct block routines */
H5_DLL herr_t H5HF__man_dblock_new(H5HF_hdr_t *fh, size_t request,
@@ -688,12 +684,12 @@ H5_DLL herr_t H5HF__man_dblock_locate(H5HF_hdr_t *hdr, hsize_t obj_off,
unsigned flags);
H5_DLL herr_t H5HF__man_dblock_delete(H5F_t *f, haddr_t dblock_addr,
hsize_t dblock_size);
-H5_DLL herr_t H5HF_man_dblock_dest(H5HF_direct_t *dblock);
+H5_DLL herr_t H5HF__man_dblock_dest(H5HF_direct_t *dblock);
/* Managed object routines */
H5_DLL herr_t H5HF__man_insert(H5HF_hdr_t *fh, size_t obj_size,
const void *obj, void *id);
-H5_DLL herr_t H5HF_man_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id,
+H5_DLL herr_t H5HF__man_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id,
size_t *obj_len_p);
H5_DLL void H5HF__man_get_obj_off(const H5HF_hdr_t *hdr, const uint8_t *id,
hsize_t *obj_off_p);
@@ -704,7 +700,7 @@ H5_DLL herr_t H5HF__man_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t o
H5_DLL herr_t H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id);
/* 'Huge' object routines */
-H5_DLL herr_t H5HF_huge_init(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF__huge_init(H5HF_hdr_t *hdr);
H5_DLL herr_t H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size,
void *obj, void *id);
H5_DLL herr_t H5HF__huge_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id,
@@ -731,46 +727,32 @@ H5_DLL herr_t H5HF__huge_bt2_filt_dir_found(const void *nrecord, void *op_data);
H5_DLL herr_t H5HF__huge_bt2_filt_dir_remove(const void *nrecord, void *op_data);
/* 'Tiny' object routines */
-H5_DLL herr_t H5HF_tiny_init(H5HF_hdr_t *hdr);
-H5_DLL herr_t H5HF_tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj,
+H5_DLL herr_t H5HF__tiny_init(H5HF_hdr_t *hdr);
+H5_DLL herr_t H5HF__tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj,
void *id);
-H5_DLL herr_t H5HF_tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id,
+H5_DLL herr_t H5HF__tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id,
size_t *obj_len_p);
-H5_DLL herr_t H5HF_tiny_read(H5HF_hdr_t *fh, const uint8_t *id, void *obj);
-H5_DLL herr_t H5HF_tiny_op(H5HF_hdr_t *hdr, const uint8_t *id,
+H5_DLL herr_t H5HF__tiny_read(H5HF_hdr_t *fh, const uint8_t *id, void *obj);
+H5_DLL herr_t H5HF__tiny_op(H5HF_hdr_t *hdr, const uint8_t *id,
H5HF_operator_t op, void *op_data);
-H5_DLL herr_t H5HF_tiny_remove(H5HF_hdr_t *fh, const uint8_t *id);
-
-/* Debugging routines for dumping file structures */
-H5_DLL void H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal,
- FILE *stream, int indent, int fwidth);
-H5_DLL herr_t H5HF_hdr_debug(H5F_t *f, haddr_t addr,
- FILE *stream, int indent, int fwidth);
-H5_DLL herr_t H5HF_dblock_debug(H5F_t *f, haddr_t addr,
- FILE *stream, int indent, int fwidth, haddr_t hdr_addr, size_t nrec);
-H5_DLL void H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal,
- FILE *stream, int indent, int fwidth);
-H5_DLL herr_t H5HF_iblock_debug(H5F_t *f, haddr_t addr,
- FILE *stream, int indent, int fwidth, haddr_t hdr_addr, unsigned nrows);
+H5_DLL herr_t H5HF__tiny_remove(H5HF_hdr_t *fh, const uint8_t *id);
/* Block iteration routines */
-H5_DLL herr_t H5HF_man_iter_init(H5HF_block_iter_t *biter);
+H5_DLL herr_t H5HF__man_iter_init(H5HF_block_iter_t *biter);
H5_DLL herr_t H5HF__man_iter_start_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
hsize_t offset);
-H5_DLL herr_t H5HF_man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
+H5_DLL herr_t H5HF__man_iter_start_entry(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
H5HF_indirect_t *iblock, unsigned start_entry);
-H5_DLL herr_t H5HF_man_iter_set_entry(const H5HF_hdr_t *hdr,
+H5_DLL herr_t H5HF__man_iter_set_entry(const H5HF_hdr_t *hdr,
H5HF_block_iter_t *biter, unsigned entry);
-H5_DLL herr_t H5HF_man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
+H5_DLL herr_t H5HF__man_iter_next(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
unsigned nentries);
-H5_DLL herr_t H5HF_man_iter_up(H5HF_block_iter_t *biter);
-H5_DLL herr_t H5HF_man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock);
-H5_DLL herr_t H5HF_man_iter_reset(H5HF_block_iter_t *biter);
-H5_DLL herr_t H5HF_man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
+H5_DLL herr_t H5HF__man_iter_up(H5HF_block_iter_t *biter);
+H5_DLL herr_t H5HF__man_iter_down(H5HF_block_iter_t *biter, H5HF_indirect_t *iblock);
+H5_DLL herr_t H5HF__man_iter_reset(H5HF_block_iter_t *biter);
+H5_DLL herr_t H5HF__man_iter_curr(H5HF_block_iter_t *biter, unsigned *row, unsigned *col,
unsigned *entry, H5HF_indirect_t **block);
-H5_DLL herr_t H5HF_man_iter_offset(H5HF_hdr_t *hdr, H5HF_block_iter_t *biter,
- hsize_t *offset);
-H5_DLL hbool_t H5HF_man_iter_ready(H5HF_block_iter_t *biter);
+H5_DLL hbool_t H5HF__man_iter_ready(H5HF_block_iter_t *biter);
/* Free space manipulation routines */
H5_DLL herr_t H5HF__space_start(H5HF_hdr_t *hdr, hbool_t may_create);
@@ -789,24 +771,24 @@ H5_DLL herr_t H5HF__space_sect_change_class(H5HF_hdr_t *hdr,
H5HF_free_section_t *sect, uint16_t new_class);
/* Free space section routines */
-H5_DLL H5HF_free_section_t *H5HF_sect_single_new(hsize_t sect_off,
+H5_DLL H5HF_free_section_t *H5HF__sect_single_new(hsize_t sect_off,
size_t sect_size, H5HF_indirect_t *parent, unsigned par_entry);
H5_DLL herr_t H5HF__sect_single_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect);
-H5_DLL herr_t H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr,
+H5_DLL herr_t H5HF__sect_single_dblock_info(H5HF_hdr_t *hdr,
const H5HF_free_section_t *sect, haddr_t *dblock_addr, size_t *dblock_size);
H5_DLL herr_t H5HF__sect_single_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
size_t amt);
H5_DLL herr_t H5HF__sect_row_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect);
H5_DLL herr_t H5HF__sect_row_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
unsigned *entry_p);
-H5_DLL H5HF_indirect_t *H5HF_sect_row_get_iblock(H5HF_free_section_t *sect);
+H5_DLL H5HF_indirect_t *H5HF__sect_row_get_iblock(H5HF_free_section_t *sect);
H5_DLL herr_t H5HF__sect_indirect_add(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock,
unsigned start_entry, unsigned nentries);
H5_DLL herr_t H5HF__sect_single_free(H5FS_section_info_t *sect);
/* Internal operator callbacks */
-H5_DLL herr_t H5HF_op_read(const void *obj, size_t obj_len, void *op_data);
-H5_DLL herr_t H5HF_op_write(const void *obj, size_t obj_len, void *op_data);
+H5_DLL herr_t H5HF__op_read(const void *obj, size_t obj_len, void *op_data);
+H5_DLL herr_t H5HF__op_write(const void *obj, size_t obj_len, void *op_data);
/* Testing routines */
#ifdef H5HF_TESTING
diff --git a/src/H5HFprivate.h b/src/H5HFprivate.h
index 4eec1c1..4919b90 100644
--- a/src/H5HFprivate.h
+++ b/src/H5HFprivate.h
@@ -15,7 +15,7 @@
*
* Created: H5HFprivate.h
* Feb 24 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Private header for library accessible fractal heap routines.
*
@@ -86,8 +86,10 @@ typedef struct H5HF_stat_t {
hsize_t tiny_nobjs; /* Number of 'tiny' objects in heap */
} H5HF_stat_t;
-/* Fractal heap info (forward decl - defined in H5HFpkg.h) */
+/* Fractal heap info (forward decls - defined in H5HFpkg.h) */
typedef struct H5HF_t H5HF_t;
+typedef struct H5HF_hdr_t H5HF_hdr_t;
+typedef struct H5HF_indirect_t H5HF_indirect_t;
/* Typedef for 'op' operations */
typedef herr_t (*H5HF_operator_t)(const void *obj/*in*/, size_t obj_len,
@@ -128,5 +130,17 @@ H5_DLL herr_t H5HF_id_print(H5HF_t *fh, const void *id, FILE *stream, int indent
H5_DLL herr_t H5HF_sects_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth);
#endif /* H5HF_DEBUGGING */
+/* Debugging routines for dumping file structures */
+H5_DLL void H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal,
+ FILE *stream, int indent, int fwidth);
+H5_DLL herr_t H5HF_hdr_debug(H5F_t *f, haddr_t addr,
+ FILE *stream, int indent, int fwidth);
+H5_DLL herr_t H5HF_dblock_debug(H5F_t *f, haddr_t addr,
+ FILE *stream, int indent, int fwidth, haddr_t hdr_addr, size_t nrec);
+H5_DLL void H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal,
+ FILE *stream, int indent, int fwidth);
+H5_DLL herr_t H5HF_iblock_debug(H5F_t *f, haddr_t addr,
+ FILE *stream, int indent, int fwidth, haddr_t hdr_addr, unsigned nrows);
+
#endif /* _H5HFprivate_H */
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index a0f984b..b2d1e3c 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Monday, May 1, 2006
*
* Purpose: Free space section routines for fractal heaps
@@ -68,12 +68,12 @@ typedef struct {
/********************/
/* Shared routines */
-static herr_t H5HF_sect_init_cls(H5FS_section_class_t *cls,
+static herr_t H5FS__sect_init_cls(H5FS_section_class_t *cls,
H5HF_hdr_t *hdr);
-static herr_t H5HF_sect_term_cls(H5FS_section_class_t *cls);
-static H5HF_free_section_t *H5HF_sect_node_new(unsigned sect_type,
+static herr_t H5FS__sect_term_cls(H5FS_section_class_t *cls);
+static H5HF_free_section_t *H5FS__sect_node_new(unsigned sect_type,
haddr_t sect_addr, hsize_t sect_size, H5FS_section_state_t state);
-static herr_t H5HF_sect_node_free(H5HF_free_section_t *sect,
+static herr_t H5HF__sect_node_free(H5HF_free_section_t *sect,
H5HF_indirect_t *parent);
/* 'single' section routines */
@@ -99,12 +99,12 @@ static herr_t H5HF__sect_single_valid(const H5FS_section_class_t *cls,
const H5FS_section_info_t *sect);
/* 'row' section routines */
-static H5HF_free_section_t *H5HF_sect_row_create(haddr_t sect_off,
+static H5HF_free_section_t *H5HF__sect_row_create(haddr_t sect_off,
hsize_t sect_size, hbool_t is_first, unsigned row, unsigned col,
unsigned nentries, H5HF_free_section_t *under_sect);
static herr_t H5HF__sect_row_first(H5HF_hdr_t *hdr, H5HF_free_section_t *sect);
static herr_t H5HF__sect_row_parent_removed(H5HF_free_section_t *sect);
-static herr_t H5HF_sect_row_from_single(H5HF_hdr_t *hdr,
+static herr_t H5HF__sect_row_from_single(H5HF_hdr_t *hdr,
H5HF_free_section_t *sect, H5HF_direct_t *dblock);
static herr_t H5HF__sect_row_free_real(H5HF_free_section_t *sect);
@@ -131,7 +131,7 @@ static herr_t H5HF__sect_row_debug(const H5FS_section_info_t *sect,
FILE *stream, int indent, int fwidth);
/* 'indirect' section routines */
-static H5HF_free_section_t *H5HF_sect_indirect_new(H5HF_hdr_t *hdr,
+static H5HF_free_section_t *H5HF__sect_indirect_new(H5HF_hdr_t *hdr,
haddr_t sect_off, hsize_t sect_size,
H5HF_indirect_t *iblock, hsize_t iblock_off,
unsigned row, unsigned col, unsigned nentries);
@@ -139,9 +139,9 @@ static herr_t H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t
hbool_t first_child, H5HF_free_section_t **first_row_sect,
unsigned space_flags, unsigned start_row, unsigned start_col,
unsigned end_row, unsigned end_col);
-static H5HF_free_section_t *H5HF_sect_indirect_for_row(H5HF_hdr_t *hdr,
+static H5HF_free_section_t *H5HF__sect_indirect_for_row(H5HF_hdr_t *hdr,
H5HF_indirect_t *iblock, H5HF_free_section_t *row_sect);
-static herr_t H5HF_sect_indirect_decr(H5HF_free_section_t *sect);
+static herr_t H5HF__sect_indirect_decr(H5HF_free_section_t *sect);
static herr_t H5HF__sect_indirect_revive_row(H5HF_hdr_t *hdr,
H5HF_free_section_t *sect);
static herr_t H5HF__sect_indirect_revive(H5HF_hdr_t *hdr,
@@ -152,28 +152,28 @@ static herr_t H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr,
H5HF_free_section_t *sect, unsigned child_entry);
static herr_t H5HF__sect_indirect_first(H5HF_hdr_t *hdr,
H5HF_free_section_t *sect);
-static hbool_t H5HF_sect_indirect_is_first(H5HF_free_section_t *sect);
-static H5HF_indirect_t * H5HF_sect_indirect_get_iblock(H5HF_free_section_t *sect);
-static hsize_t H5HF_sect_indirect_iblock_off(const H5HF_free_section_t *sect);
-static H5HF_free_section_t * H5HF_sect_indirect_top(H5HF_free_section_t *sect);
+static hbool_t H5HF__sect_indirect_is_first(H5HF_free_section_t *sect);
+static H5HF_indirect_t * H5HF__sect_indirect_get_iblock(H5HF_free_section_t *sect);
+static hsize_t H5HF__sect_indirect_iblock_off(const H5HF_free_section_t *sect);
+static H5HF_free_section_t *H5HF__sect_indirect_top(H5HF_free_section_t *sect);
static herr_t H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr,
H5HF_free_section_t *sect1, H5HF_free_section_t *sect2);
static herr_t H5HF__sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect);
static herr_t H5HF__sect_indirect_shrink(H5HF_hdr_t *hdr,
H5HF_free_section_t *sect);
-static herr_t H5HF_sect_indirect_serialize(H5HF_hdr_t *hdr,
+static herr_t H5HF__sect_indirect_serialize(H5HF_hdr_t *hdr,
const H5HF_free_section_t *sect, uint8_t *buf);
static H5FS_section_info_t *H5HF__sect_indirect_deserialize(H5HF_hdr_t *hdr,
const uint8_t *buf, haddr_t sect_addr, hsize_t sect_size, unsigned *des_flags);
-static herr_t H5HF_sect_indirect_free(H5HF_free_section_t *sect);
-static herr_t H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr,
+static herr_t H5HF__sect_indirect_free(H5HF_free_section_t *sect);
+static herr_t H5HF__sect_indirect_valid(const H5HF_hdr_t *hdr,
const H5HF_free_section_t *sect);
-static herr_t H5HF_sect_indirect_debug(const H5HF_free_section_t *sect,
+static herr_t H5HF__sect_indirect_debug(const H5HF_free_section_t *sect,
FILE *stream, int indent, int fwidth);
/* 'indirect' section callbacks */
-static herr_t H5HF_sect_indirect_init_cls(H5FS_section_class_t *cls, void *udata);
-static herr_t H5HF_sect_indirect_term_cls(H5FS_section_class_t *cls);
+static herr_t H5HF__sect_indirect_init_cls(H5FS_section_class_t *cls, void *udata);
+static herr_t H5HF__sect_indirect_term_cls(H5FS_section_class_t *cls);
/*********************/
@@ -273,8 +273,8 @@ H5FS_section_class_t H5HF_FSPACE_SECT_CLS_INDIRECT[1] = {{
NULL, /* Class private info */
/* Class methods */
- H5HF_sect_indirect_init_cls, /* Initialize section class */
- H5HF_sect_indirect_term_cls, /* Terminate section class */
+ H5HF__sect_indirect_init_cls, /* Initialize section class */
+ H5HF__sect_indirect_term_cls, /* Terminate section class */
/* Object methods */
NULL, /* Add section */
@@ -306,7 +306,7 @@ H5FL_DEFINE(H5HF_free_section_t);
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_init_cls
+ * Function: H5FS__sect_init_cls
*
* Purpose: Initialize the common class structure
*
@@ -319,12 +319,12 @@ H5FL_DEFINE(H5HF_free_section_t);
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_init_cls(H5FS_section_class_t *cls, H5HF_hdr_t *hdr)
+H5FS__sect_init_cls(H5FS_section_class_t *cls, H5HF_hdr_t *hdr)
{
H5HF_sect_private_t *cls_prvt; /* Pointer to class private info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments. */
HDassert(cls);
@@ -339,16 +339,16 @@ H5HF_sect_init_cls(H5FS_section_class_t *cls, H5HF_hdr_t *hdr)
cls->cls_private = cls_prvt;
/* Increment reference count on heap header */
- if(H5HF_hdr_incr(hdr) < 0)
+ if(H5HF__hdr_incr(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared heap header")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_init_cls() */
+} /* H5FS__sect_init_cls() */
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_term_cls
+ * Function: H5FS__sect_term_cls
*
* Purpose: Terminate the common class structure
*
@@ -361,12 +361,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_term_cls(H5FS_section_class_t *cls)
+H5FS__sect_term_cls(H5FS_section_class_t *cls)
{
H5HF_sect_private_t *cls_prvt; /* Pointer to class private info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments. */
HDassert(cls);
@@ -375,7 +375,7 @@ H5HF_sect_term_cls(H5FS_section_class_t *cls)
cls_prvt = (H5HF_sect_private_t *)cls->cls_private;
/* Decrement reference count on heap header */
- if(H5HF_hdr_decr(cls_prvt->hdr) < 0)
+ if(H5HF__hdr_decr(cls_prvt->hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared heap header")
/* Free the class private information */
@@ -383,11 +383,11 @@ H5HF_sect_term_cls(H5FS_section_class_t *cls)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_term_cls() */
+} /* H5FS__sect_term_cls() */
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_node_new
+ * Function: H5FS__sect_node_new
*
* Purpose: Allocate a free space section node of a particular type
*
@@ -401,13 +401,13 @@ done:
*-------------------------------------------------------------------------
*/
static H5HF_free_section_t *
-H5HF_sect_node_new(unsigned sect_type, haddr_t sect_addr, hsize_t sect_size,
+H5FS__sect_node_new(unsigned sect_type, haddr_t sect_addr, hsize_t sect_size,
H5FS_section_state_t sect_state)
{
H5HF_free_section_t *new_sect; /* New section */
H5HF_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments. */
HDassert(H5F_addr_defined(sect_addr));
@@ -429,11 +429,11 @@ H5HF_sect_node_new(unsigned sect_type, haddr_t sect_addr, hsize_t sect_size,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_node_new() */
+} /* H5FS__sect_node_new() */
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_node_free
+ * Function: H5HF__sect_node_free
*
* Purpose: Free a section node
*
@@ -447,11 +447,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *iblock)
+H5HF__sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *iblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(sect);
@@ -465,30 +465,29 @@ H5HF_sect_node_free(H5HF_free_section_t *sect, H5HF_indirect_t *iblock)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_node_free() */
+} /* H5HF__sect_node_free() */
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_single_new
+ * Function: H5HF__sect_single_new
*
* Purpose: Create a new 'single' section and return it to the caller
*
* Return: Pointer to new section on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 30 2006
*
*-------------------------------------------------------------------------
*/
H5HF_free_section_t *
-H5HF_sect_single_new(hsize_t sect_off, size_t sect_size,
+H5HF__sect_single_new(hsize_t sect_off, size_t sect_size,
H5HF_indirect_t *parent, unsigned par_entry)
{
H5HF_free_section_t *sect = NULL; /* 'Single' free space section to add */
H5HF_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -496,13 +495,13 @@ H5HF_sect_single_new(hsize_t sect_off, size_t sect_size,
HDassert(sect_size);
/* Create free space section node */
- if(NULL == (sect = H5HF_sect_node_new(H5HF_FSPACE_SECT_SINGLE, sect_off, (hsize_t)sect_size, H5FS_SECT_LIVE)))
+ if(NULL == (sect = H5FS__sect_node_new(H5HF_FSPACE_SECT_SINGLE, sect_off, (hsize_t)sect_size, H5FS_SECT_LIVE)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for single section")
/* Set the 'single' specific fields */
sect->u.single.parent = parent;
if(sect->u.single.parent) {
- if(H5HF_iblock_incr(sect->u.single.parent) < 0)
+ if(H5HF__iblock_incr(sect->u.single.parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared indirect block")
} /* end if */
sect->u.single.par_entry = par_entry;
@@ -517,7 +516,7 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_sect_single_new() */
+} /* end H5HF__sect_single_new() */
/*-------------------------------------------------------------------------
@@ -528,7 +527,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* October 24 2006
*
*-------------------------------------------------------------------------
@@ -556,7 +554,7 @@ H5HF__sect_single_locate_parent(H5HF_hdr_t *hdr, hbool_t refresh,
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPUTE, FAIL, "can't compute row & column of section")
/* Increment reference count on indirect block that free section is in */
- if(H5HF_iblock_incr(sec_iblock) < 0)
+ if(H5HF__iblock_incr(sec_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on shared indirect block")
/* Check for refreshing existing parent information */
@@ -590,7 +588,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 8 2006
*
*-------------------------------------------------------------------------
@@ -631,23 +628,22 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_single_dblock_info
+ * Function: H5HF__sect_single_dblock_info
*
* Purpose: Retrieve the direct block information for a single section
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* October 24 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
+H5HF__sect_single_dblock_info(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
haddr_t *dblock_addr, size_t *dblock_size)
{
- FUNC_ENTER_NOAPI_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -673,7 +669,7 @@ H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_sect_single_dblock_info() */
+} /* end H5HF__sect_single_dblock_info() */
/*-------------------------------------------------------------------------
@@ -686,7 +682,6 @@ H5HF_sect_single_dblock_info(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
@@ -752,7 +747,7 @@ H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
size_t dblock_overhead; /* Direct block's overhead */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_PACKAGE
+ FUNC_ENTER_STATIC
/* Check arguments. */
HDassert(sect);
@@ -760,7 +755,7 @@ H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
HDassert(hdr);
/* Retrieve direct block address from section */
- if(H5HF_sect_single_dblock_info(hdr, sect, &dblock_addr, &dblock_size) < 0)
+ if(H5HF__sect_single_dblock_info(hdr, sect, &dblock_addr, &dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information")
/* Check for section occupying entire direct block */
@@ -776,7 +771,7 @@ H5HF__sect_single_full_dblock(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
HDassert(H5F_addr_eq(dblock->block_off + dblock_overhead, sect->sect_info.addr));
/* Convert 'single' section into 'row' section */
- if(H5HF_sect_row_from_single(hdr, sect, dblock) < 0)
+ if(H5HF__sect_row_from_single(hdr, sect, dblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCONVERT, FAIL, "can't convert single section into row section")
/* Destroy direct block */
@@ -876,7 +871,7 @@ H5HF__sect_single_deserialize(const H5FS_section_class_t H5_ATTR_UNUSED *cls,
HDassert(sect_size);
/* Create free list section node */
- if(NULL == (new_sect = H5HF_sect_node_new(H5HF_FSPACE_SECT_SINGLE, sect_addr, sect_size, H5FS_SECT_SERIALIZED)))
+ if(NULL == (new_sect = H5FS__sect_node_new(H5HF_FSPACE_SECT_SINGLE, sect_addr, sect_size, H5FS_SECT_SERIALIZED)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "allocation failed for direct block free list section")
/* Set return value */
@@ -1086,7 +1081,7 @@ H5HF__sect_single_shrink(H5FS_section_info_t **_sect, void *_udata)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't revive single free section")
/* Retrieve direct block address from section */
- if(H5HF_sect_single_dblock_info(hdr, (*sect), &dblock_addr, &dblock_size) < 0)
+ if(H5HF__sect_single_dblock_info(hdr, (*sect), &dblock_addr, &dblock_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve direct block information")
/* Protect the direct block for the section */
@@ -1140,14 +1135,13 @@ H5HF__sect_single_free(H5FS_section_info_t *_sect)
HDassert(sect);
/* Check for live reference to an indirect block */
- if(sect->sect_info.state == H5FS_SECT_LIVE) {
+ if(sect->sect_info.state == H5FS_SECT_LIVE)
/* Get parent indirect block, if there was one */
if(sect->u.single.parent)
parent = sect->u.single.parent;
- } /* end if */
/* Release the section */
- if(H5HF_sect_node_free(sect, parent) < 0)
+ if(H5HF__sect_node_free(sect, parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node")
done:
@@ -1194,7 +1188,7 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
HDassert(H5F_addr_defined(iblock->ents[sect->u.single.par_entry].addr));
/* Retrieve direct block address from section */
- status = H5HF_sect_single_dblock_info(iblock->hdr, (const H5HF_free_section_t *)sect, &dblock_addr, &dblock_size);
+ status = H5HF__sect_single_dblock_info(iblock->hdr, (const H5HF_free_section_t *)sect, &dblock_addr, &dblock_size);
HDassert(status >= 0);
HDassert(H5F_addr_eq(iblock->ents[sect->u.single.par_entry].addr, dblock_addr));
HDassert(dblock_size > 0);
@@ -1239,7 +1233,7 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_row_create
+ * Function: H5HF__sect_row_create
*
* Purpose: Create a new 'row' section
*
@@ -1253,13 +1247,13 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5
*-------------------------------------------------------------------------
*/
static H5HF_free_section_t *
-H5HF_sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first,
+H5HF__sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first,
unsigned row, unsigned col, unsigned nentries, H5HF_free_section_t *under_sect)
{
H5HF_free_section_t *sect = NULL; /* 'Row' section created */
H5HF_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments. */
HDassert(sect_size);
@@ -1268,7 +1262,7 @@ H5HF_sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first,
/* Create 'row' free space section node */
/* ("inherits" underlying indirect section's state) */
- if(NULL == (sect = H5HF_sect_node_new((unsigned)(is_first ? H5HF_FSPACE_SECT_FIRST_ROW : H5HF_FSPACE_SECT_NORMAL_ROW), sect_off, sect_size, under_sect->sect_info.state)))
+ if(NULL == (sect = H5FS__sect_node_new((unsigned)(is_first ? H5HF_FSPACE_SECT_FIRST_ROW : H5HF_FSPACE_SECT_NORMAL_ROW), sect_off, sect_size, under_sect->sect_info.state)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for row section")
/* Set the 'row' specific fields */
@@ -1283,29 +1277,28 @@ H5HF_sect_row_create(haddr_t sect_off, hsize_t sect_size, hbool_t is_first,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_row_create() */
+} /* H5HF__sect_row_create() */
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_row_from_single
+ * Function: H5HF__sect_row_from_single
*
* Purpose: Convert a 'single' section into a 'row' section
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
+H5HF__sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
H5HF_direct_t *dblock)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -1323,7 +1316,7 @@ H5HF_sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
sect->u.row.checked_out = FALSE;
/* Create indirect section that underlies the row section */
- if(NULL == (sect->u.row.under = H5HF_sect_indirect_for_row(hdr, dblock->parent, sect)))
+ if(NULL == (sect->u.row.under = H5HF__sect_indirect_for_row(hdr, dblock->parent, sect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "serializing row section not supported yet")
/* Release single section's hold on underlying indirect block */
@@ -1332,7 +1325,7 @@ H5HF_sect_row_from_single(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_sect_row_from_single() */
+} /* end H5HF__sect_row_from_single() */
/*-------------------------------------------------------------------------
@@ -1343,7 +1336,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
@@ -1391,7 +1383,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
@@ -1467,7 +1458,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
@@ -1501,24 +1491,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_row_get_iblock
+ * Function: H5HF__sect_row_get_iblock
*
* Purpose: Retrieve the indirect block for a row section
*
* Return: Pointer to indirect block on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 9 2006
*
*-------------------------------------------------------------------------
*/
H5HF_indirect_t *
-H5HF_sect_row_get_iblock(H5HF_free_section_t *sect)
+H5HF__sect_row_get_iblock(H5HF_free_section_t *sect)
{
H5HF_indirect_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -1528,10 +1517,10 @@ H5HF_sect_row_get_iblock(H5HF_free_section_t *sect)
sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW);
HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
- ret_value = H5HF_sect_indirect_get_iblock(sect->u.row.under);
+ ret_value = H5HF__sect_indirect_get_iblock(sect->u.row.under);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_sect_row_get_iblock() */
+} /* end H5HF__sect_row_get_iblock() */
/*-------------------------------------------------------------------------
@@ -1543,7 +1532,6 @@ H5HF_sect_row_get_iblock(H5HF_free_section_t *sect)
* Return: Non-negative on success / Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* February 4 2018
*
*-------------------------------------------------------------------------
@@ -1617,7 +1605,7 @@ H5HF__sect_row_init_cls(H5FS_section_class_t *cls, void *_udata)
HDassert(hdr);
/* Call common class initialization */
- if(H5HF_sect_init_cls(cls, hdr) < 0)
+ if(H5FS__sect_init_cls(cls, hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize common section class")
/* First row sections actually are proxies for indirection sections on disk */
@@ -1659,7 +1647,7 @@ H5HF__sect_row_term_cls(H5FS_section_class_t *cls)
HDassert(cls);
/* Call common class termination */
- if(H5HF_sect_term_cls(cls) < 0)
+ if(H5FS__sect_term_cls(cls) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't terminate common section class")
done:
@@ -1700,7 +1688,7 @@ H5HF__sect_row_serialize(const H5FS_section_class_t *cls,
/* Forward to indirect routine to serialize underlying section */
hdr = ((H5HF_sect_private_t *)(cls->cls_private))->hdr;
- if(H5HF_sect_indirect_serialize(hdr, sect->u.row.under, buf) < 0)
+ if(H5HF__sect_indirect_serialize(hdr, sect->u.row.under, buf) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSERIALIZE, FAIL, "can't serialize row section's underlying indirect section")
done:
@@ -1785,22 +1773,20 @@ H5HF__sect_row_can_merge(const H5FS_section_info_t *_sect1,
HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr));
/* Get the top indirect section underlying each row */
- top_indir_sect1 = H5HF_sect_indirect_top(sect1->u.row.under);
+ top_indir_sect1 = H5HF__sect_indirect_top(sect1->u.row.under);
HDassert(top_indir_sect1);
- top_indir_sect2 = H5HF_sect_indirect_top(sect2->u.row.under);
+ top_indir_sect2 = H5HF__sect_indirect_top(sect2->u.row.under);
HDassert(top_indir_sect2);
/* Check if second section shares the same underlying indirect block as
* the first section, but doesn't already have same underlying indirect
* section.
*/
- if(top_indir_sect1 != top_indir_sect2) {
- if(H5HF_sect_indirect_iblock_off(sect1->u.row.under) == H5HF_sect_indirect_iblock_off(sect2->u.row.under)) {
+ if(top_indir_sect1 != top_indir_sect2)
+ if(H5HF__sect_indirect_iblock_off(sect1->u.row.under) == H5HF__sect_indirect_iblock_off(sect2->u.row.under))
/* Check if second section adjoins first section */
if(H5F_addr_eq((top_indir_sect1->sect_info.addr + top_indir_sect1->u.indirect.span_size), top_indir_sect2->sect_info.addr))
HGOTO_DONE(TRUE)
- } /* end if */
- } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1846,7 +1832,7 @@ H5HF__sect_row_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2,
H5HF_free_section_t *top_indir_sect; /* Top indirect section for row */
/* Get the top indirect section underlying second row section */
- top_indir_sect = H5HF_sect_indirect_top(sect2->u.row.under);
+ top_indir_sect = H5HF__sect_indirect_top(sect2->u.row.under);
/* Shrink away underlying indirect section */
if(H5HF__sect_indirect_shrink(hdr, top_indir_sect) < 0)
@@ -1934,7 +1920,7 @@ H5HF__sect_row_shrink(H5FS_section_info_t **_sect, void *_udata)
HDassert((*sect)->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
/* Get the top indirect section underlying each row */
- top_indir_sect = H5HF_sect_indirect_top((*sect)->u.row.under);
+ top_indir_sect = H5HF__sect_indirect_top((*sect)->u.row.under);
/* Shrink away underlying indirect section */
if(H5HF__sect_indirect_shrink(hdr, top_indir_sect) < 0)
@@ -1972,7 +1958,7 @@ H5HF__sect_row_free_real(H5HF_free_section_t *sect)
HDassert(sect);
/* Release the section */
- if(H5HF_sect_node_free(sect, NULL) < 0)
+ if(H5HF__sect_node_free(sect, NULL) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node")
done:
@@ -2006,7 +1992,7 @@ H5HF__sect_row_free(H5FS_section_info_t *_sect)
HDassert(sect->u.row.under);
/* Decrement the ref. count on the row section's underlying indirect section */
- if(H5HF_sect_indirect_decr(sect->u.row.under) < 0)
+ if(H5HF__sect_indirect_decr(sect->u.row.under) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't detach section node")
/* Release the section */
@@ -2069,10 +2055,10 @@ H5HF__sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t
HDassert(sect->u.row.row == indir_sect->u.indirect.row);
/* Get the top indirect section underlying row */
- top_indir_sect = H5HF_sect_indirect_top(sect->u.row.under);
+ top_indir_sect = H5HF__sect_indirect_top(sect->u.row.under);
/* Check that the row's underlying indirect section is valid */
- H5HF_sect_indirect_valid(hdr, top_indir_sect);
+ H5HF__sect_indirect_valid(hdr, top_indir_sect);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -2119,7 +2105,7 @@ H5HF__sect_row_debug(const H5FS_section_info_t *_sect, FILE *stream, int indent,
HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth,
"Underlying indirect section:");
- H5HF_sect_indirect_debug(sect->u.row.under, stream, indent + 3, MAX(0, fwidth - 3));
+ H5HF__sect_indirect_debug(sect->u.row.under, stream, indent + 3, MAX(0, fwidth - 3));
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -2127,24 +2113,23 @@ H5HF__sect_row_debug(const H5FS_section_info_t *_sect, FILE *stream, int indent,
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_iblock_off
+ * Function: H5HF__sect_indirect_iblock_off
*
* Purpose: Get the offset of the indirect block for the section
*
* Return: Offset of indirect block in "heap space" (can't fail)
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
*/
static hsize_t
-H5HF_sect_indirect_iblock_off(const H5HF_free_section_t *sect)
+H5HF__sect_indirect_iblock_off(const H5HF_free_section_t *sect)
{
hsize_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/*
* Check arguments.
@@ -2154,28 +2139,27 @@ H5HF_sect_indirect_iblock_off(const H5HF_free_section_t *sect)
ret_value = sect->sect_info.state == H5FS_SECT_LIVE ? sect->u.indirect.u.iblock->block_off : sect->u.indirect.u.iblock_off;
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_sect_indirect_iblock_off() */
+} /* end H5HF__sect_indirect_iblock_off() */
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_top
+ * Function: H5HF__sect_indirect_top
*
* Purpose: Get the "top" indirect section
*
* Return: Pointer to the top indirect section (can't fail)
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
*/
static H5HF_free_section_t *
-H5HF_sect_indirect_top(H5HF_free_section_t *sect)
+H5HF__sect_indirect_top(H5HF_free_section_t *sect)
{
H5HF_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/*
* Check arguments.
@@ -2183,16 +2167,16 @@ H5HF_sect_indirect_top(H5HF_free_section_t *sect)
HDassert(sect);
if(sect->u.indirect.parent)
- ret_value = H5HF_sect_indirect_top(sect->u.indirect.parent);
+ ret_value = H5HF__sect_indirect_top(sect->u.indirect.parent);
else
ret_value = sect;
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_sect_indirect_top() */
+} /* end H5HF__sect_indirect_top() */
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_init_cls
+ * Function: H5HF__sect_indirect_init_cls
*
* Purpose: Initialize the "indirect" class structure
*
@@ -2206,19 +2190,19 @@ H5HF_sect_indirect_top(H5HF_free_section_t *sect)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_init_cls(H5FS_section_class_t *cls, void *_udata)
+H5HF__sect_indirect_init_cls(H5FS_section_class_t *cls, void *_udata)
{
H5HF_hdr_t *hdr = (H5HF_hdr_t *)_udata; /* Fractal heap header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments. */
HDassert(cls);
HDassert(hdr);
/* Call to common class initialization */
- if(H5HF_sect_init_cls(cls, hdr) < 0)
+ if(H5FS__sect_init_cls(cls, hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't initialize common section class")
/* Set the size of all serialized objects of this class of sections */
@@ -2226,11 +2210,11 @@ H5HF_sect_indirect_init_cls(H5FS_section_class_t *cls, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_indirect_init_cls() */
+} /* H5HF__sect_indirect_init_cls() */
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_term_cls
+ * Function: H5HF__sect_indirect_term_cls
*
* Purpose: Terminate the "indirect" class structure
*
@@ -2244,26 +2228,26 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_term_cls(H5FS_section_class_t *cls)
+H5HF__sect_indirect_term_cls(H5FS_section_class_t *cls)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments. */
HDassert(cls);
/* Call common class termination */
- if(H5HF_sect_term_cls(cls) < 0)
+ if(H5FS__sect_term_cls(cls) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't terminate common section class")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_indirect_term_cls() */
+} /* H5HF__sect_indirect_term_cls() */
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_new
+ * Function: H5HF__sect_indirect_new
*
* Purpose: Create a new 'indirect' section for other routines to finish
* initializing.
@@ -2271,20 +2255,19 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
*/
static H5HF_free_section_t *
-H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
+H5HF__sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
H5HF_indirect_t *iblock, hsize_t iblock_off, unsigned row, unsigned col,
unsigned nentries)
{
H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
H5HF_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -2293,7 +2276,7 @@ H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
HDassert(nentries);
/* Create free space section node */
- if(NULL == (sect = H5HF_sect_node_new(H5HF_FSPACE_SECT_INDIRECT, sect_off,
+ if(NULL == (sect = H5FS__sect_node_new(H5HF_FSPACE_SECT_INDIRECT, sect_off,
sect_size, (iblock ? H5FS_SECT_LIVE : H5FS_SECT_SERIALIZED))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for indirect section")
@@ -2302,7 +2285,7 @@ H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
sect->u.indirect.u.iblock = iblock;
sect->u.indirect.iblock_entries = hdr->man_dtable.cparam.width *
sect->u.indirect.u.iblock->max_rows;
- if(H5HF_iblock_incr(sect->u.indirect.u.iblock) < 0)
+ if(H5HF__iblock_incr(sect->u.indirect.u.iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared indirect block")
} /* end if */
else {
@@ -2314,7 +2297,7 @@ H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
sect->u.indirect.num_entries = nentries;
/* Compute span size of indirect section */
- sect->u.indirect.span_size = H5HF_dtable_span_size(&hdr->man_dtable,
+ sect->u.indirect.span_size = H5HF__dtable_span_size(&hdr->man_dtable,
row, col, nentries);
HDassert(sect->u.indirect.span_size > 0);
@@ -2332,30 +2315,29 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_sect_indirect_new() */
+} /* end H5HF__sect_indirect_new() */
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_for_row
+ * Function: H5HF__sect_indirect_for_row
*
* Purpose: Create the underlying indirect section for a new row section
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
*/
static H5HF_free_section_t *
-H5HF_sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock,
+H5HF__sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock,
H5HF_free_section_t *row_sect)
{
H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
H5HF_free_section_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -2366,7 +2348,7 @@ H5HF_sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock,
HDassert(row_sect->u.row.row < hdr->man_dtable.max_direct_rows);
/* Create free space section node */
- if(NULL == (sect = H5HF_sect_indirect_new(hdr, row_sect->sect_info.addr,
+ if(NULL == (sect = H5HF__sect_indirect_new(hdr, row_sect->sect_info.addr,
row_sect->sect_info.size, iblock, iblock->block_off,
row_sect->u.row.row, row_sect->u.row.col, row_sect->u.row.num_entries)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create indirect section")
@@ -2391,11 +2373,11 @@ H5HF_sect_indirect_for_row(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock,
done:
if(!ret_value && sect)
- if(H5HF_sect_indirect_free(sect) < 0)
+ if(H5HF__sect_indirect_free(sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "can't free indirect section node")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_sect_indirect_for_row() */
+} /* end H5HF__sect_indirect_for_row() */
/*-------------------------------------------------------------------------
@@ -2407,7 +2389,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
@@ -2521,7 +2502,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
H5HF_free_section_t *row_sect = NULL; /* 'Row' free space section to add */
/* Create 'row' free space section node */
- if(NULL == (row_sect = H5HF_sect_row_create(curr_off,
+ if(NULL == (row_sect = H5HF__sect_row_create(curr_off,
(hdr->man_dtable.row_block_size[u] - dblock_overhead), first_child, u, row_col,
row_entries, sect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "creation failed for child row section")
@@ -2558,7 +2539,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
unsigned v; /* Local index variable */
/* Compute info about row's indirect blocks for child section */
- child_nrows = H5HF_dtable_size_to_rows(&hdr->man_dtable, hdr->man_dtable.row_block_size[u]);
+ child_nrows = H5HF__dtable_size_to_rows(&hdr->man_dtable, hdr->man_dtable.row_block_size[u]);
child_nentries = child_nrows * hdr->man_dtable.cparam.width;
/* Add an indirect section for each indirect block in the row */
@@ -2570,7 +2551,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
haddr_t child_iblock_addr; /* Child indirect block's address on disk */
/* Get the address of the child indirect block */
- if(H5HF_man_iblock_entry_addr(sect->u.indirect.u.iblock, curr_entry, &child_iblock_addr) < 0)
+ if(H5HF__man_iblock_entry_addr(sect->u.indirect.u.iblock, curr_entry, &child_iblock_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to retrieve child indirect block's address")
/* If the child indirect block's address is defined, protect it */
@@ -2585,7 +2566,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
child_iblock = NULL;
/* Create free space section node */
- if(NULL == (child_sect = H5HF_sect_indirect_new(hdr, curr_off, (hsize_t)0,
+ if(NULL == (child_sect = H5HF__sect_indirect_new(hdr, curr_off, (hsize_t)0,
child_iblock, curr_off, 0, 0, child_nentries)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section")
@@ -2658,7 +2639,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 3 2006
*
*-------------------------------------------------------------------------
@@ -2702,7 +2682,7 @@ H5HF__sect_indirect_add(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, unsigned start
sect_off += hdr->man_dtable.row_block_size[start_row] * start_col;
/* Create free space section node */
- if(NULL == (sect = H5HF_sect_indirect_new(hdr, sect_off, (hsize_t)0, iblock,
+ if(NULL == (sect = H5HF__sect_indirect_new(hdr, sect_off, (hsize_t)0, iblock,
iblock->block_off, start_row, start_col, nentries)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section")
@@ -2720,7 +2700,7 @@ H5HF__sect_indirect_add(H5HF_hdr_t *hdr, H5HF_indirect_t *iblock, unsigned start
done:
if(ret_value < 0 && sect)
- if(H5HF_sect_indirect_free(sect) < 0)
+ if(H5HF__sect_indirect_free(sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
FUNC_LEAVE_NOAPI(ret_value)
@@ -2728,24 +2708,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_decr
+ * Function: H5HF__sect_indirect_decr
*
* Purpose: Decrement ref. count on indirect section
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 6 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_decr(H5HF_free_section_t *sect)
+H5HF__sect_indirect_decr(H5HF_free_section_t *sect)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -2764,18 +2743,18 @@ H5HF_sect_indirect_decr(H5HF_free_section_t *sect)
par_sect = sect->u.indirect.parent;
/* Free indirect section */
- if(H5HF_sect_indirect_free(sect) < 0)
+ if(H5HF__sect_indirect_free(sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
/* Decrement ref. count on indirect section's parent */
if(par_sect)
- if(H5HF_sect_indirect_decr(par_sect) < 0)
+ if(H5HF__sect_indirect_decr(par_sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't decrement ref. count on parent indirect section")
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_sect_indirect_decr() */
+} /* end H5HF__sect_indirect_decr() */
/*-------------------------------------------------------------------------
@@ -2786,7 +2765,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 3 2006
*
*-------------------------------------------------------------------------
@@ -2832,7 +2810,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
@@ -2854,7 +2831,7 @@ H5HF__sect_indirect_revive(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, H5HF_indi
HDassert(sect_iblock);
/* Increment reference count on indirect block that free section is in */
- if(H5HF_iblock_incr(sect_iblock) < 0)
+ if(H5HF__iblock_incr(sect_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDEC, FAIL, "can't decrement reference count on shared indirect block")
/* Set the pointer to the section's indirect block */
@@ -2891,7 +2868,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
@@ -2954,7 +2930,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect,
hbool_t is_first; /* Flag to indicate that this section is the first section in hierarchy */
/* Check if this section is the first section */
- is_first = H5HF_sect_indirect_is_first(sect);
+ is_first = H5HF__sect_indirect_is_first(sect);
/* Remove this indirect section from parent indirect section */
if(H5HF__sect_indirect_reduce(hdr, sect->u.indirect.parent, sect->u.indirect.par_entry) < 0)
@@ -3069,7 +3045,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect,
} /* end else */
/* Create peer indirect section */
- if(NULL == (peer_sect = H5HF_sect_indirect_new(hdr, sect->sect_info.addr,
+ if(NULL == (peer_sect = H5HF__sect_indirect_new(hdr, sect->sect_info.addr,
sect->sect_info.size, iblock, iblock_off, start_row, start_col,
peer_nentries)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section")
@@ -3144,7 +3120,7 @@ done:
/* Sanity check - we should only be here if an error occurred */
HDassert(ret_value < 0);
- if(H5HF_sect_indirect_free(peer_sect) < 0)
+ if(H5HF__sect_indirect_free(peer_sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
} /* end if */
@@ -3162,7 +3138,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
@@ -3203,7 +3178,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
hbool_t is_first; /* Flag to indicate that this section is the first section in hierarchy */
/* Check if this section is the first section */
- is_first = H5HF_sect_indirect_is_first(sect);
+ is_first = H5HF__sect_indirect_is_first(sect);
/* Reduce parent indirect section */
if(H5HF__sect_indirect_reduce(hdr, sect->u.indirect.parent, sect->u.indirect.par_entry) < 0)
@@ -3298,7 +3273,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
/* Update the number of entries in current section & calculate it's span size */
/* (Will use this to compute the section address for the peer section */
sect->u.indirect.num_entries = new_nentries;
- sect->u.indirect.span_size = H5HF_dtable_span_size(&hdr->man_dtable,
+ sect->u.indirect.span_size = H5HF__dtable_span_size(&hdr->man_dtable,
sect->u.indirect.row, sect->u.indirect.col, new_nentries);
HDassert(sect->u.indirect.span_size > 0);
@@ -3308,7 +3283,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
peer_sect_addr += hdr->man_dtable.row_block_size[child_row];
/* Create peer indirect section */
- if(NULL == (peer_sect = H5HF_sect_indirect_new(hdr, peer_sect_addr,
+ if(NULL == (peer_sect = H5HF__sect_indirect_new(hdr, peer_sect_addr,
sect->sect_info.size, iblock, iblock_off, peer_start_row,
peer_start_col, peer_nentries)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section")
@@ -3370,7 +3345,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
/* Decrement # of sections which depend on this row */
/* (Must be last as section can be freed) */
- if(H5HF_sect_indirect_decr(sect) < 0)
+ if(H5HF__sect_indirect_decr(sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't decrement section's ref. count ")
done:
@@ -3380,7 +3355,7 @@ done:
/* Sanity check - we should only be here if an error occurred */
HDassert(ret_value < 0);
- if(H5HF_sect_indirect_free(peer_sect) < 0)
+ if(H5HF__sect_indirect_free(peer_sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
} /* end if */
@@ -3389,24 +3364,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_is_first
+ * Function: H5HF__sect_indirect_is_first
*
* Purpose: Check if indirect section is first in all parents
*
* Return: Non-negative (TRUE/FALSE) on success/<can't fail>
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 17 2006
*
*-------------------------------------------------------------------------
*/
static hbool_t
-H5HF_sect_indirect_is_first(H5HF_free_section_t *sect)
+H5HF__sect_indirect_is_first(H5HF_free_section_t *sect)
{
hbool_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(sect);
@@ -3414,13 +3388,13 @@ H5HF_sect_indirect_is_first(H5HF_free_section_t *sect)
/* Recurse to parent */
if(sect->u.indirect.parent) {
if(sect->sect_info.addr == sect->u.indirect.parent->sect_info.addr)
- ret_value = H5HF_sect_indirect_is_first(sect->u.indirect.parent);
+ ret_value = H5HF__sect_indirect_is_first(sect->u.indirect.parent);
} /* end if */
else
ret_value = TRUE;
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_sect_indirect_is_first() */
+} /* end H5HF__sect_indirect_is_first() */
/*-------------------------------------------------------------------------
@@ -3431,7 +3405,6 @@ H5HF_sect_indirect_is_first(H5HF_free_section_t *sect)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
@@ -3476,22 +3449,21 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_get_iblock
+ * Function: H5HF__sect_indirect_get_iblock
*
* Purpose: Retrieve the indirect block for a indirect section
*
* Return: Pointer to indirect block on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 9 2006
*
*-------------------------------------------------------------------------
*/
static H5HF_indirect_t *
-H5HF_sect_indirect_get_iblock(H5HF_free_section_t *sect)
+H5HF__sect_indirect_get_iblock(H5HF_free_section_t *sect)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/*
* Check arguments.
@@ -3501,7 +3473,7 @@ H5HF_sect_indirect_get_iblock(H5HF_free_section_t *sect)
HDassert(sect->sect_info.state == H5FS_SECT_LIVE);
FUNC_LEAVE_NOAPI(sect->u.indirect.u.iblock)
-} /* end H5HF_sect_indirect_get_iblock() */
+} /* end H5HF__sect_indirect_get_iblock() */
/*-------------------------------------------------------------------------
@@ -3545,9 +3517,9 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1,
HDassert(row_sect2->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW);
/* Set up indirect section information */
- sect1 = H5HF_sect_indirect_top(row_sect1->u.row.under);
+ sect1 = H5HF__sect_indirect_top(row_sect1->u.row.under);
HDassert(sect1);
- sect2 = H5HF_sect_indirect_top(row_sect2->u.row.under);
+ sect2 = H5HF__sect_indirect_top(row_sect2->u.row.under);
HDassert(sect2);
/* Sanity check some assumptions about the indirect sections */
@@ -3722,11 +3694,11 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1,
/* Decrement ref. count on second indirect section's parent */
HDassert(sect2->u.indirect.rc == 0);
if(sect2->u.indirect.parent)
- if(H5HF_sect_indirect_decr(sect2->u.indirect.parent) < 0)
+ if(H5HF__sect_indirect_decr(sect2->u.indirect.parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't decrement ref. count on parent indirect section")
/* Free second indirect section */
- if(H5HF_sect_indirect_free(sect2) < 0)
+ if(H5HF__sect_indirect_free(sect2) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
/* Re-add the second section's first row */
@@ -3806,7 +3778,7 @@ H5HF__sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
HDassert(par_row >= hdr->man_dtable.max_direct_rows);
/* Create parent indirect section */
- if(NULL == (par_sect = H5HF_sect_indirect_new(hdr, sect->sect_info.addr,
+ if(NULL == (par_sect = H5HF__sect_indirect_new(hdr, sect->sect_info.addr,
sect->sect_info.size, par_iblock, par_block_off,
par_row, par_col, 1)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't create indirect section")
@@ -3828,7 +3800,7 @@ H5HF__sect_indirect_build_parent(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
done:
if(ret_value < 0)
- if(par_sect && H5HF_sect_indirect_free(par_sect) < 0)
+ if(par_sect && H5HF__sect_indirect_free(par_sect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
FUNC_LEAVE_NOAPI(ret_value)
@@ -3883,7 +3855,7 @@ H5HF__sect_indirect_shrink(H5HF_hdr_t *hdr, H5HF_free_section_t *sect)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free child section node")
/* Free the indirect section itself */
- if(H5HF_sect_indirect_free(sect) < 0)
+ if(H5HF__sect_indirect_free(sect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free indirect section node")
done:
@@ -3892,7 +3864,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_serialize
+ * Function: H5HF__sect_indirect_serialize
*
* Purpose: Serialize a "live" indirect section into a buffer
*
@@ -3906,12 +3878,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
+H5HF__sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
uint8_t *buf)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments. */
HDassert(hdr);
@@ -3921,7 +3893,7 @@ H5HF_sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
/* Check if this indirect section has a parent & forward if this section is first */
if(sect->u.indirect.parent) {
if(sect->sect_info.addr == sect->u.indirect.parent->sect_info.addr)
- if(H5HF_sect_indirect_serialize(hdr, sect->u.indirect.parent, buf) < 0)
+ if(H5HF__sect_indirect_serialize(hdr, sect->u.indirect.parent, buf) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSERIALIZE, FAIL, "can't serialize indirect section's parent indirect section")
} /* end if */
else {
@@ -3945,7 +3917,7 @@ H5HF_sect_indirect_serialize(H5HF_hdr_t *hdr, const H5HF_free_section_t *sect,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_indirect_serialize() */
+} /* H5HF__sect_indirect_serialize() */
/*-------------------------------------------------------------------------
@@ -3997,7 +3969,7 @@ H5HF__sect_indirect_deserialize(H5HF_hdr_t *hdr, const uint8_t *buf,
UINT16DECODE(buf, nentries);
/* Create free space section node */
- if(NULL == (new_sect = H5HF_sect_indirect_new(hdr, sect_addr, sect_size,
+ if(NULL == (new_sect = H5HF__sect_indirect_new(hdr, sect_addr, sect_size,
NULL, iblock_off, start_row, start_col, nentries)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, NULL, "can't create indirect section")
@@ -4027,7 +3999,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_free
+ * Function: H5HF__sect_indirect_free
*
* Purpose: Free a 'indirect' section node
*
@@ -4041,12 +4013,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_free(H5HF_free_section_t *sect)
+H5HF__sect_indirect_free(H5HF_free_section_t *sect)
{
H5HF_indirect_t *iblock = NULL; /* Indirect block for section */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(sect);
@@ -4057,23 +4029,22 @@ H5HF_sect_indirect_free(H5HF_free_section_t *sect)
sect->u.indirect.indir_ents = (H5HF_free_section_t **)H5MM_xfree(sect->u.indirect.indir_ents);
/* Check for live reference to an indirect block */
- if(sect->sect_info.state == H5FS_SECT_LIVE) {
+ if(sect->sect_info.state == H5FS_SECT_LIVE)
/* Get indirect block, if there was one */
if(sect->u.indirect.u.iblock)
iblock = sect->u.indirect.u.iblock;
- } /* end if */
/* Release the sections */
- if(H5HF_sect_node_free(sect, iblock) < 0)
+ if(H5HF__sect_node_free(sect, iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't free section node")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF_sect_indirect_free() */
+} /* H5HF__sect_indirect_free() */
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_valid
+ * Function: H5HF__sect_indirect_valid
*
* Purpose: Check the validity of a section
*
@@ -4086,7 +4057,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
+H5HF__sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
{
unsigned start_row; /* Row for first block covered */
unsigned start_col; /* Column for first block covered */
@@ -4095,7 +4066,7 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
unsigned end_entry; /* Entry for last block covered */
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check arguments */
HDassert(hdr);
@@ -4167,16 +4138,16 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
} /* end if */
/* Recursively check child indirect section */
- H5HF_sect_indirect_valid(hdr, tmp_child_sect);
+ H5HF__sect_indirect_valid(hdr, tmp_child_sect);
} /* end for */
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5HF_sect_indirect_valid() */
+} /* H5HF__sect_indirect_valid() */
/*-------------------------------------------------------------------------
- * Function: H5HF_sect_indirect_debug
+ * Function: H5HF__sect_indirect_debug
*
* Purpose: Dump debugging information about an indirect free space section
*
@@ -4190,10 +4161,10 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_sect_indirect_debug(const H5HF_free_section_t *sect,
+H5HF__sect_indirect_debug(const H5HF_free_section_t *sect,
FILE *stream, int indent, int fwidth)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check arguments. */
HDassert(sect);
@@ -4210,5 +4181,5 @@ H5HF_sect_indirect_debug(const H5HF_free_section_t *sect,
sect->u.indirect.num_entries);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5HF_sect_indirect_debug() */
+} /* H5HF__sect_indirect_debug() */
diff --git a/src/H5HFspace.c b/src/H5HFspace.c
index ad5ff0f..b518996 100644
--- a/src/H5HFspace.c
+++ b/src/H5HFspace.c
@@ -15,7 +15,7 @@
*
* Created: H5HFspace.c
* May 2 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Space allocation routines for fractal heaps.
*
@@ -89,7 +89,6 @@
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2006
*
*-------------------------------------------------------------------------
@@ -153,7 +152,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 15 2006
*
*-------------------------------------------------------------------------
@@ -198,7 +196,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2006
*
*-------------------------------------------------------------------------
@@ -237,7 +234,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_space_revert_root_cb
+ * Function: H5HF__space_revert_root_cb
*
* Purpose: Callback routine from iterator, to reset 'parent' pointers in
* sections, when the heap is changing from having a root indirect
@@ -247,18 +244,17 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 24 2012
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_space_revert_root_cb(H5FS_section_info_t *_sect, void H5_ATTR_UNUSED *_udata)
+H5HF__space_revert_root_cb(H5FS_section_info_t *_sect, void H5_ATTR_UNUSED *_udata)
{
H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Section to dump info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -279,7 +275,7 @@ H5HF_space_revert_root_cb(H5FS_section_info_t *_sect, void H5_ATTR_UNUSED *_udat
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_space_revert_root_cb() */
+} /* end H5HF__space_revert_root_cb() */
/*-------------------------------------------------------------------------
@@ -292,7 +288,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 23 2012
*
*-------------------------------------------------------------------------
@@ -312,7 +307,7 @@ H5HF__space_revert_root(const H5HF_hdr_t *hdr)
/* Only need to scan the sections if the free space has been initialized */
if(hdr->fspace)
/* Iterate over all sections, resetting the parent pointers in 'single' sections */
- if(H5FS_sect_iterate(hdr->f, hdr->fspace, H5HF_space_revert_root_cb, NULL) < 0)
+ if(H5FS_sect_iterate(hdr->f, hdr->fspace, H5HF__space_revert_root_cb, NULL) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over sections to reset parent pointers")
done:
@@ -321,7 +316,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5HF_space_create_root_cb
+ * Function: H5HF__space_create_root_cb
*
* Purpose: Callback routine from iterator, to set 'parent' pointers in
* sections to newly created root indirect block, when the heap
@@ -331,19 +326,18 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 24 2012
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_space_create_root_cb(H5FS_section_info_t *_sect, void *_udata)
+H5HF__space_create_root_cb(H5FS_section_info_t *_sect, void *_udata)
{
H5HF_free_section_t *sect = (H5HF_free_section_t *)_sect; /* Section to dump info */
H5HF_indirect_t *root_iblock = (H5HF_indirect_t *)_udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -357,7 +351,7 @@ H5HF_space_create_root_cb(H5FS_section_info_t *_sect, void *_udata)
HDassert(sect->sect_info.type == H5HF_FSPACE_SECT_SINGLE);
/* Increment ref. count on new root indirect block */
- if(H5HF_iblock_incr(root_iblock) < 0)
+ if(H5HF__iblock_incr(root_iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, FAIL, "can't increment reference count on section's indirect block")
/* Set parent info ("live" section must _NOT_ have a parent right now) */
@@ -370,7 +364,7 @@ H5HF_space_create_root_cb(H5FS_section_info_t *_sect, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_space_create_root_cb() */
+} /* end H5HF__space_create_root_cb() */
/*-------------------------------------------------------------------------
@@ -384,7 +378,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 24 2012
*
*-------------------------------------------------------------------------
@@ -405,7 +398,7 @@ H5HF__space_create_root(const H5HF_hdr_t *hdr, H5HF_indirect_t *root_iblock)
/* Only need to scan the sections if the free space has been initialized */
if(hdr->fspace)
/* Iterate over all sections, seting the parent pointers in 'single' sections to the new indirect block */
- if(H5FS_sect_iterate(hdr->f, hdr->fspace, H5HF_space_create_root_cb, root_iblock) < 0)
+ if(H5FS_sect_iterate(hdr->f, hdr->fspace, H5HF__space_create_root_cb, root_iblock) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over sections to set parent pointers")
done:
@@ -422,7 +415,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* August 14 2007
*
*-------------------------------------------------------------------------
@@ -467,7 +459,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 24 2006
*
*-------------------------------------------------------------------------
@@ -505,7 +496,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2006
*
*-------------------------------------------------------------------------
@@ -529,9 +519,6 @@ H5HF__space_close(H5HF_hdr_t *hdr)
/* Retrieve the number of sections for this heap */
if(H5FS_sect_stats(hdr->fspace, NULL, &nsects) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOUNT, FAIL, "can't query free space section count")
-#ifdef QAK
-HDfprintf(stderr, "%s: nsects = %Hu\n", FUNC, nsects);
-#endif /* QAK */
/* Close the free space for the heap */
if(H5FS_close(hdr->f, hdr->fspace) < 0)
@@ -560,7 +547,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 7 2006
*
*-------------------------------------------------------------------------
@@ -596,7 +582,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 10 2006
*
*-------------------------------------------------------------------------
@@ -607,9 +592,6 @@ H5HF__space_sect_change_class(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, uint16
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
-#ifdef QAK
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* QAK */
/*
* Check arguments.
diff --git a/src/H5HFstat.c b/src/H5HFstat.c
index 7d18ba6..456fd60 100644
--- a/src/H5HFstat.c
+++ b/src/H5HFstat.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Monday, March 6, 2006
*
* Purpose: Fractal heap metadata statistics functions.
diff --git a/src/H5HFtest.c b/src/H5HFtest.c
index d6eecd7..14b20eb 100644
--- a/src/H5HFtest.c
+++ b/src/H5HFtest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Thursday, February 3, 2006
*
* Purpose: Fractal heap testing functions.
@@ -189,13 +189,10 @@ H5HF_cmp_cparam_test(const H5HF_create_t *cparam1, const H5HF_create_t *cparam2)
/* Don't worry about comparing the filter names right now... */
/* (they are expanded during the encode/decode process, but aren't copied
- * during the H5Z_append operation, generating false positive failures)
+ * during the H5Z_append operation, generating false positive failures -QAK)
*/
-#ifdef QAK
+#if 0
/* Check filter name */
-HDfprintf(stderr, "%s: Check 1.0\n", "H5HF_cmp_cparam_test");
-HDfprintf(stderr, "%s: cparam1->pline.filter[%Zu].name = %s\n", "H5HF_cmp_cparam_test", u, (cparam1->pline.filter[u].name ? cparam1->pline.filter[u].name : "<nil>"));
-HDfprintf(stderr, "%s: cparam2->pline.filter[%Zu].name = %s\n", "H5HF_cmp_cparam_test", u, (cparam2->pline.filter[u].name ? cparam2->pline.filter[u].name : "<nil>"));
if(!cparam1->pline.filter[u].name && cparam2->pline.filter[u].name)
HGOTO_DONE(-1)
else if(cparam1->pline.filter[u].name && !cparam2->pline.filter[u].name)
@@ -204,7 +201,7 @@ HDfprintf(stderr, "%s: cparam2->pline.filter[%Zu].name = %s\n", "H5HF_cmp_cparam
if((ret_value = HDstrcmp(cparam1->pline.filter[u].name, cparam2->pline.filter[u].name)))
HGOTO_DONE(ret_value)
} /* end if */
-#endif /* QAK */
+#endif
/* Check # of filter parameters */
if(cparam1->pline.filter[u].cd_nelmts < cparam2->pline.filter[u].cd_nelmts)
diff --git a/src/H5HFtiny.c b/src/H5HFtiny.c
index 113124c..21da6da 100644
--- a/src/H5HFtiny.c
+++ b/src/H5HFtiny.c
@@ -15,7 +15,7 @@
*
* Created: H5HFtiny.c
* Aug 14 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Routines for "tiny" objects in fractal heap
*
@@ -63,7 +63,7 @@
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id,
+static herr_t H5HF__tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id,
H5HF_operator_t op, void *op_data);
@@ -83,22 +83,21 @@ static herr_t H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id,
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_init
+ * Function: H5HF__tiny_init
*
* Purpose: Initialize information for tracking 'tiny' objects
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 14 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_tiny_init(H5HF_hdr_t *hdr)
+H5HF__tiny_init(H5HF_hdr_t *hdr)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -126,33 +125,29 @@ H5HF_tiny_init(H5HF_hdr_t *hdr)
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_tiny_init() */
+} /* end H5HF__tiny_init() */
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_insert
+ * Function: H5HF__tiny_insert
*
* Purpose: Pack a 'tiny' object in a heap ID
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 14 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
+H5HF__tiny_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
{
uint8_t *id = (uint8_t *)_id; /* Pointer to ID buffer */
size_t enc_obj_size; /* Encoded object size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
-#ifdef QAK
-HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
-#endif /* QAK */
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -185,33 +180,32 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
hdr->tiny_nobjs++;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if(H5HF__hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_tiny_insert() */
+} /* end H5HF__tiny_insert() */
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_get_obj_len
+ * Function: H5HF__tiny_get_obj_len
*
* Purpose: Get the size of a 'tiny' object in a fractal heap
*
* Return: SUCCEED (Can't fail)
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 14 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
+H5HF__tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
{
size_t enc_obj_size; /* Encoded object size */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -233,30 +227,29 @@ H5HF_tiny_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
*obj_len_p = enc_obj_size + 1;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_tiny_get_obj_len() */
+} /* end H5HF__tiny_get_obj_len() */
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_op_real
+ * Function: H5HF__tiny_op_real
*
* Purpose: Internal routine to perform operation on 'tiny' object
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 11 2006
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
+H5HF__tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
void *op_data)
{
size_t enc_obj_size; /* Encoded object size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -266,8 +259,8 @@ H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
HDassert(op);
/* Get the object's encoded length */
- /* H5HF_tiny_obj_len can't fail */
- ret_value = H5HF_tiny_get_obj_len(hdr, id, &enc_obj_size);
+ /* H5HF__tiny_obj_len can't fail */
+ ret_value = H5HF__tiny_get_obj_len(hdr, id, &enc_obj_size);
/* Advance past flag byte(s) */
if(!hdr->tiny_len_extended)
@@ -285,28 +278,27 @@ H5HF_tiny_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_tiny_op_real() */
+} /* end H5HF__tiny_op_real() */
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_read
+ * Function: H5HF__tiny_read
*
* Purpose: Read a 'tiny' object from the heap
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 8 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_tiny_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
+H5HF__tiny_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -316,34 +308,33 @@ H5HF_tiny_read(H5HF_hdr_t *hdr, const uint8_t *id, void *obj)
HDassert(obj);
/* Call the internal 'op' routine */
- if(H5HF_tiny_op_real(hdr, id, H5HF_op_read, obj) < 0)
+ if(H5HF__tiny_op_real(hdr, id, H5HF__op_read, obj) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_tiny_read() */
+} /* end H5HF__tiny_read() */
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_op
+ * Function: H5HF__tiny_op
*
* Purpose: Operate directly on a 'tiny' object
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sept 11 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
+H5HF__tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
void *op_data)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -353,34 +344,33 @@ H5HF_tiny_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op,
HDassert(op);
/* Call the internal 'op' routine routine */
- if(H5HF_tiny_op_real(hdr, id, op, op_data) < 0)
+ if(H5HF__tiny_op_real(hdr, id, op, op_data) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "unable to operate on heap object")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_tiny_op() */
+} /* end H5HF__tiny_op() */
/*-------------------------------------------------------------------------
- * Function: H5HF_tiny_remove
+ * Function: H5HF__tiny_remove
*
* Purpose: Remove a 'tiny' object from the heap statistics
*
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Aug 14 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_tiny_remove(H5HF_hdr_t *hdr, const uint8_t *id)
+H5HF__tiny_remove(H5HF_hdr_t *hdr, const uint8_t *id)
{
size_t enc_obj_size; /* Encoded object size */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -389,17 +379,17 @@ H5HF_tiny_remove(H5HF_hdr_t *hdr, const uint8_t *id)
HDassert(id);
/* Get the object's encoded length */
- /* H5HF_tiny_obj_len can't fail */
- ret_value = H5HF_tiny_get_obj_len(hdr, id, &enc_obj_size);
+ /* H5HF__tiny_obj_len can't fail */
+ ret_value = H5HF__tiny_get_obj_len(hdr, id, &enc_obj_size);
/* Update statistics about heap */
hdr->tiny_size -= enc_obj_size;
hdr->tiny_nobjs--;
/* Mark heap header as modified */
- if(H5HF_hdr_dirty(hdr) < 0)
+ if(H5HF__hdr_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDIRTY, FAIL, "can't mark heap header as dirty")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_tiny_remove() */
+} /* end H5HF__tiny_remove() */
diff --git a/src/H5HG.c b/src/H5HG.c
index 8caf551..f7a44ce 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, March 27, 1998
*
* Purpose: Operations on the global heap. The global heap is the set of
@@ -763,7 +763,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5HG_remove (H5F_t *f, H5HG_t *hobj)
+H5HG_remove(H5F_t *f, H5HG_t *hobj)
{
H5HG_heap_t *heap = NULL;
uint8_t *p = NULL, *obj_start = NULL;
diff --git a/src/H5HGcache.c b/src/H5HGcache.c
index 7485aad..f85df33 100644
--- a/src/H5HGcache.c
+++ b/src/H5HGcache.c
@@ -15,7 +15,7 @@
*
* Created: H5HGcache.c
* Feb 5 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement global heap metadata cache methods.
*
diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c
index a5e5363..a0697aa 100644
--- a/src/H5HGdbg.c
+++ b/src/H5HGdbg.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Wednesday, July 9, 2003
*
* Purpose: Global Heap object debugging functions.
@@ -77,7 +77,6 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Mar 27, 1998
*
*-------------------------------------------------------------------------
diff --git a/src/H5HGmodule.h b/src/H5HGmodule.h
index 1c68206..e661328 100644
--- a/src/H5HGmodule.h
+++ b/src/H5HGmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5HGpkg.h b/src/H5HGpkg.h
index 3119de4..735b4fb 100644
--- a/src/H5HGpkg.h
+++ b/src/H5HGpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Wednesday, July 9, 2003
*
* Purpose: This file contains declarations which are visible
diff --git a/src/H5HGprivate.h b/src/H5HGprivate.h
index 573ef39..1a22d56 100644
--- a/src/H5HGprivate.h
+++ b/src/H5HGprivate.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, March 27, 1998
*/
#ifndef _H5HGprivate_H
diff --git a/src/H5HGquery.c b/src/H5HGquery.c
index 35abc2e..005235c 100644
--- a/src/H5HGquery.c
+++ b/src/H5HGquery.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Wednesday, July 20, 2011
*
* Purpose: Query routines for global heaps.
diff --git a/src/H5HL.c b/src/H5HL.c
index f290294..f628e93 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -15,7 +15,7 @@
*
* Created: H5HL.c
* Jul 16 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Heap functions for the local heaps used by symbol
* tables to store names (among other things).
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 734ec5c..006ddc0 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -15,7 +15,7 @@
*
* Created: H5HLcache.c
* Feb 5 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implement local heap metadata cache methods.
*
@@ -486,11 +486,11 @@ done:
if(!ret_value) {
if(prfx) {
if(FAIL == H5HL__prfx_dest(prfx))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap prefix");
+ HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap prefix");
} /* end if */
else {
if(heap && FAIL == H5HL__dest(heap))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap");
+ HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap");
} /* end else */
} /* end if */
@@ -771,7 +771,7 @@ done:
/* Release the [possibly partially initialized] local heap on errors */
if(!ret_value && dblk)
if(FAIL == H5HL__dblk_dest(dblk))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap data block");
+ HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap data block");
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL__cache_datablock_deserialize() */
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index edb0261..c0ec68b 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Wednesday, July 9, 2003
*
* Purpose: Local Heap object debugging functions.
diff --git a/src/H5HLdblk.c b/src/H5HLdblk.c
index c3fcffe..88348a0 100644
--- a/src/H5HLdblk.c
+++ b/src/H5HLdblk.c
@@ -15,7 +15,7 @@
*
* Created: H5HLdblk.c
* Summer 2012
- * Dana Robinson <derobins@hdfgroup.org>
+ * Dana Robinson
*
* Purpose: Data block routines for local heaps.
*
diff --git a/src/H5HLint.c b/src/H5HLint.c
index cc3e3ea..17527c1 100644
--- a/src/H5HLint.c
+++ b/src/H5HLint.c
@@ -15,7 +15,7 @@
*
* Created: H5HLint.c
* Oct 12 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Local heap internal routines.
*
diff --git a/src/H5HLprfx.c b/src/H5HLprfx.c
index 41c254a..8c4ffad 100644
--- a/src/H5HLprfx.c
+++ b/src/H5HLprfx.c
@@ -15,7 +15,7 @@
*
* Created: H5HLprfx.c
* Summer 2012
- * Dana Robinson <derobins@hdfgroup.org>
+ * Dana Robinson
*
* Purpose: Prefix routines for local heaps.
*
diff --git a/src/H5HP.c b/src/H5HP.c
index 4ef5662..340457b 100644
--- a/src/H5HP.c
+++ b/src/H5HP.c
@@ -46,10 +46,10 @@ struct H5HP_t {
};
/* Static functions */
-static herr_t H5HP_swim_max(H5HP_t *heap, size_t loc);
-static herr_t H5HP_swim_min(H5HP_t *heap, size_t loc);
-static herr_t H5HP_sink_max(H5HP_t *heap, size_t loc);
-static herr_t H5HP_sink_min(H5HP_t *heap, size_t loc);
+static herr_t H5HP__swim_max(H5HP_t *heap, size_t loc);
+static herr_t H5HP__swim_min(H5HP_t *heap, size_t loc);
+static herr_t H5HP__sink_max(H5HP_t *heap, size_t loc);
+static herr_t H5HP__sink_min(H5HP_t *heap, size_t loc);
/* Declare a free list to manage the H5HP_t struct */
H5FL_DEFINE_STATIC(H5HP_t);
@@ -60,11 +60,11 @@ H5FL_SEQ_DEFINE_STATIC(H5HP_ent_t);
/*--------------------------------------------------------------------------
NAME
- H5HP_swim_max
+ H5HP__swim_max
PURPOSE
Restore heap condition by moving an object upward
USAGE
- herr_t H5HP_swim_max(heap, loc)
+ herr_t H5HP__swim_max(heap, loc)
H5HP_t *heap; IN/OUT: Pointer to heap to modify
size_t loc; IN: Location to start from
@@ -80,13 +80,13 @@ H5FL_SEQ_DEFINE_STATIC(H5HP_ent_t);
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5HP_swim_max(H5HP_t *heap, size_t loc)
+H5HP__swim_max(H5HP_t *heap, size_t loc)
{
int val; /* Temporary copy value of object to move in heap */
H5HP_info_t *obj; /* Temporary pointer to object to move in heap */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Get copies of the information about the object to move in the heap */
val=heap->heap[loc].val;
@@ -113,16 +113,16 @@ H5HP_swim_max(H5HP_t *heap, size_t loc)
heap->heap[loc].obj->heap_loc=loc;
FUNC_LEAVE_NOAPI(ret_value);
-} /* end H5HP_swim_max() */
+} /* end H5HP__swim_max() */
/*--------------------------------------------------------------------------
NAME
- H5HP_swim_min
+ H5HP__swim_min
PURPOSE
Restore heap condition by moving an object upward
USAGE
- herr_t H5HP_swim_min(heap, loc)
+ herr_t H5HP__swim_min(heap, loc)
H5HP_t *heap; IN/OUT: Pointer to heap to modify
size_t loc; IN: Location to start from
@@ -138,13 +138,13 @@ H5HP_swim_max(H5HP_t *heap, size_t loc)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5HP_swim_min(H5HP_t *heap, size_t loc)
+H5HP__swim_min(H5HP_t *heap, size_t loc)
{
int val; /* Temporary copy value of object to move in heap */
H5HP_info_t *obj; /* Temporary pointer to object to move in heap */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Get copies of the information about the object to move in the heap */
val=heap->heap[loc].val;
@@ -171,16 +171,16 @@ H5HP_swim_min(H5HP_t *heap, size_t loc)
heap->heap[loc].obj->heap_loc=loc;
FUNC_LEAVE_NOAPI(ret_value);
-} /* end H5HP_swim_min() */
+} /* end H5HP__swim_min() */
/*--------------------------------------------------------------------------
NAME
- H5HP_sink_max
+ H5HP__sink_max
PURPOSE
Restore heap condition by moving an object downward
USAGE
- herr_t H5HP_sink_max(heap, loc)
+ herr_t H5HP__sink_max(heap, loc)
H5HP_t *heap; IN/OUT: Pointer to heap to modify
size_t loc; IN: Location to start from
@@ -196,13 +196,13 @@ H5HP_swim_min(H5HP_t *heap, size_t loc)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5HP_sink_max(H5HP_t *heap, size_t loc)
+H5HP__sink_max(H5HP_t *heap, size_t loc)
{
int val; /* Temporary copy value of object to move in heap */
void *obj; /* Temporary pointer to object to move in heap */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Get copies of the information about the object to move in the heap */
val=heap->heap[loc].val;
@@ -240,16 +240,16 @@ H5HP_sink_max(H5HP_t *heap, size_t loc)
heap->heap[loc].obj->heap_loc = loc;
FUNC_LEAVE_NOAPI(ret_value);
-} /* end H5HP_sink_max() */
+} /* end H5HP__sink_max() */
/*--------------------------------------------------------------------------
NAME
- H5HP_sink_min
+ H5HP__sink_min
PURPOSE
Restore heap condition by moving an object downward
USAGE
- herr_t H5HP_sink_min(heap, loc)
+ herr_t H5HP__sink_min(heap, loc)
H5HP_t *heap; IN/OUT: Pointer to heap to modify
size_t loc; IN: Location to start from
@@ -265,13 +265,13 @@ H5HP_sink_max(H5HP_t *heap, size_t loc)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5HP_sink_min(H5HP_t *heap, size_t loc)
+H5HP__sink_min(H5HP_t *heap, size_t loc)
{
int val; /* Temporary copy value of object to move in heap */
void *obj; /* Temporary pointer to object to move in heap */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Get copies of the information about the object to move in the heap */
val=heap->heap[loc].val;
@@ -309,7 +309,7 @@ H5HP_sink_min(H5HP_t *heap, size_t loc)
heap->heap[loc].obj->heap_loc = loc;
FUNC_LEAVE_NOAPI(ret_value);
-} /* end H5HP_sink_min() */
+} /* end H5HP__sink_min() */
/*--------------------------------------------------------------------------
@@ -493,11 +493,11 @@ H5HP_insert(H5HP_t *heap, int val, void *obj)
/* Restore heap condition */
if(heap->type==H5HP_MAX_HEAP) {
- if(H5HP_swim_max(heap,heap->nobjs)<0)
+ if(H5HP__swim_max(heap,heap->nobjs)<0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "unable to restore heap condition");
} /* end if */
else {
- if(H5HP_swim_min(heap,heap->nobjs)<0)
+ if(H5HP__swim_min(heap,heap->nobjs)<0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, FAIL, "unable to restore heap condition");
} /* end else */
@@ -619,11 +619,11 @@ H5HP_remove(H5HP_t *heap, int *val, void **obj)
/* Restore heap condition, if there are objects on the heap */
if(heap->nobjs>0) {
if(heap->type==H5HP_MAX_HEAP) {
- if(H5HP_sink_max(heap, (size_t)1) < 0)
+ if(H5HP__sink_max(heap, (size_t)1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "unable to restore heap condition");
} /* end if */
else {
- if(H5HP_sink_min(heap, (size_t)1) < 0)
+ if(H5HP__sink_min(heap, (size_t)1) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "unable to restore heap condition");
} /* end else */
} /* end if */
@@ -695,21 +695,21 @@ H5HP_change(H5HP_t *heap, int val, void *_obj)
/* Restore heap condition */
if(val<old_val) {
if(heap->type==H5HP_MAX_HEAP) {
- if(H5HP_sink_max(heap,obj_loc)<0)
+ if(H5HP__sink_max(heap,obj_loc)<0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end if */
else {
- if(H5HP_swim_min(heap,obj_loc)<0)
+ if(H5HP__swim_min(heap,obj_loc)<0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end else */
} /* end if */
else {
if(heap->type==H5HP_MAX_HEAP) {
- if(H5HP_swim_max(heap,obj_loc)<0)
+ if(H5HP__swim_max(heap,obj_loc)<0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end if */
else {
- if(H5HP_sink_min(heap,obj_loc)<0)
+ if(H5HP__sink_min(heap,obj_loc)<0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end else */
} /* end else */
@@ -778,11 +778,11 @@ H5HP_incr(H5HP_t *heap, unsigned amt, void *_obj)
/* Restore heap condition */
if(H5HP_MAX_HEAP == heap->type) {
- if(H5HP_swim_max(heap, obj_loc) < 0)
+ if(H5HP__swim_max(heap, obj_loc) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition")
} /* end if */
else {
- if(H5HP_sink_min(heap, obj_loc) < 0)
+ if(H5HP__sink_min(heap, obj_loc) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition")
} /* end else */
@@ -851,11 +851,11 @@ H5HP_decr(H5HP_t *heap, unsigned amt, void *_obj)
/* Restore heap condition */
if(heap->type==H5HP_MAX_HEAP) {
- if(H5HP_sink_max(heap,obj_loc)<0)
+ if(H5HP__sink_max(heap,obj_loc)<0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end if */
else {
- if(H5HP_swim_min(heap,obj_loc)<0)
+ if(H5HP__swim_min(heap,obj_loc)<0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESTORE, FAIL, "unable to restore heap condition");
} /* end else */
diff --git a/src/H5I.c b/src/H5I.c
index a739c4e..c1d966c 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -1124,9 +1124,8 @@ H5I_is_file_object(hid_t id)
/* Return TRUE if the ID is a file object (dataset, group, map, or committed
* datatype), FALSE otherwise.
*/
- if (H5I_DATASET == id_type || H5I_GROUP == id_type || H5I_MAP == id_type) {
+ if (H5I_DATASET == id_type || H5I_GROUP == id_type || H5I_MAP == id_type)
ret_value = TRUE;
- }
else if (H5I_DATATYPE == id_type) {
H5T_t *dt = NULL;
@@ -1136,9 +1135,8 @@ H5I_is_file_object(hid_t id)
ret_value = H5T_is_named(dt);
}
- else {
+ else
ret_value = FALSE;
- }
done:
FUNC_LEAVE_NOAPI(ret_value);
diff --git a/src/H5Imodule.h b/src/H5Imodule.h
index 60bda5a..9c56842 100644
--- a/src/H5Imodule.h
+++ b/src/H5Imodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h
index 2c1d81f..54b7b43 100644
--- a/src/H5Ipkg.h
+++ b/src/H5Ipkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, May 15, 2003
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5Itest.c b/src/H5Itest.c
index 07c1965..a51f860 100644
--- a/src/H5Itest.c
+++ b/src/H5Itest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgoup.org>
+/* Programmer: Quincey Koziol
* Tuesday, July 27, 2010
*
* Purpose: ID testing functions.
diff --git a/src/H5L.c b/src/H5L.c
index 4ef045d..f6b361a 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -98,7 +98,7 @@ typedef struct {
/* Local Prototypes */
/********************/
-static int H5L_find_class_idx(H5L_type_t id);
+static int H5L__find_class_idx(H5L_type_t id);
static herr_t H5L__link_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
H5G_own_loc_t *own_loc/*out*/);
@@ -1559,7 +1559,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_find_class_idx
+ * Function: H5L__find_class_idx
*
* Purpose: Given a link class ID, return the offset in the global array
* that holds all the registered link classes.
@@ -1574,12 +1574,12 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5L_find_class_idx(H5L_type_t id)
+H5L__find_class_idx(H5L_type_t id)
{
size_t i; /* Local index variable */
int ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
for(i = 0; i < H5L_table_used_g; i++)
if(H5L_table_g[i].id == id)
@@ -1587,7 +1587,7 @@ H5L_find_class_idx(H5L_type_t id)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5L_find_class_idx */
+} /* end H5L__find_class_idx */
/*-------------------------------------------------------------------------
@@ -1613,7 +1613,7 @@ H5L_find_class(H5L_type_t id)
FUNC_ENTER_NOAPI(NULL)
/* Get the index in the global table */
- if((idx = H5L_find_class_idx(id)) < 0)
+ if((idx = H5L__find_class_idx(id)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, NULL, "unable to find link class")
/* Set return value */
@@ -2054,7 +2054,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_create_hard
+ * Function: H5L__create_hard
*
* Purpose: Creates a hard link from NEW_NAME to CUR_NAME.
*
@@ -2066,7 +2066,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name,
+H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name,
const H5G_loc_t *link_loc, const char *link_name, hid_t lcpl_id)
{
char *norm_cur_name = NULL; /* Pointer to normalized current name */
@@ -2078,7 +2078,7 @@ H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name,
hbool_t loc_valid = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(cur_loc);
@@ -2123,11 +2123,11 @@ done:
H5MM_xfree(norm_cur_name);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5L_create_hard() */
+} /* end H5L__create_hard() */
/*-------------------------------------------------------------------------
- * Function: H5L_create_soft
+ * Function: H5L__create_soft
*
* Purpose: Creates a soft link from LINK_NAME to TARGET_PATH.
*
@@ -2139,14 +2139,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_create_soft(const char *target_path, const H5G_loc_t *link_loc,
+H5L__create_soft(const char *target_path, const H5G_loc_t *link_loc,
const char *link_name, hid_t lcpl_id)
{
char *norm_target = NULL; /* Pointer to normalized current name */
H5O_link_t lnk; /* Link to insert */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(link_loc);
@@ -2171,7 +2171,7 @@ done:
H5MM_xfree(norm_target);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5L_create_soft() */
+} /* end H5L__create_soft() */
/*-------------------------------------------------------------------------
@@ -2206,7 +2206,7 @@ H5L__create_ud(const H5G_loc_t *link_loc, const char *link_name,
lnk.u.ud.udata = NULL;
/* Make sure that this link class is registered */
- if(H5L_find_class_idx(type) < 0)
+ if(H5L__find_class_idx(type) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "link class has not been registered with library")
/* Fill in UD link-specific information in the link struct*/
@@ -2327,7 +2327,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_get_val
+ * Function: H5L__get_val
*
* Purpose: Returns the value of a symbolic link or the udata for a
* user-defined link.
@@ -2346,12 +2346,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_get_val(const H5G_loc_t *loc, const char *name, void *buf/*out*/, size_t size)
+H5L__get_val(const H5G_loc_t *loc, const char *name, void *buf/*out*/, size_t size)
{
H5L_trav_gv_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(loc);
@@ -2367,7 +2367,7 @@ H5L_get_val(const H5G_loc_t *loc, const char *name, void *buf/*out*/, size_t siz
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5L_get_val() */
+} /* H5L__get_val() */
/*-------------------------------------------------------------------------
@@ -2422,7 +2422,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_get_val_by_idx
+ * Function: H5L__get_val_by_idx
*
* Purpose: Internal routine to query a link value according to the
* index within a group
@@ -2435,13 +2435,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_get_val_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
+H5L__get_val_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, void *buf/*out*/, size_t size)
{
H5L_trav_gvbi_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(loc);
@@ -2460,7 +2460,7 @@ H5L_get_val_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5L_get_val_by_idx() */
+} /* end H5L__get_val_by_idx() */
/*-------------------------------------------------------------------------
@@ -2513,7 +2513,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_delete
+ * Function: H5L__delete
*
* Purpose: Delete a link from a group.
*
@@ -2525,12 +2525,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_delete(const H5G_loc_t *loc, const char *name)
+H5L__delete(const H5G_loc_t *loc, const char *name)
{
char *norm_name = NULL; /* Pointer to normalized name */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(loc);
@@ -2550,7 +2550,7 @@ done:
H5MM_xfree(norm_name);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5L_delete() */
+} /* end H5L__delete() */
/*-------------------------------------------------------------------------
@@ -2593,7 +2593,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_delete_by_idx
+ * Function: H5L__delete_by_idx
*
* Purpose: Internal routine to delete a link according to its index
* within a group.
@@ -2606,13 +2606,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_delete_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
+H5L__delete_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n)
{
H5L_trav_rmbi_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(loc);
@@ -2629,7 +2629,7 @@ H5L_delete_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5L_delete_by_idx() */
+} /* end H5L__delete_by_idx() */
/*-------------------------------------------------------------------------
@@ -2859,7 +2859,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_move
+ * Function: H5L__move
*
* Purpose: Atomically move or copy a link.
*
@@ -2879,7 +2879,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_loc,
+H5L__move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_loc,
const char *dst_name, hbool_t copy_flag, hid_t lcpl_id)
{
unsigned dst_target_flags = H5G_TARGET_NORMAL;
@@ -2888,7 +2888,7 @@ H5L_move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_lo
H5L_trav_mv_t udata; /* User data for traversal */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(src_loc);
@@ -2935,7 +2935,7 @@ H5L_move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_lo
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5L_move() */
+} /* end H5L__move() */
/*-------------------------------------------------------------------------
@@ -3036,7 +3036,7 @@ done:
*
* Purpose: Returns whether a link exists in a group
*
- * Note: Same as H5L_exists, except that missing links are reported
+ * Note: Same as H5L__exists, except that missing links are reported
* as 'FALSE' instead of causing failures
*
* Return: Non-negative (TRUE/FALSE) on success/Negative on failure
@@ -3099,7 +3099,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_exists
+ * Function: H5L__exists
*
* Purpose: Returns whether a link exists in a group
*
@@ -3114,12 +3114,12 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5L_exists(const H5G_loc_t *loc, const char *name)
+H5L__exists(const H5G_loc_t *loc, const char *name)
{
H5L_trav_le_t udata; /* User data for traversal */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* A path of "/" will always exist in a file */
if(0 == HDstrcmp(name, "/"))
@@ -3135,7 +3135,7 @@ H5L_exists(const H5G_loc_t *loc, const char *name)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5L_exists() */
+} /* H5L__exists() */
/*-------------------------------------------------------------------------
@@ -3260,7 +3260,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_get_info_by_idx
+ * Function: H5L__get_info_by_idx
*
* Purpose: Internal routine to retrieve link info according to an
* index's order.
@@ -3270,13 +3270,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5L_get_info_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
+H5L__get_info_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, H5L_info2_t *linfo /*out*/)
{
H5L_trav_gibi_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(loc);
@@ -3295,7 +3295,7 @@ H5L_get_info_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5L_get_info_by_idx() */
+} /* end H5L__get_info_by_idx() */
/*-------------------------------------------------------------------------
@@ -3339,7 +3339,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_get_name_by_idx
+ * Function: H5L__get_name_by_idx
*
* Purpose: Internal routine to retrieve link name according to an
* index's order.
@@ -3349,14 +3349,14 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5L_get_name_by_idx(const H5G_loc_t *loc, const char *group_name,
+H5L__get_name_by_idx(const H5G_loc_t *loc, const char *group_name,
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, char *name /*out*/,
size_t size)
{
H5L_trav_gnbi_t udata; /* User data for callback */
ssize_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(loc);
@@ -3379,7 +3379,7 @@ H5L_get_name_by_idx(const H5G_loc_t *loc, const char *group_name,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5L_get_name_by_idx() */
+} /* end H5L__get_name_by_idx() */
/*-------------------------------------------------------------------------
@@ -3391,7 +3391,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sep 29 2006
*
*-------------------------------------------------------------------------
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index 8a3e3e1..b8c7819 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -291,7 +291,7 @@ H5L__extern_query(const char H5_ATTR_UNUSED * link_name, const void *_udata, siz
const uint8_t *udata = (const uint8_t *)_udata; /* Pointer to external link buffer */
ssize_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check external link version & flags */
if(((*udata >> 4) & 0x0F) != H5L_EXT_VERSION)
diff --git a/src/H5Lmodule.h b/src/H5Lmodule.h
index cba4de4..d80126d 100644
--- a/src/H5Lmodule.h
+++ b/src/H5Lmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Lpkg.h b/src/H5Lpkg.h
index f0e9cfc..34890a1 100644
--- a/src/H5Lpkg.h
+++ b/src/H5Lpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: James Laird <matzke@llnl.gov>
+ * Programmer: James Laird
* Friday, December 1, 2005
*
* Purpose: This file contains declarations which are visible
@@ -51,9 +51,31 @@
/* Package Private Prototypes */
/******************************/
+H5_DLL herr_t H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name,
+ const H5G_loc_t *link_loc, const char *link_name, hid_t lcpl_id);
+H5_DLL herr_t H5L__create_soft(const char *target_path, const H5G_loc_t *cur_loc,
+ const char *cur_name, hid_t lcpl_id);
H5_DLL herr_t H5L__create_ud(const H5G_loc_t *link_loc, const char *link_name,
const void * ud_data, size_t ud_data_size, H5L_type_t type,
hid_t lcpl_id);
+H5_DLL htri_t H5L__exists(const H5G_loc_t *loc, const char *name);
+H5_DLL herr_t H5L__get_info_by_idx(const H5G_loc_t *loc, const char *name,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ H5L_info2_t *linfo /*out*/);
+H5_DLL ssize_t H5L__get_name_by_idx(const H5G_loc_t *loc, const char *group_name,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ char *name /*out*/, size_t size);
+H5_DLL herr_t H5L__get_val(const H5G_loc_t *loc, const char *name, void *buf/*out*/,
+ size_t size);
+H5_DLL herr_t H5L__get_val_by_idx(const H5G_loc_t *loc, const char *name,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
+ void *buf/*out*/, size_t size);
+H5_DLL herr_t H5L__move(const H5G_loc_t *src_loc, const char *src_name,
+ const H5G_loc_t *dst_loc, const char *dst_name, hbool_t copy_flag,
+ hid_t lcpl_id);
+H5_DLL herr_t H5L__delete(const H5G_loc_t *loc, const char *name);
+H5_DLL herr_t H5L__delete_by_idx(const H5G_loc_t *loc, const char *name,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n);
H5_DLL herr_t H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk,
const H5O_loc_t *src_oloc, H5O_link_t *dst_lnk, H5O_copy_t *cpy_info);
diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h
index 0487557..df842f3 100644
--- a/src/H5Lprivate.h
+++ b/src/H5Lprivate.h
@@ -113,31 +113,9 @@ H5_DLL herr_t H5L_link(const H5G_loc_t *new_loc, const char *new_name,
H5G_loc_t *obj_loc, hid_t lcpl_id);
H5_DLL herr_t H5L_link_object(const H5G_loc_t *new_loc, const char *new_name,
H5O_obj_create_t *ocrt_info, hid_t lcpl_id);
-H5_DLL herr_t H5L_create_hard(H5G_loc_t *cur_loc, const char *cur_name,
- const H5G_loc_t *link_loc, const char *link_name, hid_t lcpl_id);
-H5_DLL herr_t H5L_create_soft(const char *target_path, const H5G_loc_t *cur_loc,
- const char *cur_name, hid_t lcpl_id);
-H5_DLL herr_t H5L_move(const H5G_loc_t *src_loc, const char *src_name,
- const H5G_loc_t *dst_loc, const char *dst_name, hbool_t copy_flag,
- hid_t lcpl_id);
H5_DLL htri_t H5L_exists_tolerant(const H5G_loc_t *loc, const char *name);
-H5_DLL htri_t H5L_exists(const H5G_loc_t *loc, const char *name);
H5_DLL herr_t H5L_get_info(const H5G_loc_t *loc, const char *name,
H5L_info2_t *linkbuf/*out*/);
-H5_DLL herr_t H5L_delete(const H5G_loc_t *loc, const char *name);
-H5_DLL herr_t H5L_delete_by_idx(const H5G_loc_t *loc, const char *name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n);
-H5_DLL herr_t H5L_get_info_by_idx(const H5G_loc_t *loc, const char *name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- H5L_info2_t *linfo /*out*/);
-H5_DLL ssize_t H5L_get_name_by_idx(const H5G_loc_t *loc, const char *group_name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- char *name /*out*/, size_t size);
-H5_DLL herr_t H5L_get_val(const H5G_loc_t *loc, const char *name, void *buf/*out*/,
- size_t size);
-H5_DLL herr_t H5L_get_val_by_idx(const H5G_loc_t *loc, const char *name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
- void *buf/*out*/, size_t size);
H5_DLL herr_t H5L_register_external(void);
H5_DLL herr_t H5L_iterate(H5G_loc_t *loc, const char *group_name,
H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx_p,
diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h
index 3bac5ac..861fafc 100644
--- a/src/H5Lpublic.h
+++ b/src/H5Lpublic.h
@@ -57,7 +57,7 @@ extern "C" {
* Values 64 to 255 are for "user-defined" link class types; these types are
* defined by HDF5 but their behavior can be overridden by users.
* Users who want to create new classes of links should contact the HDF5
- * development team at hdfhelp@ncsa.uiuc.edu .
+ * development team at help@hdfgroup.org.
* These values can never change because they appear in HDF5 files.
*/
typedef enum {
diff --git a/src/H5MF.c b/src/H5MF.c
index 946961d..aa65db2 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -15,7 +15,7 @@
*
* Created: H5MF.c
* Jul 11 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: File memory management functions.
*
@@ -51,9 +51,11 @@
#define H5MF_FSPACE_EXPAND 120 /* Percent of "normal" size to expand serialized free space size */
#define H5MF_CHECK_FSM(FSM, CF) \
- HDassert(*CF == FALSE); \
- if(!H5F_addr_defined(FSM->addr) || !H5F_addr_defined(FSM->sect_addr)) \
- *CF = TRUE;
+ do { \
+ HDassert(*CF == FALSE); \
+ if(!H5F_addr_defined(FSM->addr) || !H5F_addr_defined(FSM->sect_addr)) \
+ *CF = TRUE; \
+ } while(0)
/* For non-paged aggregation: map allocation request type to tracked free-space type */
/* F_SH -- pointer to H5F_shared_t; T -- H5FD_mem_t */
@@ -300,7 +302,6 @@ H5MF__alloc_to_fs_type(H5F_shared_t *f_sh, H5FD_mem_t alloc_type, hsize_t size,
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 8 2008
*
*-------------------------------------------------------------------------
@@ -380,7 +381,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 8 2008
*
*-------------------------------------------------------------------------
@@ -466,7 +466,6 @@ done:
* Failure: negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 8 2008
*
*-------------------------------------------------------------------------
@@ -781,7 +780,6 @@ done:
* Failure: HADDR_UNDEF
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 11 1997
*
*-------------------------------------------------------------------------
@@ -1086,7 +1084,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 17 1997
*
*-------------------------------------------------------------------------
@@ -1448,7 +1445,6 @@ H5MF__sects_dump(f, stderr);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Feb 14 2008
*
*-------------------------------------------------------------------------
@@ -2173,7 +2169,7 @@ H5MF__close_shrink_eoa(H5F_t *f)
} /* end for */
/* check the two aggregators */
- if((status = H5MF_aggrs_try_shrink_eoa(f)) < 0)
+ if((status = H5MF__aggrs_try_shrink_eoa(f)) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSHRINK, FAIL, "can't check for shrinking eoa")
else if(status > 0)
eoa_shrank = TRUE;
@@ -2503,7 +2499,7 @@ H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata,
hsize_t hnums = 0; /* # of sections */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_PACKAGE
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
@@ -3334,35 +3330,31 @@ static herr_t
H5MF__continue_alloc_fsm(H5F_shared_t *f_sh, H5FS_t *sm_hdr_fspace, H5FS_t *sm_sinfo_fspace,
H5FS_t *lg_hdr_fspace, H5FS_t *lg_sinfo_fspace, hbool_t *continue_alloc_fsm)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity checks */
HDassert(f_sh);
HDassert(continue_alloc_fsm);
/* Check sm_hdr_fspace */
- if(sm_hdr_fspace && sm_hdr_fspace->serial_sect_count > 0 && sm_hdr_fspace->sinfo) {
+ if(sm_hdr_fspace && sm_hdr_fspace->serial_sect_count > 0 && sm_hdr_fspace->sinfo)
H5MF_CHECK_FSM(sm_hdr_fspace, continue_alloc_fsm);
- } /* end if */
if(!(*continue_alloc_fsm))
if(sm_sinfo_fspace && sm_sinfo_fspace != sm_hdr_fspace &&
- sm_sinfo_fspace->serial_sect_count > 0 && sm_sinfo_fspace->sinfo) {
+ sm_sinfo_fspace->serial_sect_count > 0 && sm_sinfo_fspace->sinfo)
H5MF_CHECK_FSM(sm_hdr_fspace, continue_alloc_fsm);
- } /* end if */
if(H5F_SHARED_PAGED_AGGR(f_sh) && !(*continue_alloc_fsm)) {
/* Check lg_hdr_fspace */
- if(lg_hdr_fspace && lg_hdr_fspace->serial_sect_count > 0 && lg_hdr_fspace->sinfo) {
+ if(lg_hdr_fspace && lg_hdr_fspace->serial_sect_count > 0 && lg_hdr_fspace->sinfo)
H5MF_CHECK_FSM(lg_hdr_fspace, continue_alloc_fsm);
- } /* end if */
/* Check lg_sinfo_fspace */
if(!(*continue_alloc_fsm))
if(lg_sinfo_fspace && lg_sinfo_fspace != lg_hdr_fspace &&
- lg_sinfo_fspace->serial_sect_count > 0 && lg_sinfo_fspace->sinfo) {
+ lg_sinfo_fspace->serial_sect_count > 0 && lg_sinfo_fspace->sinfo)
H5MF_CHECK_FSM(lg_sinfo_fspace, continue_alloc_fsm);
- } /* end if */
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c
index 0124555..ce7db6b 100644
--- a/src/H5MFaggr.c
+++ b/src/H5MFaggr.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Tuesday, January 8, 2008
*
* Purpose: Routines for aggregating free space allocations
@@ -874,7 +874,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5MF_aggrs_try_shrink_eoa
+ * Function: H5MF__aggrs_try_shrink_eoa
*
* Purpose: Check the metadata & small block aggregators to see if
* EOA shrink is possible; if so, shrink each aggregator
@@ -887,13 +887,13 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5MF_aggrs_try_shrink_eoa(H5F_t *f)
+H5MF__aggrs_try_shrink_eoa(H5F_t *f)
{
htri_t ma_status; /* Whether the metadata aggregator can shrink the EOA */
htri_t sda_status; /* Whether the small data aggregator can shrink the EOA */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(f);
@@ -915,5 +915,5 @@ H5MF_aggrs_try_shrink_eoa(H5F_t *f)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5MF_aggrs_try_shrink_eoa() */
+} /* end H5MF__aggrs_try_shrink_eoa() */
diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c
index 43e2305..abdecce 100644
--- a/src/H5MFdbg.c
+++ b/src/H5MFdbg.c
@@ -15,7 +15,7 @@
*
* Created: H5MFdbg.c
* Jan 31 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: File memory management debugging functions.
*
@@ -92,7 +92,6 @@ static herr_t H5MF__sects_debug_cb(H5FS_section_info_t *_sect, void *_udata);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* January 31 2008
*
*-------------------------------------------------------------------------
@@ -148,7 +147,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* January 31 2008
*
*-------------------------------------------------------------------------
@@ -209,7 +207,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 31 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5MFmodule.h b/src/H5MFmodule.h
index 53daabf..6b3aba5 100644
--- a/src/H5MFmodule.h
+++ b/src/H5MFmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5MFpkg.h b/src/H5MFpkg.h
index fc398db..7d72658 100644
--- a/src/H5MFpkg.h
+++ b/src/H5MFpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Tuesday, January 8, 2008
*
* Purpose: This file contains declarations which are visible only within
@@ -191,6 +191,7 @@ H5_DLL herr_t H5MF__sect_free(H5FS_section_info_t *sect);
/* Block aggregator routines */
H5_DLL htri_t H5MF__aggr_try_extend(H5F_t *f, H5F_blk_aggr_t *aggr,
H5FD_mem_t type, haddr_t abs_blk_end, hsize_t extra_requested);
+H5_DLL htri_t H5MF__aggrs_try_shrink_eoa(H5F_t *f);
H5_DLL htri_t H5MF__aggr_can_absorb(const H5F_t *f, const H5F_blk_aggr_t *aggr,
const H5MF_free_section_t *sect, H5MF_shrink_type_t *shrink);
H5_DLL herr_t H5MF__aggr_absorb(const H5F_t *f, H5F_blk_aggr_t *aggr,
diff --git a/src/H5MFprivate.h b/src/H5MFprivate.h
index acd773b..2e9ea99 100644
--- a/src/H5MFprivate.h
+++ b/src/H5MFprivate.h
@@ -15,7 +15,7 @@
*
* Created: H5MFprivate.h
* Jul 11 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Private header file for file memory management.
*
@@ -69,7 +69,6 @@ H5_DLL haddr_t H5MF_alloc_tmp(H5F_t *f, hsize_t size);
/* 'block aggregator' routines */
H5_DLL herr_t H5MF_free_aggrs(H5F_t *f);
-H5_DLL htri_t H5MF_aggrs_try_shrink_eoa(H5F_t *f);
/* Free space manager settling routines */
H5_DLL herr_t H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled);
diff --git a/src/H5MFsection.c b/src/H5MFsection.c
index 715ece4..f69df41 100644
--- a/src/H5MFsection.c
+++ b/src/H5MFsection.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Tuesday, January 8, 2008
*
* Purpose: Free space section callbacks for file.
@@ -112,7 +112,7 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{
NULL, /* Add section */
NULL, /* Serialize section */
H5MF__sect_deserialize, /* Deserialize section */
- H5MF__sect_simple_can_merge, /* Can sections merge? */
+ H5MF__sect_simple_can_merge, /* Can sections merge? */
H5MF__sect_simple_merge, /* Merge sections */
H5MF__sect_simple_can_shrink, /* Can section shrink container?*/
H5MF__sect_simple_shrink, /* Shrink container w/section */
@@ -136,16 +136,16 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1] = {{
/* Object methods */
H5MF__sect_small_add, /* Add section */
- NULL, /* Serialize section */
- H5MF__sect_deserialize, /* Deserialize section */
+ NULL, /* Serialize section */
+ H5MF__sect_deserialize, /* Deserialize section */
H5MF__sect_small_can_merge, /* Can sections merge? */
H5MF__sect_small_merge, /* Merge sections */
- NULL, /* Can section shrink container?*/
- NULL, /* Shrink container w/section */
+ NULL, /* Can section shrink container?*/
+ NULL, /* Shrink container w/section */
H5MF__sect_free, /* Free section */
H5MF__sect_valid, /* Check validity of section */
H5MF__sect_split, /* Split section node for alignment */
- NULL, /* Dump debugging for section */
+ NULL, /* Dump debugging for section */
}};
/* Class info for "large" free space sections */
@@ -166,7 +166,7 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_LARGE[1] = {{
H5MF__sect_deserialize, /* Deserialize section */
H5MF__sect_large_can_merge, /* Can sections merge? */
H5MF__sect_large_merge, /* Merge sections */
- H5MF__sect_large_can_shrink, /* Can section shrink container?*/
+ H5MF__sect_large_can_shrink, /* Can section shrink container?*/
H5MF__sect_large_shrink, /* Shrink container w/section */
H5MF__sect_free, /* Free section */
H5MF__sect_valid, /* Check validity of section */
@@ -199,7 +199,6 @@ H5FL_DEFINE(H5MF_free_section_t);
* Return: Pointer to new section on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* January 8 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5MM.c b/src/H5MM.c
index cceac4f..efe955a 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -15,7 +15,7 @@
*
* Created: H5MM.c
* Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Memory management functions
*
diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h
index 0787eb2..b6c1002 100644
--- a/src/H5MMprivate.h
+++ b/src/H5MMprivate.h
@@ -15,7 +15,7 @@
*
* Created: H5MMprivate.h
* Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Private header for memory management.
*
diff --git a/src/H5MMpublic.h b/src/H5MMpublic.h
index 4e54c33..faa3032 100644
--- a/src/H5MMpublic.h
+++ b/src/H5MMpublic.h
@@ -13,15 +13,13 @@
/*-------------------------------------------------------------------------
*
- * Created: H5MMproto.h
+ * Created: H5MMpublic.h
* Jul 10 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Public declarations for the H5MM (memory management)
* package.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef _H5MMpublic_H
diff --git a/src/H5MP.c b/src/H5MP.c
index 7947e7d..e773655 100644
--- a/src/H5MP.c
+++ b/src/H5MP.c
@@ -15,7 +15,7 @@
*
* Created: H5MP.c
* May 2 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Implements memory pools. (Similar to Apache's APR
* memory pools)
@@ -82,7 +82,6 @@ H5FL_DEFINE(H5MP_pool_t);
* Return: Pointer to the memory pool "header" on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2005
*
*-------------------------------------------------------------------------
@@ -125,26 +124,25 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5MP_new_page
+ * Function: H5MP__new_page
*
* Purpose: Allocate new page for a memory pool
*
* Return: Pointer to the page allocated on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 4 2005
*
*-------------------------------------------------------------------------
*/
static H5MP_page_t *
-H5MP_new_page(H5MP_pool_t *mp, size_t page_size)
+H5MP__new_page(H5MP_pool_t *mp, size_t page_size)
{
H5MP_page_t *new_page; /* New page created */
H5MP_page_blk_t *first_blk; /* Pointer to first block in page */
H5MP_page_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(mp);
@@ -163,9 +161,6 @@ H5MP_new_page(H5MP_pool_t *mp, size_t page_size)
new_page->free_size = mp->max_size;
new_page->fac_alloc = TRUE;
} /* end else */
-#ifdef QAK
-HDfprintf(stderr,"%s: Allocating new page = %p\n", FUNC, new_page);
-#endif /* QAK */
/* Initialize page information */
first_blk = H5MP_PAGE_FIRST_BLOCK(new_page);
@@ -191,7 +186,7 @@ HDfprintf(stderr,"%s: Allocating new page = %p\n", FUNC, new_page);
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5MP_new_page() */
+} /* end H5MP__new_page() */
/*-------------------------------------------------------------------------
@@ -202,7 +197,6 @@ done:
* Return: Pointer to the space allocated on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 2 2005
*
*-------------------------------------------------------------------------
@@ -223,10 +217,6 @@ H5MP_malloc (H5MP_pool_t *mp, size_t request)
/* Compute actual size needed */
needed = H5MP_BLOCK_ALIGN(request) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t));
-#ifdef QAK
-HDfprintf(stderr,"%s: sizeof(H5MP_page_blk_t) = %Zu\n", FUNC, sizeof(H5MP_page_blk_t));
-HDfprintf(stderr,"%s: request = %Zu, needed = %Zu\n", FUNC, request, needed);
-#endif /* QAK */
/* See if the request can be handled by existing free space */
if(needed <= mp->free_size) {
@@ -275,7 +265,7 @@ HDfprintf(stderr,"%s: request = %Zu, needed = %Zu\n", FUNC, request, needed);
(needed + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_t))) : mp->page_size;
/* Allocate new page */
- if(NULL == (alloc_page = H5MP_new_page(mp, page_size)))
+ if(NULL == (alloc_page = H5MP__new_page(mp, page_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for page")
/* Set the block to allocate from */
@@ -323,9 +313,6 @@ found:
/* Set new space pointer for the return value */
ret_value = ((unsigned char *)alloc_free) + H5MP_BLOCK_ALIGN(sizeof(H5MP_page_blk_t));
-#ifdef QAK
-HDfprintf(stderr,"%s: Allocating space from page, ret_value = %p\n", FUNC, ret_value);
-#endif /* QAK */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -340,7 +327,6 @@ done:
* Return: NULL on success/NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 3 2005
*
* Note: Should we release pages that have no used blocks?
@@ -369,9 +355,6 @@ H5MP_free(H5MP_pool_t *mp, void *spc)
/* Add it's space to the amount of free space in the page & pool */
spc_page = spc_blk->page;
-#ifdef QAK
-HDfprintf(stderr,"%s: Freeing from page = %p\n", "H5MP_free", spc_page);
-#endif /* QAK */
spc_page->free_size += spc_blk->size;
mp->free_size += spc_blk->size;
@@ -429,7 +412,6 @@ HDfprintf(stderr,"%s: Freeing from page = %p\n", "H5MP_free", spc_page);
* Return: Non-negative on success/negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 3 2005
*
*-------------------------------------------------------------------------
diff --git a/src/H5MPmodule.h b/src/H5MPmodule.h
index 27f7706..19b137f 100644
--- a/src/H5MPmodule.h
+++ b/src/H5MPmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5MPpkg.h b/src/H5MPpkg.h
index 29a25fa..ee2eb34 100644
--- a/src/H5MPpkg.h
+++ b/src/H5MPpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Monday, May 2, 2005
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5MPprivate.h b/src/H5MPprivate.h
index 009cb50..be97e5d 100644
--- a/src/H5MPprivate.h
+++ b/src/H5MPprivate.h
@@ -15,7 +15,7 @@
*
* Created: H5MPprivate.h
* May 2 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Private header for memory pool routines.
*
diff --git a/src/H5MPtest.c b/src/H5MPtest.c
index 0cba847..fa5b165 100644
--- a/src/H5MPtest.c
+++ b/src/H5MPtest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
* Purpose: Memory pool testing functions.
@@ -42,8 +42,6 @@
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -74,8 +72,6 @@ H5MP_get_pool_free_size(const H5MP_pool_t *mp, size_t *free_size)
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -109,8 +105,6 @@ H5MP_get_pool_first_page(const H5MP_pool_t *mp, H5MP_page_t **page)
* Programmer: Quincey Koziol
* Wednesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
htri_t
@@ -144,9 +138,6 @@ H5MP_pool_is_free_size_correct(const H5MP_pool_t *mp)
/* Check that the free space from the blocks on the free list
* corresponds to space in page */
-#ifdef QAK
-HDfprintf(stderr,"%s: page_free = %Zu, page->free_size = %Zu\n", "H5MP_pool_is_free_size_correct", page_free, page->free_size);
-#endif /* QAK */
if(page_free != page->free_size)
HGOTO_DONE (FALSE)
@@ -159,9 +150,6 @@ HDfprintf(stderr,"%s: page_free = %Zu, page->free_size = %Zu\n", "H5MP_pool_is_f
/* Check that the free space from the pages
* corresponds to free space in pool */
-#ifdef QAK
-HDfprintf(stderr,"%s: pool_free = %Zu, mp->free_size = %Zu\n", "H5MP_pool_is_free_size_correct", pool_free, mp->free_size);
-#endif /* QAK */
if(pool_free != mp->free_size)
HGOTO_DONE (FALSE)
@@ -182,8 +170,6 @@ done:
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -214,8 +200,6 @@ H5MP_get_page_free_size(const H5MP_page_t *page, size_t *free_size)
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index 2d95ee9..fb08048 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -15,7 +15,7 @@
*
* Created: H5Oainfo.c
* Mar 6 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Attribute Information messages.
*
@@ -36,12 +36,12 @@
/* PRIVATE PROTOTYPES */
static void *H5O__ainfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_ainfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_ainfo_copy(const void *_mesg, void *_dest);
-static size_t H5O_ainfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__ainfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O__ainfo_copy(const void *_mesg, void *_dest);
+static size_t H5O__ainfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__ainfo_free(void *_mesg);
static herr_t H5O__ainfo_delete(H5F_t *f, H5O_t *open_oh, void *_mesg);
-static herr_t H5O_ainfo_pre_copy_file(H5F_t *file_src, const void *mesg_src,
+static herr_t H5O__ainfo_pre_copy_file(H5F_t *file_src, const void *mesg_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void *udata);
static void *H5O__ainfo_copy_file(H5F_t *file_src, void *mesg_src,
H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags,
@@ -59,16 +59,16 @@ const H5O_msg_class_t H5O_MSG_AINFO[1] = {{
sizeof(H5O_ainfo_t), /*native message size */
0, /* messages are sharable? */
H5O__ainfo_decode, /*decode message */
- H5O_ainfo_encode, /*encode message */
- H5O_ainfo_copy, /*copy the native value */
- H5O_ainfo_size, /*size of symbol table entry */
+ H5O__ainfo_encode, /*encode message */
+ H5O__ainfo_copy, /*copy the native value */
+ H5O__ainfo_size, /*size of symbol table entry */
NULL, /*default reset method */
H5O__ainfo_free, /* free method */
H5O__ainfo_delete, /* file delete method */
NULL, /* link method */
NULL, /*set share method */
NULL, /*can share method */
- H5O_ainfo_pre_copy_file, /* pre copy native value to file */
+ H5O__ainfo_pre_copy_file, /* pre copy native value to file */
H5O__ainfo_copy_file, /* copy native value to file */
H5O__ainfo_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
@@ -97,7 +97,6 @@ H5FL_DEFINE_STATIC(H5O_ainfo_t);
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 6 2007
*
*-------------------------------------------------------------------------
@@ -165,25 +164,24 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_ainfo_encode
+ * Function: H5O__ainfo_encode
*
* Purpose: Encodes a message.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 6 2007
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
unsigned char flags; /* Flags for encoding attribute info */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -215,11 +213,11 @@ H5O_ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
HDassert(!H5F_addr_defined(ainfo->corder_bt2_addr));
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_ainfo_encode() */
+} /* end H5O__ainfo_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_ainfo_copy
+ * Function: H5O__ainfo_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -228,19 +226,18 @@ H5O_ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 6 2007
*
*-------------------------------------------------------------------------
*/
static void *
-H5O_ainfo_copy(const void *_mesg, void *_dest)
+H5O__ainfo_copy(const void *_mesg, void *_dest)
{
const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
H5O_ainfo_t *dest = (H5O_ainfo_t *) _dest;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(ainfo);
@@ -255,11 +252,11 @@ H5O_ainfo_copy(const void *_mesg, void *_dest)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_ainfo_copy() */
+} /* end H5O__ainfo_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_ainfo_size
+ * Function: H5O__ainfo_size
*
* Purpose: Returns the size of the raw message in bytes not counting
* the message type or size fields, but only the data fields.
@@ -269,18 +266,17 @@ done:
* Failure: zero
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 6 2007
*
*-------------------------------------------------------------------------
*/
static size_t
-H5O_ainfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__ainfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_ainfo_t *ainfo = (const H5O_ainfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Set return value */
ret_value = (size_t)(1 /* Version */
@@ -291,7 +287,7 @@ H5O_ainfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
+ (ainfo->index_corder ? H5F_SIZEOF_ADDR(f) : 0)); /* Address of v2 B-tree for indexing creation order values of attributes */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_ainfo_size() */
+} /* end H5O__ainfo_size() */
/*-------------------------------------------------------------------------
@@ -358,7 +354,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_ainfo_pre_copy_file
+ * Function: H5O__ainfo_pre_copy_file
*
* Purpose: Perform any necessary actions before copying message between
* files.
@@ -372,10 +368,10 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
+H5O__ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(deleted);
@@ -388,7 +384,7 @@ H5O_ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSE
*deleted = TRUE;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_ainfo_pre_copy_file() */
+} /* end H5O__ainfo_pre_copy_file() */
/*-------------------------------------------------------------------------
@@ -499,7 +495,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 6 2007
*
*-------------------------------------------------------------------------
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 8850ef6..3c19cf4 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -15,7 +15,7 @@
*
* Created: H5Oalloc.c
* Nov 17 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Object header allocation routines.
*
@@ -105,7 +105,6 @@ H5FL_EXTERN(H5O_cont_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 17 2006
*
*-------------------------------------------------------------------------
@@ -231,7 +230,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 17 2006
*
*-------------------------------------------------------------------------
@@ -332,7 +330,6 @@ H5O__eliminate_gap(H5O_t *oh, hbool_t *chk_dirtied, H5O_mesg_t *mesg,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 22 2006
*
*-------------------------------------------------------------------------
@@ -440,7 +437,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Nov 21 2005
*
*-------------------------------------------------------------------------
@@ -729,7 +725,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* Oct 21 2016
*
*-------------------------------------------------------------------------
@@ -878,7 +873,6 @@ H5O__alloc_find_best_nonnull(const H5F_t *f, const H5O_t *oh, size_t *size,
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* Oct 21 2016
*
*-------------------------------------------------------------------------
@@ -1157,7 +1151,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 7 1997
*
*-------------------------------------------------------------------------
@@ -1208,7 +1201,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@lbl.gov
* Oct 21 2016
*
*-------------------------------------------------------------------------
@@ -1283,7 +1275,6 @@ H5O__alloc_find_best_null(const H5O_t *oh, size_t size, size_t *mesg_idx)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -1369,7 +1360,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 22 2006
*
*-------------------------------------------------------------------------
@@ -1607,7 +1597,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Oct 17 2005
*
*-------------------------------------------------------------------------
@@ -1958,7 +1947,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Oct 10 2005
*
*-------------------------------------------------------------------------
@@ -2101,7 +2089,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Oct 17 2005
*
*-------------------------------------------------------------------------
@@ -2286,7 +2273,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Oct 4 2005
*
*-------------------------------------------------------------------------
@@ -2347,7 +2333,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
- * nfortne2@hdfgroup.org
* Oct 20 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 6123949..8b02724 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -24,13 +24,13 @@
#include "H5Spkg.h" /* Dataspaces */
/* PRIVATE PROTOTYPES */
-static herr_t H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg);
-static void *H5O_attr_decode(H5F_t *f, H5O_t *open_oh,
+static herr_t H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg);
+static void *H5O__attr_decode(H5F_t *f, H5O_t *open_oh,
unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
-static void *H5O_attr_copy(const void *_mesg, void *_dest);
-static size_t H5O_attr_size(const H5F_t *f, const void *_mesg);
+static void *H5O__attr_copy(const void *_mesg, void *_dest);
+static size_t H5O__attr_size(const H5F_t *f, const void *_mesg);
static herr_t H5O__attr_free(void *mesg);
-static herr_t H5O_attr_pre_copy_file(H5F_t *file_src, const void *mesg_src,
+static herr_t H5O__attr_pre_copy_file(H5F_t *file_src, const void *mesg_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void *udata);
static void *H5O__attr_copy_file(H5F_t *file_src, const H5O_msg_class_t *mesg_type,
void *native_src, H5F_t *file_dst, hbool_t *recompute_size,
@@ -38,29 +38,29 @@ static void *H5O__attr_copy_file(H5F_t *file_src, const H5O_msg_class_t *mesg_ty
static herr_t H5O__attr_post_copy_file(const H5O_loc_t *src_oloc,
const void *mesg_src, H5O_loc_t *dst_oloc, void *mesg_dst,
H5O_copy_t *cpy_info);
-static herr_t H5O_attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx);
-static herr_t H5O_attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx);
+static herr_t H5O__attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx);
+static herr_t H5O__attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx);
static herr_t H5O__attr_debug(H5F_t *f, const void *_mesg, FILE * stream,
int indent, int fwidth);
/* Set up & include shared message "interface" info */
#define H5O_SHARED_TYPE H5O_MSG_ATTR
-#define H5O_SHARED_DECODE H5O_attr_shared_decode
-#define H5O_SHARED_DECODE_REAL H5O_attr_decode
-#define H5O_SHARED_ENCODE H5O_attr_shared_encode
-#define H5O_SHARED_ENCODE_REAL H5O_attr_encode
-#define H5O_SHARED_SIZE H5O_attr_shared_size
-#define H5O_SHARED_SIZE_REAL H5O_attr_size
+#define H5O_SHARED_DECODE H5O__attr_shared_decode
+#define H5O_SHARED_DECODE_REAL H5O__attr_decode
+#define H5O_SHARED_ENCODE H5O__attr_shared_encode
+#define H5O_SHARED_ENCODE_REAL H5O__attr_encode
+#define H5O_SHARED_SIZE H5O__attr_shared_size
+#define H5O_SHARED_SIZE_REAL H5O__attr_size
#define H5O_SHARED_DELETE H5O__attr_shared_delete
#define H5O_SHARED_DELETE_REAL H5O__attr_delete
#define H5O_SHARED_LINK H5O__attr_shared_link
#define H5O_SHARED_LINK_REAL H5O__attr_link
#define H5O_SHARED_COPY_FILE H5O__attr_shared_copy_file
#define H5O_SHARED_COPY_FILE_REAL H5O__attr_copy_file
-#define H5O_SHARED_POST_COPY_FILE H5O_attr_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O__attr_shared_post_copy_file
#define H5O_SHARED_POST_COPY_FILE_REAL H5O__attr_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_UPD
-#define H5O_SHARED_DEBUG H5O_attr_shared_debug
+#define H5O_SHARED_DEBUG H5O__attr_shared_debug
#define H5O_SHARED_DEBUG_REAL H5O__attr_debug
#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
@@ -70,22 +70,22 @@ const H5O_msg_class_t H5O_MSG_ATTR[1] = {{
"attribute", /* message name for debugging */
sizeof(H5A_t), /* native message size */
H5O_SHARE_IS_SHARABLE, /* messages are sharable? */
- H5O_attr_shared_decode, /* decode message */
- H5O_attr_shared_encode, /* encode message */
- H5O_attr_copy, /* copy the native value */
- H5O_attr_shared_size, /* size of raw message */
+ H5O__attr_shared_decode, /* decode message */
+ H5O__attr_shared_encode, /* encode message */
+ H5O__attr_copy, /* copy the native value */
+ H5O__attr_shared_size, /* size of raw message */
H5O__attr_reset, /* reset method */
H5O__attr_free, /* free method */
H5O__attr_shared_delete, /* file delete method */
H5O__attr_shared_link, /* link method */
NULL, /* set share method */
NULL, /* can share method */
- H5O_attr_pre_copy_file, /* pre copy native value to file */
+ H5O__attr_pre_copy_file, /* pre copy native value to file */
H5O__attr_shared_copy_file, /* copy native value to file */
- H5O_attr_shared_post_copy_file, /* post copy native value to file */
- H5O_attr_get_crt_index, /* get creation index */
- H5O_attr_set_crt_index, /* set creation index */
- H5O_attr_shared_debug /* debug the message */
+ H5O__attr_shared_post_copy_file, /* post copy native value to file */
+ H5O__attr_get_crt_index, /* get creation index */
+ H5O__attr_set_crt_index, /* set creation index */
+ H5O__attr_shared_debug /* debug the message */
}};
/* Flags for attribute flag encoding */
@@ -102,12 +102,12 @@ H5FL_EXTERN(H5S_extent_t);
/*--------------------------------------------------------------------------
NAME
- H5O_attr_decode
+ H5O__attr_decode
PURPOSE
Decode a attribute message and return a pointer to a memory struct
with the decoded information
USAGE
- void *H5O_attr_decode(f, mesg_flags, p)
+ void *H5O__attr_decode(f, mesg_flags, p)
H5F_t *f; IN: pointer to the HDF5 file struct
H5O_t *open_oh; IN: pointer to the object header
unsigned mesg_flags; IN: message flags to influence decoding
@@ -122,7 +122,7 @@ H5FL_EXTERN(H5S_extent_t);
function using malloc() and is returned to the caller.
--------------------------------------------------------------------------*/
static void *
-H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
+H5O__attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p)
{
H5A_t *attr = NULL;
@@ -134,7 +134,7 @@ H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
unsigned flags = 0; /* Attribute flags */
H5A_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
@@ -270,16 +270,16 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_attr_decode() */
+} /* end H5O__attr_decode() */
/*--------------------------------------------------------------------------
NAME
- H5O_attr_encode
+ H5O__attr_encode
PURPOSE
Encode a simple attribute message
USAGE
- herr_t H5O_attr_encode(f, p, mesg)
+ herr_t H5O__attr_encode(f, p, mesg)
H5F_t *f; IN: pointer to the HDF5 file struct
const uint8 *p; IN: the raw information buffer
const void *mesg; IN: Pointer to the simple datatype struct
@@ -290,7 +290,7 @@ done:
message in the "raw" disk form.
--------------------------------------------------------------------------*/
static herr_t
-H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
+H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
{
const H5A_t *attr = (const H5A_t *) mesg;
size_t name_len; /* Attribute name length */
@@ -299,7 +299,7 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
unsigned flags = 0; /* Attribute flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
@@ -379,16 +379,16 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
done:
FUNC_LEAVE_NOAPI(ret_value);
-} /* end H5O_attr_encode() */
+} /* end H5O__attr_encode() */
/*--------------------------------------------------------------------------
NAME
- H5O_attr_copy
+ H5O__attr_copy
PURPOSE
Copies a message from MESG to DEST, allocating DEST if necessary.
USAGE
- void *H5O_attr_copy(mesg, dest)
+ void *H5O__attr_copy(mesg, dest)
const void *mesg; IN: Pointer to the source attribute struct
const void *dest; IN: Pointer to the destination attribute struct
RETURNS
@@ -398,11 +398,11 @@ done:
allocating the destination structure if necessary.
--------------------------------------------------------------------------*/
static void *
-H5O_attr_copy(const void *_src, void *_dst)
+H5O__attr_copy(const void *_src, void *_dst)
{
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(_src);
@@ -413,16 +413,16 @@ H5O_attr_copy(const void *_src, void *_dst)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_attr_copy() */
+} /* end H5O__attr_copy() */
/*--------------------------------------------------------------------------
NAME
- H5O_attr_size
+ H5O__attr_size
PURPOSE
Return the raw message size in bytes
USAGE
- size_t H5O_attr_size(f, mesg)
+ size_t H5O__attr_size(f, mesg)
H5F_t *f; IN: pointer to the HDF5 file struct
const void *mesg; IN: Pointer to the source attribute struct
RETURNS
@@ -433,13 +433,13 @@ done:
portion of the message). It doesn't take into account alignment.
--------------------------------------------------------------------------*/
static size_t
-H5O_attr_size(const H5F_t H5_ATTR_UNUSED *f, const void *_mesg)
+H5O__attr_size(const H5F_t H5_ATTR_UNUSED *f, const void *_mesg)
{
const H5A_t *attr = (const H5A_t *)_mesg;
size_t name_len;
size_t ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(attr);
@@ -474,7 +474,7 @@ H5O_attr_size(const H5F_t H5_ATTR_UNUSED *f, const void *_mesg)
HDassert(0 && "Bad attribute version");
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_attr_size() */
+} /* end H5O__attr_size() */
/*-------------------------------------------------------------------------
@@ -608,7 +608,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_attr_pre_copy_file
+ * Function: H5O__attr_pre_copy_file
*
* Purpose: Perform any necessary actions before copying message between
* files for attribute messages.
@@ -621,13 +621,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src,
+H5O__attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
const H5A_t *attr_src = (const H5A_t *)native_src; /* Source attribute */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(deleted);
@@ -648,7 +648,7 @@ H5O_attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_attr_pre_copy_file() */
+} /* end H5O__attr_pre_copy_file() */
/*-------------------------------------------------------------------------
@@ -726,7 +726,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_attr_get_crt_index
+ * Function: H5O__attr_get_crt_index
*
* Purpose: Get creation index from the message
*
@@ -738,11 +738,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx /*out*/)
+H5O__attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx /*out*/)
{
const H5A_t *attr = (const H5A_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(attr);
HDassert(crt_idx);
@@ -751,11 +751,11 @@ H5O_attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx /*out*/)
*crt_idx = attr->shared->crt_idx;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_attr_get_crt_index() */
+} /* end H5O__attr_get_crt_index() */
/*-------------------------------------------------------------------------
- * Function: H5O_attr_set_crt_index
+ * Function: H5O__attr_set_crt_index
*
* Purpose: Set creation index from the message
*
@@ -767,11 +767,11 @@ H5O_attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx /*out*/)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx)
+H5O__attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx)
{
H5A_t *attr = (H5A_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(attr);
@@ -779,7 +779,7 @@ H5O_attr_set_crt_index(void *_mesg, H5O_msg_crt_idx_t crt_idx)
attr->shared->crt_idx = crt_idx;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_attr_set_crt_index() */
+} /* end H5O__attr_set_crt_index() */
/*--------------------------------------------------------------------------
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index 75b23dd..a795957 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -149,7 +149,6 @@ static herr_t H5O__attr_exists_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg,
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 4 2006
*
*-------------------------------------------------------------------------
@@ -393,7 +392,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 11 2006
*
*-------------------------------------------------------------------------
@@ -541,7 +539,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 18 2006
*
*-------------------------------------------------------------------------
@@ -727,7 +724,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jan 2 2007
*
*-------------------------------------------------------------------------
@@ -802,7 +798,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 4 2006
*
*-------------------------------------------------------------------------
@@ -960,7 +955,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 5 2006
*
*-------------------------------------------------------------------------
@@ -1006,7 +1000,6 @@ H5O__attr_rename_chk_cb(H5O_t H5_ATTR_UNUSED *oh, H5O_mesg_t *mesg/*in,out*/,
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 5 2006
*
*-------------------------------------------------------------------------
@@ -1468,7 +1461,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 11 2006
*
*-------------------------------------------------------------------------
@@ -1745,7 +1737,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 11 2006
*
*-------------------------------------------------------------------------
@@ -1928,48 +1919,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O__attr_bh_info() */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
-
-/*-------------------------------------------------------------------------
- * Function: H5O__attr_count
- *
- * Purpose: Determine the # of attributes on an object
- *
- * Return: SUCCEED/FAIL
- *
- * Programmer: Quincey Koziol
- * Monday, December 11, 2006
- *
- *-------------------------------------------------------------------------
- */
-int
-H5O__attr_count(const H5O_loc_t *loc)
-{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- hsize_t nattrs; /* Number of attributes */
- int ret_value = -1; /* Return value */
-
- FUNC_ENTER_PACKAGE
-
- /* Check arguments */
- HDassert(loc);
-
- /* Protect the object header to iterate over */
- if(NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPROTECT, FAIL, "unable to load object header")
-
- /* Retrieve # of attributes on object */
- if(H5O__attr_count_real(loc->file, oh, &nattrs) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve attribute count")
-
- /* Set return value */
- ret_value = (int)nattrs;
-
-done:
- if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O__attr_count */
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
diff --git a/src/H5Obogus.c b/src/H5Obogus.c
index f3cca0f..08b03b3 100644
--- a/src/H5Obogus.c
+++ b/src/H5Obogus.c
@@ -15,7 +15,7 @@
*
* Created: H5Obogus.c
* Jan 21 2003
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: "bogus" message. This message is guaranteed to never
* be found in a valid HDF5 file and is only used to
@@ -39,8 +39,8 @@
/* PRIVATE PROTOTYPES */
static void *H5O__bogus_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_bogus_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static size_t H5O_bogus_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__bogus_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static size_t H5O__bogus_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__bogus_debug(H5F_t *f, const void *_mesg, FILE *stream,
int indent, int fwidth);
@@ -51,9 +51,9 @@ const H5O_msg_class_t H5O_MSG_BOGUS_VALID[1] = {{
0, /*native message size */
H5O_SHARE_IS_SHARABLE, /* messages are sharable? */
H5O__bogus_decode, /*decode message */
- H5O_bogus_encode, /*encode message */
+ H5O__bogus_encode, /*encode message */
NULL, /*copy the native value */
- H5O_bogus_size, /*raw message size */
+ H5O__bogus_size, /*raw message size */
NULL, /*free internal memory */
NULL, /*free method */
NULL, /* file delete method */
@@ -75,9 +75,9 @@ const H5O_msg_class_t H5O_MSG_BOGUS_INVALID[1] = {{
0, /*native message size */
H5O_SHARE_IS_SHARABLE, /* messages are sharable? */
H5O__bogus_decode, /*decode message */
- H5O_bogus_encode, /*encode message */
+ H5O__bogus_encode, /*encode message */
NULL, /*copy the native value */
- H5O_bogus_size, /*raw message size */
+ H5O__bogus_size, /*raw message size */
NULL, /*free internal memory */
NULL, /*free method */
NULL, /* file delete method */
@@ -104,7 +104,6 @@ const H5O_msg_class_t H5O_MSG_BOGUS_INVALID[1] = {{
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 21 2003
*
*-------------------------------------------------------------------------
@@ -146,22 +145,21 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_bogus_encode
+ * Function: H5O__bogus_encode
*
* Purpose: Encodes a "bogus" message.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 21 2003
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void H5_ATTR_UNUSED *mesg)
+H5O__bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void H5_ATTR_UNUSED *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -172,11 +170,11 @@ H5O_bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
UINT32ENCODE(p, H5O_BOGUS_VALUE);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_bogus_encode() */
+} /* end H5O__bogus_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_bogus_size
+ * Function: H5O__bogus_size
*
* Purpose: Returns the size of the raw message in bytes not
* counting the message typ or size fields, but only the data
@@ -188,18 +186,17 @@ H5O_bogus_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 21 2003
*
*-------------------------------------------------------------------------
*/
static size_t
-H5O_bogus_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *mesg)
+H5O__bogus_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(4)
-} /* end H5O_bogus_size() */
+} /* end H5O__bogus_size() */
/*-------------------------------------------------------------------------
@@ -210,11 +207,8 @@ H5O_bogus_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 21 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c
index 5a98e59..4d3c64e 100644
--- a/src/H5Obtreek.c
+++ b/src/H5Obtreek.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Thursday, March 1, 2007
*
* Purpose: A message holding non-default v1 B-tree 'K' value
@@ -27,11 +27,11 @@
#include "H5Opkg.h" /* Object headers */
#include "H5MMprivate.h" /* Memory management */
-static void *H5O_btreek_decode(H5F_t *f, H5O_t *open_oh,
+static void *H5O__btreek_decode(H5F_t *f, H5O_t *open_oh,
unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_btreek_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_btreek_copy(const void *_mesg, void *_dest);
-static size_t H5O_btreek_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__btreek_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O__btreek_copy(const void *_mesg, void *_dest);
+static size_t H5O__btreek_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__btreek_debug(H5F_t *f, const void *_mesg, FILE *stream,
int indent, int fwidth);
@@ -40,11 +40,11 @@ const H5O_msg_class_t H5O_MSG_BTREEK[1] = {{
H5O_BTREEK_ID, /*message id number */
"v1 B-tree 'K' values", /*message name for debugging */
sizeof(H5O_btreek_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_btreek_decode, /*decode message */
- H5O_btreek_encode, /*encode message */
- H5O_btreek_copy, /*copy the native value */
- H5O_btreek_size, /*raw message size */
+ 0, /* messages are sharable? */
+ H5O__btreek_decode, /*decode message */
+ H5O__btreek_encode, /*encode message */
+ H5O__btreek_copy, /*copy the native value */
+ H5O__btreek_size, /*raw message size */
NULL, /*free internal memory */
NULL, /* free method */
NULL, /* file delete method */
@@ -56,7 +56,7 @@ const H5O_msg_class_t H5O_MSG_BTREEK[1] = {{
NULL, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
- H5O__btreek_debug /*debug the message */
+ H5O__btreek_debug /*debug the message */
}};
/* Current version of v1 B-tree 'K' value information */
@@ -64,7 +64,7 @@ const H5O_msg_class_t H5O_MSG_BTREEK[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5O_btreek_decode
+ * Function: H5O__btreek_decode
*
* Purpose: Decode a shared message table message and return a pointer
* to a newly allocated H5O_btreek_t struct.
@@ -78,14 +78,14 @@ const H5O_msg_class_t H5O_MSG_BTREEK[1] = {{
*-------------------------------------------------------------------------
*/
static void *
-H5O_btreek_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
+H5O__btreek_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
H5O_btreek_t *mesg; /* Native message */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(f);
@@ -109,11 +109,11 @@ H5O_btreek_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_btreek_decode() */
+} /* end H5O__btreek_decode() */
/*-------------------------------------------------------------------------
- * Function: H5O_btreek_encode
+ * Function: H5O__btreek_encode
*
* Purpose: Encode a v1 B-tree 'K' value message.
*
@@ -125,11 +125,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(f);
@@ -143,11 +143,11 @@ H5O_btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
UINT16ENCODE(p, mesg->sym_leaf_k);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_btreek_encode() */
+} /* end H5O__btreek_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_btreek_copy
+ * Function: H5O__btreek_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -161,13 +161,13 @@ H5O_btreek_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
*-------------------------------------------------------------------------
*/
static void *
-H5O_btreek_copy(const void *_mesg, void *_dest)
+H5O__btreek_copy(const void *_mesg, void *_dest)
{
const H5O_btreek_t *mesg = (const H5O_btreek_t *)_mesg;
H5O_btreek_t *dest = (H5O_btreek_t *)_dest;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(mesg);
@@ -183,11 +183,11 @@ H5O_btreek_copy(const void *_mesg, void *_dest)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_btreek_copy() */
+} /* end H5O__btreek_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_btreek_size
+ * Function: H5O__btreek_size
*
* Purpose: Returns the size of the raw message in bytes not counting the
* message type or size fields, but only the data fields.
@@ -201,11 +201,11 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5O_btreek_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
+H5O__btreek_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
{
size_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(f);
@@ -216,7 +216,7 @@ H5O_btreek_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sh
2; /* Symbol table node leaf 'K' value */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_btreek_size() */
+} /* end H5O__btreek_size() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 45c55fd..58db827 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -15,7 +15,7 @@
*
* Created: H5Ocache.c
* Sep 28 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Object header metadata cache virtual functions.
*
@@ -84,8 +84,7 @@ static herr_t H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing);
static herr_t H5O__cache_chk_free_icr(void *thing);
/* Prefix routines */
-static herr_t H5O__prefix_deserialize(const uint8_t *image,
- H5O_cache_ud_t *udata);
+static herr_t H5O__prefix_deserialize(const uint8_t *image, H5O_cache_ud_t *udata);
/* Chunk routines */
static herr_t H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len,
@@ -294,7 +293,7 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata)
*
* Note that the object header is read with with a speculative read.
* If the initial read is too small, make note of this fact and return
- * without error. H5C_load_entry() will note the size discrepency
+ * without error. H5C__load_entry() will note the size discrepency
* and retry the deserialize operation with the correct size read.
*
* Return: Success: Pointer to in core representation
@@ -1081,7 +1080,6 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 12, 2008
*
*-------------------------------------------------------------------------
@@ -1300,7 +1298,6 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 12, 2008
*
*-------------------------------------------------------------------------
@@ -1644,7 +1641,6 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* July 12, 2008
*
*-------------------------------------------------------------------------
diff --git a/src/H5Ocache_image.c b/src/H5Ocache_image.c
index 6ac04c8..ac51aff 100644
--- a/src/H5Ocache_image.c
+++ b/src/H5Ocache_image.c
@@ -294,39 +294,8 @@ H5O__mdci_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
* from the VFD layer at the end of file. As this was the
* last file space allocation before shutdown, the cache image
* should still be the last item in the file.
- *
- * If the hack to work around the self referential free space
- * manager issue is in use, file space for the non-empty self
- * referential free space managers was also allocated from VFD
- * layer at the end of file. Since these allocations directly
- * preceeded the cache image allocation they should be directly
- * adjacent to the cache image block at the end of file.
- *
- * In this case, just call H5MF_tidy_self_referential_fsm_hack().
- *
- * That routine will float the self referential free space
- * managers, and reduce the eoa to its value just prior to
- * allocation of space for same. Since the cache image appears
- * just after the self referential free space managers, this
- * will release the file space for the cache image as well.
- *
- * Note that in this case, there must not have been any file
- * space allocations / deallocations prior to the free of the
- * cache image. Verify this to the extent possible.
- *
- * If the hack to work around the persistent self referential
- * free space manager issue is NOT in use, just call H5MF_xfree()
- * to release the cache iamge. In principle, we should be able
- * to just reduce the EOA to the base address of the cache
- * image block, as there shouldn't be any file space allocation
- * before the first metadata cache access. However, given
- * time constraints, I don't want to go there now.
*/
-
-
-
if(f->shared->closing) {
-
/* Get the eoa, and verify that it has the expected value */
if(HADDR_UNDEF == (final_eoa = H5FD_get_eoa(f->shared->lf, H5FD_MEM_DEFAULT)) )
HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "unable to get file size")
@@ -335,11 +304,10 @@ H5O__mdci_delete(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, void *_mesg)
if(H5FD_free(f->shared->lf, H5FD_MEM_SUPER, f, mesg->addr, mesg->size) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't free MDC image")
- } else {
+ }
+ else
if(H5MF_xfree(f, H5FD_MEM_SUPER, mesg->addr, mesg->size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free file space for cache image block")
- }
-
} /* end if */
done:
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 469a9e0..6718501 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -256,7 +256,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_copy
+ * Function: H5O__copy
*
* Purpose: Private version of H5Ocopy
*
@@ -268,7 +268,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc,
+H5O__copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc,
const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id)
{
H5G_loc_t src_loc; /* Source object group location */
@@ -279,7 +279,7 @@ H5O_copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc,
hbool_t obj_open = FALSE; /* Entry at 'name' found */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(loc);
@@ -319,7 +319,7 @@ done:
HDONE_ERROR(H5E_OHDR, H5E_CLOSEERROR, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_copy() */
+} /* end H5O__copy() */
/*-------------------------------------------------------------------------
@@ -1307,10 +1307,10 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_copy_search_comm_dt_attr_cb
+ * Function: H5O__copy_search_comm_dt_attr_cb
*
* Purpose: Callback for H5O_attr_iterate_real from
- * H5O_copy_search_comm_dt_check. Checks if the attribute's
+ * H5O__copy_search_comm_dt_check. Checks if the attribute's
* datatype is committed. If it is, adds it to the merge
* committed dt skiplist present in udata if it does not match
* any already present.
@@ -1323,7 +1323,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
+H5O__copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
{
H5O_copy_search_comm_dt_ud_t *udata = (H5O_copy_search_comm_dt_ud_t *)_udata;
H5T_t *dt = NULL; /* Datatype */
@@ -1332,7 +1332,7 @@ H5O_copy_search_comm_dt_attr_cb(const H5A_t *attr, void *_udata)
hbool_t obj_inserted = FALSE; /* Object inserted into skip list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity checks */
HDassert(attr);
@@ -1385,11 +1385,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_copy_search_comm_dt_attr_cb */
+} /* end H5O__copy_search_comm_dt_attr_cb */
/*-------------------------------------------------------------------------
- * Function: H5O_copy_search_comm_dt_check
+ * Function: H5O__copy_search_comm_dt_check
*
* Purpose: Check if the object at obj_oloc is or contains a reference
* to a committed datatype. If it does, adds it to the merge
@@ -1404,7 +1404,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_search_comm_dt_check(H5O_loc_t *obj_oloc,
+H5O__copy_search_comm_dt_check(H5O_loc_t *obj_oloc,
H5O_copy_search_comm_dt_ud_t *udata)
{
H5O_copy_search_comm_dt_key_t *key = NULL; /* Skiplist key */
@@ -1414,7 +1414,7 @@ H5O_copy_search_comm_dt_check(H5O_loc_t *obj_oloc,
const H5O_obj_class_t *obj_class = NULL; /* Type of object */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity checks */
HDassert(obj_oloc);
@@ -1483,7 +1483,7 @@ H5O_copy_search_comm_dt_check(H5O_loc_t *obj_oloc,
/* Search within attributes */
attr_op.op_type = H5A_ATTR_OP_LIB;
- attr_op.u.lib_op = H5O_copy_search_comm_dt_attr_cb;
+ attr_op.u.lib_op = H5O__copy_search_comm_dt_attr_cb;
udata->obj_oloc.file = obj_oloc->file;
udata->obj_oloc.addr = obj_oloc->addr;
if(H5O_attr_iterate_real((hid_t)-1, obj_oloc, H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op, udata) < 0)
@@ -1504,7 +1504,7 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_copy_search_comm_dt_check */
+} /* end H5O__copy_search_comm_dt_check */
/*-------------------------------------------------------------------------
@@ -1512,7 +1512,7 @@ done:
*
* Purpose: H5G_visit callback to add committed datatypes to the merge
* committed dt skiplist. Mostly a wrapper for
- * H5O_copy_search_comm_dt_check.
+ * H5O__copy_search_comm_dt_check.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1554,7 +1554,7 @@ H5O__copy_search_comm_dt_cb(hid_t H5_ATTR_UNUSED group, const char *name,
obj_found = TRUE;
/* Check object and add to skip list if appropriate */
- if(H5O_copy_search_comm_dt_check(&obj_oloc, udata) < 0)
+ if(H5O__copy_search_comm_dt_check(&obj_oloc, udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "can't check object")
} /* end if */
@@ -1653,7 +1653,7 @@ H5O__copy_search_comm_dt(H5F_t *file_src, H5O_t *oh_src,
H5E_clear_stack(NULL);
else
/* Check object and add to skip list if appropriate */
- if(H5O_copy_search_comm_dt_check(&obj_oloc, &udata) < 0) {
+ if(H5O__copy_search_comm_dt_check(&obj_oloc, &udata) < 0) {
if(H5G_loc_free(&obj_loc) < 0)
HERROR(H5E_OHDR, H5E_CANTRELEASE, "can't free location");
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't check object")
diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c
index 0de661f..e03bb69 100644
--- a/src/H5Ocopy_ref.c
+++ b/src/H5Ocopy_ref.c
@@ -178,30 +178,29 @@ H5O__copy_expand_ref_object1(H5O_loc_t *src_oloc, const void *buf_src,
H5O_token_t tmp_token = { 0 };
/* If data is not initialized, copy zeros and skip */
- if(0 == HDmemcmp(src_buf, zeros, buf_size)) {
+ if(0 == HDmemcmp(src_buf, zeros, buf_size))
HDmemset(dst_buf, 0, buf_size);
- continue;
- }
-
- /* Set up for the object copy for the reference */
- if(H5R__decode_token_obj_compat(src_buf, &buf_size, &tmp_token, token_size) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to decode src object address")
- if(H5VL_native_token_to_addr(src_oloc->file, H5I_FILE, tmp_token, &src_oloc->addr) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, "can't deserialize object token into address")
-
- if(!H5F_addr_defined(src_oloc->addr) || src_oloc->addr == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "undefined reference pointer")
- dst_oloc->addr = HADDR_UNDEF;
-
- /* Attempt to copy object from source to destination file */
- if(H5O__copy_obj_by_ref(src_oloc, dst_oloc, dst_root_loc, cpy_info) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
-
- /* Set the object reference info for the destination file */
- if(H5VL_native_addr_to_token(dst_oloc->file, H5I_FILE, dst_oloc->addr, &tmp_token) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "can't serialize address into object token")
- if(H5R__encode_token_obj_compat((const H5O_token_t *)&tmp_token, token_size, dst_buf, &buf_size) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to encode dst object address")
+ else {
+ /* Set up for the object copy for the reference */
+ if(H5R__decode_token_obj_compat(src_buf, &buf_size, &tmp_token, token_size) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to decode src object address")
+ if(H5VL_native_token_to_addr(src_oloc->file, H5I_FILE, tmp_token, &src_oloc->addr) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, FAIL, "can't deserialize object token into address")
+
+ if(!H5F_addr_defined(src_oloc->addr) || src_oloc->addr == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "undefined reference pointer")
+ dst_oloc->addr = HADDR_UNDEF;
+
+ /* Attempt to copy object from source to destination file */
+ if(H5O__copy_obj_by_ref(src_oloc, dst_oloc, dst_root_loc, cpy_info) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
+
+ /* Set the object reference info for the destination file */
+ if(H5VL_native_addr_to_token(dst_oloc->file, H5I_FILE, dst_oloc->addr, &tmp_token) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "can't serialize address into object token")
+ if(H5R__encode_token_obj_compat((const H5O_token_t *)&tmp_token, token_size, dst_buf, &buf_size) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to encode dst object address")
+ } /* end else */
} /* end for */
done:
@@ -242,42 +241,41 @@ H5O__copy_expand_ref_region1(H5O_loc_t *src_oloc, const void *buf_src,
uint8_t *q;
/* If data is not initialized, copy zeros and skip */
- if(0 == HDmemcmp(src_buf, zeros, buf_size)) {
+ if(0 == HDmemcmp(src_buf, zeros, buf_size))
HDmemset(dst_buf, 0, buf_size);
- continue;
- }
-
- /* Read from heap */
- if(H5R__decode_heap(src_oloc->file, src_buf, &buf_size, &data, &data_size) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to decode dataset region information")
-
- /* Get object address */
- p = (const uint8_t *)data;
- H5F_addr_decode(src_oloc->file, &p, &src_oloc->addr);
- if(!H5F_addr_defined(src_oloc->addr) || src_oloc->addr == 0) {
- H5MM_free(data);
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "undefined reference pointer")
- }
- dst_oloc->addr = HADDR_UNDEF;
-
- /* Attempt to copy object from source to destination file */
- if(H5O__copy_obj_by_ref(src_oloc, dst_oloc, dst_root_loc, cpy_info) < 0) {
+ else {
+ /* Read from heap */
+ if(H5R__decode_heap(src_oloc->file, src_buf, &buf_size, &data, &data_size) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to decode dataset region information")
+
+ /* Get object address */
+ p = (const uint8_t *)data;
+ H5F_addr_decode(src_oloc->file, &p, &src_oloc->addr);
+ if(!H5F_addr_defined(src_oloc->addr) || src_oloc->addr == 0) {
+ H5MM_free(data);
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "undefined reference pointer")
+ }
+ dst_oloc->addr = HADDR_UNDEF;
+
+ /* Attempt to copy object from source to destination file */
+ if(H5O__copy_obj_by_ref(src_oloc, dst_oloc, dst_root_loc, cpy_info) < 0) {
+ H5MM_free(data);
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
+ } /* end if */
+
+ /* Serialize object addr */
+ q = (uint8_t *)data;
+ H5F_addr_encode(dst_oloc->file, &q, dst_oloc->addr);
+
+ /* Write to heap */
+ if(H5R__encode_heap(dst_oloc->file, dst_buf, &buf_size, data, (size_t)data_size) < 0) {
+ H5MM_free(data);
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode dataset region information")
+ }
+
+ /* Free the buffer allocated in H5R__decode_heap() */
H5MM_free(data);
- HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
- } /* end if */
-
- /* Serialize object addr */
- q = (uint8_t *)data;
- H5F_addr_encode(dst_oloc->file, &q, dst_oloc->addr);
-
- /* Write to heap */
- if(H5R__encode_heap(dst_oloc->file, dst_buf, &buf_size, data, (size_t)data_size) < 0) {
- H5MM_free(data);
- HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "unable to encode dataset region information")
- }
-
- /* Free the buffer allocated in H5R__decode_heap() */
- H5MM_free(data);
+ } /* end else */
} /* end for */
done:
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index 3c91cae..b476b17 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -15,7 +15,7 @@
*
* Created: H5Odbg.c
* Nov 17 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Object header debugging routines.
*
@@ -84,7 +84,6 @@
* Return: SUCCEED (Doesn't fail, just crashes)
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 17 2006
*
*-------------------------------------------------------------------------
@@ -236,7 +235,6 @@ H5O__assert(const H5O_t *oh)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 13 2003
*
*-------------------------------------------------------------------------
@@ -277,7 +275,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -544,7 +541,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
diff --git a/src/H5Odrvinfo.c b/src/H5Odrvinfo.c
index eb678e4..dffacfd 100644
--- a/src/H5Odrvinfo.c
+++ b/src/H5Odrvinfo.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Thursday, March 1, 2007
*
* Purpose: A message holding driver info settings
@@ -27,11 +27,11 @@
#include "H5Opkg.h" /* Object headers */
#include "H5MMprivate.h" /* Memory management */
-static void *H5O_drvinfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
+static void *H5O__drvinfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_drvinfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_drvinfo_copy(const void *_mesg, void *_dest);
-static size_t H5O_drvinfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__drvinfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O__drvinfo_copy(const void *_mesg, void *_dest);
+static size_t H5O__drvinfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__drvinfo_reset(void *_mesg);
static herr_t H5O__drvinfo_debug(H5F_t *f, const void *_mesg, FILE *stream,
int indent, int fwidth);
@@ -41,23 +41,23 @@ const H5O_msg_class_t H5O_MSG_DRVINFO[1] = {{
H5O_DRVINFO_ID, /*message id number */
"driver info", /*message name for debugging */
sizeof(H5O_drvinfo_t), /*native message size */
- 0, /* messages are sharable? */
- H5O_drvinfo_decode, /*decode message */
- H5O_drvinfo_encode, /*encode message */
- H5O_drvinfo_copy, /*copy the native value */
- H5O_drvinfo_size, /*raw message size */
+ 0, /* messages are sharable? */
+ H5O__drvinfo_decode, /*decode message */
+ H5O__drvinfo_encode, /*encode message */
+ H5O__drvinfo_copy, /*copy the native value */
+ H5O__drvinfo_size, /*raw message size */
H5O__drvinfo_reset, /*free internal memory */
NULL, /* free method */
NULL, /* file delete method */
NULL, /* link method */
- NULL, /*set share method */
+ NULL, /*set share method */
NULL, /*can share method */
NULL, /* pre copy native value to file */
NULL, /* copy native value to file */
NULL, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
- H5O__drvinfo_debug /*debug the message */
+ H5O__drvinfo_debug /*debug the message */
}};
/* Current version of driver info information */
@@ -65,7 +65,7 @@ const H5O_msg_class_t H5O_MSG_DRVINFO[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5O_drvinfo_decode
+ * Function: H5O__drvinfo_decode
*
* Purpose: Decode a shared message table message and return a pointer
* to a newly allocated H5O_drvinfo_t struct.
@@ -79,14 +79,14 @@ const H5O_msg_class_t H5O_MSG_DRVINFO[1] = {{
*-------------------------------------------------------------------------
*/
static void *
-H5O_drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
+H5O__drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
H5O_drvinfo_t *mesg; /* Native message */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(f);
@@ -123,11 +123,11 @@ H5O_drvinfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_drvinfo_decode() */
+} /* end H5O__drvinfo_decode() */
/*-------------------------------------------------------------------------
- * Function: H5O_drvinfo_encode
+ * Function: H5O__drvinfo_encode
*
* Purpose: Encode a v1 B-tree 'K' value message.
*
@@ -139,11 +139,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(f);
@@ -159,11 +159,11 @@ H5O_drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_share
H5MM_memcpy(p, mesg->buf, mesg->len);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_drvinfo_encode() */
+} /* end H5O__drvinfo_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_drvinfo_copy
+ * Function: H5O__drvinfo_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -177,13 +177,13 @@ H5O_drvinfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_share
*-------------------------------------------------------------------------
*/
static void *
-H5O_drvinfo_copy(const void *_mesg, void *_dest)
+H5O__drvinfo_copy(const void *_mesg, void *_dest)
{
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
H5O_drvinfo_t *dest = (H5O_drvinfo_t *)_dest;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(mesg);
@@ -207,11 +207,11 @@ H5O_drvinfo_copy(const void *_mesg, void *_dest)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_drvinfo_copy() */
+} /* end H5O__drvinfo_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_drvinfo_size
+ * Function: H5O__drvinfo_size
*
* Purpose: Returns the size of the raw message in bytes not counting the
* message type or size fields, but only the data fields.
@@ -225,12 +225,12 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5O_drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_drvinfo_t *mesg = (const H5O_drvinfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(f);
@@ -242,7 +242,7 @@ H5O_drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_s
mesg->len; /* Buffer */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_drvinfo_size() */
+} /* end H5O__drvinfo_size() */
/*-------------------------------------------------------------------------
@@ -254,7 +254,6 @@ H5O_drvinfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_s
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 1 2007
*
*-------------------------------------------------------------------------
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index 92a8ee3..80dbae9 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -28,16 +28,16 @@
/* PRIVATE PROTOTYPES */
-static herr_t H5O_dtype_encode(H5F_t *f, uint8_t *p, const void *mesg);
-static void *H5O_dtype_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
+static herr_t H5O__dtype_encode(H5F_t *f, uint8_t *p, const void *mesg);
+static void *H5O__dtype_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static void *H5O_dtype_copy(const void *_mesg, void *_dest);
-static size_t H5O_dtype_size(const H5F_t *f, const void *_mesg);
+static void *H5O__dtype_copy(const void *_mesg, void *_dest);
+static size_t H5O__dtype_size(const H5F_t *f, const void *_mesg);
static herr_t H5O__dtype_reset(void *_mesg);
static herr_t H5O__dtype_free(void *_mesg);
-static herr_t H5O_dtype_set_share(void *_mesg, const H5O_shared_t *sh);
-static htri_t H5O_dtype_can_share(const void *_mesg);
-static herr_t H5O_dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src,
+static herr_t H5O__dtype_set_share(void *_mesg, const H5O_shared_t *sh);
+static htri_t H5O__dtype_can_share(const void *_mesg);
+static herr_t H5O__dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void *_udata);
static void *H5O__dtype_copy_file(H5F_t *file_src, const H5O_msg_class_t *mesg_type,
void *native_src, H5F_t *file_dst, hbool_t *recompute_size,
@@ -50,22 +50,22 @@ static herr_t H5O__dtype_debug(H5F_t *f, const void *_mesg, FILE * stream,
/* Set up & include shared message "interface" info */
#define H5O_SHARED_TYPE H5O_MSG_DTYPE
-#define H5O_SHARED_DECODE H5O_dtype_shared_decode
-#define H5O_SHARED_DECODE_REAL H5O_dtype_decode
-#define H5O_SHARED_ENCODE H5O_dtype_shared_encode
-#define H5O_SHARED_ENCODE_REAL H5O_dtype_encode
-#define H5O_SHARED_SIZE H5O_dtype_shared_size
-#define H5O_SHARED_SIZE_REAL H5O_dtype_size
+#define H5O_SHARED_DECODE H5O__dtype_shared_decode
+#define H5O_SHARED_DECODE_REAL H5O__dtype_decode
+#define H5O_SHARED_ENCODE H5O__dtype_shared_encode
+#define H5O_SHARED_ENCODE_REAL H5O__dtype_encode
+#define H5O_SHARED_SIZE H5O__dtype_shared_size
+#define H5O_SHARED_SIZE_REAL H5O__dtype_size
#define H5O_SHARED_DELETE H5O__dtype_shared_delete
#undef H5O_SHARED_DELETE_REAL
#define H5O_SHARED_LINK H5O__dtype_shared_link
#undef H5O_SHARED_LINK_REAL
#define H5O_SHARED_COPY_FILE H5O__dtype_shared_copy_file
#define H5O_SHARED_COPY_FILE_REAL H5O__dtype_copy_file
-#define H5O_SHARED_POST_COPY_FILE H5O_dtype_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O__dtype_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#define H5O_SHARED_POST_COPY_FILE_UPD H5O__dtype_shared_post_copy_upd
-#define H5O_SHARED_DEBUG H5O_dtype_shared_debug
+#define H5O_SHARED_DEBUG H5O__dtype_shared_debug
#define H5O_SHARED_DEBUG_REAL H5O__dtype_debug
#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
@@ -94,27 +94,27 @@ const H5O_msg_class_t H5O_MSG_DTYPE[1] = {{
"datatype", /* message name for debugging */
sizeof(H5T_t), /* native message size */
H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
- H5O_dtype_shared_decode, /* decode message */
- H5O_dtype_shared_encode, /* encode message */
- H5O_dtype_copy, /* copy the native value */
- H5O_dtype_shared_size, /* size of raw message */
+ H5O__dtype_shared_decode, /* decode message */
+ H5O__dtype_shared_encode, /* encode message */
+ H5O__dtype_copy, /* copy the native value */
+ H5O__dtype_shared_size, /* size of raw message */
H5O__dtype_reset, /* reset method */
H5O__dtype_free, /* free method */
H5O__dtype_shared_delete, /* file delete method */
H5O__dtype_shared_link, /* link method */
- H5O_dtype_set_share, /* set share method */
- H5O_dtype_can_share, /* can share method */
- H5O_dtype_pre_copy_file, /* pre copy native value to file */
+ H5O__dtype_set_share, /* set share method */
+ H5O__dtype_can_share, /* can share method */
+ H5O__dtype_pre_copy_file, /* pre copy native value to file */
H5O__dtype_shared_copy_file, /* copy native value to file */
- H5O_dtype_shared_post_copy_file, /* post copy native value to file */
+ H5O__dtype_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
- H5O_dtype_shared_debug /* debug the message */
+ H5O__dtype_shared_debug /* debug the message */
}};
/*-------------------------------------------------------------------------
- * Function: H5O_dtype_decode_helper
+ * Function: H5O__dtype_decode_helper
*
* Purpose: Decodes a datatype
*
@@ -129,14 +129,14 @@ const H5O_msg_class_t H5O_MSG_DTYPE[1] = {{
*-------------------------------------------------------------------------
*/
static htri_t
-H5O_dtype_decode_helper(unsigned *ioflags/*in,out*/, const uint8_t **pp, H5T_t *dt)
+H5O__dtype_decode_helper(unsigned *ioflags/*in,out*/, const uint8_t **pp, H5T_t *dt)
{
unsigned flags, version;
unsigned i;
size_t z;
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(pp && *pp);
@@ -331,7 +331,7 @@ H5O_dtype_decode_helper(unsigned *ioflags/*in,out*/, const uint8_t **pp, H5T_t *
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Decode the field's datatype information */
- if((can_upgrade = H5O_dtype_decode_helper(ioflags, pp, temp_type)) < 0) {
+ if((can_upgrade = H5O__dtype_decode_helper(ioflags, pp, temp_type)) < 0) {
for(j = 0; j <= i; j++)
H5MM_xfree(dt->shared->u.compnd.memb[j].name);
H5MM_xfree(dt->shared->u.compnd.memb);
@@ -439,15 +439,15 @@ H5O_dtype_decode_helper(unsigned *ioflags/*in,out*/, const uint8_t **pp, H5T_t *
/* Set reference type */
dt->shared->u.atomic.u.r.rtype = (H5R_type_t)(flags & 0x0f);
if(dt->shared->u.atomic.u.r.rtype <= H5R_BADTYPE
- || dt->shared->u.atomic.u.r.rtype >= H5R_MAXTYPE)
+ || dt->shared->u.atomic.u.r.rtype >= H5R_MAXTYPE)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "invalid reference type");
/* Set generic flag */
if(dt->shared->u.atomic.u.r.rtype == H5R_OBJECT2
- || dt->shared->u.atomic.u.r.rtype == H5R_DATASET_REGION2
- || dt->shared->u.atomic.u.r.rtype == H5R_ATTR) {
- dt->shared->u.atomic.u.r.opaque = TRUE;
- dt->shared->u.atomic.u.r.version = (unsigned)((flags >> 4) & 0x0f);
+ || dt->shared->u.atomic.u.r.rtype == H5R_DATASET_REGION2
+ || dt->shared->u.atomic.u.r.rtype == H5R_ATTR) {
+ dt->shared->u.atomic.u.r.opaque = TRUE;
+ dt->shared->u.atomic.u.r.version = (unsigned)((flags >> 4) & 0x0f);
if(dt->shared->u.atomic.u.r.version != H5R_ENCODE_VERSION)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "reference version does not match");
} else
@@ -469,7 +469,7 @@ H5O_dtype_decode_helper(unsigned *ioflags/*in,out*/, const uint8_t **pp, H5T_t *
dt->shared->u.enumer.nmembs = dt->shared->u.enumer.nalloc = flags & 0xffff;
if(NULL == (dt->shared->parent = H5T__alloc()))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- if(H5O_dtype_decode_helper(ioflags, pp, dt->shared->parent) < 0)
+ if(H5O__dtype_decode_helper(ioflags, pp, dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode parent datatype")
/* Check if the parent of this enum has a version greater than the
@@ -511,7 +511,7 @@ H5O_dtype_decode_helper(unsigned *ioflags/*in,out*/, const uint8_t **pp, H5T_t *
/* Decode base type of VL information */
if(NULL == (dt->shared->parent = H5T__alloc()))
HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "memory allocation failed")
- if(H5O_dtype_decode_helper(ioflags, pp, dt->shared->parent) < 0)
+ if(H5O__dtype_decode_helper(ioflags, pp, dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode VL parent type")
/* Check if the parent of this vlen has a version greater than the
@@ -552,7 +552,7 @@ H5O_dtype_decode_helper(unsigned *ioflags/*in,out*/, const uint8_t **pp, H5T_t *
/* Decode base type of array */
if(NULL == (dt->shared->parent = H5T__alloc()))
HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "memory allocation failed")
- if(H5O_dtype_decode_helper(ioflags, pp, dt->shared->parent) < 0)
+ if(H5O__dtype_decode_helper(ioflags, pp, dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode array parent type")
/* Check if the parent of this array has a version greater than the
@@ -579,20 +579,19 @@ H5O_dtype_decode_helper(unsigned *ioflags/*in,out*/, const uint8_t **pp, H5T_t *
} /* end switch */
done:
- if(ret_value < 0) {
+ if(ret_value < 0)
if(dt != NULL) {
if(dt->shared != NULL)
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
dt = H5FL_FREE(H5T_t, dt);
} /* end if */
- } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_dtype_decode_helper() */
+} /* end H5O__dtype_decode_helper() */
/*-------------------------------------------------------------------------
- * Function: H5O_dtype_encode_helper
+ * Function: H5O__dtype_encode_helper
*
* Purpose: Encodes a datatype.
*
@@ -608,7 +607,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
+H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
{
unsigned flags = 0;
uint8_t *hdr = (uint8_t *)*pp;
@@ -616,7 +615,7 @@ H5O_dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
size_t n, z;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(pp && *pp);
@@ -968,7 +967,7 @@ H5O_dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
} /* end if */
/* Subtype */
- if(H5O_dtype_encode_helper(pp, dt->shared->u.compnd.memb[i].type) < 0)
+ if(H5O__dtype_encode_helper(pp, dt->shared->u.compnd.memb[i].type) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode member type")
} /* end for */
}
@@ -990,7 +989,7 @@ H5O_dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
flags = dt->shared->u.enumer.nmembs & 0xffff;
/* Parent type */
- if(H5O_dtype_encode_helper(pp, dt->shared->parent) < 0)
+ if(H5O__dtype_encode_helper(pp, dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode parent datatype")
/* Names, each a multiple of eight bytes */
@@ -1026,7 +1025,7 @@ H5O_dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
} /* end if */
/* Encode base type of VL information */
- if(H5O_dtype_encode_helper(pp, dt->shared->parent) < 0)
+ if(H5O__dtype_encode_helper(pp, dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode VL parent type")
break;
@@ -1064,7 +1063,7 @@ H5O_dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
} /* end if */
/* Encode base type of array's information */
- if(H5O_dtype_encode_helper(pp, dt->shared->parent) < 0)
+ if(H5O__dtype_encode_helper(pp, dt->shared->parent) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "unable to encode VL parent type")
break;
@@ -1083,17 +1082,17 @@ H5O_dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_dtype_encode_helper() */
+} /* end H5O__dtype_encode_helper() */
/*--------------------------------------------------------------------------
NAME
- H5O_dtype_decode
+ H5O__dtype_decode
PURPOSE
Decode a message and return a pointer to a memory struct
with the decoded information
USAGE
- void *H5O_dtype_decode(f, mesg_flags, p)
+ void *H5O__dtype_decode(f, mesg_flags, p)
H5F_t *f; IN: pointer to the HDF5 file struct
H5O_t *open_oh; IN: pointer to the object header
unsigned mesg_flags; IN: Message flags to influence decoding
@@ -1108,13 +1107,13 @@ done:
function using malloc() and is returned to the caller.
--------------------------------------------------------------------------*/
static void *
-H5O_dtype_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
+H5O__dtype_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
unsigned *ioflags/*in,out*/, size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
H5T_t *dt = NULL;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(p);
@@ -1124,7 +1123,7 @@ H5O_dtype_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigne
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Perform actual decode of message */
- if(H5O_dtype_decode_helper(ioflags, &p, dt) < 0)
+ if(H5O__dtype_decode_helper(ioflags, &p, dt) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, NULL, "can't decode type")
/* Set return value */
@@ -1132,16 +1131,16 @@ H5O_dtype_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigne
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_dtype_decode() */
+} /* end H5O__dtype_decode() */
/*--------------------------------------------------------------------------
NAME
- H5O_dtype_encode
+ H5O__dtype_encode
PURPOSE
Encode a simple datatype message
USAGE
- herr_t H5O_dtype_encode(f, raw_size, p, mesg)
+ herr_t H5O__dtype_encode(f, raw_size, p, mesg)
H5F_t *f; IN: pointer to the HDF5 file struct
size_t raw_size; IN: size of the raw information buffer
const uint8 *p; IN: the raw information buffer
@@ -1153,12 +1152,12 @@ done:
message in the "raw" disk form.
--------------------------------------------------------------------------*/
static herr_t
-H5O_dtype_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *mesg)
+H5O__dtype_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *mesg)
{
const H5T_t *dt = (const H5T_t *) mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
@@ -1166,21 +1165,21 @@ H5O_dtype_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *mesg)
HDassert(dt);
/* encode */
- if(H5O_dtype_encode_helper(&p, dt) < 0)
+ if(H5O__dtype_encode_helper(&p, dt) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode type")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_dtype_encode() */
+} /* end H5O__dtype_encode() */
/*--------------------------------------------------------------------------
NAME
- H5O_dtype_copy
+ H5O__dtype_copy
PURPOSE
Copies a message from MESG to DEST, allocating DEST if necessary.
USAGE
- void *H5O_dtype_copy(mesg, dest)
+ void *H5O__dtype_copy(mesg, dest)
const void *mesg; IN: Pointer to the source simple datatype
struct
const void *dest; IN: Pointer to the destination simple
@@ -1192,13 +1191,13 @@ done:
allocating the destination structure if necessary.
--------------------------------------------------------------------------*/
static void *
-H5O_dtype_copy(const void *_src, void *_dst)
+H5O__dtype_copy(const void *_src, void *_dst)
{
const H5T_t *src = (const H5T_t *) _src;
H5T_t *dst;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(src);
@@ -1219,16 +1218,16 @@ H5O_dtype_copy(const void *_src, void *_dst)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_dtype_copy() */
+} /* end H5O__dtype_copy() */
/*--------------------------------------------------------------------------
NAME
- H5O_dtype_size
+ H5O__dtype_size
PURPOSE
Return the raw message size in bytes
USAGE
- void *H5O_dtype_size(f, mesg)
+ void *H5O__dtype_size(f, mesg)
H5F_t *f; IN: pointer to the HDF5 file struct
const void *mesg; IN: Pointer to the source simple datatype struct
RETURNS
@@ -1239,13 +1238,13 @@ done:
portion of the message). It doesn't take into account alignment.
--------------------------------------------------------------------------*/
static size_t
-H5O_dtype_size(const H5F_t *f, const void *_mesg)
+H5O__dtype_size(const H5F_t *f, const void *_mesg)
{
const H5T_t *dt = (const H5T_t *)_mesg;
unsigned u; /* Local index variable */
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(f);
HDassert(dt);
@@ -1309,13 +1308,13 @@ H5O_dtype_size(const H5F_t *f, const void *_mesg)
4 + /*permutation*/
4 + /*reserved*/
16; /*dimensions*/
- ret_value += H5O_dtype_size(f, dt->shared->u.compnd.memb[u].type);
+ ret_value += H5O__dtype_size(f, dt->shared->u.compnd.memb[u].type);
} /* end for */
}
break;
case H5T_ENUM:
- ret_value += H5O_dtype_size(f, dt->shared->parent);
+ ret_value += H5O__dtype_size(f, dt->shared->parent);
for(u = 0; u < dt->shared->u.enumer.nmembs; u++) {
size_t name_len; /* Length of field's name */
@@ -1332,7 +1331,7 @@ H5O_dtype_size(const H5F_t *f, const void *_mesg)
break;
case H5T_VLEN:
- ret_value += H5O_dtype_size(f, dt->shared->parent);
+ ret_value += H5O__dtype_size(f, dt->shared->parent);
break;
case H5T_ARRAY:
@@ -1342,7 +1341,7 @@ H5O_dtype_size(const H5F_t *f, const void *_mesg)
ret_value += 4 * dt->shared->u.array.ndims; /* dimensions */
if(dt->shared->version < H5O_DTYPE_VERSION_3)
ret_value += 4 * dt->shared->u.array.ndims; /* dimension permutations */
- ret_value += H5O_dtype_size(f, dt->shared->parent);
+ ret_value += H5O__dtype_size(f, dt->shared->parent);
break;
case H5T_NO_CLASS:
@@ -1355,7 +1354,7 @@ H5O_dtype_size(const H5F_t *f, const void *_mesg)
} /* end switch */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_dtype_size() */
+} /* H5O__dtype_size() */
/*-------------------------------------------------------------------------
@@ -1417,7 +1416,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_dtype_set_share
+ * Function: H5O__dtype_set_share
*
* Purpose: Copies sharing information from SH into the message.
*
@@ -1429,12 +1428,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_dtype_set_share(void *_mesg/*in,out*/, const H5O_shared_t *sh)
+H5O__dtype_set_share(void *_mesg/*in,out*/, const H5O_shared_t *sh)
{
H5T_t *dt = (H5T_t *)_mesg;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(dt);
HDassert(sh);
@@ -1465,11 +1464,11 @@ H5O_dtype_set_share(void *_mesg/*in,out*/, const H5O_shared_t *sh)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_dtype_set_share() */
+} /* end H5O__dtype_set_share() */
/*-------------------------------------------------------------------------
- * Function: H5O_dtype_can_share
+ * Function: H5O__dtype_can_share
*
* Purpose: Determines if this datatype is allowed to be shared or
* not. Immutable datatypes or datatypes that are already
@@ -1485,13 +1484,13 @@ done:
*-------------------------------------------------------------------------
*/
static htri_t
-H5O_dtype_can_share(const void *_mesg)
+H5O__dtype_can_share(const void *_mesg)
{
const H5T_t *mesg = (const H5T_t *)_mesg;
htri_t tri_ret;
htri_t ret_value = TRUE;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(mesg);
@@ -1509,11 +1508,11 @@ H5O_dtype_can_share(const void *_mesg)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_dtype_can_share() */
+} /* end H5O__dtype_can_share() */
/*-------------------------------------------------------------------------
- * Function: H5O_dtype_pre_copy_file
+ * Function: H5O__dtype_pre_copy_file
*
* Purpose: Perform any necessary actions before copying message between
* files
@@ -1528,7 +1527,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src,
+H5O__dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src,
hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info,
void *_udata)
{
@@ -1536,7 +1535,7 @@ H5O_dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src,
H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(file_src);
@@ -1568,7 +1567,7 @@ H5O_dtype_pre_copy_file(H5F_t *file_src, const void *mesg_src,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_dtype_pre_copy_file() */
+} /* end H5O__dtype_pre_copy_file() */
/*-------------------------------------------------------------------------
@@ -1595,7 +1594,7 @@ H5O__dtype_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const H5O_msg_class_t *mesg
FUNC_ENTER_STATIC
/* Perform a normal copy of the object header message */
- if(NULL == (dst_mesg = (H5T_t *)H5O_dtype_copy(native_src, NULL)))
+ if(NULL == (dst_mesg = (H5T_t *)H5O__dtype_copy(native_src, NULL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy")
/* The datatype will be in the new file; set its location. */
@@ -1642,9 +1641,8 @@ H5O__dtype_shared_post_copy_upd(const H5O_loc_t H5_ATTR_UNUSED *src_oloc,
dt_dst->oloc.file = dt_dst->sh_loc.file;
dt_dst->oloc.addr = dt_dst->sh_loc.u.loc.oh_addr;
} /* end if */
- else {
+ else
HDassert(!H5T_is_named(dt_dst));
- }
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index b18d819..83bab09 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, November 25, 1997
*/
@@ -27,11 +27,11 @@
#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
-static void *H5O_efl_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
+static void *H5O__efl_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_efl_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_efl_copy(const void *_mesg, void *_dest);
-static size_t H5O_efl_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__efl_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O__efl_copy(const void *_mesg, void *_dest);
+static size_t H5O__efl_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__efl_reset(void *_mesg);
static void *H5O__efl_copy_file(H5F_t *file_src, void *mesg_src,
H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags,
@@ -45,10 +45,10 @@ const H5O_msg_class_t H5O_MSG_EFL[1] = {{
"external file list", /*message name for debugging */
sizeof(H5O_efl_t), /*native message size */
0, /* messages are sharable? */
- H5O_efl_decode, /*decode message */
- H5O_efl_encode, /*encode message */
- H5O_efl_copy, /*copy native value */
- H5O_efl_size, /*size of message on disk */
+ H5O__efl_decode, /*decode message */
+ H5O__efl_encode, /*encode message */
+ H5O__efl_copy, /*copy native value */
+ H5O__efl_size, /*size of message on disk */
H5O__efl_reset, /*reset method */
NULL, /* free method */
NULL, /* file delete method */
@@ -67,7 +67,7 @@ const H5O_msg_class_t H5O_MSG_EFL[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5O_efl_decode
+ * Function: H5O__efl_decode
*
* Purpose: Decode an external file list message and return a pointer to
* the message (and some other data).
@@ -87,7 +87,7 @@ const H5O_msg_class_t H5O_MSG_EFL[1] = {{
*-------------------------------------------------------------------------
*/
static void *
-H5O_efl_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
+H5O__efl_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
@@ -98,7 +98,7 @@ H5O_efl_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
size_t u; /* Local index variable */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(f);
@@ -177,11 +177,11 @@ done:
H5MM_xfree(mesg);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_efl_decode() */
+} /* end H5O__efl_decode() */
/*-------------------------------------------------------------------------
- * Function: H5O_efl_encode
+ * Function: H5O__efl_encode
*
* Purpose: Encodes a message.
*
@@ -193,12 +193,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
size_t u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -236,11 +236,11 @@ H5O_efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, cons
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_efl_encode() */
+} /* end H5O__efl_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_efl_copy
+ * Function: H5O__efl_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -255,7 +255,7 @@ H5O_efl_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, cons
*-------------------------------------------------------------------------
*/
static void *
-H5O_efl_copy(const void *_mesg, void *_dest)
+H5O__efl_copy(const void *_mesg, void *_dest)
{
const H5O_efl_t *mesg = (const H5O_efl_t *) _mesg;
H5O_efl_t *dest = (H5O_efl_t *) _dest;
@@ -263,7 +263,7 @@ H5O_efl_copy(const void *_mesg, void *_dest)
hbool_t slot_allocated = FALSE; /* Flag to indicate that dynamic allocation has begun */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(mesg);
@@ -303,11 +303,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_efl_copy() */
+} /* end H5O__efl_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_efl_size
+ * Function: H5O__efl_size
*
* Purpose: Returns the size of the raw message in bytes not counting the
* message type or size fields, but only the data fields. This
@@ -324,27 +324,27 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5O_efl_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__efl_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_efl_t *mesg = (const H5O_efl_t *) _mesg;
size_t ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
HDassert(mesg);
ret_value = (size_t)H5F_SIZEOF_ADDR(f) + /*heap address */
- 2 + /*slots allocated*/
- 2 + /*num slots used*/
- 4 + /*reserved */
+ 2 + /*slots allocated*/
+ 2 + /*num slots used*/
+ 4 + /*reserved */
mesg->nused * ((size_t)H5F_SIZEOF_SIZE(f) + /*name offset */
(size_t)H5F_SIZEOF_SIZE(f) + /*file offset */
(size_t)H5F_SIZEOF_SIZE(f)); /*file size */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_efl_size() */
+} /* end H5O__efl_size() */
/*-------------------------------------------------------------------------
@@ -402,11 +402,11 @@ H5O__efl_reset(void *_mesg)
*-------------------------------------------------------------------------
*/
hsize_t
-H5O_efl_total_size (H5O_efl_t *efl)
+H5O_efl_total_size(H5O_efl_t *efl)
{
hsize_t ret_value = 0, tmp;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI(0)
if(efl->nused > 0 && H5O_EFL_UNLIMITED == efl->slot[efl->nused - 1].size)
ret_value = H5O_EFL_UNLIMITED;
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index cb75bc3..b9422fb 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Wednesday, September 30, 1998
*
* Purpose: The fill message indicates a bit pattern to use for
@@ -32,15 +32,15 @@
#include "H5Sprivate.h" /* Dataspaces */
-static void *H5O_fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
+static void *H5O__fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_fill_old_encode(H5F_t *f, uint8_t *p, const void *_mesg);
-static size_t H5O_fill_old_size(const H5F_t *f, const void *_mesg);
-static void *H5O_fill_new_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
+static herr_t H5O__fill_old_encode(H5F_t *f, uint8_t *p, const void *_mesg);
+static size_t H5O__fill_old_size(const H5F_t *f, const void *_mesg);
+static void *H5O__fill_new_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_fill_new_encode(H5F_t *f, uint8_t *p, const void *_mesg);
-static size_t H5O_fill_new_size(const H5F_t *f, const void *_mesg);
-static void *H5O_fill_copy(const void *_mesg, void *_dest);
+static herr_t H5O__fill_new_encode(H5F_t *f, uint8_t *p, const void *_mesg);
+static size_t H5O__fill_new_size(const H5F_t *f, const void *_mesg);
+static void *H5O__fill_copy(const void *_mesg, void *_dest);
static herr_t H5O__fill_reset(void *_mesg);
static herr_t H5O__fill_free(void *_mesg);
static herr_t H5O__fill_pre_copy_file(H5F_t *file_src, const void *mesg_src,
@@ -49,59 +49,59 @@ static herr_t H5O__fill_debug(H5F_t *f, const void *_mesg, FILE *stream,
int indent, int fwidth);
/* Set up & include shared message "interface" info */
-#define H5O_SHARED_TYPE H5O_MSG_FILL
-#define H5O_SHARED_DECODE H5O_fill_shared_decode
-#define H5O_SHARED_DECODE_REAL H5O_fill_old_decode
-#define H5O_SHARED_ENCODE H5O_fill_shared_encode
-#define H5O_SHARED_ENCODE_REAL H5O_fill_old_encode
-#define H5O_SHARED_SIZE H5O_fill_shared_size
-#define H5O_SHARED_SIZE_REAL H5O_fill_old_size
-#define H5O_SHARED_DELETE H5O__fill_shared_delete
+#define H5O_SHARED_TYPE H5O_MSG_FILL
+#define H5O_SHARED_DECODE H5O__fill_shared_decode
+#define H5O_SHARED_DECODE_REAL H5O__fill_old_decode
+#define H5O_SHARED_ENCODE H5O__fill_shared_encode
+#define H5O_SHARED_ENCODE_REAL H5O__fill_old_encode
+#define H5O_SHARED_SIZE H5O__fill_shared_size
+#define H5O_SHARED_SIZE_REAL H5O__fill_old_size
+#define H5O_SHARED_DELETE H5O__fill_shared_delete
#undef H5O_SHARED_DELETE_REAL
-#define H5O_SHARED_LINK H5O__fill_shared_link
+#define H5O_SHARED_LINK H5O__fill_shared_link
#undef H5O_SHARED_LINK_REAL
-#define H5O_SHARED_COPY_FILE H5O__fill_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O__fill_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
-#define H5O_SHARED_POST_COPY_FILE H5O_fill_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O__fill_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE_UPD
-#define H5O_SHARED_DEBUG H5O_fill_shared_debug
-#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
-#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
+#define H5O_SHARED_DEBUG H5O__fill_shared_debug
+#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
+#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* Set up & include shared message "interface" info */
/* (Kludgy 'undef's in order to re-include the H5Oshared.h header) */
#undef H5O_SHARED_TYPE
-#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW
+#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW
#undef H5O_SHARED_DECODE
-#define H5O_SHARED_DECODE H5O_fill_new_shared_decode
+#define H5O_SHARED_DECODE H5O__fill_new_shared_decode
#undef H5O_SHARED_DECODE_REAL
-#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode
+#define H5O_SHARED_DECODE_REAL H5O__fill_new_decode
#undef H5O_SHARED_ENCODE
-#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode
+#define H5O_SHARED_ENCODE H5O__fill_new_shared_encode
#undef H5O_SHARED_ENCODE_REAL
-#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode
+#define H5O_SHARED_ENCODE_REAL H5O__fill_new_encode
#undef H5O_SHARED_SIZE
-#define H5O_SHARED_SIZE H5O_fill_new_shared_size
+#define H5O_SHARED_SIZE H5O__fill_new_shared_size
#undef H5O_SHARED_SIZE_REAL
-#define H5O_SHARED_SIZE_REAL H5O_fill_new_size
+#define H5O_SHARED_SIZE_REAL H5O__fill_new_size
#undef H5O_SHARED_DELETE
-#define H5O_SHARED_DELETE H5O__fill_new_shared_delete
+#define H5O_SHARED_DELETE H5O__fill_new_shared_delete
#undef H5O_SHARED_DELETE_REAL
#undef H5O_SHARED_LINK
-#define H5O_SHARED_LINK H5O__fill_new_shared_link
+#define H5O_SHARED_LINK H5O__fill_new_shared_link
#undef H5O_SHARED_LINK_REAL
#undef H5O_SHARED_COPY_FILE
-#define H5O_SHARED_COPY_FILE H5O__fill_new_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O__fill_new_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE
-#define H5O_SHARED_POST_COPY_FILE H5O_fill_new_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O__fill_new_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE_UPD
#undef H5O_SHARED_DEBUG
-#define H5O_SHARED_DEBUG H5O_fill_new_shared_debug
+#define H5O_SHARED_DEBUG H5O__fill_new_shared_debug
#undef H5O_SHARED_DEBUG_REAL
-#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
+#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
#undef H5Oshared_H
#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
@@ -110,11 +110,11 @@ const H5O_msg_class_t H5O_MSG_FILL[1] = {{
H5O_FILL_ID, /*message id number */
"fill", /*message name for debugging */
sizeof(H5O_fill_t), /*native message size */
- H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
- H5O_fill_shared_decode, /*decode message */
- H5O_fill_shared_encode, /*encode message */
- H5O_fill_copy, /*copy the native value */
- H5O_fill_shared_size, /*raw message size */
+ H5O_SHARE_IS_SHARABLE | H5O_SHARE_IN_OHDR, /* messages are sharable? */
+ H5O__fill_shared_decode, /*decode message */
+ H5O__fill_shared_encode, /*encode message */
+ H5O__fill_copy, /*copy the native value */
+ H5O__fill_shared_size, /*raw message size */
H5O__fill_reset, /*free internal memory */
H5O__fill_free, /* free method */
H5O__fill_shared_delete, /* file delete method */
@@ -123,10 +123,10 @@ const H5O_msg_class_t H5O_MSG_FILL[1] = {{
NULL, /*can share method */
H5O__fill_pre_copy_file, /* pre copy native value to file */
H5O__fill_shared_copy_file, /* copy native value to file */
- H5O_fill_shared_post_copy_file, /* post copy native value to file */
+ H5O__fill_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
- H5O_fill_shared_debug /*debug the message */
+ H5O__fill_shared_debug /*debug the message */
}};
/* This message derives from H5O message class, for new fill value after version 1.4 */
@@ -134,11 +134,11 @@ const H5O_msg_class_t H5O_MSG_FILL_NEW[1] = {{
H5O_FILL_NEW_ID, /*message id number */
"fill_new", /*message name for debugging */
sizeof(H5O_fill_t), /*native message size */
- H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
- H5O_fill_new_shared_decode, /*decode message */
- H5O_fill_new_shared_encode, /*encode message */
- H5O_fill_copy, /*copy the native value */
- H5O_fill_new_shared_size, /*raw message size */
+ H5O_SHARE_IS_SHARABLE | H5O_SHARE_IN_OHDR, /* messages are sharable? */
+ H5O__fill_new_shared_decode, /*decode message */
+ H5O__fill_new_shared_encode, /*encode message */
+ H5O__fill_copy, /*copy the native value */
+ H5O__fill_new_shared_size, /*raw message size */
H5O__fill_reset, /*free internal memory */
H5O__fill_free, /* free method */
H5O__fill_new_shared_delete, /* file delete method */
@@ -146,11 +146,11 @@ const H5O_msg_class_t H5O_MSG_FILL_NEW[1] = {{
NULL, /* set share method */
NULL, /*can share method */
H5O__fill_pre_copy_file, /* pre copy native value to file */
- H5O__fill_new_shared_copy_file, /* copy native value to file */
- H5O_fill_new_shared_post_copy_file, /* post copy native value to file */
+ H5O__fill_new_shared_copy_file, /* copy native value to file */
+ H5O__fill_new_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
- H5O_fill_new_shared_debug /*debug the message */
+ H5O__fill_new_shared_debug /*debug the message */
}};
/* Format version bounds for fill value */
@@ -179,7 +179,7 @@ H5FL_BLK_EXTERN(type_conv);
/*-------------------------------------------------------------------------
- * Function: H5O_fill_new_decode
+ * Function: H5O__fill_new_decode
*
* Purpose: Decode a new fill value message. The new fill value
* message is fill value plus space allocation time and
@@ -194,14 +194,14 @@ H5FL_BLK_EXTERN(type_conv);
*-------------------------------------------------------------------------
*/
static void *
-H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
+H5O__fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t p_size, const uint8_t *p)
{
H5O_fill_t *fill = NULL;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(f);
HDassert(p);
@@ -277,10 +277,9 @@ H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
/* Set the "defined" flag */
fill->fill_defined = TRUE;
} /* end else */
- else {
+ else
/* Set the "defined" flag */
fill->fill_defined = TRUE;
- } /* end else */
} /* end else */
/* Set return value */
@@ -294,11 +293,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_fill_new_decode() */
+} /* end H5O__fill_new_decode() */
/*-------------------------------------------------------------------------
- * Function: H5O_fill_old_decode
+ * Function: H5O__fill_old_decode
*
* Purpose: Decode an old fill value message.
*
@@ -311,7 +310,7 @@ done:
*-------------------------------------------------------------------------
*/
static void *
-H5O_fill_old_decode(H5F_t *f, H5O_t *open_oh,
+H5O__fill_old_decode(H5F_t *f, H5O_t *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t p_size, const uint8_t *p)
{
@@ -320,7 +319,7 @@ H5O_fill_old_decode(H5F_t *f, H5O_t *open_oh,
H5T_t *dt = NULL;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(f);
HDassert(p);
@@ -375,11 +374,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_fill_old_decode() */
+} /* end H5O__fill_old_decode() */
/*-------------------------------------------------------------------------
- * Function: H5O_fill_new_encode
+ * Function: H5O__fill_new_encode
*
* Purpose: Encode a new fill value message. The new fill value
* message is fill value plus space allocation time and
@@ -393,11 +392,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
+H5O__fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(f);
HDassert(p);
@@ -473,11 +472,11 @@ H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_fill_new_encode() */
+} /* end H5O__fill_new_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_fill_old_encode
+ * Function: H5O__fill_old_encode
*
* Purpose: Encode an old fill value message.
*
@@ -489,11 +488,11 @@ H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
+H5O__fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(f);
HDassert(p);
@@ -504,11 +503,11 @@ H5O_fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
H5MM_memcpy(p, fill->buf, (size_t)fill->size);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_fill_old_encode() */
+} /* end H5O__fill_old_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_fill_copy
+ * Function: H5O__fill_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary. The new fill value message is fill value plus
@@ -524,13 +523,13 @@ H5O_fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
*-------------------------------------------------------------------------
*/
static void *
-H5O_fill_copy(const void *_src, void *_dst)
+H5O__fill_copy(const void *_src, void *_dst)
{
const H5O_fill_t *src = (const H5O_fill_t *)_src;
H5O_fill_t *dst = (H5O_fill_t *)_dst;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(src);
@@ -621,11 +620,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_fill_copy() */
+} /* end H5O__fill_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_fill_new_size
+ * Function: H5O__fill_new_size
*
* Purpose: Returns the size of the raw message in bytes not counting the
* message type or size fields, but only the data fields. This
@@ -642,40 +641,40 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5O_fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
+H5O__fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(f);
HDassert(fill);
/* Determine size for different versions */
if(fill->version < H5O_FILL_VERSION_3) {
- ret_value = 1 + /* Version number */
- 1 + /* Space allocation time */
- 1 + /* Fill value write time */
- 1; /* Fill value defined */
+ ret_value = 1 + /* Version number */
+ 1 + /* Space allocation time */
+ 1 + /* Fill value write time */
+ 1; /* Fill value defined */
if(fill->fill_defined)
- ret_value += 4 + /* Fill value size */
+ ret_value += 4 + /* Fill value size */
(fill->size > 0 ? (size_t)fill->size : 0); /* Size of fill value */
} /* end if */
else {
- ret_value = 1 + /* Version number */
- 1; /* Status flags */
+ ret_value = 1 + /* Version number */
+ 1; /* Status flags */
if(fill->size > 0)
- ret_value += 4 + /* Fill value size */
- (size_t)fill->size; /* Size of fill value */
+ ret_value += 4 + /* Fill value size */
+ (size_t)fill->size; /* Size of fill value */
} /* end else */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_fill_new_size() */
+} /* end H5O__fill_new_size() */
/*-------------------------------------------------------------------------
- * Function: H5O_fill_old_size
+ * Function: H5O__fill_old_size
*
* Purpose: Returns the size of the raw message in bytes not counting the
* message type or size fields, but only the data fields. This
@@ -690,16 +689,16 @@ H5O_fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
*-------------------------------------------------------------------------
*/
static size_t
-H5O_fill_old_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
+H5O__fill_old_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(fill);
FUNC_LEAVE_NOAPI(4 + (size_t)fill->size)
-} /* end H5O_fill_old_size() */
+} /* end H5O__fill_old_size() */
/*-------------------------------------------------------------------------
@@ -987,7 +986,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
hid_t src_id = -1, dst_id = -1; /* Datatype identifiers */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI(FAIL)
HDassert(fill);
HDassert(dset_type);
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index 898184b..8d6f0b1 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -15,7 +15,7 @@
*
* Created: H5Oflush.c
* Aug 19, 2010
- * Mike McGreevy <mamcgree@hdfgroup.org>
+ * Mike McGreevy
*
* Purpose: Object flush/refresh routines.
*
diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c
index e2fa4e5..d0f447c 100644
--- a/src/H5Ofsinfo.c
+++ b/src/H5Ofsinfo.c
@@ -15,7 +15,7 @@
*
* Created: H5Ofsinfo.c
* Feb 2009
- * Vailin Choi
+ * Vailin Choi
*
* Purpose: File space info message.
*
@@ -25,44 +25,44 @@
#include "H5Omodule.h" /* This source code file is part of the H5O module */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5Opkg.h" /* Object headers */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
-static void *H5O_fsinfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
+static void *H5O__fsinfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_fsinfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_fsinfo_copy(const void *_mesg, void *_dest);
-static size_t H5O_fsinfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__fsinfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O__fsinfo_copy(const void *_mesg, void *_dest);
+static size_t H5O__fsinfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__fsinfo_free(void *mesg);
static herr_t H5O__fsinfo_debug(H5F_t *f, const void *_mesg, FILE * stream,
int indent, int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_FSINFO[1] = {{
- H5O_FSINFO_ID, /* message id number */
- "fsinfo", /* message name for debugging */
- sizeof(H5O_fsinfo_t), /* native message size */
- 0, /* messages are sharable? */
- H5O_fsinfo_decode, /* decode message */
- H5O_fsinfo_encode, /* encode message */
- H5O_fsinfo_copy, /* copy the native value */
- H5O_fsinfo_size, /* size of free-space manager info message */
- NULL, /* default reset method */
- H5O__fsinfo_free, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /* set share method */
- NULL, /* can share method */
- NULL, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O__fsinfo_debug /* debug the message */
+ H5O_FSINFO_ID, /* message id number */
+ "fsinfo", /* message name for debugging */
+ sizeof(H5O_fsinfo_t), /* native message size */
+ 0, /* messages are sharable? */
+ H5O__fsinfo_decode, /* decode message */
+ H5O__fsinfo_encode, /* encode message */
+ H5O__fsinfo_copy, /* copy the native value */
+ H5O__fsinfo_size, /* size of free-space manager info message */
+ NULL, /* default reset method */
+ H5O__fsinfo_free, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /* set share method */
+ NULL, /* can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O__fsinfo_debug /* debug the message */
}};
/* Format version bounds for fsinfo message */
@@ -81,7 +81,7 @@ H5FL_DEFINE_STATIC(H5O_fsinfo_t);
/*-------------------------------------------------------------------------
- * Function: H5O_fsinfo_decode
+ * Function: H5O__fsinfo_decode
*
* Purpose: Decode a message and return a pointer to a newly allocated one.
*
@@ -93,7 +93,7 @@ H5FL_DEFINE_STATIC(H5O_fsinfo_t);
*-------------------------------------------------------------------------
*/
static void *
-H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
+H5O__fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
@@ -102,7 +102,7 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned vers; /* message version */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
@@ -134,7 +134,6 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
/* Map version 0 (deprecated) to version 1 message */
switch(strategy) {
-
case H5F_FILE_SPACE_ALL_PERSIST:
fsinfo->strategy = H5F_FSPACE_STRATEGY_FSM_AGGR;
fsinfo->persist = TRUE;
@@ -166,8 +165,8 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
fsinfo->version = H5O_FSINFO_VERSION_1;
fsinfo->mapped = TRUE;
-
- } else {
+ }
+ else {
HDassert(vers >= H5O_FSINFO_VERSION_1);
fsinfo->version = vers;
@@ -180,10 +179,9 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
H5F_addr_decode(f, &p, &(fsinfo->eoa_pre_fsm_fsalloc)); /* EOA before free-space header and section info */
/* Decode addresses of free space managers, if persisting */
- if(fsinfo->persist) {
+ if(fsinfo->persist)
for(ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++)
H5F_addr_decode(f, &p, &(fsinfo->fs_addr[ptype - 1]));
- } /* end if */
fsinfo->mapped = FALSE;
}
@@ -196,11 +194,11 @@ done:
fsinfo = H5FL_FREE(H5O_fsinfo_t, fsinfo);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_fsinfo_decode() */
+} /* end H5O__fsinfo_decode() */
/*-------------------------------------------------------------------------
- * Function: H5O_fsinfo_encode
+ * Function: H5O__fsinfo_encode
*
* Purpose: Encodes a message.
*
@@ -211,12 +209,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
H5F_mem_page_t ptype; /* Memory type for iteration */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -233,18 +231,17 @@ H5O_fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
H5F_addr_encode(f, &p, fsinfo->eoa_pre_fsm_fsalloc); /* EOA before free-space header and section info */
/* Store addresses of free-space managers, if persisting */
- if(fsinfo->persist) {
+ if(fsinfo->persist)
/* Addresses of free-space managers */
for(ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++)
H5F_addr_encode(f, &p, fsinfo->fs_addr[ptype - 1]);
- } /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_fsinfo_encode() */
+} /* end H5O__fsinfo_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_fsinfo_copy
+ * Function: H5O__fsinfo_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -257,13 +254,13 @@ H5O_fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
*-------------------------------------------------------------------------
*/
static void *
-H5O_fsinfo_copy(const void *_mesg, void *_dest)
+H5O__fsinfo_copy(const void *_mesg, void *_dest)
{
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
H5O_fsinfo_t *dest = (H5O_fsinfo_t *) _dest;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(fsinfo);
@@ -278,11 +275,11 @@ H5O_fsinfo_copy(const void *_mesg, void *_dest)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_fsinfo_copy() */
+} /* end H5O__fsinfo_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_fsinfo_size
+ * Function: H5O__fsinfo_size
*
* Purpose: Returns the size of the raw message in bytes not counting
* the message type or size fields, but only the data fields.
@@ -296,12 +293,12 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5O_fsinfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__fsinfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
ret_value = 3 /* Version, strategy & persist */
+ (size_t)H5F_SIZEOF_SIZE(f) /* Free-space section threshold */
@@ -314,7 +311,7 @@ H5O_fsinfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi
ret_value += (H5F_MEM_PAGE_NTYPES - 1) * (size_t)H5F_SIZEOF_ADDR(f);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_fsinfo_size() */
+} /* end H5O__fsinfo_size() */
/*-------------------------------------------------------------------------
@@ -342,6 +339,79 @@ H5O__fsinfo_free(void *mesg)
/*-------------------------------------------------------------------------
+ * Function: H5O__fsinfo_debug
+ *
+ * Purpose: Prints debugging info for a message.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; Feb 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5O__fsinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE * stream,
+ int indent, int fwidth)
+{
+ const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *) _mesg;
+ H5F_mem_page_t ptype; /* Free-space types for iteration */
+
+ FUNC_ENTER_STATIC_NOERR
+
+ /* check args */
+ HDassert(f);
+ HDassert(fsinfo);
+ HDassert(stream);
+ HDassert(indent >= 0);
+ HDassert(fwidth >= 0);
+
+ HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "File space strategy:");
+ switch(fsinfo->strategy) {
+ case H5F_FSPACE_STRATEGY_FSM_AGGR:
+ HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_FSM_AGGR");
+ break;
+
+ case H5F_FSPACE_STRATEGY_PAGE:
+ HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_PAGE");
+ break;
+
+ case H5F_FSPACE_STRATEGY_AGGR:
+ HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_AGGR");
+ break;
+
+ case H5F_FSPACE_STRATEGY_NONE:
+ HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_NONE");
+ break;
+
+ case H5F_FSPACE_STRATEGY_NTYPES:
+ default:
+ HDfprintf(stream, "%s\n", "unknown");
+ } /* end switch */
+
+ HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
+ "Free-space persist:", fsinfo->persist);
+
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ "Free-space section threshold:", fsinfo->threshold);
+
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ "File space page size:", fsinfo->page_size);
+
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "Page end metadata threshold:", fsinfo->pgend_meta_thres);
+
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ "eoa_pre_fsm_fsalloc:", fsinfo->eoa_pre_fsm_fsalloc);
+
+ if(fsinfo->persist)
+ for(ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++)
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ "Free space manager address:", fsinfo->fs_addr[ptype-1]);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5O__fsinfo_debug() */
+
+/*-------------------------------------------------------------------------
* Function: H5O_fsinfo_set_version
*
* Purpose: Set the version to encode the fsinfo message with.
@@ -414,77 +484,3 @@ done:
} /* end H5O_fsinfo_check_version() */
-/*-------------------------------------------------------------------------
- * Function: H5O__fsinfo_debug
- *
- * Purpose: Prints debugging info for a message.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Vailin Choi; Feb 2009
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5O__fsinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE * stream,
- int indent, int fwidth)
-{
- const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *) _mesg;
- H5F_mem_page_t ptype; /* Free-space types for iteration */
-
- FUNC_ENTER_STATIC_NOERR
-
- /* check args */
- HDassert(f);
- HDassert(fsinfo);
- HDassert(stream);
- HDassert(indent >= 0);
- HDassert(fwidth >= 0);
-
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "File space strategy:");
- switch(fsinfo->strategy) {
- case H5F_FSPACE_STRATEGY_FSM_AGGR:
- HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_FSM_AGGR");
- break;
-
- case H5F_FSPACE_STRATEGY_PAGE:
- HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_PAGE");
- break;
-
- case H5F_FSPACE_STRATEGY_AGGR:
- HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_AGGR");
- break;
-
- case H5F_FSPACE_STRATEGY_NONE:
- HDfprintf(stream, "%s\n", "H5F_FSPACE_STRATEGY_NONE");
- break;
-
- case H5F_FSPACE_STRATEGY_NTYPES:
- default:
- HDfprintf(stream, "%s\n", "unknown");
- } /* end switch */
-
- HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth,
- "Free-space persist:", fsinfo->persist);
-
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Free-space section threshold:", fsinfo->threshold);
-
- HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "File space page size:", fsinfo->page_size);
-
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Page end metadata threshold:", fsinfo->pgend_meta_thres);
-
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "eoa_pre_fsm_fsalloc:", fsinfo->eoa_pre_fsm_fsalloc);
-
- if(fsinfo->persist) {
- for(ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++)
- HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Free space manager address:", fsinfo->fs_addr[ptype-1]);
- } /* end if */
-
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O__fsinfo_debug() */
-
diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c
index d6190c6..75016e5 100644
--- a/src/H5Oginfo.c
+++ b/src/H5Oginfo.c
@@ -15,7 +15,7 @@
*
* Created: H5Oginfo.c
* Aug 23 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Group Information messages.
*
@@ -32,11 +32,11 @@
/* PRIVATE PROTOTYPES */
-static void *H5O_ginfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
+static void *H5O__ginfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_ginfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_ginfo_copy(const void *_mesg, void *_dest);
-static size_t H5O_ginfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__ginfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O__ginfo_copy(const void *_mesg, void *_dest);
+static size_t H5O__ginfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__ginfo_free(void *_mesg);
static herr_t H5O__ginfo_debug(H5F_t *f, const void *_mesg, FILE * stream,
int indent, int fwidth);
@@ -47,10 +47,10 @@ const H5O_msg_class_t H5O_MSG_GINFO[1] = {{
"ginfo", /*message name for debugging */
sizeof(H5O_ginfo_t), /*native message size */
0, /* messages are sharable? */
- H5O_ginfo_decode, /*decode message */
- H5O_ginfo_encode, /*encode message */
- H5O_ginfo_copy, /*copy the native value */
- H5O_ginfo_size, /*size of symbol table entry */
+ H5O__ginfo_decode, /*decode message */
+ H5O__ginfo_encode, /*encode message */
+ H5O__ginfo_copy, /*copy the native value */
+ H5O__ginfo_size, /*size of symbol table entry */
NULL, /*default reset method */
H5O__ginfo_free, /* free method */
NULL, /* file delete method */
@@ -78,7 +78,7 @@ H5FL_DEFINE_STATIC(H5O_ginfo_t);
/*-------------------------------------------------------------------------
- * Function: H5O_ginfo_decode
+ * Function: H5O__ginfo_decode
*
* Purpose: Decode a message and return a pointer to
* a newly allocated one.
@@ -88,13 +88,12 @@ H5FL_DEFINE_STATIC(H5O_ginfo_t);
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 30 2005
*
*-------------------------------------------------------------------------
*/
static void *
-H5O_ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
+H5O__ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t H5_ATTR_UNUSED p_size, const uint8_t *p)
{
@@ -102,7 +101,7 @@ H5O_ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned char flags; /* Flags for encoding group info */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(p);
@@ -151,29 +150,28 @@ done:
ginfo = H5FL_FREE(H5O_ginfo_t, ginfo);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_ginfo_decode() */
+} /* end H5O__ginfo_decode() */
/*-------------------------------------------------------------------------
- * Function: H5O_ginfo_encode
+ * Function: H5O__ginfo_encode
*
* Purpose: Encodes a message.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 30 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *) _mesg;
unsigned char flags = 0; /* Flags for encoding group info */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(p);
@@ -200,11 +198,11 @@ H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_ginfo_encode() */
+} /* end H5O__ginfo_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_ginfo_copy
+ * Function: H5O__ginfo_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -214,19 +212,18 @@ H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 30 2005
*
*-------------------------------------------------------------------------
*/
static void *
-H5O_ginfo_copy(const void *_mesg, void *_dest)
+H5O__ginfo_copy(const void *_mesg, void *_dest)
{
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
H5O_ginfo_t *dest = (H5O_ginfo_t *)_dest;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(ginfo);
@@ -241,11 +238,11 @@ H5O_ginfo_copy(const void *_mesg, void *_dest)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_ginfo_copy() */
+} /* end H5O__ginfo_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_ginfo_size
+ * Function: H5O__ginfo_size
*
* Purpose: Returns the size of the raw message in bytes not counting
* the message type or size fields, but only the data fields.
@@ -256,33 +253,32 @@ done:
* Failure: zero
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 30 2005
*
*-------------------------------------------------------------------------
*/
static size_t
-H5O_ginfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__ginfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Set return value */
ret_value = 1 + /* Version */
1 + /* Flags */
(ginfo->store_link_phase_change ? (
- (size_t)(2 + /* "Max compact" links */
- 2) /* "Min dense" links */
+ (size_t)(2 + /* "Max compact" links */
+ 2) /* "Min dense" links */
) : 0) + /* "Min dense" links */
(ginfo->store_est_entry_info ? (
- (size_t)(2 + /* Estimated # of entries in group */
- 2) /* Estimated length of name of entry in group */
+ (size_t)(2 + /* Estimated # of entries in group */
+ 2) /* Estimated length of name of entry in group */
) : 0);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_ginfo_size() */
+} /* end H5O__ginfo_size() */
/*-------------------------------------------------------------------------
@@ -300,7 +296,7 @@ H5O_ginfo_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
static herr_t
H5O__ginfo_free(void *mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(mesg);
@@ -318,7 +314,6 @@ H5O__ginfo_free(void *mesg)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 30 2005
*
*-------------------------------------------------------------------------
diff --git a/src/H5Oint.c b/src/H5Oint.c
index 04220af..09db25a 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -99,36 +99,36 @@ hbool_t H5_PKG_INIT_VAR = FALSE;
* message.
*/
const H5O_msg_class_t *const H5O_msg_class_g[] = {
- H5O_MSG_NULL, /*0x0000 Null */
- H5O_MSG_SDSPACE, /*0x0001 Dataspace */
- H5O_MSG_LINFO, /*0x0002 Link information */
- H5O_MSG_DTYPE, /*0x0003 Datatype */
- H5O_MSG_FILL, /*0x0004 Old data storage -- fill value */
- H5O_MSG_FILL_NEW, /*0x0005 New data storage -- fill value */
- H5O_MSG_LINK, /*0x0006 Link */
- H5O_MSG_EFL, /*0x0007 Data storage -- external data files */
- H5O_MSG_LAYOUT, /*0x0008 Data Layout */
+ H5O_MSG_NULL, /*0x0000 Null */
+ H5O_MSG_SDSPACE, /*0x0001 Dataspace */
+ H5O_MSG_LINFO, /*0x0002 Link information */
+ H5O_MSG_DTYPE, /*0x0003 Datatype */
+ H5O_MSG_FILL, /*0x0004 Old data storage -- fill value */
+ H5O_MSG_FILL_NEW, /*0x0005 New data storage -- fill value */
+ H5O_MSG_LINK, /*0x0006 Link */
+ H5O_MSG_EFL, /*0x0007 Data storage -- external data files */
+ H5O_MSG_LAYOUT, /*0x0008 Data Layout */
#ifdef H5O_ENABLE_BOGUS
- H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */
+ H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */
#else /* H5O_ENABLE_BOGUS */
- NULL, /*0x0009 "Bogus valid" (for testing) */
+ NULL, /*0x0009 "Bogus valid" (for testing) */
#endif /* H5O_ENABLE_BOGUS */
- H5O_MSG_GINFO, /*0x000A Group information */
- H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */
- H5O_MSG_ATTR, /*0x000C Attribute */
- H5O_MSG_NAME, /*0x000D Object name */
- H5O_MSG_MTIME, /*0x000E Object modification date and time */
- H5O_MSG_SHMESG, /*0x000F File-wide shared message table */
- H5O_MSG_CONT, /*0x0010 Object header continuation */
- H5O_MSG_STAB, /*0x0011 Symbol table */
- H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */
- H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */
- H5O_MSG_DRVINFO, /*0x0014 Driver info settings */
- H5O_MSG_AINFO, /*0x0015 Attribute information */
- H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */
- H5O_MSG_FSINFO, /*0x0017 Free-space manager info */
- H5O_MSG_MDCI, /*0x0018 Metadata cache image */
- H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */
+ H5O_MSG_GINFO, /*0x000A Group information */
+ H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */
+ H5O_MSG_ATTR, /*0x000C Attribute */
+ H5O_MSG_NAME, /*0x000D Object name */
+ H5O_MSG_MTIME, /*0x000E Object modification date and time */
+ H5O_MSG_SHMESG, /*0x000F File-wide shared message table */
+ H5O_MSG_CONT, /*0x0010 Object header continuation */
+ H5O_MSG_STAB, /*0x0011 Symbol table */
+ H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */
+ H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */
+ H5O_MSG_DRVINFO, /*0x0014 Driver info settings */
+ H5O_MSG_AINFO, /*0x0015 Attribute information */
+ H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */
+ H5O_MSG_FSINFO, /*0x0017 Free-space manager info */
+ H5O_MSG_MDCI, /*0x0018 Metadata cache image */
+ H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */
};
/* Format version bounds for object header */
@@ -219,7 +219,7 @@ H5O__init_package(void)
/*-------------------------------------------------------------------------
- * Function: H5O_set_version
+ * Function: H5O__set_version
*
* Purpose: Sets the correct version to encode the object header.
* Chooses the oldest version possible, unless the file's
@@ -233,12 +233,12 @@ H5O__init_package(void)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_idx)
+H5O__set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_idx)
{
uint8_t version; /* Message version */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* check arguments */
HDassert(f);
@@ -262,7 +262,7 @@ H5O_set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_idx
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_set_version() */
+} /* end H5O__set_version() */
/*-------------------------------------------------------------------------
@@ -280,17 +280,8 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 5 1997
*
- * Changes: 2018 August 17
- * Jacob Smith
- * Refactor out the operations into two separate steps --
- * preparation and application -- to facilitate overriding the
- * library-default size allocated for the object header. This
- * function is retained as a wrapper, to minimize changes to
- * unaffected calling functions.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -308,13 +299,13 @@ H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc
/* create object header in freelist
* header version is set internally
*/
- oh = H5O__create_ohdr(f, ocpl_id);
+ oh = H5O_create_ohdr(f, ocpl_id);
if(NULL == oh)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't instantiate object header")
/* apply object header information to file
*/
- if(H5O__apply_ohdr(f, oh, ocpl_id, size_hint, initial_rc, loc) < 0)
+ if(H5O_apply_ohdr(f, oh, ocpl_id, size_hint, initial_rc, loc) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't apply object header to file")
done:
@@ -326,7 +317,7 @@ done:
/*-----------------------------------------------------------------------------
- * Function: H5O__create_ohdr
+ * Function: H5O_create_ohdr
*
* Purpose: Create the object header, set version and flags.
*
@@ -339,7 +330,7 @@ done:
*-----------------------------------------------------------------------------
*/
H5O_t *
-H5O__create_ohdr(H5F_t *f, hid_t ocpl_id)
+H5O_create_ohdr(H5F_t *f, hid_t ocpl_id)
{
H5P_genplist_t *oc_plist;
H5O_t *oh = NULL; /* Object header in Freelist */
@@ -364,20 +355,18 @@ H5O__create_ohdr(H5F_t *f, hid_t ocpl_id)
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, NULL, "not a property list")
/* Get any object header status flags set by properties */
- if(H5P_DATASET_CREATE_DEFAULT == ocpl_id)
- {
+ if(H5P_DATASET_CREATE_DEFAULT == ocpl_id) {
/* If the OCPL is the default DCPL, we can get the header flags from the
* API context. Otherwise we have to call H5P_get */
if(H5CX_get_ohdr_flags(&oh_flags) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get object header flags")
}
- else
- {
+ else {
if(H5P_get(oc_plist, H5O_CRT_OHDR_FLAGS_NAME, &oh_flags) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get object header flags")
}
- if(H5O_set_version(f, oh, oh_flags, H5F_STORE_MSG_CRT_IDX(f)) < 0)
+ if(H5O__set_version(f, oh, oh_flags, H5F_STORE_MSG_CRT_IDX(f)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, NULL, "can't set version of object header")
oh->flags = oh_flags;
@@ -389,11 +378,11 @@ done:
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, NULL, "can't delete object header")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O__create_ohdr() */
+} /* H5O_create_ohdr() */
/*-----------------------------------------------------------------------------
- * Function: H5O__apply_ohdr
+ * Function: H5O_apply_ohdr
*
* Purpose: Initialize and set the object header in the file.
* Record some information at `loc_out`.
@@ -407,7 +396,7 @@ done:
*-----------------------------------------------------------------------------
*/
herr_t
-H5O__apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t initial_rc, H5O_loc_t *loc_out)
+H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t initial_rc, H5O_loc_t *loc_out)
{
haddr_t oh_addr;
size_t oh_size;
@@ -564,7 +553,7 @@ H5O__apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t ini
done:
FUNC_LEAVE_NOAPI(ret_value);
-} /* H5O__apply_ohdr() */
+} /* H5O_apply_ohdr() */
/*-------------------------------------------------------------------------
@@ -664,7 +653,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_open_by_idx
+ * Function: H5O__open_by_idx
*
* Purpose: Internal routine to open an object by index within group
*
@@ -677,7 +666,7 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5O_open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
+H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, H5I_type_t *opened_type)
{
H5G_loc_t obj_loc; /* Location used to open group */
@@ -686,7 +675,7 @@ H5O_open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
hbool_t loc_found = FALSE; /* Entry at 'name' found */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(loc);
@@ -712,11 +701,11 @@ done:
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "can't free location")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_open_by_idx() */
+} /* end H5O__open_by_idx() */
/*-------------------------------------------------------------------------
- * Function: H5O_open_by_addr
+ * Function: H5O__open_by_addr
*
* Purpose: Internal routine to open an object by its address
*
@@ -729,14 +718,14 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5O_open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type)
+H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type)
{
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_PACKAGE
/* Check arguments */
HDassert(loc);
@@ -755,7 +744,7 @@ H5O_open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_open_by_addr() */
+} /* end H5O__open_by_addr() */
/*-------------------------------------------------------------------------
@@ -869,7 +858,6 @@ done:
* Failure: -1
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 5 1997
*
*-------------------------------------------------------------------------
@@ -984,7 +972,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 5 1997
*
*-------------------------------------------------------------------------
@@ -1033,7 +1020,6 @@ done:
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Dec 31 2002
*
*-------------------------------------------------------------------------
@@ -1219,7 +1205,6 @@ done:
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 13 2008
*
*-------------------------------------------------------------------------
@@ -1266,7 +1251,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 13 2008
*
*-------------------------------------------------------------------------
@@ -1302,7 +1286,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Dec 31 2002
*
*-------------------------------------------------------------------------
@@ -1498,7 +1481,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * <koziol@ncsa.uiuc.edu>
* Tuesday, January 21, 2003
*
*-------------------------------------------------------------------------
@@ -1570,7 +1552,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 19 2003
*
*-------------------------------------------------------------------------
@@ -1633,7 +1614,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 19 2003
*
*-------------------------------------------------------------------------
@@ -1696,7 +1676,7 @@ H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type)
done:
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5O_obj_type() */
@@ -1734,10 +1714,9 @@ H5O__obj_type_real(const H5O_t *oh, H5O_type_t *obj_type)
/* Set type to "unknown" */
*obj_type = H5O_TYPE_UNKNOWN;
}
- else {
+ else
/* Set object type */
*obj_type = obj_class->type;
- }
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__obj_type_real() */
@@ -1923,7 +1902,6 @@ H5O_loc_reset(H5O_loc_t *loc)
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Monday, September 19, 2005
*
*-------------------------------------------------------------------------
@@ -2131,7 +2109,7 @@ H5O_get_hdr_info(const H5O_loc_t *loc, H5O_hdr_info_t *hdr)
done:
if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
+ HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_get_hdr_info() */
@@ -2942,7 +2920,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 13 2008
*
*-------------------------------------------------------------------------
@@ -2978,7 +2955,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jul 13 2008
*
*-------------------------------------------------------------------------
@@ -3015,7 +2991,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Oct 08 2010
*
*-------------------------------------------------------------------------
@@ -3081,7 +3056,6 @@ H5O_get_proxy(const H5O_t *oh)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 15 2003
*
*-------------------------------------------------------------------------
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 8e6e204..671afeb 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Wednesday, October 8, 1997
*
* Purpose: Messages related to data layout.
@@ -967,7 +967,7 @@ H5O__layout_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
const H5O_layout_t *layout_src = (const H5O_layout_t *)mesg_src; /* Source layout */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(cpy_info);
diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c
index a2f88d9..ebb34dc 100644
--- a/src/H5Olinfo.c
+++ b/src/H5Olinfo.c
@@ -15,7 +15,7 @@
*
* Created: H5Olinfo.c
* Aug 23 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Link Information messages.
*
@@ -38,9 +38,9 @@
/* PRIVATE PROTOTYPES */
static void *H5O__linfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_linfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_linfo_copy(const void *_mesg, void *_dest);
-static size_t H5O_linfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__linfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O__linfo_copy(const void *_mesg, void *_dest);
+static size_t H5O__linfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__linfo_free(void *_mesg);
static herr_t H5O__linfo_delete(H5F_t *f, H5O_t *open_oh, void *_mesg);
static void *H5O__linfo_copy_file(H5F_t *file_src, void *native_src,
@@ -59,9 +59,9 @@ const H5O_msg_class_t H5O_MSG_LINFO[1] = {{
sizeof(H5O_linfo_t), /*native message size */
0, /* messages are sharable? */
H5O__linfo_decode, /*decode message */
- H5O_linfo_encode, /*encode message */
- H5O_linfo_copy, /*copy the native value */
- H5O_linfo_size, /*size of symbol table entry */
+ H5O__linfo_encode, /*encode message */
+ H5O__linfo_copy, /*copy the native value */
+ H5O__linfo_size, /*size of symbol table entry */
NULL, /*default reset method */
H5O__linfo_free, /* free method */
H5O__linfo_delete, /* file delete method */
@@ -105,7 +105,6 @@ H5FL_DEFINE_STATIC(H5O_linfo_t);
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 23 2005
*
*-------------------------------------------------------------------------
@@ -174,25 +173,24 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_linfo_encode
+ * Function: H5O__linfo_encode
*
* Purpose: Encodes a message.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 23 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
unsigned char index_flags; /* Flags for encoding link index info */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -224,11 +222,11 @@ H5O_linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
HDassert(!H5F_addr_defined(linfo->corder_bt2_addr));
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_linfo_encode() */
+} /* end H5O__linfo_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_linfo_copy
+ * Function: H5O__linfo_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -237,19 +235,18 @@ H5O_linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 23 2005
*
*-------------------------------------------------------------------------
*/
static void *
-H5O_linfo_copy(const void *_mesg, void *_dest)
+H5O__linfo_copy(const void *_mesg, void *_dest)
{
const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
H5O_linfo_t *dest = (H5O_linfo_t *) _dest;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(linfo);
@@ -264,11 +261,11 @@ H5O_linfo_copy(const void *_mesg, void *_dest)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_linfo_copy() */
+} /* end H5O__linfo_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_linfo_size
+ * Function: H5O__linfo_size
*
* Purpose: Returns the size of the raw message in bytes not counting
* the message type or size fields, but only the data fields.
@@ -278,18 +275,17 @@ done:
* Failure: zero
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 23 2005
*
*-------------------------------------------------------------------------
*/
static size_t
-H5O_linfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__linfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_linfo_t *linfo = (const H5O_linfo_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Set return value */
ret_value = 1 /* Version */
@@ -300,7 +296,7 @@ H5O_linfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
+ (linfo->index_corder ? (size_t)H5F_SIZEOF_ADDR(f) : 0); /* Address of v2 B-tree for indexing creation order values of links */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_linfo_size() */
+} /* end H5O__linfo_size() */
/*-------------------------------------------------------------------------
@@ -393,7 +389,7 @@ H5O__linfo_copy_file(H5F_t H5_ATTR_UNUSED *file_src, void *native_src, H5F_t *fi
HDassert(cpy_info);
/* Copy the source message */
- if(NULL == (linfo_dst = (H5O_linfo_t *)H5O_linfo_copy(linfo_src, NULL)))
+ if(NULL == (linfo_dst = (H5O_linfo_t *)H5O__linfo_copy(linfo_src, NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "memory allocation failed")
/* If we are performing a 'shallow hierarchy' copy, and the links in this
@@ -441,7 +437,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Sept 26 2006
*
*-------------------------------------------------------------------------
@@ -548,7 +543,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 23 2005
*
*-------------------------------------------------------------------------
diff --git a/src/H5Olink.c b/src/H5Olink.c
index c27b51f..70b654f 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -15,7 +15,7 @@
*
* Created: H5Olink.c
* Aug 29 2005
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Link messages.
*
@@ -40,12 +40,12 @@
/* PRIVATE PROTOTYPES */
static void *H5O__link_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_link_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_link_copy(const void *_mesg, void *_dest);
-static size_t H5O_link_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__link_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O__link_copy(const void *_mesg, void *_dest);
+static size_t H5O__link_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__link_reset(void *_mesg);
static herr_t H5O__link_free(void *_mesg);
-static herr_t H5O_link_pre_copy_file(H5F_t *file_src, const void *mesg_src,
+static herr_t H5O__link_pre_copy_file(H5F_t *file_src, const void *mesg_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void *udata);
static void *H5O__link_copy_file(H5F_t *file_src, void *native_src,
H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags,
@@ -63,16 +63,16 @@ const H5O_msg_class_t H5O_MSG_LINK[1] = {{
sizeof(H5O_link_t), /*native message size */
0, /* messages are sharable? */
H5O__link_decode, /*decode message */
- H5O_link_encode, /*encode message */
- H5O_link_copy, /*copy the native value */
- H5O_link_size, /*size of symbol table entry */
+ H5O__link_encode, /*encode message */
+ H5O__link_copy, /*copy the native value */
+ H5O__link_size, /*size of symbol table entry */
H5O__link_reset, /* reset method */
H5O__link_free, /* free method */
H5O_link_delete, /* file delete method */
NULL, /* link method */
NULL, /*set share method */
NULL, /*can share method */
- H5O_link_pre_copy_file, /* pre copy native value to file */
+ H5O__link_pre_copy_file, /* pre copy native value to file */
H5O__link_copy_file, /* copy native value to file */
H5O__link_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
@@ -111,7 +111,6 @@ H5FL_DEFINE_STATIC(H5O_link_t);
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 29 2005
*
*-------------------------------------------------------------------------
@@ -284,26 +283,25 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_link_encode
+ * Function: H5O__link_encode
*
* Purpose: Encodes a link message.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 29 2005
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_link_t *lnk = (const H5O_link_t *) _mesg;
uint64_t len; /* Length of a string in the message */
unsigned char link_flags; /* Flags for encoding link info */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -404,11 +402,11 @@ H5O_link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
} /* end switch */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_link_encode() */
+} /* end H5O__link_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_link_copy
+ * Function: H5O__link_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -418,19 +416,18 @@ H5O_link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 29 2005
*
*-------------------------------------------------------------------------
*/
static void *
-H5O_link_copy(const void *_mesg, void *_dest)
+H5O__link_copy(const void *_mesg, void *_dest)
{
const H5O_link_t *lnk = (const H5O_link_t *) _mesg;
H5O_link_t *dest = (H5O_link_t *) _dest;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(lnk);
@@ -471,11 +468,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_link_copy() */
+} /* end H5O__link_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_link_size
+ * Function: H5O__link_size
*
* Purpose: Returns the size of the raw message in bytes not counting
* the message type or size fields, but only the data fields.
@@ -486,20 +483,19 @@ done:
* Failure: zero
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 29 2005
*
*-------------------------------------------------------------------------
*/
static size_t
-H5O_link_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__link_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_link_t *lnk = (const H5O_link_t *)_mesg;
uint64_t name_len; /* Length of name */
size_t name_size; /* Size of encoded name length */
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDcompile_assert(sizeof(uint64_t) >= sizeof(size_t));
@@ -548,7 +544,7 @@ H5O_link_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void
} /* end switch */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_link_size() */
+} /* end H5O__link_size() */
/*-------------------------------------------------------------------------
@@ -683,7 +679,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_link_pre_copy_file
+ * Function: H5O__link_pre_copy_file
*
* Purpose: Perform any necessary actions before copying message between
* files for link messages.
@@ -698,10 +694,10 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
+H5O__link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(deleted);
@@ -716,7 +712,7 @@ H5O_link_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED
*deleted = TRUE;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_link_pre_copy_file() */
+} /* end H5O__link_pre_copy_file() */
/*-------------------------------------------------------------------------
@@ -811,7 +807,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Aug 29 2005
*
*-------------------------------------------------------------------------
@@ -823,7 +818,7 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
const H5O_link_t *lnk = (const H5O_link_t *) _mesg;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index d66ea69..283d913 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -15,7 +15,7 @@
*
* Created: H5Omessage.c
* Dec 3 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Object header message routines.
*
@@ -105,7 +105,6 @@ static herr_t H5O__copy_mesg(H5F_t *f, H5O_t *oh, size_t idx,
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 1 2006
*
*-------------------------------------------------------------------------
@@ -153,7 +152,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Dec 31 2002
*
*-------------------------------------------------------------------------
@@ -196,7 +194,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 8 2006
*
*-------------------------------------------------------------------------
@@ -248,7 +245,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -304,7 +300,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Dec 6 2007
*
*-------------------------------------------------------------------------
@@ -352,7 +347,6 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -453,7 +447,6 @@ done:
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -506,7 +499,6 @@ done:
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -563,7 +555,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
*-------------------------------------------------------------------------
@@ -600,7 +591,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
*-------------------------------------------------------------------------
@@ -951,7 +941,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 28 1997
*
*-------------------------------------------------------------------------
@@ -1002,7 +991,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
*-------------------------------------------------------------------------
@@ -1052,7 +1040,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
*-------------------------------------------------------------------------
@@ -1118,7 +1105,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 28 1997
*
*-------------------------------------------------------------------------
@@ -1175,7 +1161,6 @@ done:
* object headers were processed.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Nov 19 2004
*
* Description:
@@ -1241,7 +1226,6 @@ done:
* object headers were processed.
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
* Description:
@@ -1316,7 +1300,7 @@ done:
*/
if(oh_modified & H5O_MODIFY_CONDENSE)
if(H5O__condense_header(f, oh) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't pack object header")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't pack object header")
/* Mark object header as changed */
if(H5O_touch_oh(f, oh, FALSE) < 0)
@@ -1340,7 +1324,6 @@ done:
* Return: Size of message on success, 0 on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Feb 13 2003
*
*-------------------------------------------------------------------------
@@ -1383,7 +1366,6 @@ done:
* Return: Size of message on success, 0 on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 6 2005
*
*-------------------------------------------------------------------------
@@ -1447,7 +1429,6 @@ done:
* Return: Size of message on success, 0 on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 7 2007
*
*-------------------------------------------------------------------------
@@ -1584,7 +1565,6 @@ H5O_msg_can_share_in_ohdr(unsigned type_id)
* Object is not shared: FALSE
*
* Programmer: James Laird
- * jlaird@ncsa.uiuc.edu
* April 5 2006
*
*-------------------------------------------------------------------------
@@ -1629,7 +1609,6 @@ H5O_msg_is_shared(unsigned type_id, const void *mesg)
* Failure: Negative
*
* Programmer: James Laird
- * jlaird@hdfgroup.org
* November 1 2006
*
*-------------------------------------------------------------------------
@@ -1680,7 +1659,6 @@ done:
* Failure: Negative
*
* Programmer: James Laird
- * jlaird@hdfgroup.org
* Oct 17 2006
*
*-------------------------------------------------------------------------
@@ -1756,7 +1734,6 @@ done:
* Failure: Negative
*
* Programmer: Raymond Lu
- * slu@ncsa.uiuc.edu
* July 13, 2004
*
*-------------------------------------------------------------------------
@@ -1796,14 +1773,8 @@ done:
* Failure: NULL
*
* Programmer: Raymond Lu
- * slu@ncsa.uiuc.edu
* July 14, 2004
*
- * Modifications: Neil Fortner
- * Feb 4 2009
- * Added open_oh parameter. This parameter is optional and
- * contains this message's protected object header
- *
*-------------------------------------------------------------------------
*/
void *
@@ -2067,7 +2038,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* September 26 2003
*
*-------------------------------------------------------------------------
@@ -2107,7 +2077,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* May 14 2007
*
*-------------------------------------------------------------------------
@@ -2208,7 +2177,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Nov 21 2005
*
*-------------------------------------------------------------------------
diff --git a/src/H5Omodule.h b/src/H5Omodule.h
index df3ab56..6f00fcc 100644
--- a/src/H5Omodule.h
+++ b/src/H5Omodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index fbf7613..846bbf3 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Friday, July 24, 1998
*
* Purpose: The object modification time message.
@@ -29,14 +29,14 @@
static void *H5O__mtime_new_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_mtime_new_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static size_t H5O_mtime_new_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__mtime_new_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static size_t H5O__mtime_new_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static void *H5O__mtime_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_mtime_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_mtime_copy(const void *_mesg, void *_dest);
-static size_t H5O_mtime_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__mtime_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O__mtime_copy(const void *_mesg, void *_dest);
+static size_t H5O__mtime_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__mtime_free(void *_mesg);
static herr_t H5O__mtime_debug(H5F_t *f, const void *_mesg, FILE *stream,
int indent, int fwidth);
@@ -48,9 +48,9 @@ const H5O_msg_class_t H5O_MSG_MTIME[1] = {{
sizeof(time_t), /*native message size */
0, /* messages are sharable? */
H5O__mtime_decode, /*decode message */
- H5O_mtime_encode, /*encode message */
- H5O_mtime_copy, /*copy the native value */
- H5O_mtime_size, /*raw message size */
+ H5O__mtime_encode, /*encode message */
+ H5O__mtime_copy, /*copy the native value */
+ H5O__mtime_size, /*raw message size */
NULL, /* reset method */
H5O__mtime_free, /* free method */
NULL, /* file delete method */
@@ -73,9 +73,9 @@ const H5O_msg_class_t H5O_MSG_MTIME_NEW[1] = {{
sizeof(time_t), /*native message size */
0, /* messages are sharable? */
H5O__mtime_new_decode, /*decode message */
- H5O_mtime_new_encode, /*encode message */
- H5O_mtime_copy, /*copy the native value */
- H5O_mtime_new_size, /*raw message size */
+ H5O__mtime_new_encode, /*encode message */
+ H5O__mtime_copy, /*copy the native value */
+ H5O__mtime_new_size, /*raw message size */
NULL, /* reset method */
H5O__mtime_free, /* free method */
NULL, /* file delete method */
@@ -111,7 +111,6 @@ H5FL_DEFINE(time_t);
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 3 2002
*
*-------------------------------------------------------------------------
@@ -168,7 +167,6 @@ done:
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 24 1998
*
*-------------------------------------------------------------------------
@@ -220,24 +218,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_new_encode
+ * Function: H5O__mtime_new_encode
*
* Purpose: Encodes a new modification time message.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 3 2002
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const time_t *mesg = (const time_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -256,31 +253,28 @@ H5O_mtime_new_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_sha
UINT32ENCODE(p, *mesg);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_mtime_new_encode() */
+} /* end H5O__mtime_new_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_encode
+ * Function: H5O__mtime_encode
*
* Purpose: Encodes a modification time message.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 24 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const time_t *mesg = (const time_t *) _mesg;
struct tm *tm;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -290,15 +284,15 @@ H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
/* encode */
tm = HDgmtime(mesg);
HDsprintf((char*)p, "%04d%02d%02d%02d%02d%02d",
- 1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday,
- tm->tm_hour, tm->tm_min, tm->tm_sec);
+ 1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec);
FUNC_LEAVE_NOAPI(SUCCEED)
-}
+} /* end H5O__mtime_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_copy
+ * Function: H5O__mtime_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -308,25 +302,22 @@ H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 24 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
-H5O_mtime_copy(const void *_mesg, void *_dest)
+H5O__mtime_copy(const void *_mesg, void *_dest)
{
const time_t *mesg = (const time_t *) _mesg;
time_t *dest = (time_t *) _dest;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(mesg);
- if (!dest && NULL==(dest = H5FL_MALLOC(time_t)))
+ if(!dest && NULL == (dest = H5FL_MALLOC(time_t)))
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* copy */
@@ -337,11 +328,11 @@ H5O_mtime_copy(const void *_mesg, void *_dest)
done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5O__mtime_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_new_size
+ * Function: H5O__mtime_new_size
*
* Purpose: Returns the size of the raw message in bytes not
* counting the message type or size fields, but only the data
@@ -353,28 +344,25 @@ done:
* Failure: 0
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Jan 3 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static size_t
-H5O_mtime_new_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED * mesg)
+H5O__mtime_new_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED * mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
HDassert(mesg);
FUNC_LEAVE_NOAPI(8)
-} /* end H5O_mtime_new_size() */
+} /* end H5O__mtime_new_size() */
/*-------------------------------------------------------------------------
- * Function: H5O_mtime_size
+ * Function: H5O__mtime_size
*
* Purpose: Returns the size of the raw message in bytes not
* counting the message type or size fields, but only the data
@@ -386,24 +374,21 @@ H5O_mtime_new_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disabl
* Failure: 0
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 14 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static size_t
-H5O_mtime_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED * mesg)
+H5O__mtime_size(const H5F_t H5_ATTR_UNUSED * f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED * mesg)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
HDassert(mesg);
FUNC_LEAVE_NOAPI(16)
-}
+} /* end H5O__mtime_size() */
/*-------------------------------------------------------------------------
@@ -439,7 +424,6 @@ H5O__mtime_free(void *mesg)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Jul 24 1998
*
*-------------------------------------------------------------------------
diff --git a/src/H5Oname.c b/src/H5Oname.c
index 1f20f10..41cd01e 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -15,7 +15,7 @@
*
* Created: H5Oname.c
* Aug 12 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Object name message.
*
@@ -34,9 +34,9 @@
/* PRIVATE PROTOTYPES */
static void *H5O__name_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_name_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_name_copy(const void *_mesg, void *_dest);
-static size_t H5O_name_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__name_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O__name_copy(const void *_mesg, void *_dest);
+static size_t H5O__name_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__name_reset(void *_mesg);
static herr_t H5O__name_debug(H5F_t *f, const void *_mesg, FILE * stream,
int indent, int fwidth);
@@ -48,9 +48,9 @@ const H5O_msg_class_t H5O_MSG_NAME[1] = {{
sizeof(H5O_name_t), /*native message size */
0, /* messages are sharable? */
H5O__name_decode, /*decode message */
- H5O_name_encode, /*encode message */
- H5O_name_copy, /*copy the native value */
- H5O_name_size, /*raw message size */
+ H5O__name_encode, /*encode message */
+ H5O__name_copy, /*copy the native value */
+ H5O__name_size, /*raw message size */
H5O__name_reset, /*free internal memory */
NULL, /* free method */
NULL, /* file delete method */
@@ -77,7 +77,6 @@ const H5O_msg_class_t H5O_MSG_NAME[1] = {{
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
*-------------------------------------------------------------------------
@@ -115,26 +114,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_name_encode
+ * Function: H5O__name_encode
*
* Purpose: Encodes a name message.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -145,11 +141,11 @@ H5O_name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
HDstrcpy((char*)p, mesg->s);
FUNC_LEAVE_NOAPI(SUCCEED)
-}
+} /* end H5O__name_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_name_copy
+ * Function: H5O__name_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -159,21 +155,18 @@ H5O_name_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void *
-H5O_name_copy(const void *_mesg, void *_dest)
+H5O__name_copy(const void *_mesg, void *_dest)
{
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
H5O_name_t *dest = (H5O_name_t *) _dest;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(mesg);
@@ -195,11 +188,11 @@ done:
dest = (H5O_name_t *)H5MM_xfree(dest);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_name_copy() */
+} /* end H5O__name_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_name_size
+ * Function: H5O__name_size
*
* Purpose: Returns the size of the raw message in bytes not
* counting the message typ or size fields, but only the data
@@ -211,20 +204,17 @@ done:
* Failure: Negative
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static size_t
-H5O_name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
+H5O__name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void *_mesg)
{
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -233,7 +223,7 @@ H5O_name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
ret_value = mesg->s ? HDstrlen(mesg->s) + 1 : 0;
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5O__name_size() */
/*-------------------------------------------------------------------------
@@ -245,7 +235,6 @@ H5O_name_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
*-------------------------------------------------------------------------
@@ -275,11 +264,8 @@ H5O__name_reset(void *_mesg)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 12 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -288,7 +274,7 @@ H5O__name_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream,
{
const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
diff --git a/src/H5Onull.c b/src/H5Onull.c
index 5697455..43c555f 100644
--- a/src/H5Onull.c
+++ b/src/H5Onull.c
@@ -15,7 +15,6 @@
*
* Created: H5Onull.c
* Aug 6 1997
- * Robb Matzke <matzke@llnl.gov>
*
* Purpose: The null message.
*
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index 16ea8e5..07e0e8e 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -554,7 +554,12 @@ H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATASET[1];
H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATATYPE[1];
/* Package-local function prototypes */
+H5_DLL void *H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type/*out*/);
+H5_DLL void *H5O__open_by_idx(const H5G_loc_t *loc, const char *name,
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5I_type_t *opened_type/*out*/);
H5_DLL const H5O_obj_class_t *H5O__obj_class(const H5O_loc_t *loc);
+H5_DLL herr_t H5O__copy(const H5G_loc_t *src_loc, const char *src_name,
+ H5G_loc_t *dst_loc, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id);
H5_DLL int H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted);
H5_DLL herr_t H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type,
H5_iter_order_t order, H5O_iterate2_t op, void *op_data, unsigned fields);
diff --git a/src/H5Opline.c b/src/H5Opline.c
index a956725..35efed3 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -12,81 +12,81 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
- * Wednesday, April 15, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, April 15, 1998
*
- * Purpose: Data filter pipeline message.
+ * Purpose: Data filter pipeline message.
*/
#include "H5Omodule.h" /* This source code file is part of the H5O module */
-#define H5Z_FRIEND /*suppress error about including H5Zpkg */
+#define H5Z_FRIEND /*suppress error about including H5Zpkg */
-#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Zpkg.h" /* Data filters */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Zpkg.h" /* Data filters */
/* PRIVATE PROTOTYPES */
-static herr_t H5O_pline_encode(H5F_t *f, uint8_t *p, const void *mesg);
+static herr_t H5O__pline_encode(H5F_t *f, uint8_t *p, const void *mesg);
static void *H5O__pline_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static void *H5O_pline_copy(const void *_mesg, void *_dest);
-static size_t H5O_pline_size(const H5F_t *f, const void *_mesg);
+static void *H5O__pline_copy(const void *_mesg, void *_dest);
+static size_t H5O__pline_size(const H5F_t *f, const void *_mesg);
static herr_t H5O__pline_reset(void *_mesg);
static herr_t H5O__pline_free(void *_mesg);
-static herr_t H5O_pline_pre_copy_file(H5F_t *file_src,
+static herr_t H5O__pline_pre_copy_file(H5F_t *file_src,
const void *mesg_src, hbool_t *deleted, const H5O_copy_t *cpy_info, void *_udata);
static herr_t H5O__pline_debug(H5F_t *f, const void *_mesg, FILE * stream,
int indent, int fwidth);
/* Set up & include shared message "interface" info */
-#define H5O_SHARED_TYPE H5O_MSG_PLINE
-#define H5O_SHARED_DECODE H5O_pline_shared_decode
-#define H5O_SHARED_DECODE_REAL H5O__pline_decode
-#define H5O_SHARED_ENCODE H5O_pline_shared_encode
-#define H5O_SHARED_ENCODE_REAL H5O_pline_encode
-#define H5O_SHARED_SIZE H5O_pline_shared_size
-#define H5O_SHARED_SIZE_REAL H5O_pline_size
-#define H5O_SHARED_DELETE H5O__pline_shared_delete
+#define H5O_SHARED_TYPE H5O_MSG_PLINE
+#define H5O_SHARED_DECODE H5O__pline_shared_decode
+#define H5O_SHARED_DECODE_REAL H5O__pline_decode
+#define H5O_SHARED_ENCODE H5O__pline_shared_encode
+#define H5O_SHARED_ENCODE_REAL H5O__pline_encode
+#define H5O_SHARED_SIZE H5O__pline_shared_size
+#define H5O_SHARED_SIZE_REAL H5O__pline_size
+#define H5O_SHARED_DELETE H5O__pline_shared_delete
#undef H5O_SHARED_DELETE_REAL
-#define H5O_SHARED_LINK H5O__pline_shared_link
+#define H5O_SHARED_LINK H5O__pline_shared_link
#undef H5O_SHARED_LINK_REAL
-#define H5O_SHARED_COPY_FILE H5O__pline_shared_copy_file
+#define H5O_SHARED_COPY_FILE H5O__pline_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
-#define H5O_SHARED_POST_COPY_FILE H5O_pline_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O__pline_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE_UPD
-#define H5O_SHARED_DEBUG H5O_pline_shared_debug
-#define H5O_SHARED_DEBUG_REAL H5O__pline_debug
-#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
+#define H5O_SHARED_DEBUG H5O__pline_shared_debug
+#define H5O_SHARED_DEBUG_REAL H5O__pline_debug
+#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_PLINE[1] = {{
- H5O_PLINE_ID, /* message id number */
- "filter pipeline", /* message name for debugging */
- sizeof(H5O_pline_t), /* native message size */
- H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
- H5O_pline_shared_decode, /* decode message */
- H5O_pline_shared_encode, /* encode message */
- H5O_pline_copy, /* copy the native value */
- H5O_pline_shared_size, /* size of raw message */
- H5O__pline_reset, /* reset method */
- H5O__pline_free, /* free method */
- H5O__pline_shared_delete, /* file delete method */
- H5O__pline_shared_link, /* link method */
- NULL, /* set share method */
- NULL, /*can share method */
- H5O_pline_pre_copy_file, /* pre copy native value to file */
- H5O__pline_shared_copy_file, /* copy native value to file */
- H5O_pline_shared_post_copy_file, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_pline_shared_debug /* debug the message */
+ H5O_PLINE_ID, /* message id number */
+ "filter pipeline", /* message name for debugging */
+ sizeof(H5O_pline_t), /* native message size */
+ H5O_SHARE_IS_SHARABLE | H5O_SHARE_IN_OHDR, /* messages are sharable? */
+ H5O__pline_shared_decode, /* decode message */
+ H5O__pline_shared_encode, /* encode message */
+ H5O__pline_copy, /* copy the native value */
+ H5O__pline_shared_size, /* size of raw message */
+ H5O__pline_reset, /* reset method */
+ H5O__pline_free, /* free method */
+ H5O__pline_shared_delete, /* file delete method */
+ H5O__pline_shared_link, /* link method */
+ NULL, /* set share method */
+ NULL, /*can share method */
+ H5O__pline_pre_copy_file, /* pre copy native value to file */
+ H5O__pline_shared_copy_file,/* copy native value to file */
+ H5O__pline_shared_post_copy_file, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O__pline_shared_debug /* debug the message */
}};
/* Format version bounds for filter pipleline */
@@ -105,12 +105,12 @@ H5FL_DEFINE(H5O_pline_t);
/*-------------------------------------------------------------------------
* Function: H5O__pline_decode
*
- * Purpose: Decodes a filter pipeline message.
+ * Purpose: Decodes a filter pipeline message.
*
- * Return: Success: Ptr to the native message.
- * Failure: NULL
+ * Return: Success: Ptr to the native message.
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
@@ -223,7 +223,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
if (p + 4 - 1 <= p_end)
UINT32DECODE(p, filter->cd_values[j])
else
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "ran off the end of the buffer: current p = %p, p_size = %zu, p_end = %p", p, p_size, p_end)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "ran off the end of the buffer: current p = %p, p_size = %zu, p_end = %p", (const void *)p, p_size, (const void *)p_end)
}
if(pline->version == H5O_PLINE_VERSION_1)
@@ -246,7 +246,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_pline_encode
+ * Function: H5O__pline_encode
*
* Purpose: Encodes message MESG into buffer P.
*
@@ -258,13 +258,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
+H5O__pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
{
const H5O_pline_t *pline = (const H5O_pline_t*)mesg; /* Pipeline message to encode */
const H5Z_filter_info_t *filter; /* Filter to encode */
size_t i, j; /* Local index variables */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(p);
@@ -288,7 +288,7 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
size_t name_length; /* Length of filter name */
/* Filter ID */
- UINT16ENCODE(p, filter->id);
+ UINT16ENCODE(p, filter->id);
/* Skip writing the name length & name if the filter is an internal filter */
if(pline->version > H5O_PLINE_VERSION_1 && filter->id < H5Z_FILTER_RESERVED) {
@@ -312,26 +312,26 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
} /* end else */
/* Filter flags */
- UINT16ENCODE(p, filter->flags);
+ UINT16ENCODE(p, filter->flags);
/* # of filter parameters */
- UINT16ENCODE(p, filter->cd_nelmts);
+ UINT16ENCODE(p, filter->cd_nelmts);
/* Encode name, if there is one to encode */
- if(name_length > 0) {
+ if(name_length > 0) {
/* Store name, with null terminator */
- H5MM_memcpy(p, name, name_length);
- p += name_length;
+ H5MM_memcpy(p, name, name_length);
+ p += name_length;
/* Pad out name to alignment, in older versions */
if(pline->version == H5O_PLINE_VERSION_1)
while(name_length++ % 8)
*p++ = 0;
- } /* end if */
+ } /* end if */
/* Filter parameters */
- for(j = 0; j < filter->cd_nelmts; j++)
- UINT32ENCODE(p, filter->cd_values[j]);
+ for(j = 0; j < filter->cd_nelmts; j++)
+ UINT32ENCODE(p, filter->cd_values[j]);
/* Align the parameters for older versions of the format */
if(pline->version == H5O_PLINE_VERSION_1)
@@ -340,11 +340,11 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_pline_encode() */
+} /* end H5O__pline_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_pline_copy
+ * Function: H5O__pline_copy
*
* Purpose: Copies a filter pipeline message from SRC to DST allocating
* DST if necessary. If DST is already allocated then we assume
@@ -360,18 +360,18 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
*-------------------------------------------------------------------------
*/
static void *
-H5O_pline_copy(const void *_src, void *_dst/*out*/)
+H5O__pline_copy(const void *_src, void *_dst/*out*/)
{
const H5O_pline_t *src = (const H5O_pline_t *)_src; /* Source pipeline message */
H5O_pline_t *dst = (H5O_pline_t *)_dst; /* Destination pipeline message */
size_t i; /* Local index variable */
H5O_pline_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Allocate pipeline message, if not provided */
if(!dst && NULL == (dst = H5FL_MALLOC(H5O_pline_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Shallow copy basic fields */
*dst = *src;
@@ -428,16 +428,16 @@ H5O_pline_copy(const void *_src, void *_dst/*out*/)
done:
if(!ret_value && dst) {
H5O__pline_reset(dst);
- if(!_dst)
+ if(!_dst)
H5O__pline_free(dst);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_pline_copy() */
+} /* end H5O__pline_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_pline_size
+ * Function: H5O__pline_size
*
* Purpose: Determines the size of a raw filter pipeline message.
*
@@ -451,18 +451,18 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5O_pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg)
+H5O__pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg)
{
const H5O_pline_t *pline = (const H5O_pline_t*)mesg; /* Pipeline message */
size_t i; /* Local index variable */
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Message header */
ret_value = (size_t)(1 + /*version */
- 1 + /*number of filters */
- (pline->version == H5O_PLINE_VERSION_1 ? 6 : 0)); /*reserved */
+ 1 + /*number of filters */
+ (pline->version == H5O_PLINE_VERSION_1 ? 6 : 0)); /*reserved */
/* Calculate size of each filter in pipeline */
for(i = 0; i < pline->nused; i++) {
@@ -475,26 +475,26 @@ H5O_pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg)
else {
H5Z_class2_t *cls; /* Filter class */
- /* Get the name of the filter, same as done with H5O_pline_encode() */
+ /* 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 ? HDstrlen(name) + 1 : 0;
} /* end else */
- ret_value += 2 + /*filter identification number */
- (size_t)((pline->version == H5O_PLINE_VERSION_1 || pline->filter[i].id >= H5Z_FILTER_RESERVED) ? 2 : 0) + /*name length */
- 2 + /*flags */
- 2 + /*number of client data values */
- (pline->version == H5O_PLINE_VERSION_1 ? (size_t)H5O_ALIGN_OLD(name_len) : name_len); /*length of the filter name */
+ ret_value += 2 + /*filter identification number */
+ (size_t)((pline->version == H5O_PLINE_VERSION_1 || pline->filter[i].id >= H5Z_FILTER_RESERVED) ? 2 : 0) + /*name length */
+ 2 + /*flags */
+ 2 + /*number of client data values */
+ (pline->version == H5O_PLINE_VERSION_1 ? (size_t)H5O_ALIGN_OLD(name_len) : name_len); /*length of the filter name */
- ret_value += pline->filter[i].cd_nelmts * 4;
+ ret_value += pline->filter[i].cd_nelmts * 4;
if(pline->version == H5O_PLINE_VERSION_1)
if(pline->filter[i].cd_nelmts % 2)
ret_value += 4;
} /* end for */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_pline_size() */
+} /* end H5O__pline_size() */
/*-------------------------------------------------------------------------
@@ -525,8 +525,7 @@ H5O__pline_reset(void *mesg)
HDassert(pline);
/* Free the filter information and array */
- if (pline->filter) {
-
+ if(pline->filter) {
/* Free information for each filter */
for(i = 0; i < pline->nused; i++) {
if(pline->filter[i].name && pline->filter[i].name != pline->filter[i]._name)
@@ -579,7 +578,7 @@ H5O__pline_free(void *mesg)
/*-------------------------------------------------------------------------
- * Function: H5O_pline_pre_copy_file
+ * Function: H5O__pline_pre_copy_file
*
* Purpose: Perform any necessary actions before copying message between
* files
@@ -594,14 +593,14 @@ H5O__pline_free(void *mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
+H5O__pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void *_udata)
{
const H5O_pline_t *pline_src = (const H5O_pline_t *)mesg_src; /* Source pline */
H5O_copy_file_ud_common_t *udata = (H5O_copy_file_ud_common_t *)_udata; /* Object copying user data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(pline_src);
@@ -618,12 +617,12 @@ H5O_pline_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
* the object copying process.
*/
if(udata)
- if(NULL == (udata->src_pline = (H5O_pline_t *)H5O_pline_copy(pline_src, NULL)))
+ if(NULL == (udata->src_pline = (H5O_pline_t *)H5O__pline_copy(pline_src, NULL)))
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to copy")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_pline_pre_copy_file() */
+} /* end H5O__pline_pre_copy_file() */
/*-------------------------------------------------------------------------
@@ -663,36 +662,36 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream,
/* Loop over all the filters */
for(i = 0; i < pline->nused; i++) {
- char name[32];
-
- HDsnprintf(name, sizeof(name), "Filter at position %u", (unsigned)i);
- HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
- HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter identification:",
- (unsigned)(pline->filter[i].id));
- if(pline->filter[i].name)
- HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter name:",
- pline->filter[i].name);
- else
- HDfprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3),
- "Filter name:");
- HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
- "Flags:",
- pline->filter[i].flags);
- HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
- "Num CD values:",
- pline->filter[i].cd_nelmts);
+ char name[32];
+
+ HDsnprintf(name, sizeof(name), "Filter at position %u", (unsigned)i);
+ HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
+ HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Filter identification:",
+ (unsigned)(pline->filter[i].id));
+ if(pline->filter[i].name)
+ HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Filter name:",
+ pline->filter[i].name);
+ else
+ HDfprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Filter name:");
+ HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Flags:",
+ pline->filter[i].flags);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
+ "Num CD values:",
+ pline->filter[i].cd_nelmts);
- /* Filter parameters */
- for(j = 0; j < pline->filter[i].cd_nelmts; j++) {
- char field_name[32];
+ /* Filter parameters */
+ for(j = 0; j < pline->filter[i].cd_nelmts; j++) {
+ char field_name[32];
- HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j);
- HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6),
- field_name,
- pline->filter[i].cd_values[j]);
- } /* end for */
+ HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j);
+ HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6),
+ field_name,
+ pline->filter[i].cd_values[j]);
+ } /* end for */
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 0be6d89..fdbc368 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -15,7 +15,7 @@
*
* Created: H5Oprivate.h
* Aug 5 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Object header private include file.
*
@@ -885,13 +885,10 @@ struct H5P_genplist_t;
H5_DLL herr_t H5O_init(void);
H5_DLL herr_t H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc,
hid_t ocpl_id, H5O_loc_t *loc/*out*/);
-H5_DLL H5O_t *H5O__create_ohdr(H5F_t *f, hid_t ocpl_id);
-H5_DLL herr_t H5O__apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id,
+H5_DLL H5O_t *H5O_create_ohdr(H5F_t *f, hid_t ocpl_id);
+H5_DLL herr_t H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id,
size_t size_hint, size_t initial_rc, H5O_loc_t *loc_out);
H5_DLL herr_t H5O_open(H5O_loc_t *loc);
-H5_DLL void *H5O_open_by_idx(const H5G_loc_t *loc, const char *name,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5I_type_t *opened_type/*out*/);
-H5_DLL void *H5O_open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type/*out*/);
H5_DLL void *H5O_open_by_loc(const H5G_loc_t *obj_loc, H5I_type_t *opened_type/*out*/);
H5_DLL herr_t H5O_close(H5O_loc_t *loc, hbool_t *file_closed/*out*/);
H5_DLL int H5O_link(const H5O_loc_t *loc, int adjust);
@@ -986,8 +983,6 @@ H5_DLL herr_t H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst
H5_DLL herr_t H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, H5T_t *dt_src,
void *buf_src, size_t nbytes_src, H5F_t *file_dst, void *buf_dst,
H5O_copy_t *cpy_info);
-H5_DLL herr_t H5O_copy(const H5G_loc_t *src_loc, const char *src_name,
- H5G_loc_t *dst_loc, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id);
/* Debugging routines */
H5_DLL herr_t H5O_debug_id(unsigned type_id, H5F_t *f, const void *mesg, FILE *stream, int indent, int fwidth);
diff --git a/src/H5Opublic.h b/src/H5Opublic.h
index d0f8ab3..23a6cba 100644
--- a/src/H5Opublic.h
+++ b/src/H5Opublic.h
@@ -15,7 +15,7 @@
*
* Created: H5Opublic.h
* Aug 5 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Public declarations for the H5O (object header)
* package.
diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c
index 66b79bb..1ef8486 100644
--- a/src/H5Orefcount.c
+++ b/src/H5Orefcount.c
@@ -15,7 +15,7 @@
*
* Created: H5Orefcount.c
* Mar 10 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Object ref. count messages.
*
@@ -34,11 +34,11 @@
/* PRIVATE PROTOTYPES */
static void *H5O__refcount_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_refcount_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_refcount_copy(const void *_mesg, void *_dest);
-static size_t H5O_refcount_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__refcount_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O__refcount_copy(const void *_mesg, void *_dest);
+static size_t H5O__refcount_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__refcount_free(void *_mesg);
-static herr_t H5O_refcount_pre_copy_file(H5F_t *file_src, const void *mesg_src,
+static herr_t H5O__refcount_pre_copy_file(H5F_t *file_src, const void *mesg_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void *udata);
static herr_t H5O__refcount_debug(H5F_t *f, const void *_mesg, FILE * stream,
int indent, int fwidth);
@@ -50,16 +50,16 @@ const H5O_msg_class_t H5O_MSG_REFCOUNT[1] = {{
sizeof(H5O_refcount_t), /*native message size */
0, /* messages are sharable? */
H5O__refcount_decode, /*decode message */
- H5O_refcount_encode, /*encode message */
- H5O_refcount_copy, /*copy the native value */
- H5O_refcount_size, /*size of symbol table entry */
+ H5O__refcount_encode, /*encode message */
+ H5O__refcount_copy, /*copy the native value */
+ H5O__refcount_size, /*size of symbol table entry */
NULL, /*default reset method */
H5O__refcount_free, /* free method */
NULL, /* file delete method */
NULL, /* link method */
NULL, /*set share method */
NULL, /*can share method */
- H5O_refcount_pre_copy_file, /* pre copy native value to file */
+ H5O__refcount_pre_copy_file,/* pre copy native value to file */
NULL, /* copy native value to file */
NULL, /* post copy native value to file */
NULL, /* get creation index */
@@ -83,7 +83,6 @@ H5FL_DEFINE_STATIC(H5O_refcount_t);
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 10 2007
*
*-------------------------------------------------------------------------
@@ -125,24 +124,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_refcount_encode
+ * Function: H5O__refcount_encode
*
* Purpose: Encodes a message.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 10 2007
*
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -156,11 +154,11 @@ H5O_refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
UINT32ENCODE(p, *refcount);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_refcount_encode() */
+} /* end H5O__refcount_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_refcount_copy
+ * Function: H5O__refcount_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -169,19 +167,18 @@ H5O_refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 10 2007
*
*-------------------------------------------------------------------------
*/
static void *
-H5O_refcount_copy(const void *_mesg, void *_dest)
+H5O__refcount_copy(const void *_mesg, void *_dest)
{
const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
H5O_refcount_t *dest = (H5O_refcount_t *) _dest;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(refcount);
@@ -196,11 +193,11 @@ H5O_refcount_copy(const void *_mesg, void *_dest)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_refcount_copy() */
+} /* end H5O__refcount_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_refcount_size
+ * Function: H5O__refcount_size
*
* Purpose: Returns the size of the raw message in bytes not counting
* the message type or size fields, but only the data fields.
@@ -210,25 +207,24 @@ done:
* Failure: zero
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 10 2007
*
*-------------------------------------------------------------------------
*/
static size_t
-H5O_refcount_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
+H5O__refcount_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
const void H5_ATTR_UNUSED *_mesg)
{
- size_t ret_value; /* Return value */
+ size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Set return value */
ret_value = 1 /* Version */
+ 4; /* Ref. count */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_refcount_size() */
+} /* end H5O__refcount_size() */
/*-------------------------------------------------------------------------
@@ -257,7 +253,7 @@ H5O__refcount_free(void *mesg)
/*-------------------------------------------------------------------------
- * Function: H5O_refcount_pre_copy_file
+ * Function: H5O__refcount_pre_copy_file
*
* Purpose: Perform any necessary actions before copying message between
* files.
@@ -271,10 +267,10 @@ H5O__refcount_free(void *mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
+H5O__refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
hbool_t *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info, void H5_ATTR_UNUSED *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(deleted);
@@ -286,7 +282,7 @@ H5O_refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UN
*deleted = TRUE;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_refcount_pre_copy_file() */
+} /* end H5O__refcount_pre_copy_file() */
/*-------------------------------------------------------------------------
@@ -297,7 +293,6 @@ H5O_refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UN
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Mar 6 2007
*
*-------------------------------------------------------------------------
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 33310dc..54ac71f 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -27,34 +27,34 @@
/* PRIVATE PROTOTYPES */
static void *H5O__sdspace_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg);
-static void *H5O_sdspace_copy(const void *_mesg, void *_dest);
-static size_t H5O_sdspace_size(const H5F_t *f, const void *_mesg);
+static herr_t H5O__sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg);
+static void *H5O__sdspace_copy(const void *_mesg, void *_dest);
+static size_t H5O__sdspace_size(const H5F_t *f, const void *_mesg);
static herr_t H5O__sdspace_reset(void *_mesg);
static herr_t H5O__sdspace_free(void *_mesg);
-static herr_t H5O_sdspace_pre_copy_file(H5F_t *file_src, const void *mesg_src,
+static herr_t H5O__sdspace_pre_copy_file(H5F_t *file_src, const void *mesg_src,
hbool_t *deleted, const H5O_copy_t *cpy_info, void *_udata);
static herr_t H5O__sdspace_debug(H5F_t *f, const void *_mesg, FILE * stream,
int indent, int fwidth);
/* Set up & include shared message "interface" info */
#define H5O_SHARED_TYPE H5O_MSG_SDSPACE
-#define H5O_SHARED_DECODE H5O_sdspace_shared_decode
+#define H5O_SHARED_DECODE H5O__sdspace_shared_decode
#define H5O_SHARED_DECODE_REAL H5O__sdspace_decode
-#define H5O_SHARED_ENCODE H5O_sdspace_shared_encode
-#define H5O_SHARED_ENCODE_REAL H5O_sdspace_encode
-#define H5O_SHARED_SIZE H5O_sdspace_shared_size
-#define H5O_SHARED_SIZE_REAL H5O_sdspace_size
+#define H5O_SHARED_ENCODE H5O__sdspace_shared_encode
+#define H5O_SHARED_ENCODE_REAL H5O__sdspace_encode
+#define H5O_SHARED_SIZE H5O__sdspace_shared_size
+#define H5O_SHARED_SIZE_REAL H5O__sdspace_size
#define H5O_SHARED_DELETE H5O__sdspace_shared_delete
#undef H5O_SHARED_DELETE_REAL
#define H5O_SHARED_LINK H5O__sdspace_shared_link
#undef H5O_SHARED_LINK_REAL
#define H5O_SHARED_COPY_FILE H5O__sdspace_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
-#define H5O_SHARED_POST_COPY_FILE H5O_sdspace_shared_post_copy_file
+#define H5O_SHARED_POST_COPY_FILE H5O__sdspace_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE_UPD
-#define H5O_SHARED_DEBUG H5O_sdspace_shared_debug
+#define H5O_SHARED_DEBUG H5O__sdspace_shared_debug
#define H5O_SHARED_DEBUG_REAL H5O__sdspace_debug
#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
@@ -63,23 +63,23 @@ const H5O_msg_class_t H5O_MSG_SDSPACE[1] = {{
H5O_SDSPACE_ID, /* message id number */
"dataspace", /* message name for debugging */
sizeof(H5S_extent_t), /* native message size */
- H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
- H5O_sdspace_shared_decode, /* decode message */
- H5O_sdspace_shared_encode, /* encode message */
- H5O_sdspace_copy, /* copy the native value */
- H5O_sdspace_shared_size, /* size of symbol table entry */
+ H5O_SHARE_IS_SHARABLE | H5O_SHARE_IN_OHDR, /* messages are sharable? */
+ H5O__sdspace_shared_decode, /* decode message */
+ H5O__sdspace_shared_encode, /* encode message */
+ H5O__sdspace_copy, /* copy the native value */
+ H5O__sdspace_shared_size, /* size of symbol table entry */
H5O__sdspace_reset, /* default reset method */
H5O__sdspace_free, /* free method */
- H5O__sdspace_shared_delete, /* file delete method */
- H5O__sdspace_shared_link, /* link method */
- NULL, /* set share method */
- NULL, /*can share method */
- H5O_sdspace_pre_copy_file, /* pre copy native value to file */
- H5O__sdspace_shared_copy_file,/* copy native value to file */
- H5O_sdspace_shared_post_copy_file,/* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O_sdspace_shared_debug /* debug the message */
+ H5O__sdspace_shared_delete, /* file delete method */
+ H5O__sdspace_shared_link, /* link method */
+ NULL, /* set share method */
+ NULL, /*can share method */
+ H5O__sdspace_pre_copy_file, /* pre copy native value to file */
+ H5O__sdspace_shared_copy_file,/* copy native value to file */
+ H5O__sdspace_shared_post_copy_file,/* post copy native value to file*/
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O__sdspace_shared_debug /* debug the message */
}};
/* Declare external the free list for H5S_extent_t's */
@@ -199,11 +199,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5O_sdspace_encode
+ H5O__sdspace_encode
PURPOSE
Encode a simple dimensionality message
USAGE
- herr_t H5O_sdspace_encode(f, raw_size, p, mesg)
+ herr_t H5O__sdspace_encode(f, raw_size, p, mesg)
H5F_t *f; IN: pointer to the HDF5 file struct
size_t raw_size; IN: size of the raw information buffer
const uint8 *p; IN: the raw information buffer
@@ -214,28 +214,15 @@ done:
This function encodes the native memory form of the simple
dimensionality message in the "raw" disk form.
- MODIFICATIONS
- Robb Matzke, 1998-04-09
- The current and maximum dimensions are now H5F_SIZEOF_SIZET bytes
- instead of just four bytes.
-
- Robb Matzke, 1998-07-20
- Added a version number and reformatted the message for aligment.
-
- Raymond Lu
- April 8, 2004
- Added the type of dataspace into this header message using a reserved
- byte.
-
--------------------------------------------------------------------------*/
static herr_t
-H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
+H5O__sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5S_extent_t *sdim = (const H5S_extent_t *)_mesg;
unsigned flags = 0;
unsigned u; /* Local counting variable */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -277,16 +264,16 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_sdspace_encode() */
+} /* end H5O__sdspace_encode() */
/*--------------------------------------------------------------------------
NAME
- H5O_sdspace_copy
+ H5O__sdspace_copy
PURPOSE
Copies a message from MESG to DEST, allocating DEST if necessary.
USAGE
- void *H5O_sdspace_copy(_mesg, _dest)
+ void *H5O__sdspace_copy(_mesg, _dest)
const void *_mesg; IN: Pointer to the source extent dimensionality struct
const void *_dest; IN: Pointer to the destination extent dimensionality struct
RETURNS
@@ -296,13 +283,13 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
allocating the destination structure if necessary.
--------------------------------------------------------------------------*/
static void *
-H5O_sdspace_copy(const void *_mesg, void *_dest)
+H5O__sdspace_copy(const void *_mesg, void *_dest)
{
const H5S_extent_t *mesg = (const H5S_extent_t *)_mesg;
H5S_extent_t *dest = (H5S_extent_t *)_dest;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(mesg);
@@ -322,16 +309,16 @@ done:
dest = H5FL_FREE(H5S_extent_t, dest);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_sdspace_copy() */
+} /* end H5O__sdspace_copy() */
/*--------------------------------------------------------------------------
NAME
- H5O_sdspace_size
+ H5O__sdspace_size
PURPOSE
Return the raw message size in bytes
USAGE
- void *H5O_sdspace_size(f, mesg)
+ void *H5O__sdspace_size(f, mesg)
H5F_t *f; IN: pointer to the HDF5 file struct
const void *mesg; IN: Pointer to the source extent dimensionality struct
RETURNS
@@ -341,18 +328,14 @@ done:
success. (Not counting the message type or size fields, only the data
portion of the message). It doesn't take into account alignment.
- MODIFICATIONS
- Robb Matzke, 1998-04-09
- The current and maximum dimensions are now H5F_SIZEOF_SIZET bytes
- instead of just four bytes.
--------------------------------------------------------------------------*/
static size_t
-H5O_sdspace_size(const H5F_t *f, const void *_mesg)
+H5O__sdspace_size(const H5F_t *f, const void *_mesg)
{
const H5S_extent_t *space = (const H5S_extent_t *)_mesg;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Basic information for all dataspace messages */
ret_value = (size_t)(1 + /* Version */
@@ -368,7 +351,7 @@ H5O_sdspace_size(const H5F_t *f, const void *_mesg)
ret_value += space->max ? (space->rank * H5F_SIZEOF_SIZE(f)) : 0;
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_sdspace_size() */
+} /* end H5O__sdspace_size() */
/*-------------------------------------------------------------------------
@@ -423,7 +406,7 @@ H5O__sdspace_free(void *mesg)
/*-------------------------------------------------------------------------
- * Function: H5O_sdspace_pre_copy_file
+ * Function: H5O__sdspace_pre_copy_file
*
* Purpose: Perform any necessary actions before copying message between
* files
@@ -438,14 +421,14 @@ H5O__sdspace_free(void *mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
+H5O__sdspace_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void *_udata)
{
const H5S_extent_t *src_space_extent = (const H5S_extent_t *)mesg_src; /* Source dataspace extent */
H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(file_src);
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index b49e501..ca6c873 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Wednesday, April 1, 1998
*
* Purpose: Functions that operate on a shared message. The shared
@@ -103,7 +103,6 @@ static herr_t H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh,
* Failure: NULL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 24 2003
*
*-------------------------------------------------------------------------
@@ -217,7 +216,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 26 2003
*
*-------------------------------------------------------------------------
@@ -443,7 +441,6 @@ H5O__shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_m
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Sep 26 2003
*
*-------------------------------------------------------------------------
@@ -654,7 +651,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Peter Cao
- * xcao@hdfgroup.org
* May 24 2007
*
*-------------------------------------------------------------------------
diff --git a/src/H5Oshared.h b/src/H5Oshared.h
index e4ad980..6dbf927 100644
--- a/src/H5Oshared.h
+++ b/src/H5Oshared.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Friday, January 19, 2007
*
* Purpose: This file contains inline definitions for "generic" routines
diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c
index 136268a..10181ad 100644
--- a/src/H5Oshmesg.c
+++ b/src/H5Oshmesg.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: James Laird <jlaird@hdfgroup.org>
+/* Programmer: James Laird
* Monday, January 29, 2007
*
* Purpose: A message holding "implicitly shared object header message"
@@ -29,9 +29,9 @@
static void *H5O__shmesg_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
unsigned *ioflags, size_t p_size, const uint8_t *p);
-static herr_t H5O_shmesg_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_shmesg_copy(const void *_mesg, void *_dest);
-static size_t H5O_shmesg_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__shmesg_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O__shmesg_copy(const void *_mesg, void *_dest);
+static size_t H5O__shmesg_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__shmesg_debug(H5F_t *f, const void *_mesg, FILE *stream,
int indent, int fwidth);
@@ -42,9 +42,9 @@ const H5O_msg_class_t H5O_MSG_SHMESG[1] = {{
sizeof(H5O_shmesg_table_t), /*native message size */
0, /* messages are sharable? */
H5O__shmesg_decode, /*decode message */
- H5O_shmesg_encode, /*encode message */
- H5O_shmesg_copy, /*copy the native value */
- H5O_shmesg_size, /*raw message size */
+ H5O__shmesg_encode, /*encode message */
+ H5O__shmesg_copy, /*copy the native value */
+ H5O__shmesg_size, /*raw message size */
NULL, /*free internal memory */
NULL, /* free method */
NULL, /* file delete method */
@@ -105,7 +105,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_shmesg_encode
+ * Function: H5O__shmesg_encode
*
* Purpose: Encode a shared message table message.
*
@@ -117,11 +117,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_shmesg_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
+H5O__shmesg_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_shmesg_table_t *mesg = (const H5O_shmesg_table_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(f);
@@ -134,11 +134,11 @@ H5O_shmesg_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
*p++ = (uint8_t)mesg->nindexes;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_shmesg_encode() */
+} /* end H5O__shmesg_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_shmesg_copy
+ * Function: H5O__shmesg_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -152,13 +152,13 @@ H5O_shmesg_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
*-------------------------------------------------------------------------
*/
static void *
-H5O_shmesg_copy(const void *_mesg, void *_dest)
+H5O__shmesg_copy(const void *_mesg, void *_dest)
{
const H5O_shmesg_table_t *mesg = (const H5O_shmesg_table_t *)_mesg;
H5O_shmesg_table_t *dest = (H5O_shmesg_table_t *)_dest;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(mesg);
@@ -174,11 +174,11 @@ H5O_shmesg_copy(const void *_mesg, void *_dest)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_shmesg_copy() */
+} /* end H5O__shmesg_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_shmesg_size
+ * Function: H5O__shmesg_size
*
* Purpose: Returns the size of the raw message in bytes not counting the
* message type or size fields, but only the data fields.
@@ -192,11 +192,11 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5O_shmesg_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
+H5O__shmesg_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg)
{
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(f);
@@ -206,7 +206,7 @@ H5O_shmesg_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi
1); /* Number of indexes */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_shmesg_size() */
+} /* end H5O__shmesg_size() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 0f14a4b..18f32b3 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -15,7 +15,7 @@
*
* Created: H5Ostab.c
* Aug 6 1997
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Symbol table messages.
*
@@ -90,7 +90,6 @@ H5FL_DEFINE_STATIC(H5O_stab_t);
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -103,7 +102,7 @@ H5O__stab_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
H5O_stab_t *stab = NULL;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
@@ -119,10 +118,9 @@ H5O__stab_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
ret_value = stab;
done:
- if(ret_value == NULL) {
+ if(ret_value == NULL)
if(stab != NULL)
stab = H5FL_FREE(H5O_stab_t, stab);
- } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__stab_decode() */
@@ -136,7 +134,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -172,7 +169,6 @@ H5O__stab_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
* Failure: NULL
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -189,7 +185,7 @@ H5O__stab_copy(const void *_mesg, void *_dest)
/* check args */
HDassert(stab);
if(!dest && NULL == (dest = H5FL_MALLOC(H5O_stab_t)))
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* copy */
*dest = *stab;
@@ -214,7 +210,6 @@ done:
* Failure: zero
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
*-------------------------------------------------------------------------
@@ -415,11 +410,8 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
- * matzke@llnl.gov
* Aug 6 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
diff --git a/src/H5Otest.c b/src/H5Otest.c
index df08ff7..5d242f3 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
* Monday, December 4, 2006
*
* Purpose: Object header testing functions.
@@ -789,5 +789,5 @@ done:
HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "can't reset API context")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O__msg_get_chunkno_test() */
+} /* H5O__msg_move_to_new_chunk_test() */
diff --git a/src/H5Ounknown.c b/src/H5Ounknown.c
index 89c00ad..a7116c8 100644
--- a/src/H5Ounknown.c
+++ b/src/H5Ounknown.c
@@ -15,7 +15,7 @@
*
* Created: H5Ounknown.c
* Apr 19 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Handle unknown message classes in a minimal way.
*
diff --git a/src/H5P.c b/src/H5P.c
index 9bc293b..d490e7b 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
*
* Purpose: Generic Property Functions
*/
diff --git a/src/H5PBmodule.h b/src/H5PBmodule.h
index c8aabb6..571d2be 100644
--- a/src/H5PBmodule.h
+++ b/src/H5PBmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5PLpkg.h b/src/H5PLpkg.h
index 8c2367f..a086a2c 100644
--- a/src/H5PLpkg.h
+++ b/src/H5PLpkg.h
@@ -95,7 +95,7 @@
# define H5PL_HANDLE void *
/* Get a handle to a plugin library. Windows: TEXT macro handles Unicode strings */
-# define H5PL_OPEN_DLIB(S) dlopen(S, RTLD_LAZY)
+# define H5PL_OPEN_DLIB(S) dlopen(S, RTLD_LAZY | RTLD_LOCAL)
/* Get the address of a symbol in dynamic library */
# define H5PL_GET_LIB_FUNC(H,N) dlsym(H,N)
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index 5ce12b4..6dae5ed 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -15,7 +15,7 @@
*
* Created: H5Pdapl.c
* October 27, 2008
- * Neil Fortner <nfortne2@hdfgroup.org>
+ * Neil Fortner
*
* Purpose: Dataset access property list class routines
*
@@ -322,7 +322,7 @@ H5P__dapl_vds_file_pref_enc(const void *value, void **_pp, size_t *size)
uint64_t enc_value;
unsigned enc_size;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -374,7 +374,7 @@ H5P__dapl_vds_file_pref_dec(const void **_pp, void *_value)
unsigned enc_size; /* Size of encoded property */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(pp);
HDassert(*pp);
@@ -418,7 +418,7 @@ static herr_t
H5P__dapl_vds_file_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(value);
@@ -439,7 +439,7 @@ H5P__dapl_vds_file_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU
static herr_t
H5P__dapl_vds_file_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(value);
@@ -466,7 +466,7 @@ H5P__dapl_vds_file_pref_cmp(const void *value1, const void *value2, size_t H5_AT
const char *pref2 = *(const char * const *)value2;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
if(NULL == pref1 && NULL != pref2)
HGOTO_DONE(1);
@@ -491,7 +491,7 @@ done:
static herr_t
H5P__dapl_vds_file_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(value);
@@ -570,7 +570,7 @@ H5P__dapl_efile_pref_enc(const void *value, void **_pp, size_t *size)
uint64_t enc_value;
unsigned enc_size;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -622,7 +622,7 @@ H5P__dapl_efile_pref_dec(const void **_pp, void *_value)
unsigned enc_size; /* Size of encoded property */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(pp);
HDassert(*pp);
@@ -666,7 +666,7 @@ static herr_t
H5P__dapl_efile_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(value);
@@ -687,7 +687,7 @@ H5P__dapl_efile_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
static herr_t
H5P__dapl_efile_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(value);
@@ -714,7 +714,7 @@ H5P__dapl_efile_pref_cmp(const void *value1, const void *value2, size_t H5_ATTR_
const char *pref2 = *(const char * const *)value2;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
if(NULL == pref1 && NULL != pref2)
HGOTO_DONE(1);
@@ -739,7 +739,7 @@ done:
static herr_t
H5P__dapl_efile_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(value);
@@ -885,7 +885,7 @@ H5P__encode_chunk_cache_nslots(const void *value, void **_pp, size_t *size)
uint8_t **pp = (uint8_t **)_pp;
unsigned enc_size; /* Size of encoded property */
- FUNC_ENTER_PACKAGE_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity checks */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -941,7 +941,7 @@ H5P__decode_chunk_cache_nslots(const void **_pp, void *_value)
uint64_t enc_value; /* Decoded property value */
unsigned enc_size; /* Size of encoded property */
- FUNC_ENTER_PACKAGE_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -987,7 +987,7 @@ H5P__encode_chunk_cache_nbytes(const void *value, void **_pp, size_t *size)
uint8_t **pp = (uint8_t **)_pp;
unsigned enc_size; /* Size of encoded property */
- FUNC_ENTER_PACKAGE_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity checks */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -1043,7 +1043,7 @@ H5P__decode_chunk_cache_nbytes(const void **_pp, void *_value)
uint64_t enc_value; /* Decoded property value */
unsigned enc_size; /* Size of encoded property */
- FUNC_ENTER_PACKAGE_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 064a9b8..11ab7b1 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -1847,13 +1847,6 @@ H5P__init_def_layout(void)
* Programmer: Robb Matzke
* Tuesday, January 6, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to check parameter and set property for
- * generic property list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1928,13 +1921,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to check parameter and get property for
- * generic property list.
- *
*-------------------------------------------------------------------------
*/
H5D_layout_t
@@ -1978,13 +1964,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, January 6, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to check parameter and set property for
- * generic property list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -2060,13 +2039,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to check parameter and set property for
- * generic property list.
- *
*-------------------------------------------------------------------------
*/
int
@@ -2828,13 +2800,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, March 3, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to check parameter and set property for
- * generic property list.
- *
*-------------------------------------------------------------------------
*/
int
@@ -2885,13 +2850,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, March 3, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to check parameter and get property for
- * generic property list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3013,8 +2971,6 @@ done:
* Programmer: Kent Yang
* Wednesday, November 13, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3058,9 +3014,6 @@ done:
* Programmer: Xiaowen Wu
* Wednesday, December 22, 2004
*
- * Modifications:
- *
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3120,9 +3073,6 @@ done:
* Programmer: Xiaowen Wu
* Thursday, April 14, 2005
*
- * Modifications:
- *
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3526,9 +3476,6 @@ done:
* Programmer: Raymond Lu
* Wednesday, January 16, 2002
*
- * Modifications:
- *
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3709,9 +3656,6 @@ done:
* Programmer: Raymond Lu
* Wednesday, January 16, 2002
*
- * Modifications:
- *
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3760,8 +3704,6 @@ done:
* Programmer: Jacob Smith
* 2018 August 14
*
- * Modifications: None.
- *
*-----------------------------------------------------------------------------
*/
herr_t
@@ -3807,8 +3749,6 @@ done:
* Programmer: Jacob Smith
* 2018 August 14
*
- * Modifications: None.
- *
*-----------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c
index b9efaee..88ebec1 100644
--- a/src/H5Pdeprec.c
+++ b/src/H5Pdeprec.c
@@ -15,7 +15,7 @@
*
* Created: H5Pdeprec.c
* October 11 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Deprecated functions from the H5P interface. These
* functions are here for compatibility purposes and may be
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 3f5754e..e6db02f 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -15,7 +15,7 @@
*
* Created: H5Pdxpl.c
* March 16 1998
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: Data transfer property list class routines
*
@@ -770,7 +770,7 @@ done:
*
* Return: Success: SUCCEED, Failure: FAIL
*
- * Programmer: Leon Arber larber@uiuc.edu
+ * Programmer: Leon Arber
*
* Date: April 9, 2004
*
@@ -801,7 +801,7 @@ done:
*
* Return: Success: SUCCEED, Failure: FAIL
*
- * Programmer: Leon Arber larber@uiuc.edu
+ * Programmer: Leon Arber
*
* Date: April 9, 2004
*
@@ -887,7 +887,7 @@ done:
*
* Return: Success: SUCCEED, Failure: FAIL
*
- * Programmer: Leon Arber larber@uiuc.edu
+ * Programmer: Leon Arber
*
* Date: April 9, 2004
*
@@ -1297,8 +1297,6 @@ done:
* Programmer: Raymond Lu
* Jan 14, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1339,8 +1337,6 @@ done:
* Programmer: Raymond Lu
* April 15, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1381,8 +1377,6 @@ done:
* Programmer: Raymond Lu
* April 15, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c
index d4b6b5f..8b10971 100644
--- a/src/H5Pencdec.c
+++ b/src/H5Pencdec.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
+/* Programmer: Quincey Koziol
*
* Purpose: Generic Property Functions
*/
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 7b332d0..4539883 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -204,12 +204,12 @@
/* Definition for 'mdc log location' flag */
#define H5F_ACS_MDC_LOG_LOCATION_SIZE sizeof(char *)
#define H5F_ACS_MDC_LOG_LOCATION_DEF NULL /* default is no log location */
-#define H5F_ACS_MDC_LOG_LOCATION_ENC H5P_facc_mdc_log_location_enc
-#define H5F_ACS_MDC_LOG_LOCATION_DEC H5P_facc_mdc_log_location_dec
-#define H5F_ACS_MDC_LOG_LOCATION_DEL H5P_facc_mdc_log_location_del
-#define H5F_ACS_MDC_LOG_LOCATION_COPY H5P_facc_mdc_log_location_copy
-#define H5F_ACS_MDC_LOG_LOCATION_CMP H5P_facc_mdc_log_location_cmp
-#define H5F_ACS_MDC_LOG_LOCATION_CLOSE H5P_facc_mdc_log_location_close
+#define H5F_ACS_MDC_LOG_LOCATION_ENC H5P__facc_mdc_log_location_enc
+#define H5F_ACS_MDC_LOG_LOCATION_DEC H5P__facc_mdc_log_location_dec
+#define H5F_ACS_MDC_LOG_LOCATION_DEL H5P__facc_mdc_log_location_del
+#define H5F_ACS_MDC_LOG_LOCATION_COPY H5P__facc_mdc_log_location_copy
+#define H5F_ACS_MDC_LOG_LOCATION_CMP H5P__facc_mdc_log_location_cmp
+#define H5F_ACS_MDC_LOG_LOCATION_CLOSE H5P__facc_mdc_log_location_close
/* Definition for 'start metadata cache logging on access' flag */
#define H5F_ACS_START_MDC_LOG_ON_ACCESS_SIZE sizeof(hbool_t)
#define H5F_ACS_START_MDC_LOG_ON_ACCESS_DEF FALSE
@@ -354,12 +354,12 @@ static herr_t H5P__facc_libver_type_enc(const void *value, void **_pp, size_t *s
static herr_t H5P__facc_libver_type_dec(const void **_pp, void *value);
/* Metadata cache log location property callbacks */
-static herr_t H5P_facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size);
-static herr_t H5P_facc_mdc_log_location_dec(const void **_pp, void *value);
-static herr_t H5P_facc_mdc_log_location_del(hid_t prop_id, const char *name, size_t size, void *value);
-static herr_t H5P_facc_mdc_log_location_copy(const char *name, size_t size, void *value);
-static int H5P_facc_mdc_log_location_cmp(const void *value1, const void *value2, size_t size);
-static herr_t H5P_facc_mdc_log_location_close(const char *name, size_t size, void *value);
+static herr_t H5P__facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size);
+static herr_t H5P__facc_mdc_log_location_dec(const void **_pp, void *value);
+static herr_t H5P__facc_mdc_log_location_del(hid_t prop_id, const char *name, size_t size, void *value);
+static herr_t H5P__facc_mdc_log_location_copy(const char *name, size_t size, void *value);
+static int H5P__facc_mdc_log_location_cmp(const void *value1, const void *value2, size_t size);
+static herr_t H5P__facc_mdc_log_location_close(const char *name, size_t size, void *value);
/* Metadata cache image property callbacks */
static int H5P__facc_cache_image_config_cmp(const void *_config1, const void *_config2, size_t H5_ATTR_UNUSED size);
@@ -767,12 +767,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, June 9, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed file access property list mechanism to the new
- * generic property list.
*-------------------------------------------------------------------------
*/
herr_t
@@ -1929,13 +1923,6 @@ done:
* Programmer: Quincey Koziol
* June, 1999
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1971,13 +1958,6 @@ done:
* Programmer: Quincey Koziol
* June, 1999
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -2013,8 +1993,6 @@ done:
* Programmer: Raymond Lu
* November, 2001
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -2049,8 +2027,6 @@ done:
* Programmer: Raymond Lu
* November, 2001
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -2094,13 +2070,6 @@ done:
* Programmer: Quincey Koziol
* Friday, August 25, 2000
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -2136,13 +2105,6 @@ done:
* Programmer: Quincey Koziol
* Friday, August 29, 2000
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -2189,13 +2151,6 @@ done:
* Programmer: Quincey Koziol
* Thursday, September 21, 2000
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -2231,13 +2186,6 @@ done:
* Programmer: Quincey Koziol
* Thursday, September 21, 2000
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -2283,8 +2231,6 @@ done:
* Programmer: Quincey Koziol
* Wednesday, June 5, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -2320,8 +2266,6 @@ done:
* Programmer: Quincey Koziol
* Wednesday, June 5, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -4082,13 +4026,13 @@ H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts/*out*/)
if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
- /* Get the # of read attempts set */
+ /* Get the # of read attempts set */
if(H5P_get(plist, H5F_ACS_METADATA_READ_ATTEMPTS_NAME, attempts) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get the number of metadata read attempts")
- /* If not set, return the default value */
- if(*attempts == H5F_ACS_METADATA_READ_ATTEMPTS_DEF) /* 0 */
- *attempts = H5F_METADATA_READ_ATTEMPTS;
+ /* If not set, return the default value */
+ if(*attempts == H5F_ACS_METADATA_READ_ATTEMPTS_DEF) /* 0 */
+ *attempts = H5F_METADATA_READ_ATTEMPTS;
} /* end if */
done:
@@ -4172,9 +4116,9 @@ H5Pget_object_flush_cb(hid_t plist_id, H5F_flush_cb_t *func, void **udata)
/* Assign return value */
if(func)
- *func = flush_info.func;
+ *func = flush_info.func;
if(udata)
- *udata = flush_info.udata;
+ *udata = flush_info.udata;
done:
FUNC_LEAVE_API(ret_value)
@@ -4289,7 +4233,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5P_facc_mdc_log_location_enc
+ * Function: H5P__facc_mdc_log_location_enc
*
* Purpose: Callback routine which is called whenever the metadata
* cache log location property in the file access property
@@ -4301,7 +4245,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5P_facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size)
+H5P__facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size)
{
const char *log_location = *(const char * const *)value;
uint8_t **pp = (uint8_t **)_pp;
@@ -4309,7 +4253,7 @@ H5P_facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size)
uint64_t enc_value;
unsigned enc_size;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t));
@@ -4338,11 +4282,11 @@ H5P_facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size)
*size += len;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5P_facc_mdc_log_location_enc() */
+} /* end H5P__facc_mdc_log_location_enc() */
/*-------------------------------------------------------------------------
- * Function: H5P_facc_mdc_log_location_dec
+ * Function: H5P__facc_mdc_log_location_dec
*
* Purpose: Callback routine which is called whenever the metadata
* cache log location property in the file access property
@@ -4354,7 +4298,7 @@ H5P_facc_mdc_log_location_enc(const void *value, void **_pp, size_t *size)
*-------------------------------------------------------------------------
*/
static herr_t
-H5P_facc_mdc_log_location_dec(const void **_pp, void *_value)
+H5P__facc_mdc_log_location_dec(const void **_pp, void *_value)
{
char **log_location = (char **)_value;
const uint8_t **pp = (const uint8_t **)_pp;
@@ -4363,7 +4307,7 @@ H5P_facc_mdc_log_location_dec(const void **_pp, void *_value)
unsigned enc_size; /* Size of encoded property */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(pp);
HDassert(*pp);
@@ -4392,11 +4336,11 @@ H5P_facc_mdc_log_location_dec(const void **_pp, void *_value)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_facc_mdc_log_location_dec() */
+} /* end H5P__facc_mdc_log_location_dec() */
/*-------------------------------------------------------------------------
- * Function: H5P_facc_mdc_log_location_del
+ * Function: H5P__facc_mdc_log_location_del
*
* Purpose: Frees memory used to store the metadata cache log location.
*
@@ -4405,21 +4349,21 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5P_facc_mdc_log_location_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
+H5P__facc_mdc_log_location_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name,
size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(value);
H5MM_xfree(*(void **)value);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5P_facc_mdc_log_location_del() */
+} /* end H5P__facc_mdc_log_location_del() */
/*-------------------------------------------------------------------------
- * Function: H5P_facc_mdc_log_location_copy
+ * Function: H5P__facc_mdc_log_location_copy
*
* Purpose: Creates a copy of the metadata cache log location string.
*
@@ -4428,20 +4372,20 @@ H5P_facc_mdc_log_location_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_U
*-------------------------------------------------------------------------
*/
static herr_t
-H5P_facc_mdc_log_location_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
+H5P__facc_mdc_log_location_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(value);
*(char **)value = H5MM_xstrdup(*(const char **)value);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5P_facc_mdc_log_location_copy() */
+} /* end H5P__facc_mdc_log_location_copy() */
/*-------------------------------------------------------------------------
- * Function: H5P_facc_mdc_log_location_cmp
+ * Function: H5P__facc_mdc_log_location_cmp
*
* Purpose: Callback routine which is called whenever the metadata
* cache log location property in the file creation property
@@ -4451,14 +4395,14 @@ H5P_facc_mdc_log_location_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_U
*
*-------------------------------------------------------------------------
*/
-static int
-H5P_facc_mdc_log_location_cmp(const void *value1, const void *value2, size_t H5_ATTR_UNUSED size)
+static H5_ATTR_PURE int
+H5P__facc_mdc_log_location_cmp(const void *value1, const void *value2, size_t H5_ATTR_UNUSED size)
{
const char *pref1 = *(const char * const *)value1;
const char *pref2 = *(const char * const *)value2;
int ret_value = 0;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
if(NULL == pref1 && NULL != pref2)
HGOTO_DONE(1);
@@ -4469,11 +4413,11 @@ H5P_facc_mdc_log_location_cmp(const void *value1, const void *value2, size_t H5_
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_facc_mdc_log_location_cmp() */
+} /* end H5P__facc_mdc_log_location_cmp() */
/*-------------------------------------------------------------------------
- * Function: H5P_facc_mdc_log_location_close
+ * Function: H5P__facc_mdc_log_location_close
*
* Purpose: Frees memory used to store the metadata cache log location
* string
@@ -4483,16 +4427,16 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5P_facc_mdc_log_location_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
+H5P__facc_mdc_log_location_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(value);
H5MM_xfree(*(void **)value);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5P_facc_mdc_log_location_close() */
+} /* end H5P__facc_mdc_log_location_close() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index 3b0ce66..db80f19 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -15,7 +15,7 @@
*
* Created: H5Pfcpl.c
* January 6 1998
- * Robb Matzke <matzke@llnl.gov>
+ * Robb Matzke
*
* Purpose: File creation property list class routines
*
@@ -128,7 +128,7 @@
/********************/
/* Property class callbacks */
-static herr_t H5P_fcrt_reg_prop(H5P_genclass_t *pclass);
+static herr_t H5P__fcrt_reg_prop(H5P_genclass_t *pclass);
/* property callbacks */
static herr_t H5P__fcrt_btree_rank_enc(const void *value, void **_pp, size_t *size);
@@ -154,7 +154,7 @@ const H5P_libclass_t H5P_CLS_FCRT[1] = {{
&H5P_CLS_FILE_CREATE_g, /* Pointer to class */
&H5P_CLS_FILE_CREATE_ID_g, /* Pointer to class ID */
&H5P_LST_FILE_CREATE_ID_g, /* Pointer to default property list ID */
- H5P_fcrt_reg_prop, /* Default property registration routine */
+ H5P__fcrt_reg_prop, /* Default property registration routine */
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
@@ -194,7 +194,7 @@ static const hsize_t H5F_def_file_space_page_size_g = H5F_CRT_FILE_SPACE_PAGE_SI
/*-------------------------------------------------------------------------
- * Function: H5P_fcrt_reg_prop
+ * Function: H5P__fcrt_reg_prop
*
* Purpose: Register the file creation property list class's properties
*
@@ -205,11 +205,11 @@ static const hsize_t H5F_def_file_space_page_size_g = H5F_CRT_FILE_SPACE_PAGE_SI
*-------------------------------------------------------------------------
*/
static herr_t
-H5P_fcrt_reg_prop(H5P_genclass_t *pclass)
+H5P__fcrt_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Register the user block size */
if(H5P__register_real(pclass, H5F_CRT_USER_BLOCK_NAME, H5F_CRT_USER_BLOCK_SIZE, &H5F_def_userblock_size_g,
@@ -297,7 +297,7 @@ H5P_fcrt_reg_prop(H5P_genclass_t *pclass)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_fcrt_reg_prop() */
+} /* end H5P__fcrt_reg_prop() */
/*-------------------------------------------------------------------------
@@ -359,11 +359,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- *
- * Raymond Lu, Oct 14, 2001
- * Changed to the new generic property list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -517,11 +512,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, January 6, 1998
*
- * Modifications:
- *
- * Raymond Lu, Oct 14, 2001
- * Changed to the new generic property list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -571,11 +561,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Changed to the new generic property list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -619,11 +604,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, January 6, 1998
*
- * Modifications:
- *
- * Raymond Lu, Oct 14, 2001
- * Changed to the new generic property list.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -673,11 +653,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- *
- * Raymond Lu, Oct 14, 2001
- * Changed to the new generic property list.
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Pfmpl.c b/src/H5Pfmpl.c
index 41ad078..a0a6d35 100644
--- a/src/H5Pfmpl.c
+++ b/src/H5Pfmpl.c
@@ -15,7 +15,7 @@
*
* Created: H5Pmtpl.c
* November 1 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: File mount property list class routines
*
@@ -64,7 +64,7 @@
/********************/
/* Property class callbacks */
-static herr_t H5P_fmnt_reg_prop(H5P_genclass_t *pclass);
+static herr_t H5P__fmnt_reg_prop(H5P_genclass_t *pclass);
/*********************/
@@ -80,7 +80,7 @@ const H5P_libclass_t H5P_CLS_FMNT[1] = {{
&H5P_CLS_FILE_MOUNT_g, /* Pointer to class */
&H5P_CLS_FILE_MOUNT_ID_g, /* Pointer to class ID */
&H5P_LST_FILE_MOUNT_ID_g, /* Pointer to default property list ID */
- H5P_fmnt_reg_prop, /* Default property registration routine */
+ H5P__fmnt_reg_prop, /* Default property registration routine */
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
@@ -106,7 +106,7 @@ static const hbool_t H5F_def_local_g = H5F_MNT_SYM_LOCAL_DEF; /* Whether sy
/*-------------------------------------------------------------------------
- * Function: H5P_fmnt_reg_prop
+ * Function: H5P__fmnt_reg_prop
*
* Purpose: Register the file mount property list class's properties
*
@@ -117,11 +117,11 @@ static const hbool_t H5F_def_local_g = H5F_MNT_SYM_LOCAL_DEF; /* Whether sy
*-------------------------------------------------------------------------
*/
static herr_t
-H5P_fmnt_reg_prop(H5P_genclass_t *pclass)
+H5P__fmnt_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Register property of whether symlinks is local to file */
if(H5P__register_real(pclass, H5F_MNT_SYM_LOCAL_NAME, H5F_MNT_SYM_LOCAL_SIZE, &H5F_def_local_g,
@@ -130,5 +130,5 @@ H5P_fmnt_reg_prop(H5P_genclass_t *pclass)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_fmnt_reg_prop() */
+} /* end H5P__fmnt_reg_prop() */
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index 03874c8..107ca15 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -15,7 +15,7 @@
*
* Created: H5Pgcpl.c
* August 29 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: Group creation property list class routines
*
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 2e463b2..4d73083 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
*
* Purpose: Generic Property Functions
*/
@@ -5604,7 +5604,7 @@ done:
* Return: Success: Non-negative ID of property list.
* Failure: H5I_INVALID_HID
*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* April 22, 2014
*
*-------------------------------------------------------------------------
@@ -5632,7 +5632,7 @@ H5P_get_plist_id(const H5P_genplist_t *plist)
* Return: Success: Non-NULL class of property list.
* Failure: NULL
*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* April 22, 2014
*
*-------------------------------------------------------------------------
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index 8fdcc8b..8a0848c 100644
--- a/src/H5Plapl.c
+++ b/src/H5Plapl.c
@@ -15,7 +15,7 @@
*
* Created: H5Plapl.c
* July 14 2006
- * James Laird <jlaird@ncsa.uiuc.edu>
+ * James Laird
*
* Purpose: Link access property list class routines
*
diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c
index 9c32552..2c8e364 100644
--- a/src/H5Plcpl.c
+++ b/src/H5Plcpl.c
@@ -64,7 +64,7 @@
/********************/
/* Property class callbacks */
-static herr_t H5P_lcrt_reg_prop(H5P_genclass_t *pclass);
+static herr_t H5P__lcrt_reg_prop(H5P_genclass_t *pclass);
/*********************/
@@ -80,7 +80,7 @@ const H5P_libclass_t H5P_CLS_LCRT[1] = {{
&H5P_CLS_LINK_CREATE_g, /* Pointer to class */
&H5P_CLS_LINK_CREATE_ID_g, /* Pointer to class ID */
&H5P_LST_LINK_CREATE_ID_g, /* Pointer to default property list ID */
- H5P_lcrt_reg_prop, /* Default property registration routine */
+ H5P__lcrt_reg_prop, /* Default property registration routine */
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
@@ -106,7 +106,7 @@ static const unsigned H5L_def_intmd_group_g = H5L_CRT_INTERMEDIATE_GROUP_DEF;
/*-------------------------------------------------------------------------
- * Function: H5P_lcrt_reg_prop
+ * Function: H5P__lcrt_reg_prop
*
* Purpose: Register the dataset creation property list class's properties
*
@@ -116,12 +116,12 @@ static const unsigned H5L_def_intmd_group_g = H5L_CRT_INTERMEDIATE_GROUP_DEF;
* October 31, 2006
*-------------------------------------------------------------------------
*/
-herr_t
-H5P_lcrt_reg_prop(H5P_genclass_t *pclass)
+static herr_t
+H5P__lcrt_reg_prop(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Register create intermediate groups property */
if(H5P__register_real(pclass, H5L_CRT_INTERMEDIATE_GROUP_NAME, H5L_CRT_INTERMEDIATE_GROUP_SIZE, &H5L_def_intmd_group_g,
@@ -131,7 +131,7 @@ H5P_lcrt_reg_prop(H5P_genclass_t *pclass)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_lcrt_reg_prop() */
+} /* end H5P__lcrt_reg_prop() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Pmodule.h b/src/H5Pmodule.h
index d5c471a..11df06d 100644
--- a/src/H5Pmodule.h
+++ b/src/H5Pmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index a60c593..b576aec 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -15,7 +15,7 @@
*
* Created: H5Pocpl.c
* Nov 28 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Object creation property list class routines
*
@@ -581,13 +581,6 @@ done:
* Programmer: Quincey Koziol
* Friday, April 5, 2003
*
- * Modifications:
- *
- * Neil Fortner
- * Thursday, March 26, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -652,18 +645,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to check parameter and set property for
- * generic property list.
- *
- * Neil Fortner
- * Wednesday, May 20, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -781,13 +762,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, August 4, 1998
*
- * Modifications:
- *
- * Neil Fortner
- * Wednesday, May 20, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
int
@@ -838,13 +812,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
- * Modifications:
- *
- * Neil Fortner
- * Wednesday, May 20, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
H5Z_filter_t
@@ -980,13 +947,6 @@ done:
* Programmer: Quincey Koziol
* Friday, April 5, 2003
*
- * Modifications:
- *
- * Neil Fortner
- * Thursday, May 21, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1049,13 +1009,6 @@ done:
* Programmer: Quincey Koziol
* Tuesday, April 8, 2003
*
- * Modifications:
- *
- * Neil Fortner
- * Thursday, May 21, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
htri_t
@@ -1132,13 +1085,6 @@ done:
* Programmer: Pedro Vicente
* January 26, 2004
*
- * Modifications:
- *
- * Neil Fortner
- * Thursday, May 21, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1191,18 +1137,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, October 2, 2001
- * Changed the way to check parameter and set property for
- * generic property list.
- *
- * Neil Fortner
- * Thursday, March 26, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1251,13 +1185,6 @@ done:
* Programmer: Raymond Lu
* Dec 19, 2002
*
- * Modifications:
- *
- * Neil Fortner
- * Wednesday, May 6, 2009
- * Overloaded to accept gcpl's as well as dcpl's and moved to
- * H5Pocpl.c
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c
index 7390cae..d23585c 100644
--- a/src/H5Pocpypl.c
+++ b/src/H5Pocpypl.c
@@ -15,7 +15,7 @@
*
* Created: H5Pocpypl.c
* Mar 13 2006
- * Peter Cao <xcao@ncsa.uiuc.edu>
+ * Peter Cao
*
* Purpose: Object copying property list class routines
*
diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h
index c8e5e98..2a52cc5 100644
--- a/src/H5Ppkg.h
+++ b/src/H5Ppkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, November 16, 2001
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c
index 97d6119..6371862 100644
--- a/src/H5Pstrcpl.c
+++ b/src/H5Pstrcpl.c
@@ -15,7 +15,7 @@
*
* Created: H5Pstrcpl.c
* October 26 2005
- * James Laird <jlaird@ncsa.uiuc.edu>
+ * James Laird
*
* Purpose: String creation property list class routines
*
diff --git a/src/H5Ptest.c b/src/H5Ptest.c
index 303fbf7..6bec415 100644
--- a/src/H5Ptest.c
+++ b/src/H5Ptest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Saturday May 31, 2003
*
* Purpose: Generic Property Testing Functions
diff --git a/src/H5RS.c b/src/H5RS.c
index ae500c5..6459f0d 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -39,11 +39,11 @@ H5FL_BLK_DEFINE(str_buf);
/*--------------------------------------------------------------------------
NAME
- H5RS_xstrdup
+ H5RS__xstrdup
PURPOSE
Duplicate the string being reference counted
USAGE
- char *H5RS_xstrdup(s)
+ char *H5RS__xstrdup(s)
const char *s; IN: String to duplicate
RETURNS
@@ -57,11 +57,11 @@ H5FL_BLK_DEFINE(str_buf);
REVISION LOG
--------------------------------------------------------------------------*/
static char *
-H5RS_xstrdup(const char *s)
+H5RS__xstrdup(const char *s)
{
char *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
if(s) {
size_t len = HDstrlen(s) + 1;
@@ -74,7 +74,7 @@ H5RS_xstrdup(const char *s)
ret_value = NULL;
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5RS_xstrdup() */
+} /* end H5RS__xstrdup() */
/*--------------------------------------------------------------------------
@@ -108,7 +108,7 @@ H5RS_create(const char *s)
HGOTO_ERROR(H5E_RS, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set the internal fields */
- ret_value->s = H5RS_xstrdup(s);
+ ret_value->s = H5RS__xstrdup(s);
ret_value->wrapped = 0;
ret_value->n = 1;
@@ -270,7 +270,7 @@ H5RS_incr(H5RS_str_t *rs)
* scope appropriately.
*/
if(rs->wrapped) {
- rs->s = H5RS_xstrdup(rs->s);
+ rs->s = H5RS__xstrdup(rs->s);
rs->wrapped = 0;
} /* end if */
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index 4e44683..f48af51 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -66,6 +66,8 @@
/********************/
/* Local Prototypes */
/********************/
+static herr_t H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t token_size, H5S_t *space, unsigned char *buf, size_t *nalloc);
+static herr_t H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref_type, const unsigned char *buf, H5O_token_t *obj_token);
/*********************/
@@ -82,9 +84,157 @@
/* Local Variables */
/*******************/
-#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
+ * Function: H5R__decode_token_compat
+ *
+ * Purpose: Decode an object token. (native only)
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref_type,
+ const unsigned char *buf, H5O_token_t *obj_token)
+{
+ hid_t file_id = H5I_INVALID_HID; /* File ID for region reference */
+ H5VL_object_t *vol_obj_file = NULL;
+ H5VL_file_cont_info_t cont_info = {H5VL_CONTAINER_INFO_VERSION, 0, 0, 0};
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_STATIC
+
+#ifndef NDEBUG
+ {
+ hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
+
+ /* Check if using native VOL connector */
+ if(H5VL_object_is_native(vol_obj, &is_native) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
+
+ /* Must use native VOL connector for this operation */
+ HDassert(is_native);
+ }
+#endif /* NDEBUG */
+
+ /* Get the file for the object */
+ if((file_id = H5F_get_file_id(vol_obj, type, FALSE)) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
+
+ /* Retrieve VOL object */
+ if(NULL == (vol_obj_file = H5VL_vol_object(file_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
+
+ /* Get container info */
+ if(H5VL_file_get((const H5VL_object_t *)vol_obj_file, H5VL_FILE_GET_CONT_INFO, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &cont_info) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info")
+
+ if(ref_type == H5R_OBJECT1) {
+ size_t buf_size = H5R_OBJ_REF_BUF_SIZE;
+
+ /* Get object address */
+ if(H5R__decode_token_obj_compat(buf, &buf_size, obj_token, cont_info.token_size) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object token")
+ } /* end if */
+ else {
+ size_t buf_size = H5R_DSET_REG_REF_BUF_SIZE;
+ H5F_t *f = NULL;
+
+ /* Retrieve file from VOL object */
+ if(NULL == (f = (H5F_t *)H5VL_object_data((const H5VL_object_t *)vol_obj_file)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object")
+
+ /* Get object address */
+ if(H5R__decode_token_region_compat(f, buf, &buf_size, obj_token, cont_info.token_size, NULL) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object address")
+ } /* end else */
+
+done:
+ if(file_id != H5I_INVALID_HID && H5I_dec_ref(file_id) < 0)
+ HDONE_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "unable to decrement refcount on file")
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5R__decode_token_compat() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5R__encode_token_region_compat
+ *
+ * Purpose: Encode dataset selection and insert data into heap
+ * (native only).
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token,
+ size_t token_size, H5S_t *space, unsigned char *buf, size_t *nalloc)
+{
+ size_t buf_size;
+ unsigned char *data = NULL;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_STATIC
+
+ HDassert(f);
+ HDassert(obj_token);
+ HDassert(token_size);
+ HDassert(space);
+ HDassert(nalloc);
+
+ /* Get required buffer size */
+ if(H5R__encode_heap(f, NULL, &buf_size, NULL, (size_t)0) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
+
+ if(buf && *nalloc >= buf_size) {
+ ssize_t data_size;
+ uint8_t *p;
+
+ /* Pass the correct encoding version for the selection depending on the
+ * file libver bounds, this is later retrieved in H5S hyper encode */
+ H5CX_set_libver_bounds(f);
+
+ /* Zero the heap ID out, may leak heap space if user is re-using
+ * reference and doesn't have garbage collection turned on
+ */
+ HDmemset(buf, 0, buf_size);
+
+ /* Get the amount of space required to serialize the selection */
+ if((data_size = H5S_SELECT_SERIAL_SIZE(space)) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "Invalid amount of space for serializing selection")
+
+ /* Increase buffer size to allow for the dataset token */
+ data_size += (hssize_t)token_size;
+
+ /* Allocate the space to store the serialized information */
+ H5_CHECK_OVERFLOW(data_size, hssize_t, size_t);
+ if(NULL == (data = (uint8_t *)H5MM_malloc((size_t)data_size)))
+ HGOTO_ERROR(H5E_REFERENCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+
+ /* Serialize information for dataset OID into heap buffer */
+ p = (uint8_t *)data;
+ H5MM_memcpy(p, obj_token, token_size);
+ p += token_size;
+
+ /* Serialize the selection into heap buffer */
+ if(H5S_SELECT_SERIALIZE(space, &p) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection")
+
+ /* Write to heap */
+ if(H5R__encode_heap(f, buf, nalloc, data, (size_t)data_size) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
+ }
+ *nalloc = buf_size;
+
+done:
+ H5MM_free(data);
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5R__encode_token_region_compat() */
+
+
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+/*-------------------------------------------------------------------------
* Function: H5Rget_obj_type1
*
* Purpose: Retrieves the type of the object that a reference points to.
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 0acc887..38eff9d 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -822,7 +822,7 @@ H5R__set_obj_token(H5R_ref_priv_t *ref, const H5O_token_t *obj_token,
HDassert(token_size);
HDassert(token_size <= H5O_MAX_TOKEN_SIZE);
- H5MM_memcpy(&ref->info.obj.token, obj_token, sizeof(H5O_token_t));
+ H5MM_memcpy(&ref->info.obj.token, obj_token, token_size);
HDassert(token_size <= 255);
ref->token_size = (uint8_t)token_size;
@@ -1499,123 +1499,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5R__free_heap
- *
- * Purpose: Remove data previously inserted into heap (native only).
- *
- * Return: SUCCEED/FAIL
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5R__free_heap(H5F_t *f, const unsigned char *buf, size_t nbytes)
-{
- H5HG_t hobjid;
- const uint8_t *p = (const uint8_t *)buf;
- size_t buf_size;
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_PACKAGE
-
- HDassert(f);
- HDassert(buf);
-
- buf_size = H5HG_HEAP_ID_SIZE(f);
- /* Don't decode if buffer size isn't big enough */
- if(nbytes < buf_size)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "Buffer size is too small")
-
- /* Get the heap information */
- H5F_addr_decode(f, &p, &(hobjid.addr));
- if(!H5F_addr_defined(hobjid.addr) || hobjid.addr == 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Undefined reference pointer")
- UINT32DECODE(p, hobjid.idx);
-
- /* Free heap object */
- if(hobjid.addr > 0) {
- /* Free heap object */
- if(H5HG_remove(f, &hobjid) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_WRITEERROR, FAIL, "Unable to remove heap object")
- } /* end if */
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5R__free_heap() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5R__decode_token_compat
- *
- * Purpose: Decode an object token. (native only)
- *
- * Return: SUCCEED/FAIL
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref_type,
- const unsigned char *buf, H5O_token_t *obj_token)
-{
- hid_t file_id = H5I_INVALID_HID; /* File ID for region reference */
- H5VL_object_t *vol_obj_file = NULL;
- H5VL_file_cont_info_t cont_info = {H5VL_CONTAINER_INFO_VERSION, 0, 0, 0};
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_PACKAGE
-
-#ifndef NDEBUG
- {
- hbool_t is_native = FALSE; /* Whether the src file is using the native VOL connector */
-
- /* Check if using native VOL connector */
- if(H5VL_object_is_native(vol_obj, &is_native) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't query if file uses native VOL connector")
-
- /* Must use native VOL connector for this operation */
- HDassert(is_native);
- }
-#endif /* NDEBUG */
-
- /* Get the file for the object */
- if((file_id = H5F_get_file_id(vol_obj, type, FALSE)) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
-
- /* Retrieve VOL object */
- if(NULL == (vol_obj_file = H5VL_vol_object(file_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
-
- /* Get container info */
- if(H5VL_file_get((const H5VL_object_t *)vol_obj_file, H5VL_FILE_GET_CONT_INFO, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &cont_info) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to get container info")
-
- if(ref_type == H5R_OBJECT1) {
- size_t buf_size = H5R_OBJ_REF_BUF_SIZE;
-
- /* Get object address */
- if(H5R__decode_token_obj_compat(buf, &buf_size, obj_token, cont_info.token_size) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object token")
- } /* end if */
- else {
- size_t buf_size = H5R_DSET_REG_REF_BUF_SIZE;
- H5F_t *f = NULL;
-
- /* Retrieve file from VOL object */
- if(NULL == (f = (H5F_t *)H5VL_object_data((const H5VL_object_t *)vol_obj_file)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid VOL object")
-
- /* Get object address */
- if(H5R__decode_token_region_compat(f, buf, &buf_size, obj_token, cont_info.token_size, NULL) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, "unable to get object address")
- } /* end else */
-
-done:
- if(file_id != H5I_INVALID_HID && H5I_dec_ref(file_id) < 0)
- HDONE_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "unable to decrement refcount on file")
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5R__decode_token_compat() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5R__encode_token_obj_compat
*
* Purpose: Encode an object token. (native only)
@@ -1682,82 +1565,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5R__encode_token_region_compat
- *
- * Purpose: Encode dataset selection and insert data into heap
- * (native only).
- *
- * Return: SUCCEED/FAIL
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token,
- size_t token_size, H5S_t *space, unsigned char *buf, size_t *nalloc)
-{
- size_t buf_size;
- unsigned char *data = NULL;
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_PACKAGE
-
- HDassert(f);
- HDassert(obj_token);
- HDassert(token_size);
- HDassert(space);
- HDassert(nalloc);
-
- /* Get required buffer size */
- if(H5R__encode_heap(f, NULL, &buf_size, NULL, (size_t)0) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
-
- if(buf && *nalloc >= buf_size) {
- ssize_t data_size;
- uint8_t *p;
-
- /* Pass the correct encoding version for the selection depending on the
- * file libver bounds, this is later retrieved in H5S hyper encode */
- H5CX_set_libver_bounds(f);
-
- /* Zero the heap ID out, may leak heap space if user is re-using
- * reference and doesn't have garbage collection turned on
- */
- HDmemset(buf, 0, buf_size);
-
- /* Get the amount of space required to serialize the selection */
- if((data_size = H5S_SELECT_SERIAL_SIZE(space)) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "Invalid amount of space for serializing selection")
-
- /* Increase buffer size to allow for the dataset token */
- data_size += (hssize_t)token_size;
-
- /* Allocate the space to store the serialized information */
- H5_CHECK_OVERFLOW(data_size, hssize_t, size_t);
- if(NULL == (data = (uint8_t *)H5MM_malloc((size_t)data_size)))
- HGOTO_ERROR(H5E_REFERENCE, H5E_NOSPACE, FAIL, "memory allocation failed")
-
- /* Serialize information for dataset OID into heap buffer */
- p = (uint8_t *)data;
- H5MM_memcpy(p, obj_token, token_size);
- p += token_size;
-
- /* Serialize the selection into heap buffer */
- if(H5S_SELECT_SERIALIZE(space, &p) < 0)
- HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection")
-
- /* Write to heap */
- if(H5R__encode_heap(f, buf, nalloc, data, (size_t)data_size) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
- }
- *nalloc = buf_size;
-
-done:
- H5MM_free(data);
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5R__encode_token_region_compat() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5R__decode_token_region_compat
*
* Purpose: Decode dataset selection from data inserted into heap
diff --git a/src/H5Rpkg.h b/src/H5Rpkg.h
index 36cf805..c475951 100644
--- a/src/H5Rpkg.h
+++ b/src/H5Rpkg.h
@@ -116,14 +116,10 @@ H5_DLL herr_t H5R__decode(const unsigned char *buf, size_t *nbytes, H5R_ref_pr
/* Native HDF5 specific routines */
H5_DLL herr_t H5R__encode_heap(H5F_t *f, unsigned char *buf, size_t *nalloc, const unsigned char *data, size_t data_size);
H5_DLL herr_t H5R__decode_heap(H5F_t *f, const unsigned char *buf, size_t *nbytes, unsigned char **data_ptr, size_t *data_size);
-H5_DLL herr_t H5R__free_heap(H5F_t *f, const unsigned char *buf, size_t nbytes);
-
-H5_DLL herr_t H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref_type, const unsigned char *buf, H5O_token_t *obj_token);
H5_DLL herr_t H5R__encode_token_obj_compat(const H5O_token_t *obj_token, size_t token_size, unsigned char *buf, size_t *nalloc);
H5_DLL herr_t H5R__decode_token_obj_compat(const unsigned char *buf, size_t *nbytes, H5O_token_t *obj_token, size_t token_size);
-H5_DLL herr_t H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t token_size, H5S_t *space, unsigned char *buf, size_t *nalloc);
H5_DLL herr_t H5R__decode_token_region_compat(H5F_t *f, const unsigned char *buf, size_t *nbytes, H5O_token_t *obj_token, size_t token_size, H5S_t **space_ptr);
#endif /* _H5Rpkg_H */
diff --git a/src/H5SL.c b/src/H5SL.c
index ff8edb8..4716dc4 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -568,10 +568,10 @@ struct H5SL_t {
};
/* Static functions */
-static H5SL_node_t * H5SL_new_node(void *item, const void *key, uint32_t hashval);
-static H5SL_node_t *H5SL_insert_common(H5SL_t *slist, void *item, const void *key);
-static herr_t H5SL_release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data);
-static herr_t H5SL_close_common(H5SL_t *slist, H5SL_operator_t op, void *op_data);
+static H5SL_node_t *H5SL__new_node(void *item, const void *key, uint32_t hashval);
+static H5SL_node_t *H5SL__insert_common(H5SL_t *slist, void *item, const void *key);
+static herr_t H5SL__release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data);
+static herr_t H5SL__close_common(H5SL_t *slist, H5SL_operator_t op, void *op_data);
/* Package initialization variable */
hbool_t H5_PKG_INIT_VAR = FALSE;
@@ -642,7 +642,8 @@ H5SL__init_package(void)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-int H5SL_term_package(void)
+int
+H5SL_term_package(void)
{
int n = 0;
@@ -682,11 +683,11 @@ int H5SL_term_package(void)
/*--------------------------------------------------------------------------
NAME
- H5SL_new_node
+ H5SL__new_node
PURPOSE
Create a new skip list node of level 0
USAGE
- H5SL_node_t *H5SL_new_node(item,key,hasval)
+ H5SL_node_t *H5SL__new_node(item,key,hasval)
void *item; IN: Pointer to item info for node
void *key; IN: Pointer to key info for node
uint32_t hashval; IN: Hash value for node
@@ -703,11 +704,11 @@ int H5SL_term_package(void)
REVISION LOG
--------------------------------------------------------------------------*/
static H5SL_node_t *
-H5SL_new_node(void *item, const void *key, uint32_t hashval)
+H5SL__new_node(void *item, const void *key, uint32_t hashval)
{
H5SL_node_t *ret_value = NULL; /* New skip list node */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Allocate the node */
if(NULL == (ret_value = (H5SL_node_t *)H5FL_MALLOC(H5SL_node_t)))
@@ -727,16 +728,16 @@ H5SL_new_node(void *item, const void *key, uint32_t hashval)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5SL_new_node() */
+} /* end H5SL__new_node() */
/*--------------------------------------------------------------------------
NAME
- H5SL_insert_common
+ H5SL__insert_common
PURPOSE
Common code for inserting an object into a skip list
USAGE
- H5SL_node_t *H5SL_insert_common(slist,item,key)
+ H5SL_node_t *H5SL__insert_common(slist,item,key)
H5SL_t *slist; IN/OUT: Pointer to skip list
void *item; IN: Item to insert
void *key; IN: Key for item to insert
@@ -752,14 +753,14 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5SL_node_t *
-H5SL_insert_common(H5SL_t *slist, void *item, const void *key)
+H5SL__insert_common(H5SL_t *slist, void *item, const void *key)
{
H5SL_node_t *x; /* Current node to examine */
H5SL_node_t *prev; /* Node before the new node */
uint32_t hashval = 0; /* Hash value for key */
H5SL_node_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(slist);
@@ -822,7 +823,7 @@ H5SL_insert_common(H5SL_t *slist, void *item, const void *key)
slist->curr_level = 0;
/* Create new node of level 0 */
- if(NULL == (x = H5SL_new_node(item, key, hashval)))
+ if(NULL == (x = H5SL__new_node(item, key, hashval)))
HGOTO_ERROR(H5E_SLIST ,H5E_NOSPACE, NULL, "can't create new skip list node")
/* Update the links */
@@ -844,16 +845,16 @@ H5SL_insert_common(H5SL_t *slist, void *item, const void *key)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5SL_insert_common() */
+} /* end H5SL__insert_common() */
/*--------------------------------------------------------------------------
NAME
- H5SL_release_common
+ H5SL__release_common
PURPOSE
Release all nodes from a skip list, optionally calling a 'free' operator
USAGE
- herr_t H5SL_release_common(slist,op,opdata)
+ herr_t H5SL__release_common(slist,op,opdata)
H5SL_t *slist; IN/OUT: Pointer to skip list to release nodes
H5SL_operator_t op; IN: Callback function to free item & key
void *op_data; IN/OUT: Pointer to application data for callback
@@ -872,12 +873,12 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5SL_release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
+H5SL__release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
{
H5SL_node_t *node, *next_node; /* Pointers to skip list nodes */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(slist);
@@ -917,16 +918,16 @@ H5SL_release_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5SL_release_common() */
+} /* end H5SL__release_common() */
/*--------------------------------------------------------------------------
NAME
- H5SL_close_common
+ H5SL__close_common
PURPOSE
Close a skip list, deallocating it and potentially freeing all its nodes.
USAGE
- herr_t H5SL_close_common(slist,op,opdata)
+ herr_t H5SL__close_common(slist,op,opdata)
H5SL_t *slist; IN/OUT: Pointer to skip list to close
H5SL_operator_t op; IN: Callback function to free item & key
void *op_data; IN/OUT: Pointer to application data for callback
@@ -944,11 +945,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5SL_close_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
+H5SL__close_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(slist);
@@ -957,7 +958,7 @@ H5SL_close_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
/* (Pre-condition) */
/* Free skip list nodes */
- if(H5SL_release_common(slist, op, op_data) < 0)
+ if(H5SL__release_common(slist, op, op_data) < 0)
HGOTO_ERROR(H5E_SLIST, H5E_CANTFREE, FAIL, "can't release skip list nodes")
/* Release header node */
@@ -969,7 +970,7 @@ H5SL_close_common(H5SL_t *slist, H5SL_operator_t op, void *op_data)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5SL_close_common() */
+} /* end H5SL__close_common() */
/*--------------------------------------------------------------------------
@@ -1016,7 +1017,7 @@ H5SL_create(H5SL_type_t type, H5SL_cmp_t cmp)
new_slist->safe_iterating = FALSE;
/* Allocate the header node */
- if(NULL == (header = H5SL_new_node(NULL, NULL, (uint32_t)ULONG_MAX)))
+ if(NULL == (header = H5SL__new_node(NULL, NULL, (uint32_t)ULONG_MAX)))
HGOTO_ERROR(H5E_SLIST ,H5E_NOSPACE, NULL, "can't create new skip list node")
/* Initialize header node's forward pointer */
@@ -1118,8 +1119,8 @@ H5SL_insert(H5SL_t *slist, void *item, const void *key)
/* (Pre-condition) */
/* Insert item into skip list */
- if(H5SL_insert_common(slist,item,key)==NULL)
- HGOTO_ERROR(H5E_SLIST,H5E_CANTINSERT,FAIL,"can't create new skip list node")
+ if(NULL == H5SL__insert_common(slist, item, key))
+ HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, FAIL, "can't create new skip list node")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1168,8 +1169,8 @@ H5SL_add(H5SL_t *slist, void *item, const void *key)
/* (Pre-condition) */
/* Insert item into skip list */
- if((ret_value=H5SL_insert_common(slist,item,key))==NULL)
- HGOTO_ERROR(H5E_SLIST,H5E_CANTINSERT,NULL,"can't create new skip list node")
+ if(NULL == (ret_value = H5SL__insert_common(slist, item, key)))
+ HGOTO_ERROR(H5E_SLIST, H5E_CANTINSERT, NULL, "can't create new skip list node")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2241,7 +2242,9 @@ H5SL_iterate(H5SL_t *slist, H5SL_operator_t op, void *op_data)
herr_t
H5SL_release(H5SL_t *slist)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(slist);
@@ -2253,8 +2256,10 @@ H5SL_release(H5SL_t *slist)
/* (Pre-condition) */
/* Free skip list nodes */
- H5SL_release_common(slist,NULL,NULL); /* always succeeds */
+ if(H5SL__release_common(slist, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_SLIST, H5E_CANTFREE, FAIL, "can't release skip list nodes")
+done:
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SL_release() */
@@ -2290,7 +2295,9 @@ H5SL_release(H5SL_t *slist)
herr_t
H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI(FAIL)
/* Check args */
HDassert(slist);
@@ -2302,9 +2309,11 @@ H5SL_free(H5SL_t *slist, H5SL_operator_t op, void *op_data)
/* (Pre-condition) */
/* Free skip list nodes */
- H5SL_release_common(slist,op,op_data); /* always succeeds */
+ if(H5SL__release_common(slist, op, op_data) < 0)
+ HGOTO_ERROR(H5E_SLIST, H5E_CANTFREE, FAIL, "can't release skip list nodes")
- FUNC_LEAVE_NOAPI(SUCCEED)
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SL_free() */
@@ -2516,9 +2525,9 @@ done:
herr_t
H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data)
{
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(slist);
@@ -2527,8 +2536,10 @@ H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data)
/* (Pre-condition) */
/* Close skip list */
- (void)H5SL_close_common(slist,op,op_data); /* always succeeds */
+ if(H5SL__close_common(slist, op, op_data) < 0)
+ HGOTO_ERROR(H5E_SLIST, H5E_CANTCLOSEOBJ, FAIL, "can't close skip list")
+done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SL_destroy() */
@@ -2555,7 +2566,9 @@ H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data)
herr_t
H5SL_close(H5SL_t *slist)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(slist);
@@ -2564,8 +2577,10 @@ H5SL_close(H5SL_t *slist)
/* (Pre-condition) */
/* Close skip list */
- (void)H5SL_close_common(slist,NULL,NULL); /* always succeeds */
+ if(H5SL__close_common(slist, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_SLIST, H5E_CANTCLOSEOBJ, FAIL, "can't close skip list")
- FUNC_LEAVE_NOAPI(SUCCEED)
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SL_close() */
diff --git a/src/H5SLmodule.h b/src/H5SLmodule.h
index 34f08a1..335e35b 100644
--- a/src/H5SLmodule.h
+++ b/src/H5SLmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5SM.c b/src/H5SM.c
index 066224e..404e08b 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -61,6 +61,7 @@ static herr_t H5SM__find_in_list(const H5SM_list_t *list, const H5SM_mesg_key_t
size_t *empty_pos, size_t *list_pos);
static herr_t H5SM__convert_list_to_btree(H5F_t * f, H5SM_index_header_t * header,
H5SM_list_t **_list, H5HF_t *fheap, H5O_t *open_oh);
+static herr_t H5SM__bt2_convert_to_list_op(const void * record, void *op_data);
static herr_t H5SM__convert_btree_to_list(H5F_t * f, H5SM_index_header_t * header);
static herr_t H5SM__incr_ref(void *record, void *_op_data, hbool_t *changed);
static herr_t H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header,
@@ -294,7 +295,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5SM_get_index
+ * Function: H5SM__get_index
*
* Purpose: Get the index number for a given message type.
*
@@ -310,13 +311,13 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id)
+H5SM__get_index(const H5SM_master_table_t *table, unsigned type_id)
{
size_t x;
unsigned type_flag;
ssize_t ret_value = FAIL;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Translate the H5O type_id into an H5SM type flag */
if(H5SM__type_to_flag(type_id, &type_flag) < 0)
@@ -334,7 +335,7 @@ H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id)
*/
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5SM_get_index() */
+} /* end H5SM__get_index() */
/*-------------------------------------------------------------------------
@@ -428,7 +429,7 @@ H5SM_get_fheap_addr(H5F_t *f, unsigned type_id, haddr_t *fheap_addr)
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Look up index for message type */
- if((index_num = H5SM_get_index(table, type_id)) < 0)
+ if((index_num = H5SM__get_index(table, type_id)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to find correct SOHM index")
/* Retrieve heap address for index */
@@ -801,6 +802,48 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5SM__bt2_convert_to_list_op
+ *
+ * Purpose: An H5B2_remove_t callback function to convert a SOHM
+ * B-tree index to a list.
+ *
+ * Inserts this record into the list passed through op_data.
+ *
+ * Return: Non-negative on success
+ * Negative on failure
+ *
+ * Programmer: James Laird
+ * Monday, November 6, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5SM__bt2_convert_to_list_op(const void * record, void *op_data)
+{
+ const H5SM_sohm_t *message = (const H5SM_sohm_t *)record;
+ const H5SM_list_t *list = (const H5SM_list_t *)op_data;
+ size_t mesg_idx; /* Index of message to modify */
+
+ FUNC_ENTER_STATIC_NOERR
+
+ /* Sanity checks */
+ HDassert(record);
+ HDassert(op_data);
+
+ /* Get the message index, and increment the # of messages in list */
+ mesg_idx = list->header->num_messages++;
+ HDassert(list->header->num_messages <= list->header->list_max);
+
+ /* Insert this message at the end of the list */
+ HDassert(list->messages[mesg_idx].location == H5SM_NO_LOC);
+ HDassert(message->location != H5SM_NO_LOC);
+ H5MM_memcpy(&(list->messages[mesg_idx]), message, sizeof(H5SM_sohm_t));
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5SM__bt2_convert_to_list_op() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5SM__convert_btree_to_list
*
* Purpose: Given a B-tree index, turns it into a list index. This is
@@ -847,7 +890,7 @@ H5SM__convert_btree_to_list(H5F_t * f, H5SM_index_header_t * header)
/* Delete the B-tree and have messages copy themselves to the
* list as they're deleted
*/
- if(H5B2_delete(f, btree_addr, f, H5SM_bt2_convert_to_list_op, list) < 0)
+ if(H5B2_delete(f, btree_addr, f, H5SM__bt2_convert_to_list_op, list) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete B-tree")
done:
@@ -860,7 +903,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5SM_can_share_common
+ * Function: H5SM__can_share_common
*
* Purpose: "trivial" checks for determining if a message can be shared.
*
@@ -878,11 +921,11 @@ done:
*-------------------------------------------------------------------------
*/
static htri_t
-H5SM_can_share_common(const H5F_t *f, unsigned type_id, const void *mesg)
+H5SM__can_share_common(const H5F_t *f, unsigned type_id, const void *mesg)
{
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check whether this message ought to be shared or not */
/* If sharing is disabled in this file, don't share the message */
@@ -901,7 +944,7 @@ H5SM_can_share_common(const H5F_t *f, unsigned type_id, const void *mesg)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5SM_can_share_common() */
+} /* end H5SM__can_share_common() */
/*-------------------------------------------------------------------------
@@ -934,7 +977,7 @@ H5SM_can_share(H5F_t *f, H5SM_master_table_t *table,
FUNC_ENTER_NOAPI_TAG(H5AC__SOHM_TAG, FAIL)
/* "trivial" sharing checks */
- if((tri_ret = H5SM_can_share_common(f, type_id, mesg)) < 0)
+ if((tri_ret = H5SM__can_share_common(f, type_id, mesg)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'trivial' sharing checks returned error")
if(tri_ret == FALSE)
HGOTO_DONE(FALSE)
@@ -956,7 +999,7 @@ H5SM_can_share(H5F_t *f, H5SM_master_table_t *table,
/* Find the right index for this message type. If there is no such index
* then this type of message isn't shareable
*/
- if((index_num = H5SM_get_index(my_table, type_id)) < 0) {
+ if((index_num = H5SM__get_index(my_table, type_id)) < 0) {
H5E_clear_stack(NULL); /*ignore error*/
HGOTO_DONE(FALSE)
} /* end if */
@@ -1072,7 +1115,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags,
/* "trivial" sharing checks */
if(mesg_flags && (*mesg_flags & H5O_MSG_FLAG_DONTSHARE))
HGOTO_DONE(FALSE)
- if((tri_ret = H5SM_can_share_common(f, type_id, mesg)) < 0)
+ if((tri_ret = H5SM__can_share_common(f, type_id, mesg)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_BADTYPE, FAIL, "'trivial' sharing checks returned error")
if(tri_ret == FALSE)
HGOTO_DONE(FALSE)
@@ -1561,7 +1604,7 @@ H5SM_delete(H5F_t *f, H5O_t *open_oh, H5O_shared_t *sh_mesg)
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Find the correct index and try to delete from it */
- if((index_num = H5SM_get_index(table, type_id)) < 0)
+ if((index_num = H5SM__get_index(table, type_id)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index")
/* If mesg_buf is not NULL, the message's reference count has reached
@@ -1675,34 +1718,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5SM_get_hash_fh_cb
- *
- * Purpose: Callback for fractal heap operator, to make copy of link when
- * when lookup up a link by index
- *
- * Return: SUCCEED/FAIL
- *
- * Programmer: Quincey Koziol
- * koziol@hdfgroup.org
- * Nov 7 2006
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5SM_get_hash_fh_cb(const void *obj, size_t obj_len, void *_udata)
-{
- H5SM_fh_ud_gh_t *udata = (H5SM_fh_ud_gh_t *)_udata; /* User data for fractal heap 'op' callback */
-
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- /* Compute hash value on raw message */
- udata->hash = H5_checksum_lookup3(obj, obj_len, udata->type_id);
-
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5SM_get_hash_fh_cb() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5SM__decr_ref
*
* Purpose: Decrement the reference count for a SOHM message. Doesn't
@@ -2108,7 +2123,7 @@ H5SM_reconstitute(H5O_shared_t *sh_mesg, H5F_t *f, unsigned msg_type_id,
/*-------------------------------------------------------------------------
- * Function: H5SM_get_refcount_bt2_cb
+ * Function: H5SM__get_refcount_bt2_cb
*
* Purpose: v2 B-tree 'find' callback to retrieve the record for a message
*
@@ -2120,12 +2135,12 @@ H5SM_reconstitute(H5O_shared_t *sh_mesg, H5F_t *f, unsigned msg_type_id,
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM_get_refcount_bt2_cb(const void *_record, void *_op_data)
+H5SM__get_refcount_bt2_cb(const void *_record, void *_op_data)
{
const H5SM_sohm_t *record = (const H5SM_sohm_t *)_record; /* v2 B-tree record for message */
H5SM_sohm_t *op_data = (H5SM_sohm_t *)_op_data; /* "op data" from v2 B-tree find */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/*
* Check arguments.
@@ -2137,7 +2152,7 @@ H5SM_get_refcount_bt2_cb(const void *_record, void *_op_data)
*op_data = *record;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5SM_get_refcount_bt2_cb() */
+} /* end H5SM__get_refcount_bt2_cb() */
/*-------------------------------------------------------------------------
@@ -2184,7 +2199,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg,
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Find the correct index and find the message in it */
- if((index_num = H5SM_get_index(table, type_id)) < 0)
+ if((index_num = H5SM__get_index(table, type_id)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index")
header = &(table->indexes[index_num]);
@@ -2241,7 +2256,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg,
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
/* Look up the message in the v2 B-tree */
- if((msg_exists = H5B2_find(bt2, &key, H5SM_get_refcount_bt2_cb, &message)) < 0)
+ if((msg_exists = H5B2_find(bt2, &key, H5SM__get_refcount_bt2_cb, &message)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "error finding message in index")
if(!msg_exists)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index")
@@ -2466,7 +2481,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5SM_table_free
+ * Function: H5SM__table_free
*
* Purpose: Frees memory used by the SOHM table.
*
@@ -2478,9 +2493,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5SM_table_free(H5SM_master_table_t *table)
+H5SM__table_free(H5SM_master_table_t *table)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(table);
@@ -2491,11 +2506,11 @@ H5SM_table_free(H5SM_master_table_t *table)
table = H5FL_FREE(H5SM_master_table_t, table);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5SM_table_free() */
+} /* end H5SM__table_free() */
/*-------------------------------------------------------------------------
- * Function: H5SM_list_free
+ * Function: H5SM__list_free
*
* Purpose: Frees all memory used by the list.
*
@@ -2507,9 +2522,9 @@ H5SM_table_free(H5SM_master_table_t *table)
*-------------------------------------------------------------------------
*/
herr_t
-H5SM_list_free(H5SM_list_t *list)
+H5SM__list_free(H5SM_list_t *list)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(list);
HDassert(list->messages);
@@ -2519,7 +2534,7 @@ H5SM_list_free(H5SM_list_t *list)
list = H5FL_FREE(H5SM_list_t, list);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5SM_list_free() */
+} /* end H5SM__list_free() */
/*-------------------------------------------------------------------------
diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c
index 7f6c804..644f3dc 100644
--- a/src/H5SMbtree2.c
+++ b/src/H5SMbtree2.c
@@ -212,45 +212,3 @@ H5SM__bt2_debug(FILE *stream, int indent, int fwidth,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5SM__bt2_debug */
-
-/*-------------------------------------------------------------------------
- * Function: H5SM_bt2_convert_to_list_op
- *
- * Purpose: An H5B2_remove_t callback function to convert a SOHM
- * B-tree index to a list.
- *
- * Inserts this record into the list passed through op_data.
- *
- * Return: Non-negative on success
- * Negative on failure
- *
- * Programmer: James Laird
- * Monday, November 6, 2006
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5SM_bt2_convert_to_list_op(const void * record, void *op_data)
-{
- const H5SM_sohm_t *message = (const H5SM_sohm_t *)record;
- const H5SM_list_t *list = (const H5SM_list_t *)op_data;
- size_t mesg_idx; /* Index of message to modify */
-
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- /* Sanity checks */
- HDassert(record);
- HDassert(op_data);
-
- /* Get the message index, and increment the # of messages in list */
- mesg_idx = list->header->num_messages++;
- HDassert(list->header->num_messages <= list->header->list_max);
-
- /* Insert this message at the end of the list */
- HDassert(list->messages[mesg_idx].location == H5SM_NO_LOC);
- HDassert(message->location != H5SM_NO_LOC);
- H5MM_memcpy(&(list->messages[mesg_idx]), message, sizeof(H5SM_sohm_t));
-
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5SM_bt2_convert_to_list_op() */
-
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 7f243a6..e7cd29e 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -15,7 +15,7 @@
*
* Created: H5SMcache.c
* Nov 13 2006
- * James Laird <jlaird@hdfgroup.org>
+ * James Laird
*
* Purpose: Implement shared message metadata cache methods.
*
@@ -308,7 +308,7 @@ H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l
done:
if(!ret_value && table)
- if(H5SM_table_free(table) < 0)
+ if(H5SM__table_free(table) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTFREE, NULL, "unable to destroy sohm table")
FUNC_LEAVE_NOAPI(ret_value)
@@ -467,7 +467,7 @@ H5SM__cache_table_free_icr(void *_thing)
HDassert(table->cache_info.type == H5AC_SOHM_TABLE);
/* Destroy Shared Object Header Message table */
- if(H5SM_table_free(table) < 0)
+ if(H5SM__table_free(table) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTRELEASE, FAIL, "unable to free shared message table")
done:
@@ -778,7 +778,7 @@ H5SM__cache_list_free_icr(void *_thing)
HDassert(list->cache_info.type == H5AC_SOHM_LIST);
/* Destroy Shared Object Header Message list */
- if(H5SM_list_free(list) < 0)
+ if(H5SM__list_free(list) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTRELEASE, FAIL, "unable to free shared message list")
done:
diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c
index e085204..1787fbe 100644
--- a/src/H5SMmessage.c
+++ b/src/H5SMmessage.c
@@ -38,7 +38,7 @@
/* Local Typedefs */
/******************/
-/* Udata struct for calls to H5SM_compare_cb and H5SM_compare_iter_op*/
+/* Udata struct for calls to H5SM__compare_cb and H5SM__compare_iter_op*/
typedef struct H5SM_compare_udata_t {
const H5SM_mesg_key_t *key; /* Key; compare this against stored message */
H5O_msg_crt_idx_t idx; /* Index of the message in the OH, if applicable */
@@ -49,8 +49,8 @@ typedef struct H5SM_compare_udata_t {
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5SM_compare_cb(const void *obj, size_t obj_len, void *udata);
-static herr_t H5SM_compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg, unsigned sequence,
+static herr_t H5SM__compare_cb(const void *obj, size_t obj_len, void *udata);
+static herr_t H5SM__compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg, unsigned sequence,
unsigned *oh_modified, void *udata);
@@ -71,7 +71,7 @@ static herr_t H5SM_compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg, unsigned sequenc
/*-------------------------------------------------------------------------
- * Function: H5SM_compare_cb
+ * Function: H5SM__compare_cb
*
* Purpose: Callback for H5HF_op, used in H5SM__message_compare below.
* Determines whether the search key passed in in _UDATA is
@@ -87,11 +87,11 @@ static herr_t H5SM_compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg, unsigned sequenc
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM_compare_cb(const void *obj, size_t obj_len, void *_udata)
+H5SM__compare_cb(const void *obj, size_t obj_len, void *_udata)
{
H5SM_compare_udata_t *udata = (H5SM_compare_udata_t *)_udata;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* If the encoding sizes are different, it's not the same object */
if(udata->key->encoding_size > obj_len)
@@ -103,11 +103,11 @@ H5SM_compare_cb(const void *obj, size_t obj_len, void *_udata)
udata->ret = HDmemcmp(udata->key->encoding, obj, obj_len);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5SM_compare_cb() */
+} /* end H5SM__compare_cb() */
/*-------------------------------------------------------------------------
- * Function: H5SM_compare_iter_op
+ * Function: H5SM__compare_iter_op
*
* Purpose: OH iteration callback to compare a key against a message in
* an OH
@@ -123,13 +123,13 @@ H5SM_compare_cb(const void *obj, size_t obj_len, void *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5SM_compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
+H5SM__compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
unsigned H5_ATTR_UNUSED *oh_modified, void *_udata/*in,out*/)
{
H5SM_compare_udata_t *udata = (H5SM_compare_udata_t *) _udata;
herr_t ret_value = H5_ITER_CONT;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -165,7 +165,7 @@ H5SM_compare_iter_op(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5SM_compare_iter_op() */
+} /* end H5SM__compare_iter_op() */
/*-------------------------------------------------------------------------
@@ -237,7 +237,7 @@ H5SM__message_compare(const void *rec1, const void *rec2, int *result)
*/
if(mesg->location == H5SM_IN_HEAP) {
/* Call heap op routine with comparison callback */
- if(H5HF_op(key->fheap, &(mesg->u.heap_loc.fheap_id), H5SM_compare_cb, &udata) < 0)
+ if(H5HF_op(key->fheap, &(mesg->u.heap_loc.fheap_id), H5SM__compare_cb, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
} /* end if */
else {
@@ -261,7 +261,7 @@ H5SM__message_compare(const void *rec1, const void *rec2, int *result)
/* Locate the right message and compare with it */
op.op_type = H5O_MESG_OP_LIB;
- op.u.lib_op = H5SM_compare_iter_op;
+ op.u.lib_op = H5SM__compare_iter_op;
if(H5O_msg_iterate(&oloc, mesg->msg_type_id, &op, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over links")
} /* end else */
diff --git a/src/H5SMmodule.h b/src/H5SMmodule.h
index 656c7dd..ccd7b9f 100644
--- a/src/H5SMmodule.h
+++ b/src/H5SMmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5SMpkg.h b/src/H5SMpkg.h
index bb458a7..59be8b7 100644
--- a/src/H5SMpkg.h
+++ b/src/H5SMpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: James Laird <jlaird@ncsa.uiuc.edu>
+ * Programmer: James Laird
* Thursday, March 30, 2006
*
* Purpose: This file contains declarations which are visible only within
@@ -259,22 +259,16 @@ H5_DLLVAR const H5B2_class_t H5SM_INDEX[1];
/****************************/
/* General routines */
-H5_DLL ssize_t H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id);
+H5_DLL ssize_t H5SM__get_index(const H5SM_master_table_t *table, unsigned type_id);
/* Encode and decode routines, used for B-tree and cache encoding/decoding */
H5_DLL herr_t H5SM__message_compare(const void *rec1, const void *rec2, int *result);
H5_DLL herr_t H5SM__message_encode(uint8_t *raw, const void *native, void *ctx);
H5_DLL herr_t H5SM__message_decode(const uint8_t *raw, void *native, void *ctx);
-/* H5B2_remove_t callback to add messages to a list index */
-H5_DLL herr_t H5SM_bt2_convert_to_list_op(const void * record, void *op_data);
-
-/* Fractal heap 'op' callback to compute hash value for message "in place" */
-H5_DLL herr_t H5SM_get_hash_fh_cb(const void *obj, size_t obj_len, void *_udata);
-
/* Routines to release data structures */
-herr_t H5SM_table_free(H5SM_master_table_t *table);
-herr_t H5SM_list_free(H5SM_list_t *list);
+H5_DLL herr_t H5SM__table_free(H5SM_master_table_t *table);
+H5_DLL herr_t H5SM__list_free(H5SM_list_t *list);
/* Testing functions */
#ifdef H5SM_TESTING
diff --git a/src/H5SMprivate.h b/src/H5SMprivate.h
index e6776f3..80d3692 100644
--- a/src/H5SMprivate.h
+++ b/src/H5SMprivate.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: James Laird <jlaird@ncsa.uiuc.edu>
+ * Programmer: James Laird
* Thursday, March 2, 2006
*
* Purpose: This file contains private declarations for the H5SM
diff --git a/src/H5SMtest.c b/src/H5SMtest.c
index 0a6149d..a4a43e6 100644
--- a/src/H5SMtest.c
+++ b/src/H5SMtest.c
@@ -99,7 +99,7 @@ H5SM__get_mesg_count_test(H5F_t *f, unsigned type_id, size_t *mesg_count)
HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Find the correct index for this message type */
- if((index_num = H5SM_get_index(table, type_id)) < 0)
+ if((index_num = H5SM__get_index(table, type_id)) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index")
header = &(table->indexes[index_num]);
diff --git a/src/H5ST.c b/src/H5ST.c
index 3a1020b..2570f72 100644
--- a/src/H5ST.c
+++ b/src/H5ST.c
@@ -70,7 +70,7 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5ST_close_internal
+ H5ST__close_internal
PURPOSE
Close a TST, deallocating it.
USAGE
@@ -87,21 +87,21 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5ST_close_internal(H5ST_ptr_t p)
+H5ST__close_internal(H5ST_ptr_t p)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Recursively free TST */
if(p) {
- H5ST_close_internal(p->lokid);
+ H5ST__close_internal(p->lokid);
if(p->splitchar)
- H5ST_close_internal(p->eqkid);
- H5ST_close_internal(p->hikid);
+ H5ST__close_internal(p->eqkid);
+ H5ST__close_internal(p->hikid);
p = H5FL_FREE(H5ST_node_t, p);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5ST_close_internal() */
+} /* end H5ST__close_internal() */
/*--------------------------------------------------------------------------
@@ -134,7 +134,7 @@ H5ST_close(H5ST_tree_t *tree)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid TST")
/* Free the TST itself */
- if(H5ST_close_internal(tree->root) < 0)
+ if(H5ST__close_internal(tree->root) < 0)
HGOTO_ERROR(H5E_TST, H5E_CANTFREE, FAIL, "can't free TST")
/* Free root node itself */
@@ -270,7 +270,7 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5ST_find_internal
+ H5ST__find_internal
PURPOSE
Find the node matching a particular key string
USAGE
@@ -289,11 +289,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5ST_ptr_t
-H5ST_find_internal(H5ST_ptr_t p, const char *s)
+H5ST__find_internal(H5ST_ptr_t p, const char *s)
{
H5ST_ptr_t ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
while (p) {
if (*s < p->splitchar)
@@ -308,7 +308,7 @@ H5ST_find_internal(H5ST_ptr_t p, const char *s)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5ST_find_internal() */
+} /* end H5ST__find_internal() */
/*--------------------------------------------------------------------------
@@ -338,7 +338,7 @@ H5ST_find(H5ST_tree_t *tree, const char *s)
FUNC_ENTER_NOAPI(NULL)
- if(NULL == (ret_value = H5ST_find_internal(tree->root, s)))
+ if(NULL == (ret_value = H5ST__find_internal(tree->root, s)))
HGOTO_ERROR(H5E_TST, H5E_NOTFOUND, NULL, "key not found in TST")
done:
@@ -374,7 +374,7 @@ H5ST_locate(H5ST_tree_t *tree, const char *s)
FUNC_ENTER_NOAPI(NULL)
/* Locate the node to remove */
- if(NULL == (node = H5ST_find_internal(tree->root, s)))
+ if(NULL == (node = H5ST__find_internal(tree->root, s)))
HGOTO_ERROR(H5E_TST, H5E_NOTFOUND, NULL, "key not found in TST")
/* Get the pointer to the object to return */
@@ -387,11 +387,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5ST_findfirst_internal
+ H5ST__findfirst_internal
PURPOSE
Find the first node in a TST
USAGE
- H5ST_ptr_t H5ST_findfirst_internal(p)
+ H5ST_ptr_t H5ST__findfirst_internal(p)
H5ST_ptr_t p; IN: TST to locate first node within
RETURNS
Success: Non-NULL
@@ -404,11 +404,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5ST_ptr_t
-H5ST_findfirst_internal(H5ST_ptr_t p)
+H5ST__findfirst_internal(H5ST_ptr_t p)
{
H5ST_ptr_t ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
while(p) {
/* Find least node in current tree */
@@ -428,7 +428,7 @@ H5ST_findfirst_internal(H5ST_ptr_t p)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5ST_findfirst_internal() */
+} /* end H5ST__findfirst_internal() */
/*--------------------------------------------------------------------------
@@ -456,7 +456,7 @@ H5ST_findfirst(H5ST_tree_t *tree)
FUNC_ENTER_NOAPI(NULL)
- if(NULL == (ret_value = H5ST_findfirst_internal(tree->root)))
+ if(NULL == (ret_value = H5ST__findfirst_internal(tree->root)))
HGOTO_ERROR(H5E_TST,H5E_NOTFOUND,NULL,"no nodes in TST");
done:
@@ -466,11 +466,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5ST_getnext
+ H5ST__getnext
PURPOSE
Internal routine to find the next node in a given level of a TST
USAGE
- H5ST_ptr_t H5ST_getnext(p)
+ H5ST_ptr_t H5ST__getnext(p)
H5ST_ptr_t *p; IN: Pointer to node to find next node from
RETURNS
Success: Non-NULL
@@ -483,11 +483,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5ST_ptr_t
-H5ST_getnext(H5ST_ptr_t p)
+H5ST__getnext(H5ST_ptr_t p)
{
H5ST_ptr_t ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* If the node to continue from has higher-valued nodes attached */
if(p->hikid) {
@@ -519,7 +519,7 @@ H5ST_getnext(H5ST_ptr_t p)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5ST_getnext() */
+} /* end H5ST__getnext() */
/*--------------------------------------------------------------------------
@@ -550,9 +550,9 @@ H5ST_findnext(H5ST_ptr_t p)
/* Find the next node at the current level, or go back up the tree */
do {
- q = H5ST_getnext(p);
+ q = H5ST__getnext(p);
if(q) {
- HGOTO_DONE(H5ST_findfirst_internal(q->eqkid));
+ HGOTO_DONE(H5ST__findfirst_internal(q->eqkid));
} /* end if */
else
p = p->up;
@@ -565,11 +565,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5ST_delete_internal
+ H5ST__delete_internal
PURPOSE
Delete a node from a TST
USAGE
- herr_t H5ST_delete_internal(root,p)
+ herr_t H5ST__delete_internal(root,p)
H5ST_ptr_t *root; IN/OUT: Root of TST to delete node from
H5ST_ptr_t p; IN: Node to delete
RETURNS
@@ -584,12 +584,12 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5ST_delete_internal(H5ST_ptr_t *root, H5ST_ptr_t p)
+H5ST__delete_internal(H5ST_ptr_t *root, H5ST_ptr_t p)
{
H5ST_ptr_t q, /* Temporary pointer to TST node */
newp; /* Pointer to node which will replace deleted node in tree */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Find node to replace one being deleted */
if(p->lokid) {
@@ -628,7 +628,7 @@ H5ST_delete_internal(H5ST_ptr_t *root, H5ST_ptr_t p)
/* If we deleted the last node in the TST, delete the upper node also */
if(NULL == newp)
- H5ST_delete_internal(root, p->up);
+ H5ST__delete_internal(root, p->up);
} /* end if */
else /* Deleted last node at top level of tree */
*root = newp;
@@ -637,7 +637,7 @@ H5ST_delete_internal(H5ST_ptr_t *root, H5ST_ptr_t p)
p = H5FL_FREE(H5ST_node_t, p);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5ST_delete_internal() */
+} /* end H5ST__delete_internal() */
/*--------------------------------------------------------------------------
@@ -667,7 +667,7 @@ H5ST_delete(H5ST_tree_t *tree, H5ST_ptr_t p)
FUNC_ENTER_NOAPI(FAIL)
- if(H5ST_delete_internal(&tree->root, p) < 0)
+ if(H5ST__delete_internal(&tree->root, p) < 0)
HGOTO_ERROR(H5E_TST, H5E_CANTDELETE, FAIL, "can't delete node from TST")
done:
@@ -703,14 +703,14 @@ H5ST_remove(H5ST_tree_t *tree, const char *s)
FUNC_ENTER_NOAPI(NULL)
/* Locate the node to remove */
- if(NULL == (node = H5ST_find_internal(tree->root, s)))
+ if(NULL == (node = H5ST__find_internal(tree->root, s)))
HGOTO_ERROR(H5E_TST, H5E_NOTFOUND, NULL, "key not found in TST")
/* Get the pointer to the object to return */
ret_value = node->eqkid;
/* Remove the node from the TST */
- if(H5ST_delete_internal(&tree->root, node) < 0)
+ if(H5ST__delete_internal(&tree->root, node) < 0)
HGOTO_ERROR(H5E_TST, H5E_CANTDELETE, NULL, "can't delete node from TST")
done:
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 9026e7c..f342279 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Tuesday, June 16, 1998
*
* Purpose: "All" selection dataspace I/O functions.
diff --git a/src/H5Sdbg.c b/src/H5Sdbg.c
index 32f5295..a870c92 100644
--- a/src/H5Sdbg.c
+++ b/src/H5Sdbg.c
@@ -16,7 +16,6 @@
* Created: H5Sdbg.c
* Quincey Koziol
* Jul 24 2007
- *
*
* Purpose: Dump debugging information about a dataspace
*
diff --git a/src/H5Sdeprec.c b/src/H5Sdeprec.c
index e4ec1b0..e37694c 100644
--- a/src/H5Sdeprec.c
+++ b/src/H5Sdeprec.c
@@ -87,7 +87,6 @@
* Failure: negative
*
* Programmer: Raymond Lu
- * slu@ncsa.uiuc.edu
* July 14, 2004
*
*-------------------------------------------------------------------------
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 9f75785..95bce29 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -5405,7 +5405,7 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
{
hbool_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_PACKAGE_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity checks */
HDassert(span_info1);
@@ -7017,9 +7017,8 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
{
hbool_t non_zero_offset = FALSE; /* Whether any offset is non-zero */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC_NOERR
/* Sanity checks */
HDassert(space);
@@ -7062,8 +7061,7 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
} /* end if */
}
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_adjust_s() */
@@ -9613,7 +9611,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[],
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(space);
diff --git a/src/H5Smodule.h b/src/H5Smodule.h
index 962f0a2..67ac785 100644
--- a/src/H5Smodule.h
+++ b/src/H5Smodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Snone.c b/src/H5Snone.c
index 672302d..67c07d0 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Tuesday, November 10, 1998
*
* Purpose: "None" selection dataspace I/O functions.
diff --git a/src/H5Spkg.h b/src/H5Spkg.h
index e08fedf..b1a46f2 100644
--- a/src/H5Spkg.h
+++ b/src/H5Spkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, September 28, 2000
*
* Purpose: This file contains declarations which are visible only within
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index c9d7fc0..eb5cf1c 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.ued>
+/* Programmer: Quincey Koziol
* Friday, May 29, 1998
*
* Purpose: Dataspace selection functions.
@@ -56,9 +56,9 @@
/********************/
#ifdef LATER
-static herr_t H5S_select_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end);
-static htri_t H5S_select_iter_has_next_block(const H5S_sel_iter_t *iter);
-static herr_t H5S_select_iter_next_block(H5S_sel_iter_t *iter);
+static herr_t H5S__select_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end);
+static htri_t H5S__select_iter_has_next_block(const H5S_sel_iter_t *iter);
+static herr_t H5S__select_iter_next_block(H5S_sel_iter_t *iter);
#endif /* LATER */
@@ -1233,11 +1233,11 @@ H5S_select_iter_coords(const H5S_sel_iter_t *sel_iter, hsize_t *coords)
/*--------------------------------------------------------------------------
NAME
- H5S_select_iter_block
+ H5S__select_iter_block
PURPOSE
Get the block of the current iterator position
USAGE
- herr_t H5S_select_iter_block(sel_iter,start,end)
+ herr_t H5S__select_iter_block(sel_iter,start,end)
const H5S_sel_iter_t *sel_iter; IN: Selection iterator to query
hsize_t *start; OUT: Array to place iterator start block coordinates
hsize_t *end; OUT: Array to place iterator end block coordinates
@@ -1255,11 +1255,11 @@ H5S_select_iter_coords(const H5S_sel_iter_t *sel_iter, hsize_t *coords)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S_select_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
+H5S__select_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(iter);
@@ -1270,7 +1270,7 @@ H5S_select_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
ret_value = (*iter->type->iter_block)(iter, start, end);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5S_select_iter_block() */
+} /* end H5S__select_iter_block() */
#endif /* LATER */
@@ -1314,11 +1314,11 @@ H5S_select_iter_nelmts(const H5S_sel_iter_t *sel_iter)
/*--------------------------------------------------------------------------
NAME
- H5S_select_iter_has_next_block
+ H5S__select_iter_has_next_block
PURPOSE
Check if there is another block available in the selection iterator
USAGE
- htri_t H5S_select_iter_has_next_block(sel_iter)
+ htri_t H5S__select_iter_has_next_block(sel_iter)
const H5S_sel_iter_t *sel_iter; IN: Selection iterator to query
RETURNS
Non-negative on success, negative on failure.
@@ -1334,11 +1334,11 @@ H5S_select_iter_nelmts(const H5S_sel_iter_t *sel_iter)
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
-H5S_select_iter_has_next_block(const H5S_sel_iter_t *iter)
+H5S__select_iter_has_next_block(const H5S_sel_iter_t *iter)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(iter);
@@ -1347,7 +1347,7 @@ H5S_select_iter_has_next_block(const H5S_sel_iter_t *iter)
ret_value = (*iter->type->iter_has_next_block)(iter);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5S_select_iter_has_next_block() */
+} /* end H5S__select_iter_has_next_block() */
#endif /* LATER */
@@ -1397,11 +1397,11 @@ H5S_select_iter_next(H5S_sel_iter_t *iter, size_t nelem)
/*--------------------------------------------------------------------------
NAME
- H5S_select_iter_next_block
+ H5S__select_iter_next_block
PURPOSE
Advance selection iterator to next block
USAGE
- herr_t H5S_select_iter_next_block(iter)
+ herr_t H5S__select_iter_next_block(iter)
H5S_sel_iter_t *iter; IN/OUT: Selection iterator to change
RETURNS
Non-negative on success, negative on failure.
@@ -1419,11 +1419,11 @@ H5S_select_iter_next(H5S_sel_iter_t *iter, size_t nelem)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S_select_iter_next_block(H5S_sel_iter_t *iter)
+H5S__select_iter_next_block(H5S_sel_iter_t *iter)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(iter);
@@ -1432,7 +1432,7 @@ H5S_select_iter_next_block(H5S_sel_iter_t *iter)
ret_value = (*iter->type->iter_next_block)(iter);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5S_select_iter_next_block() */
+} /* end H5S__select_iter_next_block() */
#endif /* LATER */
diff --git a/src/H5Stest.c b/src/H5Stest.c
index b61b6bf..1bc5b9f 100644
--- a/src/H5Stest.c
+++ b/src/H5Stest.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Saturday, May 31, 2003
*
* Purpose: Dataspace selection testing functions.
diff --git a/src/H5T.c b/src/H5T.c
index 991095d..d59aaff 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -1912,12 +1912,6 @@ done:
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- *
- * Robb Matzke, 1 Jun 1998
- * It is illegal to lock a named datatype since we must allow named
- * types to be closed (to release file resources) but locking a type
- * prevents that.
*-------------------------------------------------------------------------
*/
herr_t
@@ -1990,9 +1984,6 @@ done:
* Programmer: Robb Matzke
* Monday, December 8, 1997
*
- * Modifications:
- * Broke out from H5Tget_class - QAK - 6/4/99
- *
*-------------------------------------------------------------------------
*/
H5T_class_t
@@ -3029,10 +3020,6 @@ done:
* Programmer: Raymond Lu
* July 14, 2004
*
- * Modification:Raymond Lu
- * 17 February 2011
- * I changed the value for the APP_REF parameter of H5I_register
- * from FALSE to TRUE.
*-------------------------------------------------------------------------
*/
hid_t
@@ -3195,10 +3182,6 @@ done:
* Programmer: Robb Matzke
* Friday, December 5, 1997
*
- * Modifications:
- * Raymond Lu
- * 19 May 2011
- * We support fixed size or variable-length string now.
*-------------------------------------------------------------------------
*/
H5T_t *
@@ -5173,11 +5156,6 @@ H5T_path_noop(const H5T_path_t *p)
* Programmer: Raymond Lu
* 8 June 2007
*
- * Modifications: Neil Fortner
- * 19 September 2008
- * Changed return value to H5T_subset_info_t
- * (to allow it to return copy_size)
- *
*-------------------------------------------------------------------------
*/
H5T_subset_info_t *
@@ -5905,7 +5883,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_upgrade_version_cb
+ * Function: H5T__upgrade_version_cb
*
* Purpose: H5T__visit callback to Upgrade the version of a datatype
* (if there's any benefit to doing so)
@@ -5922,9 +5900,9 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_upgrade_version_cb(H5T_t *dt, void *op_value)
+H5T__upgrade_version_cb(H5T_t *dt, void *op_value)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(dt);
@@ -5959,7 +5937,7 @@ H5T_upgrade_version_cb(H5T_t *dt, void *op_value)
} /* end switch */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5T_upgrade_version_cb() */
+} /* end H5T__upgrade_version_cb() */
/*-------------------------------------------------------------------------
@@ -5987,7 +5965,7 @@ H5T__upgrade_version(H5T_t *dt, unsigned new_version)
HDassert(dt);
/* Iterate over entire datatype, upgrading the version of components, if it's useful */
- if(H5T__visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPLEX_LAST), H5T_upgrade_version_cb, &new_version) < 0)
+ if(H5T__visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPLEX_LAST), H5T__upgrade_version_cb, &new_version) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "iteration to upgrade datatype encoding version failed")
done:
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h
index 887f001..effda55 100644
--- a/src/H5TSprivate.h
+++ b/src/H5TSprivate.h
@@ -19,8 +19,6 @@
*
* Purpose: Private non-prototype header.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef H5TSprivate_H_
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c
index f4a9e04..caf81cb 100644
--- a/src/H5Tcompound.c
+++ b/src/H5Tcompound.c
@@ -93,8 +93,6 @@ static H5T_t *H5T__reopen_member_type(const H5T_t *dt, unsigned membno);
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
size_t
@@ -163,8 +161,6 @@ H5T_get_member_offset(const H5T_t *dt, unsigned membno)
* Programmer: Quincey Koziol
* Thursday, November 9, 2000
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
H5T_class_t
@@ -361,8 +357,6 @@ H5T__get_member_size(const H5T_t *dt, unsigned membno)
* Programmer: Robb Matzke
* Monday, December 8, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -407,8 +401,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -616,8 +608,6 @@ done:
* Programmer: Quincey Koziol
* Thursday, September 11, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static htri_t
@@ -654,8 +644,6 @@ H5T__is_packed(const H5T_t *dt)
* Programmer: Neil Fortner
* Monday, October 19, 2009
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 15658cc..f644b21 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -990,7 +990,7 @@ typedef struct H5T_conv_hw_t {
/* Local Prototypes */
/********************/
-static herr_t H5T_reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order);
+static herr_t H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order);
/*********************/
@@ -1725,7 +1725,7 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(src->shared->u.atomic.prec > dst->shared->u.atomic.prec) {
/*overflow*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id,
src_rev, d, cb_struct.user_data);
} /* end if */
@@ -1824,7 +1824,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_conv_struct_free
+ * Function: H5T__conv_struct_free
*
* Purpose: Free the private data structure used by the compound
* conversion functions.
@@ -1837,14 +1837,14 @@ done:
*-------------------------------------------------------------------------
*/
static H5T_conv_struct_t *
-H5T_conv_struct_free(H5T_conv_struct_t *priv)
+H5T__conv_struct_free(H5T_conv_struct_t *priv)
{
int *src2dst = priv->src2dst;
hid_t *src_memb_id = priv->src_memb_id,
*dst_memb_id = priv->dst_memb_id;
unsigned i;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
for(i = 0; i < priv->src_nmembs; i++)
if(src2dst[i] >= 0) {
@@ -1862,11 +1862,11 @@ H5T_conv_struct_free(H5T_conv_struct_t *priv)
H5MM_xfree(priv->memb_path);
FUNC_LEAVE_NOAPI((H5T_conv_struct_t *)H5MM_xfree(priv))
-} /* end H5T_conv_struct_free() */
+} /* end H5T__conv_struct_free() */
/*-------------------------------------------------------------------------
- * Function: H5T_conv_struct_init
+ * Function: H5T__conv_struct_init
*
* Purpose: Initialize the `priv' field of `cdata' with conversion
* information that is relatively constant. If `priv' is
@@ -1912,7 +1912,7 @@ H5T_conv_struct_free(H5T_conv_struct_t *priv)
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
+H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
{
H5T_conv_struct_t *priv = (H5T_conv_struct_t*)(cdata->priv);
int *src2dst = NULL;
@@ -1920,7 +1920,7 @@ H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
unsigned i, j;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
src_nmembs = src->shared->u.compnd.nmembs;
dst_nmembs = dst->shared->u.compnd.nmembs;
@@ -2000,7 +2000,7 @@ H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
H5T_path_t *tpath = H5T_path_find(src->shared->u.compnd.memb[i].type, dst->shared->u.compnd.memb[src2dst[i]].type);
if(NULL == (priv->memb_path[i] = tpath)) {
- cdata->priv = H5T_conv_struct_free(priv);
+ cdata->priv = H5T__conv_struct_free(priv);
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unable to convert member datatype")
} /* end if */
} /* end if */
@@ -2053,7 +2053,7 @@ H5T_conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_conv_struct_init() */
+} /* end H5T__conv_struct_init() */
/*-------------------------------------------------------------------------
@@ -2160,7 +2160,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(H5T_COMPOUND != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype")
- if(H5T_conv_struct_init(src, dst, cdata) < 0)
+ if(H5T__conv_struct_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data")
break;
@@ -2168,7 +2168,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*
* Free the private conversion data.
*/
- cdata->priv = H5T_conv_struct_free(priv);
+ cdata->priv = H5T__conv_struct_free(priv);
break;
case H5T_CONV_CONV:
@@ -2180,7 +2180,7 @@ H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HDassert(priv);
HDassert(bkg && cdata->need_bkg);
- if(cdata->recalc && H5T_conv_struct_init(src, dst, cdata) < 0)
+ if(cdata->recalc && H5T__conv_struct_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data")
/*
@@ -2389,7 +2389,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_COMPOUND datatype")
/* Initialize data which is relatively constant */
- if(H5T_conv_struct_init(src, dst, cdata) < 0)
+ if(H5T__conv_struct_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data")
priv = (H5T_conv_struct_t *)(cdata->priv);
src2dst = priv->src2dst;
@@ -2422,7 +2422,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
if(dst_memb->size > src_memb->size) {
offset -= src_memb->size;
if(dst_memb->size > src->shared->size-offset) {
- cdata->priv = H5T_conv_struct_free(priv);
+ cdata->priv = H5T__conv_struct_free(priv);
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "conversion is unsupported by this function")
} /* end if */
} /* end if */
@@ -2434,7 +2434,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*
* Free the private conversion data.
*/
- cdata->priv = H5T_conv_struct_free((H5T_conv_struct_t *)(cdata->priv));
+ cdata->priv = H5T__conv_struct_free((H5T_conv_struct_t *)(cdata->priv));
break;
case H5T_CONV_CONV:
@@ -2445,7 +2445,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Update cached data if necessary */
- if(cdata->recalc && H5T_conv_struct_init(src, dst, cdata) < 0)
+ if(cdata->recalc && H5T__conv_struct_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data")
priv = (H5T_conv_struct_t *)(cdata->priv);
HDassert(priv);
@@ -2579,7 +2579,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_conv_enum_init
+ * Function: H5T__conv_enum_init
*
* Purpose: Initialize information for H5T__conv_enum().
*
@@ -2593,7 +2593,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
+H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
{
H5T_enum_struct_t *priv = NULL; /*private conversion data */
int n; /*src value cast as native int */
@@ -2603,7 +2603,7 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
unsigned i, j; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
cdata->need_bkg = H5T_BKG_NO;
if(NULL == (priv = (H5T_enum_struct_t *)(cdata->priv = H5MM_calloc(sizeof(*priv)))))
@@ -2766,7 +2766,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(H5T_ENUM != dst->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype")
- if(H5T_conv_enum_init(src, dst, cdata) < 0)
+ if(H5T__conv_enum_init(src, dst, cdata) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize private data")
break;
@@ -2794,7 +2794,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype")
/* priv->src2dst map was computed for certain sort keys. Make sure those same
- * sort keys are used here during conversion. See H5T_conv_enum_init(). But
+ * sort keys are used here during conversion. See H5T__conv_enum_init(). But
* we actually don't care about the source type's order when doing the O(1)
* conversion algorithm, which is turned on by non-zero priv->length */
H5T__sort_name(dst, NULL);
@@ -2831,7 +2831,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* (The casting won't work when the byte orders are different. i.g. if the source value
* is big-endian 0x0000000f, the direct casting "n = *((int*)s);" will make it a big
* number 0x0f000000 on little-endian machine. But we won't fix it because it's an
- * optimization code. Please also see the comment in the H5T_conv_enum_init() function.
+ * optimization code. Please also see the comment in the H5T__conv_enum_init() function.
* SLU - 2011/5/24)
*/
if(1 == src->shared->size)
@@ -3641,7 +3641,7 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(0 == (buf_size = src->shared->u.atomic.u.r.cls->getsize(
src->shared->u.atomic.u.r.file, s, src->shared->size,
dst->shared->u.atomic.u.r.file, &dst_copy)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "incorrect size")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to obtain size of reference")
/* Check if conversion buffer is large enough, resize if necessary. */
if(conv_buf_size < buf_size) {
@@ -3869,7 +3869,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} else if (first>=dst->shared->u.atomic.prec) {
/*overflow*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -3898,7 +3898,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (first+1 == src->shared->u.atomic.prec) {
/*overflow - source is negative*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -3918,7 +3918,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} else if (first>=dst->shared->u.atomic.prec) {
/*overflow - source is positive*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -3945,7 +3945,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (first+1 >= dst->shared->u.atomic.prec) {
/*overflow*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -3982,7 +3982,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (sfz>=0 && fz+1>=dst->shared->u.atomic.prec) {
/*overflow*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -4012,7 +4012,7 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (first+1>=dst->shared->u.atomic.prec) {
/*overflow*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
- H5T_reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src->shared->size, src->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id, src_rev, d,
cb_struct.user_data);
}
@@ -4293,7 +4293,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* +Inf or -Inf */
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
if(sign)
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_NINF,
src_id, dst_id, src_rev, d, cb_struct.user_data);
@@ -4332,7 +4332,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* +Inf or -Inf */
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
if(sign)
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_NINF,
src_id, dst_id, src_rev, d, cb_struct.user_data);
@@ -4371,7 +4371,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* NaN */
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_NAN,
src_id, dst_id, src_rev, d, cb_struct.user_data);
}
@@ -4490,7 +4490,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -4583,7 +4583,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -8696,7 +8696,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(sign) { /* -Infinity */
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_NINF,
src_id, dst_id, src_rev, d, cb_struct.user_data);
}
@@ -8713,7 +8713,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} else { /* +Infinity */
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_PINF,
src_id, dst_id, src_rev, d, cb_struct.user_data);
}
@@ -8742,7 +8742,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(sign) { /* -Infinity */
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_NINF,
src_id, dst_id, src_rev, d, cb_struct.user_data);
}
@@ -8759,7 +8759,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} else { /* +Infinity */
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_PINF,
src_id, dst_id, src_rev, d, cb_struct.user_data);
}
@@ -8782,7 +8782,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* NaN */
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_NAN,
src_id, dst_id, src_rev, d, cb_struct.user_data);
}
@@ -8878,7 +8878,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(sign) { /*source is negative*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW,
src_id, dst_id, src_rev, d, cb_struct.user_data);
if(except_ret == H5T_CONV_ABORT)
@@ -8894,7 +8894,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*overflow*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI,
src_id, dst_id, src_rev, d, cb_struct.user_data);
}
@@ -8910,7 +8910,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} else if (first <dst.prec) {
if(truncated && cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_TRUNCATE,
src_id, dst_id, src_rev, d, cb_struct.user_data);
}
@@ -8931,7 +8931,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(first < dst.prec-1) {
if(truncated && cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_TRUNCATE,
src_id, dst_id, src_rev, d, cb_struct.user_data);
}
@@ -8957,7 +8957,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW,
src_id, dst_id, src_rev, d, cb_struct.user_data);
}
@@ -8977,7 +8977,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*overflow*/
if(cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI,
src_id, dst_id, src_rev, d, cb_struct.user_data);
}
@@ -8994,7 +8994,7 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} else if(first < dst.prec-1) {
if(truncated && cb_struct.func) { /*If user's exception handler is present, use it*/
/*reverse order first*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order);
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_TRUNCATE,
src_id, dst_id, src_rev, d, cb_struct.user_data);
}
@@ -9316,7 +9316,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
* precision loss. Let user's handler deal with the case if it's present
*/
if(cb_struct.func) {
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_PRECISION, src_id, dst_id,
src_rev, d, cb_struct.user_data);
}
@@ -9384,7 +9384,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(expo > expo_max) { /*overflows*/
if(cb_struct.func) { /*user's exception handler. Reverse back source order*/
- H5T_reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order); /*reverse order first*/
+ H5T__reverse_order(src_rev, s, src_p->shared->size, src_p->shared->u.atomic.order); /*reverse order first*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id,
src_rev, d, cb_struct.user_data);
@@ -9486,7 +9486,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_reverse_order
+ * Function: H5T__reverse_order
*
* Purpose: Internal assisting function to reverse the order of
* a sequence of byte when it's big endian or VAX order.
@@ -9502,11 +9502,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order)
+H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order)
{
size_t i;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(s);
HDassert(size);
@@ -9595,13 +9595,13 @@ H5T_reclaim_cb(void *elem, const H5T_t *dt, unsigned H5_ATTR_UNUSED ndim,
HDassert(dt);
if(dt->shared->type == H5T_REFERENCE) {
- if(H5T_ref_reclaim(elem, dt) < 0)
+ if(H5T__ref_reclaim(elem, dt) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't reclaim ref elements")
} else {
HDassert(op_data);
/* Allow vlen reclaim to recurse into that routine */
- if(H5T_vlen_reclaim(elem, dt, (H5T_vlen_alloc_info_t *)op_data) < 0)
+ if(H5T__vlen_reclaim(elem, dt, (H5T_vlen_alloc_info_t *)op_data) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't reclaim vlen elements")
}
diff --git a/src/H5Tcset.c b/src/H5Tcset.c
index 186e598..5ac2a62 100644
--- a/src/H5Tcset.c
+++ b/src/H5Tcset.c
@@ -39,10 +39,6 @@
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works for derived data types.
- *
*-------------------------------------------------------------------------
*/
H5T_cset_t
@@ -85,10 +81,6 @@ done:
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived data types.
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index 2c98dc0..3823e47 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -15,7 +15,7 @@
*
* Created: H5Tdeprec.c
* April 5 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Deprecated functions from the H5T interface. These
* functions are here for compatibility purposes and may be
diff --git a/src/H5Tenum.c b/src/H5Tenum.c
index 6daa497..cd41a23 100644
--- a/src/H5Tenum.c
+++ b/src/H5Tenum.c
@@ -26,9 +26,9 @@
#include "H5Tpkg.h" /*data-type functions */
/* Static local functions */
-static char *H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/,
+static char *H5T__enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/,
size_t size);
-static herr_t H5T_enum_valueof(const H5T_t *dt, const char *name,
+static herr_t H5T__enum_valueof(const H5T_t *dt, const char *name,
void *value/*out*/);
@@ -89,8 +89,6 @@ done:
* Programmer: Raymond Lu
* October 9, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
H5T_t *
@@ -132,8 +130,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, December 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -179,8 +175,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, December 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -243,8 +237,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, December 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -286,8 +278,6 @@ done:
* Programmer: Raymond Lu
* October 9, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -323,8 +313,6 @@ H5T__get_member_value(const H5T_t *dt, unsigned membno, void *value/*out*/)
* Programmer: Robb Matzke
* Monday, January 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -346,7 +334,7 @@ H5Tenum_nameof(hid_t type, const void *value, char *name/*out*/, size_t size)
if (!name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name buffer supplied")
- if (NULL==H5T_enum_nameof(dt, value, name, size))
+ if (NULL==H5T__enum_nameof(dt, value, name, size))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "nameof query failed")
done:
@@ -355,7 +343,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_enum_nameof
+ * Function: H5T__enum_nameof
*
* Purpose: Finds the symbol name that corresponds the the specified
* VALUE of an enumeration data type DT. At most SIZE characters
@@ -375,15 +363,10 @@ done:
* Programmer: Robb Matzke
* Monday, January 4, 1999
*
- * Modifications:
- * Raymond Lu
- * Wednesday, Febuary 9, 2005
- * Made a copy of original datatype and do sorting and search
- * on that copy, to protect the original order of members.
*-------------------------------------------------------------------------
*/
static char *
-H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t size)
+H5T__enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t size)
{
H5T_t *copied_dt = NULL; /* Do sorting in copied datatype */
unsigned lt, md = 0, rt; /* Indices for binary search */
@@ -391,7 +374,7 @@ H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t si
hbool_t alloc_name = FALSE; /* Whether name has been allocated */
char *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(dt && H5T_ENUM == dt->shared->type);
@@ -431,8 +414,7 @@ H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t si
/* Save result name */
if(!name) {
- if(NULL == (name = (char *)H5MM_malloc(
- HDstrlen(copied_dt->shared->u.enumer.name[md]) + 1)))
+ if(NULL == (name = (char *)H5MM_malloc(HDstrlen(copied_dt->shared->u.enumer.name[md]) + 1)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
alloc_name = TRUE;
} /* end if */
@@ -451,7 +433,7 @@ done:
H5MM_free(name);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_enum_nameof() */
+} /* end H5T__enum_nameof() */
/*-------------------------------------------------------------------------
@@ -469,11 +451,6 @@ done:
* Programmer: Robb Matzke
* Monday, January 4, 1999
*
- * Modifications:
- * Raymond Lu
- * Wednesday, Febuary 9, 2005
- * Made a copy of original datatype and do sorting and search
- * on that copy, to protect the original order of members.
*-------------------------------------------------------------------------
*/
herr_t
@@ -495,7 +472,7 @@ H5Tenum_valueof(hid_t type, const char *name, void *value/*out*/)
if(!value)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no value buffer")
- if(H5T_enum_valueof(dt, name, value) < 0)
+ if(H5T__enum_valueof(dt, name, value) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "valueof query failed")
done:
@@ -504,7 +481,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_enum_valueof
+ * Function: H5T__enum_valueof
*
* Purpose: Finds the value that corresponds the the specified symbol
* NAME of an enumeration data type DT and copy it to the VALUE
@@ -518,22 +495,17 @@ done:
* Programmer: Robb Matzke
* Monday, January 4, 1999
*
- * Modifications:
- * Raymond Lu
- * Wednesday, Febuary 9, 2005
- * Made a copy of original datatype and do sorting and search
- * on that copy, to protect the original order of members.
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_enum_valueof(const H5T_t *dt, const char *name, void *value/*out*/)
+H5T__enum_valueof(const H5T_t *dt, const char *name, void *value/*out*/)
{
unsigned lt, md=0, rt; /*indices for binary search */
int cmp=(-1); /*comparison result */
H5T_t *copied_dt = NULL; /*do sorting in copied datatype */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(dt && H5T_ENUM==dt->shared->type);
diff --git a/src/H5Tfields.c b/src/H5Tfields.c
index be0b5f2..8f5e202 100644
--- a/src/H5Tfields.c
+++ b/src/H5Tfields.c
@@ -41,9 +41,6 @@
* Programmer: Robb Matzke
* Monday, December 8, 1997
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with enumeration datatypes.
*-------------------------------------------------------------------------
*/
int
@@ -83,8 +80,6 @@ done:
* Programmer: Raymond Lu
* October 8, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
@@ -124,9 +119,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with enumeration datatypes.
*-------------------------------------------------------------------------
*/
char *
@@ -166,7 +158,6 @@ done:
* Programmer: Raymond Lu
* October 9, 2002
*
- * Modifications:
*-------------------------------------------------------------------------
*/
char *
@@ -225,8 +216,6 @@ done:
* Programmer: Raymond Lu
* Thursday, April 4, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
@@ -394,8 +383,6 @@ H5T__sort_value(const H5T_t *dt, int *map)
* Programmer: Robb Matzke
* Monday, January 4, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c
index bc1d84d..5270a9a 100644
--- a/src/H5Tfixed.c
+++ b/src/H5Tfixed.c
@@ -37,9 +37,6 @@
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived datatypes.
*-------------------------------------------------------------------------
*/
H5T_sign_t
@@ -75,8 +72,6 @@ done:
* Programmer: Raymond Lu
* October 8, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
H5T_sign_t
@@ -115,10 +110,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived datatypes.
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Tfloat.c b/src/H5Tfloat.c
index 85e8f30..0d224db 100644
--- a/src/H5Tfloat.c
+++ b/src/H5Tfloat.c
@@ -194,10 +194,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived datatypes.
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Tmodule.h b/src/H5Tmodule.h
index d2ab08c..f8f57ac 100644
--- a/src/H5Tmodule.h
+++ b/src/H5Tmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Toffset.c b/src/H5Toffset.c
index c0e94fc..38c7e53 100644
--- a/src/H5Toffset.c
+++ b/src/H5Toffset.c
@@ -25,7 +25,7 @@
#include "H5Tpkg.h" /* Datatypes */
/* Static local functions */
-static herr_t H5T_set_offset(const H5T_t *dt, size_t offset);
+static herr_t H5T__set_offset(const H5T_t *dt, size_t offset);
@@ -163,10 +163,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Moved real work to a private function.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -191,7 +187,7 @@ H5Tset_offset(hid_t type_id, size_t offset)
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for this datatype")
/* Do the real work */
- if (H5T_set_offset(dt, offset)<0)
+ if (H5T__set_offset(dt, offset)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set offset")
done:
@@ -200,7 +196,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_set_offset
+ * Function: H5T__set_offset
*
* Purpose: Sets the bit offset of the first significant bit. The
* significant bits of an atomic datum can be offset from the
@@ -232,18 +228,14 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works for derived data types.
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_set_offset(const H5T_t *dt, size_t offset)
+H5T__set_offset(const H5T_t *dt, size_t offset)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(dt);
@@ -254,7 +246,7 @@ H5T_set_offset(const H5T_t *dt, size_t offset)
HDassert(!(H5T_ENUM==dt->shared->type && 0==dt->shared->u.enumer.nmembs));
if (dt->shared->parent) {
- if (H5T_set_offset(dt->shared->parent, offset)<0)
+ if (H5T__set_offset(dt->shared->parent, offset)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set offset for base type")
/* Adjust size of datatype appropriately */
diff --git a/src/H5Topaque.c b/src/H5Topaque.c
index 4e8f1d4..f7ce977 100644
--- a/src/H5Topaque.c
+++ b/src/H5Topaque.c
@@ -37,8 +37,6 @@
* Programmer: Robb Matzke
* Thursday, May 20, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -84,8 +82,6 @@ done:
* Programmer: Robb Matzke
* Thursday, May 20, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
char *
diff --git a/src/H5Torder.c b/src/H5Torder.c
index b4babfa..7784c1d 100644
--- a/src/H5Torder.c
+++ b/src/H5Torder.c
@@ -50,7 +50,7 @@
/********************/
/* Local Prototypes */
/********************/
-static herr_t H5T_set_order(H5T_t *dtype, H5T_order_t order);
+static herr_t H5T__set_order(H5T_t *dtype, H5T_order_t order);
/*********************/
@@ -216,7 +216,7 @@ H5Tset_order(hid_t type_id, H5T_order_t order)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype is read-only")
/* Call internal routine to set the order */
- if(H5T_set_order(dt, order) < 0)
+ if(H5T__set_order(dt, order) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "can't set order")
done:
@@ -225,7 +225,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_set_order
+ * Function: H5T__set_order
*
* Purpose: Private function to set the byte order for a datatype.
*
@@ -237,11 +237,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_set_order(H5T_t *dtype, H5T_order_t order)
+H5T__set_order(H5T_t *dtype, H5T_order_t order)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
if(H5T_ENUM == dtype->shared->type && dtype->shared->u.enumer.nmembs > 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "operation not allowed after enum members are defined")
@@ -274,12 +274,12 @@ H5T_set_order(H5T_t *dtype, H5T_order_t order)
/* Loop through all fields of compound type, setting the order */
for(i = 0; i < nmemb; i++)
- if(H5T_set_order(dtype->shared->u.compnd.memb[i].type, order) < 0)
+ if(H5T__set_order(dtype->shared->u.compnd.memb[i].type, order) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set order for compound member")
} /* end if */
} /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_set_order() */
+} /* end H5T__set_order() */
diff --git a/src/H5Tpad.c b/src/H5Tpad.c
index c96f42a..450c567 100644
--- a/src/H5Tpad.c
+++ b/src/H5Tpad.c
@@ -38,10 +38,6 @@
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived data types.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -82,10 +78,6 @@ done:
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived data types.
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 3eaec8c..1766c3f 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, December 8, 1997
*
* Purpose: This file contains declarations which are visible only within
@@ -1179,6 +1179,7 @@ H5_DLL void H5T__bit_neg(uint8_t *buf, size_t start, size_t size);
/* VL functions */
H5_DLL H5T_t * H5T__vlen_create(const H5T_t *base);
+H5_DLL herr_t H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info);
H5_DLL htri_t H5T__vlen_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc);
/* Array functions */
@@ -1187,6 +1188,7 @@ H5_DLL int H5T__get_array_ndims(const H5T_t *dt);
H5_DLL int H5T__get_array_dims(const H5T_t *dt, hsize_t dims[]);
/* Reference functions */
+H5_DLL herr_t H5T__ref_reclaim(void *elem, const H5T_t *dt);
H5_DLL htri_t H5T__ref_set_loc(const H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc);
/* Compound functions */
diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c
index bd28fc2..9366332 100644
--- a/src/H5Tprecis.c
+++ b/src/H5Tprecis.c
@@ -25,7 +25,7 @@
#include "H5Tpkg.h" /* Datatypes */
/* Static local functions */
-static herr_t H5T_set_precision(const H5T_t *dt, size_t prec);
+static herr_t H5T__set_precision(const H5T_t *dt, size_t prec);
@@ -45,10 +45,6 @@ static herr_t H5T_set_precision(const H5T_t *dt, size_t prec);
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works for derived datatypes.
- *
*-------------------------------------------------------------------------
*/
size_t
@@ -134,10 +130,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Moved real work to a private function.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -166,7 +158,7 @@ H5Tset_precision(hid_t type_id, size_t prec)
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified datatype")
/* Do the work */
- if (H5T_set_precision(dt, prec)<0)
+ if (H5T__set_precision(dt, prec)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision")
done:
@@ -175,7 +167,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_set_precision
+ * Function: H5T__set_precision
*
* Purpose: Sets the precision of a datatype. The precision is
* the number of significant bits which, unless padding is
@@ -197,19 +189,15 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works for derived datatypes.
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_set_precision(const H5T_t *dt, size_t prec)
+H5T__set_precision(const H5T_t *dt, size_t prec)
{
size_t offset, size;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Check args */
HDassert(dt);
@@ -220,7 +208,7 @@ H5T_set_precision(const H5T_t *dt, size_t prec)
HDassert(!(H5T_ENUM==dt->shared->type && 0==dt->shared->u.enumer.nmembs));
if (dt->shared->parent) {
- if (H5T_set_precision(dt->shared->parent, prec)<0)
+ if (H5T__set_precision(dt->shared->parent, prec)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "unable to set precision for base type")
/* Adjust size of datatype appropriately */
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index e05bb4e..490ffb5 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -135,8 +135,6 @@ H5_DLL herr_t H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id,
size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg);
H5_DLL herr_t H5T_reclaim(hid_t type_id, struct H5S_t *space, void *buf);
H5_DLL herr_t H5T_reclaim_cb(void *elem, const H5T_t *dt, unsigned ndim, const hsize_t *point, void *op_data);
-H5_DLL herr_t H5T_ref_reclaim(void *elem, const H5T_t *dt);
-H5_DLL herr_t H5T_vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info);
H5_DLL herr_t H5T_vlen_reclaim_elmt(void *elem, H5T_t *dt);
H5_DLL htri_t H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc);
H5_DLL htri_t H5T_is_sensible(const H5T_t *dt);
diff --git a/src/H5Tref.c b/src/H5Tref.c
index 42e3da2..44f61c0 100644
--- a/src/H5Tref.c
+++ b/src/H5Tref.c
@@ -1237,7 +1237,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_ref_reclaim
+ * Function: H5T__ref_reclaim
*
* Purpose: Internal routine to free reference datatypes
*
@@ -1246,11 +1246,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5T_ref_reclaim(void *elem, const H5T_t *dt)
+H5T__ref_reclaim(void *elem, const H5T_t *dt)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
H5T_REF_LOG_DEBUG("");
/* Sanity checks */
@@ -1262,5 +1262,5 @@ H5T_ref_reclaim(void *elem, const H5T_t *dt)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_ref_reclaim() */
+} /* end H5T__ref_reclaim() */
diff --git a/src/H5Tstrpad.c b/src/H5Tstrpad.c
index fa084f1..35de30b 100644
--- a/src/H5Tstrpad.c
+++ b/src/H5Tstrpad.c
@@ -41,10 +41,6 @@
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works for derived datatypes.
- *
*-------------------------------------------------------------------------
*/
H5T_str_t
@@ -98,10 +94,6 @@ done:
* Programmer: Robb Matzke
* Friday, January 9, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works for derived datatypes.
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5Tvisit.c b/src/H5Tvisit.c
index c706dee..00c7d8f 100644
--- a/src/H5Tvisit.c
+++ b/src/H5Tvisit.c
@@ -22,7 +22,7 @@
*
* Created: H5Tvisit.c
* Jul 19 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Visit all the components of a datatype
*
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 9d098c6..f185c2f 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -1037,7 +1037,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_vlen_reclaim
+ * Function: H5T__vlen_reclaim
*
* Purpose: Internal recursive routine to free VL datatypes
*
@@ -1049,7 +1049,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5T_vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info)
+H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info)
{
unsigned u; /* Local index variable */
H5MM_free_t free_func; /* Free function */
@@ -1156,7 +1156,7 @@ H5T_vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5T_vlen_reclaim() */
+} /* end H5T__vlen_reclaim() */
/*-------------------------------------------------------------------------
@@ -1191,7 +1191,7 @@ H5T_vlen_reclaim_elmt(void *elem, H5T_t *dt)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info")
/* Recurse on buffer to free dynamic fields */
- if(H5T_vlen_reclaim(elem, dt, &vl_alloc_info) < 0)
+ if(H5T__vlen_reclaim(elem, dt, &vl_alloc_info) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't reclaim vlen elements")
done:
diff --git a/src/H5VLnative_link.c b/src/H5VLnative_link.c
index ceb8d61..48bd2d8 100644
--- a/src/H5VLnative_link.c
+++ b/src/H5VLnative_link.c
@@ -75,7 +75,7 @@ H5VL__native_link_create(H5VL_link_create_type_t create_type, void *obj,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should be in the same file.")
/* Create the link */
- if((ret_value = H5L_create_hard(cur_loc_p, cur_params->loc_data.loc_by_name.name,
+ if((ret_value = H5L__create_hard(cur_loc_p, cur_params->loc_data.loc_by_name.name,
link_loc_p, loc_params->loc_data.loc_by_name.name, lcpl_id)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
} /* end if */
@@ -96,7 +96,7 @@ H5VL__native_link_create(H5VL_link_create_type_t create_type, void *obj,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
/* Create the link */
- if((ret_value = H5L_create_soft(target_name, &link_loc, loc_params->loc_data.loc_by_name.name, lcpl_id)) < 0)
+ if((ret_value = H5L__create_soft(target_name, &link_loc, loc_params->loc_data.loc_by_name.name, lcpl_id)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
break;
}
@@ -161,7 +161,7 @@ H5VL__native_link_copy(void *src_obj, const H5VL_loc_params_t *loc_params1,
dst_loc_p = src_loc_p;
/* Copy the link */
- if(H5L_move(src_loc_p, loc_params1->loc_data.loc_by_name.name,
+ if(H5L__move(src_loc_p, loc_params1->loc_data.loc_by_name.name,
dst_loc_p, loc_params2->loc_data.loc_by_name.name,
TRUE, lcpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy link")
@@ -206,7 +206,7 @@ H5VL__native_link_move(void *src_obj, const H5VL_loc_params_t *loc_params1,
dst_loc_p = src_loc_p;
/* Move the link */
- if(H5L_move(src_loc_p, loc_params1->loc_data.loc_by_name.name,
+ if(H5L__move(src_loc_p, loc_params1->loc_data.loc_by_name.name,
dst_loc_p, loc_params2->loc_data.loc_by_name.name,
FALSE, lcpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link")
@@ -249,7 +249,7 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info")
} /* end if */
else if(loc_params->type == H5VL_OBJECT_BY_IDX) { /* H5Lget_info_by_idx */
- if(H5L_get_info_by_idx(&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
+ if(H5L__get_info_by_idx(&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n, linfo2) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info")
} /* end else-if */
@@ -267,7 +267,7 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_
ssize_t *ret = HDva_arg(arguments, ssize_t *);
/* Get the link name */
- if((*ret = H5L_get_name_by_idx(&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
+ if((*ret = H5L__get_name_by_idx(&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n, name, size)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info")
@@ -282,12 +282,12 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_
/* Get the link information */
if(loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Lget_val */
- if(H5L_get_val(&loc, loc_params->loc_data.loc_by_name.name, buf, size) < 0)
+ if(H5L__get_val(&loc, loc_params->loc_data.loc_by_name.name, buf, size) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link value")
}
else if(loc_params->type == H5VL_OBJECT_BY_IDX) { /* H5Lget_val_by_idx */
- if(H5L_get_val_by_idx(&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
+ if(H5L__get_val_by_idx(&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n, buf, size) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link val")
}
@@ -333,7 +333,7 @@ H5VL__native_link_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
/* Check for the existence of the link */
- if((*ret = H5L_exists(&loc, loc_params->loc_data.loc_by_name.name)) < 0)
+ if((*ret = H5L__exists(&loc, loc_params->loc_data.loc_by_name.name)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to specific link info")
break;
}
@@ -392,11 +392,11 @@ H5VL__native_link_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
/* Unlink */
if(loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Ldelete */
- if(H5L_delete(&loc, loc_params->loc_data.loc_by_name.name) < 0)
+ if(H5L__delete(&loc, loc_params->loc_data.loc_by_name.name) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link")
} /* end if */
else if(loc_params->type == H5VL_OBJECT_BY_IDX) { /* H5Ldelete_by_idx */
- if(H5L_delete_by_idx(&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
+ if(H5L__delete_by_idx(&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link")
} /* end else-if */
diff --git a/src/H5VLnative_object.c b/src/H5VLnative_object.c
index 8f60ac4..bfbbee0 100644
--- a/src/H5VLnative_object.c
+++ b/src/H5VLnative_object.c
@@ -64,7 +64,7 @@ H5VL__native_object_open(void *obj, const H5VL_loc_params_t *loc_params, H5I_typ
case H5VL_OBJECT_BY_IDX:
{
/* Open the object */
- if(NULL == (ret_value = H5O_open_by_idx(&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
+ if(NULL == (ret_value = H5O__open_by_idx(&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
loc_params->loc_data.loc_by_idx.order, loc_params->loc_data.loc_by_idx.n, opened_type)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object by index")
break;
@@ -80,7 +80,7 @@ H5VL__native_object_open(void *obj, const H5VL_loc_params_t *loc_params, H5I_typ
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNSERIALIZE, NULL, "can't deserialize object token into address")
/* Open the object */
- if(NULL == (ret_value = H5O_open_by_addr(&loc, addr, opened_type)))
+ if(NULL == (ret_value = H5O__open_by_addr(&loc, addr, opened_type)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open object by address")
break;
}
@@ -122,8 +122,8 @@ H5VL__native_object_copy(void *src_obj, const H5VL_loc_params_t *loc_params1, co
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
/* Copy the object */
- if((ret_value = H5O_copy(&src_loc, src_name, &dst_loc, dst_name, ocpypl_id, lcpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, FAIL, "unable to copy object")
+ if((ret_value = H5O__copy(&src_loc, src_name, &dst_loc, dst_name, ocpypl_id, lcpl_id)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5VM.c b/src/H5VM.c
index d12bea6..7be8eab 100644
--- a/src/H5VM.c
+++ b/src/H5VM.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, October 10, 1997
*/
@@ -34,21 +34,21 @@ typedef struct H5VM_memcpy_ud_t {
/* Local prototypes */
static void
-H5VM_stride_optimize1(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
+H5VM__stride_optimize1(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
const hsize_t *size, hsize_t *stride1);
static void
-H5VM_stride_optimize2(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
+H5VM__stride_optimize2(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
const hsize_t *size, hsize_t *stride1, hsize_t *stride2);
#ifdef LATER
static void
-H5VM_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
+H5VM__stride_copy2(hsize_t nelmts, hsize_t elmt_size,
unsigned dst_n, const hsize_t *dst_size, const ssize_t *dst_stride, void *_dst,
unsigned src_n, const hsize_t *src_size, const ssize_t *src_stride, const void *_src);
#endif /* LATER */
/*-------------------------------------------------------------------------
- * Function: H5VM_stride_optimize1
+ * Function: H5VM__stride_optimize1
*
* Purpose: Given a stride vector which references elements of the
* specified size, optimize the dimensionality, the stride
@@ -63,15 +63,13 @@ H5VM_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
* Programmer: Robb Matzke
* Saturday, October 11, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
-H5VM_stride_optimize1(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
+H5VM__stride_optimize1(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
const hsize_t *size, hsize_t *stride1)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/*
* This has to be true because if we optimize the dimensionality down to
@@ -94,7 +92,7 @@ H5VM_stride_optimize1(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
/*-------------------------------------------------------------------------
- * Function: H5VM_stride_optimize2
+ * Function: H5VM__stride_optimize2
*
* Purpose: Given two stride vectors which reference elements of the
* specified size, optimize the dimensionality, the stride
@@ -109,18 +107,13 @@ H5VM_stride_optimize1(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
* Programmer: Robb Matzke
* Saturday, October 11, 1997
*
- * Modifications:
- * Unrolled loops for common cases
- * Quincey Koziol
- * ?, ? ?, 2001?
- *
*-------------------------------------------------------------------------
*/
static void
-H5VM_stride_optimize2(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
+H5VM__stride_optimize2(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
const hsize_t *size, hsize_t *stride1, hsize_t *stride2)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/*
* This has to be true because if we optimize the dimensionality down to
@@ -247,11 +240,6 @@ H5VM_stride_optimize2(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
* Programmer: Robb Matzke
* Saturday, October 11, 1997
*
- * Modifications:
- * Unrolled loops for common cases
- * Quincey Koziol
- * ?, ? ?, 2001?
- *
*-------------------------------------------------------------------------
*/
hsize_t
@@ -350,8 +338,6 @@ H5VM_hyper_stride(unsigned n, const hsize_t *size,
* Programmer: Robb Matzke
* Friday, October 17, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
htri_t
@@ -401,8 +387,6 @@ done:
* Programmer: Robb Matzke
* Friday, October 10, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -439,7 +423,7 @@ H5VM_hyper_fill(unsigned n, const hsize_t *_size,
/* Compute an optimal destination stride vector */
dst_start = H5VM_hyper_stride(n, size, total_size, offset, dst_stride);
- H5VM_stride_optimize1(&n, &elmt_size, size, dst_stride);
+ H5VM__stride_optimize1(&n, &elmt_size, size, dst_stride);
/* Copy */
ret_value = H5VM_stride_fill(n, elmt_size, size, dst_stride, dst+dst_start,
@@ -476,11 +460,6 @@ H5VM_hyper_fill(unsigned n, const hsize_t *_size,
* Programmer: Robb Matzke
* Friday, October 10, 1997
*
- * Modifications:
- * Unrolled loops for common cases
- * Quincey Koziol
- * ?, ? ?, 2001?
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -624,7 +603,7 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size,
#endif /* NO_INLINED_CODE */
/* Optimize the strides as a pair */
- H5VM_stride_optimize2(&n, &elmt_size, size, dst_stride, src_stride);
+ H5VM__stride_optimize2(&n, &elmt_size, size, dst_stride, src_stride);
/* Perform the copy in terms of stride */
ret_value = H5VM_stride_copy(n, elmt_size, size,
@@ -645,8 +624,6 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size,
* Programmer: Robb Matzke
* Saturday, October 11, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -705,8 +682,6 @@ H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size,
* Programmer: Robb Matzke
* Saturday, October 11, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -774,8 +749,6 @@ H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size,
* Programmer: Robb Matzke
* Saturday, October 11, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -828,7 +801,7 @@ H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *size,
#ifdef LATER
/*-------------------------------------------------------------------------
- * Function: H5VM_stride_copy2
+ * Function: H5VM__stride_copy2
*
* Purpose: Similar to H5VM_stride_copy() except the source and
* destination each have their own dimensionality and size and
@@ -840,12 +813,10 @@ H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *size,
* Programmer: Robb Matzke
* Saturday, October 11, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
-H5VM_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
+H5VM__stride_copy2(hsize_t nelmts, hsize_t elmt_size,
/* destination */
unsigned dst_n, const hsize_t *dst_size,
@@ -865,7 +836,7 @@ H5VM_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
int j; /* Local index variable */
hbool_t carry;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(elmt_size < SIZET_MAX);
HDassert(dst_n>0);
@@ -918,8 +889,6 @@ H5VM_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
* Programmer: Quincey Koziol
* Thursday, June 18, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -975,8 +944,6 @@ H5VM_array_fill(void *_dst, const void *src, size_t size, size_t count)
* Programmer: Quincey Koziol
* Monday, April 28, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1056,8 +1023,6 @@ H5VM_array_offset_pre(unsigned n, const hsize_t *acc, const hsize_t *offset)
* Programmer: Quincey Koziol
* Tuesday, June 22, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
hsize_t
@@ -1140,8 +1105,6 @@ H5VM_array_calc_pre(hsize_t offset, unsigned n, const hsize_t *down,
* Programmer: Quincey Koziol
* Wednesday, April 16, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h
index 26f59e2..e784847 100644
--- a/src/H5VMprivate.h
+++ b/src/H5VMprivate.h
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, October 10, 1997
*/
#ifndef H5VMprivate_H
@@ -28,16 +28,16 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off,
size_t len, void *udata);
/* Vector comparison functions like Fortran66 comparison operators */
-#define H5VM_vector_eq_s(N,V1,V2) (H5VM_vector_cmp_s (N, V1, V2)==0)
-#define H5VM_vector_lt_s(N,V1,V2) (H5VM_vector_cmp_s (N, V1, V2)<0)
-#define H5VM_vector_gt_s(N,V1,V2) (H5VM_vector_cmp_s (N, V1, V2)>0)
-#define H5VM_vector_le_s(N,V1,V2) (H5VM_vector_cmp_s (N, V1, V2)<=0)
-#define H5VM_vector_ge_s(N,V1,V2) (H5VM_vector_cmp_s (N, V1, V2)>=0)
-#define H5VM_vector_eq_u(N,V1,V2) (H5VM_vector_cmp_u (N, V1, V2)==0)
-#define H5VM_vector_lt_u(N,V1,V2) (H5VM_vector_cmp_u (N, V1, V2)<0)
-#define H5VM_vector_gt_u(N,V1,V2) (H5VM_vector_cmp_u (N, V1, V2)>0)
-#define H5VM_vector_le_u(N,V1,V2) (H5VM_vector_cmp_u (N, V1, V2)<=0)
-#define H5VM_vector_ge_u(N,V1,V2) (H5VM_vector_cmp_u (N, V1, V2)>=0)
+#define H5VM_vector_eq_s(N,V1,V2) (H5VM_vector_cmp_s(N, V1, V2) == 0)
+#define H5VM_vector_lt_s(N,V1,V2) (H5VM_vector_cmp_s(N, V1, V2) < 0)
+#define H5VM_vector_gt_s(N,V1,V2) (H5VM_vector_cmp_s(N, V1, V2) > 0)
+#define H5VM_vector_le_s(N,V1,V2) (H5VM_vector_cmp_s(N, V1, V2) <= 0)
+#define H5VM_vector_ge_s(N,V1,V2) (H5VM_vector_cmp_s(N, V1, V2) >= 0)
+#define H5VM_vector_eq_u(N,V1,V2) (H5VM_vector_cmp_u(N, V1, V2) == 0)
+#define H5VM_vector_lt_u(N,V1,V2) (H5VM_vector_cmp_u(N, V1, V2) < 0)
+#define H5VM_vector_gt_u(N,V1,V2) (H5VM_vector_cmp_u(N, V1, V2) > 0)
+#define H5VM_vector_le_u(N,V1,V2) (H5VM_vector_cmp_u(N, V1, V2) <= 0)
+#define H5VM_vector_ge_u(N,V1,V2) (H5VM_vector_cmp_u(N, V1, V2) >= 0)
/* Other functions */
#define H5VM_vector_cpy(N,DST,SRC) { \
@@ -146,6 +146,10 @@ H5_DLL ssize_t H5VM_memcpyvv(void *_dst,
* elements in an array and array dimensions are always of type
* size_t.
*
+ * Note: Although this routine is 'static' in this file, that's intended
+ * only as an optimization and the naming (with a single underscore)
+ * reflects its inclusion in a "private" header file.
+ *
* Return: Success: Product of elements
*
* Failure: 1 if N is zero
@@ -153,8 +157,6 @@ H5_DLL ssize_t H5VM_memcpyvv(void *_dst,
* Programmer: Robb Matzke
* Friday, October 10, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5_INLINE hsize_t H5_ATTR_UNUSED
@@ -162,8 +164,8 @@ H5VM_vector_reduce_product(unsigned n, const hsize_t *v)
{
hsize_t ret_value = 1;
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Use FUNC_ENTER_STATIC_NOERR here to avoid performance issues */
+ FUNC_ENTER_STATIC_NOERR
if (n && !v) HGOTO_DONE(0)
while (n--) ret_value *= *v++;
@@ -177,6 +179,10 @@ done:
*
* Purpose: Determines if all elements of a vector are zero.
*
+ * Note: Although this routine is 'static' in this file, that's intended
+ * only as an optimization and the naming (with a single underscore)
+ * reflects its inclusion in a "private" header file.
+ *
* Return: Success: TRUE if all elements are zero,
* FALSE otherwise
*
@@ -185,8 +191,6 @@ done:
* Programmer: Robb Matzke
* Friday, October 10, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5_INLINE htri_t H5_ATTR_UNUSED
@@ -194,8 +198,8 @@ H5VM_vector_zerop_u(int n, const hsize_t *v)
{
htri_t ret_value=TRUE; /* Return value */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Use FUNC_ENTER_STATIC_NOERR here to avoid performance issues */
+ FUNC_ENTER_STATIC_NOERR
if (!v)
HGOTO_DONE(TRUE)
@@ -212,6 +216,10 @@ done:
*
* Purpose: Determines if all elements of a vector are zero.
*
+ * Note: Although this routine is 'static' in this file, that's intended
+ * only as an optimization and the naming (with a single underscore)
+ * reflects its inclusion in a "private" header file.
+ *
* Return: Success: TRUE if all elements are zero,
* FALSE otherwise
*
@@ -220,8 +228,6 @@ done:
* Programmer: Robb Matzke
* Friday, October 10, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5_INLINE htri_t H5_ATTR_UNUSED
@@ -229,8 +235,8 @@ H5VM_vector_zerop_s(int n, const hssize_t *v)
{
htri_t ret_value=TRUE; /* Return value */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Use FUNC_ENTER_STATIC_NOERR here to avoid performance issues */
+ FUNC_ENTER_STATIC_NOERR
if (!v)
HGOTO_DONE(TRUE)
@@ -248,6 +254,10 @@ done:
* Purpose: Compares two vectors of the same size and determines if V1 is
* lexicographically less than, equal, or greater than V2.
*
+ * Note: Although this routine is 'static' in this file, that's intended
+ * only as an optimization and the naming (with a single underscore)
+ * reflects its inclusion in a "private" header file.
+ *
* Return: Success: -1 if V1 is less than V2
* 0 if they are equal
* 1 if V1 is greater than V2
@@ -257,17 +267,15 @@ done:
* Programmer: Robb Matzke
* Friday, October 10, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5_INLINE int H5_ATTR_UNUSED
-H5VM_vector_cmp_u (unsigned n, const hsize_t *v1, const hsize_t *v2)
+H5VM_vector_cmp_u(unsigned n, const hsize_t *v1, const hsize_t *v2)
{
int ret_value=0; /* Return value */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Use FUNC_ENTER_STATIC_NOERR here to avoid performance issues */
+ FUNC_ENTER_STATIC_NOERR
if (v1 == v2) HGOTO_DONE(0)
if (v1 == NULL) HGOTO_DONE(-1)
@@ -290,6 +298,10 @@ done:
* Purpose: Compares two vectors of the same size and determines if V1 is
* lexicographically less than, equal, or greater than V2.
*
+ * Note: Although this routine is 'static' in this file, that's intended
+ * only as an optimization and the naming (with a single underscore)
+ * reflects its inclusion in a "private" header file.
+ *
* Return: Success: -1 if V1 is less than V2
* 0 if they are equal
* 1 if V1 is greater than V2
@@ -299,17 +311,15 @@ done:
* Programmer: Robb Matzke
* Wednesday, April 8, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5_INLINE int H5_ATTR_UNUSED
-H5VM_vector_cmp_s (unsigned n, const hssize_t *v1, const hssize_t *v2)
+H5VM_vector_cmp_s(unsigned n, const hssize_t *v1, const hssize_t *v2)
{
int ret_value=0; /* Return value */
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* Use FUNC_ENTER_STATIC_NOERR here to avoid performance issues */
+ FUNC_ENTER_STATIC_NOERR
if (v1 == v2) HGOTO_DONE(0)
if (v1 == NULL) HGOTO_DONE(-1)
@@ -331,13 +341,15 @@ done:
*
* Purpose: Increments V1 by V2
*
+ * Note: Although this routine is 'static' in this file, that's intended
+ * only as an optimization and the naming (with a single underscore)
+ * reflects its inclusion in a "private" header file.
+ *
* Return: void
*
* Programmer: Robb Matzke
* Monday, October 13, 1997
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static H5_INLINE void H5_ATTR_UNUSED
@@ -380,6 +392,10 @@ static const unsigned char LogTable256[] =
* The version on the web-site is for 32-bit quantities and this
* version has been extended for 64-bit quantities.
*
+ * Note: Although this routine is 'static' in this file, that's intended
+ * only as an optimization and the naming (with a single underscore)
+ * reflects its inclusion in a "private" header file.
+ *
* Return: log2(n) (always - no failure condition)
*
* Programmer: Quincey Koziol
@@ -428,6 +444,10 @@ static const unsigned MultiplyDeBruijnBitPosition[32] =
* This is from the "Bit Twiddling Hacks" at:
* http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogDeBruijn
*
+ * Note: Although this routine is 'static' in this file, that's intended
+ * only as an optimization and the naming (with a single underscore)
+ * reflects its inclusion in a "private" header file.
+ *
* Return: log2(n) (always - no failure condition)
*
* Programmer: Quincey Koziol
@@ -450,6 +470,10 @@ H5VM_log2_of2(uint32_t n)
*
* Purpose: Round up a number to the next power of 2
*
+ * Note: Although this routine is 'static' in this file, that's intended
+ * only as an optimization and the naming (with a single underscore)
+ * reflects its inclusion in a "private" header file.
+ *
* Return: Return the number which is a power of 2
*
* Programmer: Vailin Choi; Nov 2014
@@ -478,6 +502,10 @@ H5VM_power2up(hsize_t n)
* Purpose: Determine the # of bytes needed to encode values within a
* range from 0 to a given limit
*
+ * Note: Although this routine is 'static' in this file, that's intended
+ * only as an optimization and the naming (with a single underscore)
+ * reflects its inclusion in a "private" header file.
+ *
* Return: Number of bytes needed
*
* Programmer: Quincey Koziol
@@ -507,6 +535,10 @@ static const unsigned char H5VM_bit_clear_g[8] = {0x7F, 0xBF, 0xDF, 0xEF, 0xF7,
* to bit offset 7 in the first byte's low-bit position, then to
* bit offset 8 in the second byte's high-bit position, etc.
*
+ * Note: Although this routine is 'static' in this file, that's intended
+ * only as an optimization and the naming (with a single underscore)
+ * reflects its inclusion in a "private" header file.
+ *
* Return: TRUE/FALSE
*
* Programmer: Quincey Koziol
@@ -534,6 +566,10 @@ H5VM_bit_get(const unsigned char *buf, size_t offset)
* to bit offset 7 in the first byte's low-bit position, then to
* bit offset 8 in the second byte's high-bit position, etc.
*
+ * Note: Although this routine is 'static' in this file, that's intended
+ * only as an optimization and the naming (with a single underscore)
+ * reflects its inclusion in a "private" header file.
+ *
* Return: None
*
* Programmer: Quincey Koziol
diff --git a/src/H5WB.c b/src/H5WB.c
index 8a85a3a..abeaf63 100644
--- a/src/H5WB.c
+++ b/src/H5WB.c
@@ -15,7 +15,7 @@
*
* Created: H5WB.c
* Jun 26 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Implements the "wrapped buffer" code for wrapping
* an existing [staticly sized] buffer, in order to
@@ -97,7 +97,6 @@ H5FL_BLK_DEFINE_STATIC(extra_buf);
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jun 26 2007
*
*-------------------------------------------------------------------------
@@ -151,7 +150,6 @@ done:
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jun 26 2007
*
*-------------------------------------------------------------------------
@@ -219,7 +217,6 @@ done:
* NULL on failure
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jun 26 2007
*
*-------------------------------------------------------------------------
@@ -257,7 +254,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
- * koziol@hdfgroup.org
* Jun 26 2007
*
*-------------------------------------------------------------------------
diff --git a/src/H5WBprivate.h b/src/H5WBprivate.h
index 4460808..3ec9261 100644
--- a/src/H5WBprivate.h
+++ b/src/H5WBprivate.h
@@ -15,7 +15,7 @@
*
* Created: H5WBprivate.h
* Jun 26 2007
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Private header for library accessible wrapped buffer routines.
*
diff --git a/src/H5Z.c b/src/H5Z.c
index 3bd4bcb..616db1f 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -68,7 +68,7 @@ static H5Z_stats_t *H5Z_stat_table_g = NULL;
#endif /* H5Z_DEBUG */
/* Local functions */
-static int H5Z_find_idx(H5Z_filter_t id);
+static int H5Z__find_idx(H5Z_filter_t id);
static int H5Z__check_unregister_dset_cb(void *obj_ptr, hid_t obj_id, void *key);
static int H5Z__check_unregister_group_cb(void *obj_ptr, hid_t obj_id, void *key);
static int H5Z__flush_file_cb(void *obj_ptr, hid_t obj_id, void *key);
@@ -713,7 +713,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_prelude_callback
+ * Function: H5Z__prelude_callback
*
* Purpose: Makes a dataset creation "prelude" callback for the "can_apply"
* or "set_local" routines.
@@ -726,14 +726,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id,
+H5Z__prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id,
hid_t space_id, H5Z_prelude_type_t prelude_type)
{
H5Z_class2_t *fclass; /* Individual filter information */
size_t u; /* Local index variable */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(pline->nused > 0);
@@ -791,11 +791,11 @@ H5Z_prelude_callback(const H5O_pline_t *pline, hid_t dcpl_id, hid_t type_id,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_prelude_callback() */
+} /* end H5Z__prelude_callback() */
/*-------------------------------------------------------------------------
- * Function: H5Z_prepare_prelude_callback_dcpl
+ * Function: H5Z__prepare_prelude_callback_dcpl
*
* Purpose: Prepares to make a dataset creation "prelude" callback
* for the "can_apply" or "set_local" routines.
@@ -808,13 +808,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_type)
+H5Z__prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_type)
{
hid_t space_id = -1; /* ID for dataspace describing chunk */
H5O_layout_t *dcpl_layout = NULL; /* Dataset's layout information */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(H5I_GENPROP_LST == H5I_get_type(dcpl_id));
HDassert(H5I_DATATYPE == H5I_get_type(type_id));
@@ -862,7 +862,7 @@ H5Z_prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type
}
/* Make the callbacks */
- if (H5Z_prelude_callback(&dcpl_pline, dcpl_id, type_id, space_id, prelude_type) < 0)
+ if (H5Z__prelude_callback(&dcpl_pline, dcpl_id, type_id, space_id, prelude_type) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter")
}
}
@@ -876,7 +876,7 @@ done:
dcpl_layout = (H5O_layout_t *)H5MM_xfree(dcpl_layout);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_prepare_prelude_callback_dcpl() */
+} /* end H5Z__prepare_prelude_callback_dcpl() */
/*-------------------------------------------------------------------------
@@ -902,7 +902,7 @@ H5Z_can_apply(hid_t dcpl_id, hid_t type_id)
FUNC_ENTER_NOAPI(FAIL)
/* Make "can apply" callbacks for filters in pipeline */
- if (H5Z_prepare_prelude_callback_dcpl(dcpl_id, type_id, H5Z_PRELUDE_CAN_APPLY) < 0)
+ if (H5Z__prepare_prelude_callback_dcpl(dcpl_id, type_id, H5Z_PRELUDE_CAN_APPLY) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter")
done:
@@ -933,7 +933,7 @@ H5Z_set_local(hid_t dcpl_id, hid_t type_id)
FUNC_ENTER_NOAPI(FAIL)
/* Make "set local" callbacks for filters in pipeline */
- if (H5Z_prepare_prelude_callback_dcpl(dcpl_id, type_id, H5Z_PRELUDE_SET_LOCAL) < 0)
+ if (H5Z__prepare_prelude_callback_dcpl(dcpl_id, type_id, H5Z_PRELUDE_SET_LOCAL) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set")
done:
@@ -962,7 +962,7 @@ H5Z_can_apply_direct(const H5O_pline_t *pline)
HDassert(pline->nused > 0);
/* Make "can apply" callbacks for filters in pipeline */
- if (H5Z_prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_CAN_APPLY) < 0)
+ if (H5Z__prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_CAN_APPLY) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter")
done:
@@ -995,7 +995,7 @@ H5Z_set_local_direct(const H5O_pline_t *pline)
HDassert(pline->nused > 0);
/* Make "set local" callbacks for filters in pipeline */
- if (H5Z_prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_SET_LOCAL) < 0)
+ if (H5Z__prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_SET_LOCAL) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set")
done:
@@ -1168,7 +1168,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_find_idx
+ * Function: H5Z__find_idx
*
* Purpose: Given a filter ID return the offset in the global array
* that holds all the registered filters.
@@ -1178,20 +1178,20 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5Z_find_idx(H5Z_filter_t id)
+H5Z__find_idx(H5Z_filter_t id)
{
size_t i; /* Local index variable */
int ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
- for (i = 0; i < H5Z_table_used_g; i++)
- if (H5Z_table_g[i].id == id)
+ for(i = 0; i < H5Z_table_used_g; i++)
+ if(H5Z_table_g[i].id == id)
HGOTO_DONE((int)i)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_find_idx() */
+} /* end H5Z__find_idx() */
/*-------------------------------------------------------------------------
@@ -1213,7 +1213,7 @@ H5Z_find(H5Z_filter_t id)
FUNC_ENTER_NOAPI(NULL)
/* Get the index in the global table */
- if ((idx = H5Z_find_idx(id)) < 0)
+ if ((idx = H5Z__find_idx(id)) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "required filter %d is not registered", id)
/* Set return value */
@@ -1290,7 +1290,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
* indicate no plugin through HDF5_PRELOAD_PLUG (using the symbol "::"),
* try to load it dynamically and register it. Otherwise, return failure
*/
- if ((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) {
+ if ((fclass_idx = H5Z__find_idx(pline->filter[idx].id)) < 0) {
H5PL_key_t key;
const H5Z_class2_t *filter_info;
hbool_t issue_error = FALSE;
@@ -1303,7 +1303,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter")
/* Search in the table of registered filters again to find the dynamic filter just loaded and registered */
- if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0)
+ if((fclass_idx = H5Z__find_idx(pline->filter[idx].id)) < 0)
issue_error = TRUE;
}
else
@@ -1365,7 +1365,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
failed |= (unsigned)1 << idx;
continue; /* filter excluded */
}
- if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) {
+ if((fclass_idx = H5Z__find_idx(pline->filter[idx].id)) < 0) {
/* Check if filter is optional -- If it isn't, then error */
if((pline->filter[idx].flags & H5Z_FLAG_OPTIONAL) == 0)
HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "required filter is not registered")
diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c
index 6d7b87e..09cca14 100644
--- a/src/H5Zdeflate.c
+++ b/src/H5Zdeflate.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, August 27, 1999
*/
@@ -34,26 +34,26 @@
#endif
/* Local function prototypes */
-static size_t H5Z_filter_deflate (unsigned flags, size_t cd_nelmts,
+static size_t H5Z__filter_deflate (unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
/* This message derives from H5Z */
const H5Z_class2_t H5Z_DEFLATE[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_DEFLATE, /* Filter id number */
- 1, /* encoder_present flag (set to true) */
- 1, /* decoder_present flag (set to true) */
+ 1, /* encoder_present flag (set to true) */
+ 1, /* decoder_present flag (set to true) */
"deflate", /* Filter name for debugging */
NULL, /* The "can apply" callback */
NULL, /* The "set local" callback */
- H5Z_filter_deflate, /* The actual filter function */
+ H5Z__filter_deflate, /* The actual filter function */
}};
#define H5Z_DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * (double)1.001f) + 12)
/*-------------------------------------------------------------------------
- * Function: H5Z_filter_deflate
+ * Function: H5Z__filter_deflate
*
* Purpose: Implement an I/O filter around the 'deflate' algorithm in
* libz
@@ -64,12 +64,10 @@ const H5Z_class2_t H5Z_DEFLATE[1] = {{
* Programmer: Robb Matzke
* Thursday, April 16, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static size_t
-H5Z_filter_deflate (unsigned flags, size_t cd_nelmts,
+H5Z__filter_deflate(unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes,
size_t *buf_size, void **buf)
{
@@ -77,7 +75,7 @@ H5Z_filter_deflate (unsigned flags, size_t cd_nelmts,
int status; /* Status from zlib operation */
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI(0)
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(*buf_size > 0);
diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c
index c40e9b4..07e2f79 100644
--- a/src/H5Zfletcher32.c
+++ b/src/H5Zfletcher32.c
@@ -26,26 +26,26 @@
#include "H5Zpkg.h" /* Data filters */
/* Local function prototypes */
-static size_t H5Z_filter_fletcher32 (unsigned flags, size_t cd_nelmts,
+static size_t H5Z__filter_fletcher32(unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
/* This message derives from H5Z */
const H5Z_class2_t H5Z_FLETCHER32[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_FLETCHER32, /* Filter id number */
- 1, /* encoder_present flag (set to true) */
- 1, /* decoder_present flag (set to true) */
+ 1, /* encoder_present flag (set to true) */
+ 1, /* decoder_present flag (set to true) */
"fletcher32", /* Filter name for debugging */
NULL, /* The "can apply" callback */
NULL, /* The "set local" callback */
- H5Z_filter_fletcher32, /* The actual filter function */
+ H5Z__filter_fletcher32, /* The actual filter function */
}};
#define FLETCHER_LEN 4
/*-------------------------------------------------------------------------
- * Function: H5Z_filter_fletcher32
+ * Function: H5Z__filter_fletcher32
*
* Purpose: Implement an I/O filter of Fletcher32 Checksum
*
@@ -55,21 +55,10 @@ const H5Z_class2_t H5Z_FLETCHER32[1] = {{
* Programmer: Raymond Lu
* Jan 3, 2003
*
- * Modifications:
- * Raymond Lu
- * July 8, 2005
- * There was a bug in the calculating code of the Fletcher32
- * checksum in the library before v1.6.3. The checksum
- * value wasn't consistent between big-endian and little-endian
- * systems. This bug was fixed in Release 1.6.3. However,
- * after fixing the bug, the checksum value is no longer the
- * same as before on little-endian system. We'll check both
- * the correct checksum and the wrong checksum to be consistent
- * with Release 1.6.2 and before.
*-------------------------------------------------------------------------
*/
static size_t
-H5Z_filter_fletcher32 (unsigned flags, size_t H5_ATTR_UNUSED cd_nelmts, const unsigned H5_ATTR_UNUSED cd_values[],
+H5Z__filter_fletcher32(unsigned flags, size_t H5_ATTR_UNUSED cd_nelmts, const unsigned H5_ATTR_UNUSED cd_values[],
size_t nbytes, size_t *buf_size, void **buf)
{
void *outbuf = NULL; /* Pointer to new buffer */
@@ -80,7 +69,7 @@ H5Z_filter_fletcher32 (unsigned flags, size_t H5_ATTR_UNUSED cd_nelmts, const un
uint8_t tmp;
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI(0)
+ FUNC_ENTER_STATIC
HDassert(sizeof(uint32_t)>=4);
diff --git a/src/H5Zmodule.h b/src/H5Zmodule.h
index 97e158c..e4fd90c 100644
--- a/src/H5Zmodule.h
+++ b/src/H5Zmodule.h
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index 8c0e876..d29343b 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -34,34 +34,34 @@ typedef struct {
} parms_atomic;
/* Local function prototypes */
-static htri_t H5Z_can_apply_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static herr_t H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static size_t H5Z_filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
+static htri_t H5Z__can_apply_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static herr_t H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static size_t H5Z__filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t nbytes, size_t *buf_size, void **buf);
-static void H5Z_calc_parms_nooptype(size_t *cd_values_actual_nparms);
-static void H5Z_calc_parms_atomic(size_t *cd_values_actual_nparms);
-static herr_t H5Z_calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms);
-static herr_t H5Z_calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms);
+static void H5Z__calc_parms_nooptype(size_t *cd_values_actual_nparms);
+static void H5Z__calc_parms_atomic(size_t *cd_values_actual_nparms);
+static herr_t H5Z__calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms);
+static herr_t H5Z__calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms);
-static herr_t H5Z_set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index,
+static herr_t H5Z__set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[]);
-static herr_t H5Z_set_parms_atomic(const H5T_t *type, unsigned *cd_values_index,
+static herr_t H5Z__set_parms_atomic(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[], hbool_t *need_not_compress);
-static herr_t H5Z_set_parms_array(const H5T_t *type, unsigned *cd_values_index,
+static herr_t H5Z__set_parms_array(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[], hbool_t *need_not_compress);
-static herr_t H5Z_set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
+static herr_t H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[], hbool_t *need_not_compress);
-static void H5Z_nbit_next_byte(size_t *j, size_t *buf_len);
-static void H5Z_nbit_decompress_one_byte(unsigned char *data, size_t data_offset,
+static void H5Z__nbit_next_byte(size_t *j, size_t *buf_len);
+static void H5Z__nbit_decompress_one_byte(unsigned char *data, size_t data_offset,
unsigned k, unsigned begin_i, unsigned end_i, unsigned char *buffer, size_t *j,
size_t *buf_len, const parms_atomic *p, size_t datatype_len);
-static void H5Z_nbit_compress_one_byte(unsigned char *data, size_t data_offset, unsigned k, unsigned begin_i,
+static void H5Z__nbit_compress_one_byte(unsigned char *data, size_t data_offset, unsigned k, unsigned begin_i,
unsigned end_i, unsigned char *buffer, size_t *j, size_t *buf_len, const parms_atomic *p, size_t datatype_len);
-static void H5Z_nbit_decompress_one_nooptype(unsigned char *data, size_t data_offset,
+static void H5Z__nbit_decompress_one_nooptype(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, unsigned size);
-static void H5Z_nbit_decompress_one_atomic(unsigned char *data, size_t data_offset,
+static void H5Z__nbit_decompress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const parms_atomic *p);
static herr_t H5Z__nbit_decompress_one_array(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const unsigned parms[],
@@ -71,29 +71,27 @@ static herr_t H5Z__nbit_decompress_one_compound(unsigned char *data, size_t data
unsigned *parms_index);
static herr_t H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
const unsigned parms[]);
-static void H5Z_nbit_compress_one_nooptype(unsigned char *data, size_t data_offset,
+static void H5Z__nbit_compress_one_nooptype(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, unsigned size);
-static void H5Z_nbit_compress_one_atomic(unsigned char *data, size_t data_offset,
- unsigned char *buffer, size_t *j, size_t *buf_len, const parms_atomic *p);
-static void H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
+static void H5Z__nbit_compress_one_array(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const unsigned parms[],
unsigned *parms_index);
-static void H5Z_nbit_compress_one_compound(unsigned char *data, size_t data_offset,
+static void H5Z__nbit_compress_one_compound(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const unsigned parms[],
unsigned *parms_index);
-static void H5Z_nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
+static void H5Z__nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
size_t *buffer_size, const unsigned parms[]);
/* This message derives from H5Z */
H5Z_class2_t H5Z_NBIT[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_NBIT, /* Filter id number */
- 1, /* Assume encoder present: check before registering */
- 1, /* decoder_present flag (set to true) */
- "nbit", /* Filter name for debugging */
- H5Z_can_apply_nbit, /* The "can apply" callback */
- H5Z_set_local_nbit, /* The "set local" callback */
- H5Z_filter_nbit, /* The actual filter function */
+ 1, /* Assume encoder present: check before registering */
+ 1, /* decoder_present flag (set to true) */
+ "nbit", /* Filter name for debugging */
+ H5Z__can_apply_nbit, /* The "can apply" callback */
+ H5Z__set_local_nbit, /* The "set local" callback */
+ H5Z__filter_nbit, /* The actual filter function */
}};
/* Local macros */
@@ -109,7 +107,7 @@ H5Z_class2_t H5Z_NBIT[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5Z_can_apply_nbit
+ * Function: H5Z__can_apply_nbit
*
* Purpose: Check the parameters for nbit compression for validity and
* whether they fit a particular dataset.
@@ -120,17 +118,15 @@ H5Z_class2_t H5Z_NBIT[1] = {{
* Programmer: Xiaowen Wu
* Tuesday, December 21, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static htri_t
-H5Z_can_apply_nbit(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
+H5Z__can_apply_nbit(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
{
const H5T_t *type; /* Datatype */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Get datatype */
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -146,11 +142,11 @@ H5Z_can_apply_nbit(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UN
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_can_apply_nbit() */
+} /* end H5Z__can_apply_nbit() */
/*-------------------------------------------------------------------------
- * Function: H5Z_calc_parms_nooptype
+ * Function: H5Z__calc_parms_nooptype
*
* Purpose: Calculate the number of parameters of array cd_values[]
* of datatype that is not integer, nor floating-point, nor
@@ -159,12 +155,10 @@ done:
* Programmer: Xiaowen Wu
* Thursday, March 3, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
-H5Z_calc_parms_nooptype(size_t *cd_values_actual_nparms)
+H5Z__calc_parms_nooptype(size_t *cd_values_actual_nparms)
{
/* Store datatype class code */
*cd_values_actual_nparms += 1;
@@ -175,7 +169,7 @@ H5Z_calc_parms_nooptype(size_t *cd_values_actual_nparms)
/*-------------------------------------------------------------------------
- * Function: H5Z_calc_parms_atomic
+ * Function: H5Z__calc_parms_atomic
*
* Purpose: Calculate the number of parameters of array cd_values[]
* of atomic datatype whose datatype class is integer
@@ -184,12 +178,10 @@ H5Z_calc_parms_nooptype(size_t *cd_values_actual_nparms)
* Programmer: Xiaowen Wu
* Saturday, January 29, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void
-H5Z_calc_parms_atomic(size_t *cd_values_actual_nparms)
+H5Z__calc_parms_atomic(size_t *cd_values_actual_nparms)
{
/* Store datatype class code */
*cd_values_actual_nparms += 1;
@@ -209,7 +201,7 @@ H5Z_calc_parms_atomic(size_t *cd_values_actual_nparms)
/*-------------------------------------------------------------------------
- * Function: H5Z_calc_parms_array
+ * Function: H5Z__calc_parms_array
*
* Purpose: Calculate the number of parameters of array cd_values[]
* for a given datatype identifier type_id
@@ -221,18 +213,16 @@ H5Z_calc_parms_atomic(size_t *cd_values_actual_nparms)
* Programmer: Xiaowen Wu
* Wednesday, January 19, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms)
+H5Z__calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms)
{
H5T_t *dtype_base = NULL; /* Array datatype's base datatype */
H5T_class_t dtype_base_class; /* Array datatype's base datatype's class */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Store datatype class code */
*cd_values_actual_nparms += 1;
@@ -252,16 +242,16 @@ H5Z_calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms)
switch(dtype_base_class) {
case H5T_INTEGER:
case H5T_FLOAT:
- H5Z_calc_parms_atomic(cd_values_actual_nparms);
+ H5Z__calc_parms_atomic(cd_values_actual_nparms);
break;
case H5T_ARRAY:
- if(H5Z_calc_parms_array(dtype_base, cd_values_actual_nparms) == FAIL)
+ if(H5Z__calc_parms_array(dtype_base, cd_values_actual_nparms) == FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
case H5T_COMPOUND:
- if(H5Z_calc_parms_compound(dtype_base, cd_values_actual_nparms) == FAIL)
+ if(H5Z__calc_parms_compound(dtype_base, cd_values_actual_nparms) == FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
@@ -273,7 +263,7 @@ H5Z_calc_parms_array(const H5T_t *type, size_t *cd_values_actual_nparms)
case H5T_ENUM:
case H5T_VLEN:
/* Other datatype classes: nbit does no compression */
- H5Z_calc_parms_nooptype(cd_values_actual_nparms);
+ H5Z__calc_parms_nooptype(cd_values_actual_nparms);
break;
case H5T_NO_CLASS:
@@ -290,11 +280,11 @@ done:
HDONE_ERROR(H5E_PLINE, H5E_CLOSEERROR, FAIL, "Unable to close base datatype")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_calc_parms_array() */
+} /* end H5Z__calc_parms_array() */
/*-------------------------------------------------------------------------
- * Function: H5Z_calc_parms_compound
+ * Function: H5Z__calc_parms_compound
*
* Purpose: Calculate the number of parameters of array cd_values[]
* for a given datatype identifier type_id
@@ -306,19 +296,17 @@ done:
* Programmer: Xiaowen Wu
* Wednesday, January 19, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms)
+H5Z__calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms)
{
int nmembers; /* Compound datatype's number of members */
H5T_t *dtype_member = NULL; /* Compound datatype's member datatype */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Store compound datatype class code */
*cd_values_actual_nparms += 1;
@@ -352,16 +340,16 @@ H5Z_calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms)
switch(dtype_member_class) {
case H5T_INTEGER:
case H5T_FLOAT:
- H5Z_calc_parms_atomic(cd_values_actual_nparms);
+ H5Z__calc_parms_atomic(cd_values_actual_nparms);
break;
case H5T_ARRAY:
- if(H5Z_calc_parms_array(dtype_member, cd_values_actual_nparms) == FAIL)
+ if(H5Z__calc_parms_array(dtype_member, cd_values_actual_nparms) == FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
case H5T_COMPOUND:
- if(H5Z_calc_parms_compound(dtype_member, cd_values_actual_nparms) == FAIL)
+ if(H5Z__calc_parms_compound(dtype_member, cd_values_actual_nparms) == FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
@@ -373,7 +361,7 @@ H5Z_calc_parms_compound(const H5T_t *type, size_t *cd_values_actual_nparms)
case H5T_ENUM:
case H5T_VLEN:
/* Other datatype classes: nbit does no compression */
- H5Z_calc_parms_nooptype(cd_values_actual_nparms);
+ H5Z__calc_parms_nooptype(cd_values_actual_nparms);
break;
case H5T_NO_CLASS:
@@ -400,7 +388,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_set_parms_nooptype
+ * Function: H5Z__set_parms_nooptype
*
* Purpose: Set the array cd_values[] for a given datatype identifier
* type_id if its datatype class is not integer, nor
@@ -413,17 +401,15 @@ done:
* Programmer: Xiaowen Wu
* Tuesday, April 5, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index, unsigned cd_values[])
+H5Z__set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index, unsigned cd_values[])
{
size_t dtype_size; /* No-op datatype's size (in bytes) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Set datatype class code */
cd_values[(*cd_values_index)++] = H5Z_NBIT_NOOPTYPE;
@@ -438,11 +424,11 @@ H5Z_set_parms_nooptype(const H5T_t *type, unsigned *cd_values_index, unsigned cd
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_parms_nooptype() */
+} /* end H5Z__set_parms_nooptype() */
/*-------------------------------------------------------------------------
- * Function: H5Z_set_parms_atomic
+ * Function: H5Z__set_parms_atomic
*
* Purpose: Set the array cd_values[] for a given datatype identifier
* type_id if its datatype class is integer or floating point
@@ -453,12 +439,10 @@ done:
* Programmer: Xiaowen Wu
* Tuesday, January 11, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_parms_atomic(const H5T_t *type, unsigned *cd_values_index,
+H5Z__set_parms_atomic(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[], hbool_t *need_not_compress)
{
H5T_order_t dtype_order; /* Atomic datatype's endianness order */
@@ -468,7 +452,7 @@ H5Z_set_parms_atomic(const H5T_t *type, unsigned *cd_values_index,
unsigned dtype_offset; /* Atomic datatype's offset (in bits) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Set datatype class code */
cd_values[(*cd_values_index)++] = H5Z_NBIT_ATOMIC;
@@ -532,11 +516,11 @@ H5Z_set_parms_atomic(const H5T_t *type, unsigned *cd_values_index,
*need_not_compress = FALSE;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_parms_atomic() */
+} /* end H5Z__set_parms_atomic() */
/*-------------------------------------------------------------------------
- * Function: H5Z_set_parms_array
+ * Function: H5Z__set_parms_array
*
* Purpose: Set the array cd_values[] for a given datatype identifier
* type_id if its datatype class is array datatype
@@ -547,12 +531,10 @@ done:
* Programmer: Xiaowen Wu
* Tuesday, April 5, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_parms_array(const H5T_t *type, unsigned *cd_values_index,
+H5Z__set_parms_array(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[], hbool_t *need_not_compress)
{
H5T_t *dtype_base = NULL; /* Array datatype's base datatype */
@@ -561,7 +543,7 @@ H5Z_set_parms_array(const H5T_t *type, unsigned *cd_values_index,
htri_t is_vlstring; /* flag indicating if datatype is variable-length string */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Set datatype class code */
cd_values[(*cd_values_index)++] = H5Z_NBIT_ARRAY;
@@ -586,17 +568,17 @@ H5Z_set_parms_array(const H5T_t *type, unsigned *cd_values_index,
switch(dtype_base_class) {
case H5T_INTEGER:
case H5T_FLOAT:
- if(H5Z_set_parms_atomic(dtype_base, cd_values_index, cd_values, need_not_compress) < 0)
+ if(H5Z__set_parms_atomic(dtype_base, cd_values_index, cd_values, need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
case H5T_ARRAY:
- if(H5Z_set_parms_array(dtype_base, cd_values_index, cd_values, need_not_compress) < 0)
+ if(H5Z__set_parms_array(dtype_base, cd_values_index, cd_values, need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
case H5T_COMPOUND:
- if(H5Z_set_parms_compound(dtype_base, cd_values_index, cd_values, need_not_compress) < 0)
+ if(H5Z__set_parms_compound(dtype_base, cd_values_index, cd_values, need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
@@ -609,7 +591,7 @@ H5Z_set_parms_array(const H5T_t *type, unsigned *cd_values_index,
if(dtype_base_class == H5T_VLEN || is_vlstring)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "datatype not supported by nbit")
- if(H5Z_set_parms_nooptype(dtype_base, cd_values_index, cd_values) < 0)
+ if(H5Z__set_parms_nooptype(dtype_base, cd_values_index, cd_values) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
@@ -619,7 +601,7 @@ H5Z_set_parms_array(const H5T_t *type, unsigned *cd_values_index,
case H5T_OPAQUE:
case H5T_REFERENCE:
case H5T_ENUM:
- if(H5Z_set_parms_nooptype(dtype_base, cd_values_index, cd_values) < 0)
+ if(H5Z__set_parms_nooptype(dtype_base, cd_values_index, cd_values) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
@@ -637,11 +619,11 @@ done:
HDONE_ERROR(H5E_PLINE, H5E_CLOSEERROR, FAIL, "Unable to close base datatype")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_parms_array() */
+} /* end H5Z__set_parms_array() */
/*-------------------------------------------------------------------------
- * Function: H5Z_set_parms_compound
+ * Function: H5Z__set_parms_compound
*
* Purpose: Set the array cd_values[] for a given datatype identifier
* type_id if its datatype class is compound datatype
@@ -652,12 +634,10 @@ done:
* Programmer: Xiaowen Wu
* Tuesday, April 5, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
+H5Z__set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
unsigned cd_values[], hbool_t *need_not_compress)
{
int snmembers; /* Compound datatype's number of members */
@@ -671,7 +651,7 @@ H5Z_set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Set "local" parameter for compound datatype class code */
cd_values[(*cd_values_index)++] = H5Z_NBIT_COMPOUND;
@@ -713,17 +693,17 @@ H5Z_set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
switch(dtype_member_class) {
case H5T_INTEGER:
case H5T_FLOAT:
- if(H5Z_set_parms_atomic(dtype_member, cd_values_index, cd_values, need_not_compress) < 0)
+ if(H5Z__set_parms_atomic(dtype_member, cd_values_index, cd_values, need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
case H5T_ARRAY:
- if(H5Z_set_parms_array(dtype_member, cd_values_index, cd_values, need_not_compress) < 0)
+ if(H5Z__set_parms_array(dtype_member, cd_values_index, cd_values, need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
case H5T_COMPOUND:
- if(H5Z_set_parms_compound(dtype_member, cd_values_index, cd_values, need_not_compress) < 0)
+ if(H5Z__set_parms_compound(dtype_member, cd_values_index, cd_values, need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
@@ -761,7 +741,7 @@ H5Z_set_parms_compound(const H5T_t *type, unsigned *cd_values_index,
case H5T_REFERENCE:
case H5T_ENUM:
/* other datatype that nbit does no compression */
- if(H5Z_set_parms_nooptype(dtype_member, cd_values_index, cd_values) < 0)
+ if(H5Z__set_parms_nooptype(dtype_member, cd_values_index, cd_values) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
@@ -789,7 +769,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_set_local_nbit
+ * Function: H5Z__set_local_nbit
*
* Purpose: Set the "local" dataset parameters for nbit compression.
*
@@ -799,12 +779,10 @@ done:
* Programmer: Xiaowen Wu
* Tuesday, January 11, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
+H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
{
H5P_genplist_t *dcpl_plist; /* Property list pointer */
const H5T_t *type; /* Datatype */
@@ -819,7 +797,7 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
hbool_t need_not_compress; /* Flag if TRUE indicating no need to do nbit compression */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Get datatype */
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -839,16 +817,16 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
switch(dtype_class) {
case H5T_INTEGER:
case H5T_FLOAT:
- H5Z_calc_parms_atomic(&cd_values_actual_nparms);
+ H5Z__calc_parms_atomic(&cd_values_actual_nparms);
break;
case H5T_ARRAY:
- if(H5Z_calc_parms_array(type, &cd_values_actual_nparms) < 0)
+ if(H5Z__calc_parms_array(type, &cd_values_actual_nparms) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
case H5T_COMPOUND:
- if(H5Z_calc_parms_compound(type, &cd_values_actual_nparms) < 0)
+ if(H5Z__calc_parms_compound(type, &cd_values_actual_nparms) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot compute parameters for datatype")
break;
@@ -909,17 +887,17 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
switch(dtype_class) {
case H5T_INTEGER:
case H5T_FLOAT:
- if(H5Z_set_parms_atomic(type, &cd_values_index, cd_values, &need_not_compress) < 0)
+ if(H5Z__set_parms_atomic(type, &cd_values_index, cd_values, &need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
case H5T_ARRAY:
- if(H5Z_set_parms_array(type, &cd_values_index, cd_values, &need_not_compress) < 0)
+ if(H5Z__set_parms_array(type, &cd_values_index, cd_values, &need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
case H5T_COMPOUND:
- if(H5Z_set_parms_compound(type, &cd_values_index, cd_values, &need_not_compress) < 0)
+ if(H5Z__set_parms_compound(type, &cd_values_index, cd_values, &need_not_compress) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "nbit cannot set parameters for datatype")
break;
@@ -958,11 +936,11 @@ done:
H5MM_xfree(cd_values);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_local_nbit() */
+} /* end H5Z__set_local_nbit() */
/*-------------------------------------------------------------------------
- * Function: H5Z_filter_nbit
+ * Function: H5Z__filter_nbit
*
* Purpose: Implement an I/O filter for storing packed nbit data
*
@@ -975,7 +953,7 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5Z_filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
+H5Z__filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t nbytes, size_t *buf_size, void **buf)
{
unsigned char *outbuf; /* pointer to new output buffer */
@@ -983,7 +961,7 @@ H5Z_filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
unsigned d_nelmts = 0; /* number of elements in the chunk */
size_t ret_value = 0; /* return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check arguments
* cd_values[0] stores actual number of parameters in cd_values[]
@@ -1023,7 +1001,7 @@ H5Z_filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, 0, "memory allocation failed for nbit compression")
/* compress the buffer, size_out will be changed */
- H5Z_nbit_compress((unsigned char *)*buf, d_nelmts, outbuf, &size_out, cd_values);
+ H5Z__nbit_compress((unsigned char *)*buf, d_nelmts, outbuf, &size_out, cd_values);
} /* end else */
/* free the input buffer */
@@ -1036,7 +1014,7 @@ H5Z_filter_nbit(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_filter_nbit() */
+} /* end H5Z__filter_nbit() */
/* ======== Nbit Algorithm ===============================================
* assume one byte has 8 bit
@@ -1047,14 +1025,14 @@ done:
*/
static void
-H5Z_nbit_next_byte(size_t *j, size_t *buf_len)
+H5Z__nbit_next_byte(size_t *j, size_t *buf_len)
{
++(*j);
*buf_len = 8 * sizeof(unsigned char);
}
static void
-H5Z_nbit_decompress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
+H5Z__nbit_decompress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
unsigned begin_i, unsigned end_i, unsigned char *buffer, size_t *j, size_t *buf_len,
const parms_atomic *p, size_t datatype_len)
{
@@ -1088,7 +1066,7 @@ H5Z_nbit_decompress_one_byte(unsigned char *data, size_t data_offset, unsigned k
data[data_offset + k] = (unsigned char)(
((val & ~((unsigned)(~0) << *buf_len)) << (dat_len - *buf_len)) << dat_offset);
dat_len -= *buf_len;
- H5Z_nbit_next_byte(j, buf_len);
+ H5Z__nbit_next_byte(j, buf_len);
if(dat_len == 0)
return;
@@ -1100,7 +1078,7 @@ H5Z_nbit_decompress_one_byte(unsigned char *data, size_t data_offset, unsigned k
}
static void
-H5Z_nbit_decompress_one_nooptype(unsigned char *data, size_t data_offset,
+H5Z__nbit_decompress_one_nooptype(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, unsigned size)
{
unsigned i; /* index */
@@ -1114,7 +1092,7 @@ H5Z_nbit_decompress_one_nooptype(unsigned char *data, size_t data_offset,
data[data_offset + i] = (unsigned char)(((val & ~((unsigned)(~0) << *buf_len)) << (dat_len - *buf_len)));
dat_len -= *buf_len;
- H5Z_nbit_next_byte(j, buf_len);
+ H5Z__nbit_next_byte(j, buf_len);
if(dat_len == 0)
continue;
@@ -1125,7 +1103,7 @@ H5Z_nbit_decompress_one_nooptype(unsigned char *data, size_t data_offset,
}
static void
-H5Z_nbit_decompress_one_atomic(unsigned char *data, size_t data_offset,
+H5Z__nbit_decompress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const parms_atomic *p)
{
/* begin_i: the index of byte having first significant bit
@@ -1145,7 +1123,7 @@ H5Z_nbit_decompress_one_atomic(unsigned char *data, size_t data_offset,
end_i = p->offset / 8;
for(k = (int)begin_i; k >= (int)end_i; k--)
- H5Z_nbit_decompress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
+ H5Z__nbit_decompress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
buffer, j, buf_len, p, datatype_len);
}
else { /* big endian */
@@ -1160,7 +1138,7 @@ H5Z_nbit_decompress_one_atomic(unsigned char *data, size_t data_offset,
end_i = ((unsigned)datatype_len - p->offset) / 8 - 1;
for(k = (int)begin_i; k <= (int)end_i; k++)
- H5Z_nbit_decompress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
+ H5Z__nbit_decompress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
buffer, j, buf_len, p, datatype_len);
}
}
@@ -1192,7 +1170,7 @@ H5Z__nbit_decompress_one_array(unsigned char *data, size_t data_offset,
n = total_size / p.size;
for(i = 0; i < n; i++)
- H5Z_nbit_decompress_one_atomic(data, data_offset + i * p.size,
+ H5Z__nbit_decompress_one_atomic(data, data_offset + i * p.size,
buffer, j, buf_len, &p);
break;
@@ -1222,7 +1200,7 @@ H5Z__nbit_decompress_one_array(unsigned char *data, size_t data_offset,
case H5Z_NBIT_NOOPTYPE:
(*parms_index)++; /* skip size of no-op type */
- H5Z_nbit_decompress_one_nooptype(data, data_offset, buffer, j, buf_len, total_size);
+ H5Z__nbit_decompress_one_nooptype(data, data_offset, buffer, j, buf_len, total_size);
break;
default:
@@ -1269,7 +1247,7 @@ H5Z__nbit_decompress_one_compound(unsigned char *data, size_t data_offset,
if(p.precision > p.size * 8 || (p.precision + p.offset) > p.size * 8)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "invalid datatype precision/offset")
- H5Z_nbit_decompress_one_atomic(data, data_offset + member_offset,
+ H5Z__nbit_decompress_one_atomic(data, data_offset + member_offset,
buffer, j, buf_len, &p);
break;
@@ -1288,7 +1266,7 @@ H5Z__nbit_decompress_one_compound(unsigned char *data, size_t data_offset,
case H5Z_NBIT_NOOPTYPE:
/* Advance past member size */
(*parms_index)++;
- H5Z_nbit_decompress_one_nooptype(data, data_offset+member_offset,
+ H5Z__nbit_decompress_one_nooptype(data, data_offset+member_offset,
buffer, j, buf_len, member_size);
break;
@@ -1335,7 +1313,7 @@ H5Z__nbit_decompress(unsigned char *data, unsigned d_nelmts, unsigned char *buff
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "invalid datatype precision/offset")
for(i = 0; i < d_nelmts; i++)
- H5Z_nbit_decompress_one_atomic(data, i * p.size, buffer, &j, &buf_len, &p);
+ H5Z__nbit_decompress_one_atomic(data, i * p.size, buffer, &j, &buf_len, &p);
break;
case H5Z_NBIT_ARRAY:
@@ -1367,7 +1345,7 @@ done:
}
static void
-H5Z_nbit_compress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
+H5Z__nbit_compress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
unsigned begin_i, unsigned end_i, unsigned char *buffer, size_t *j, size_t *buf_len,
const parms_atomic *p, size_t datatype_len)
{
@@ -1396,7 +1374,7 @@ H5Z_nbit_compress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
} else {
buffer[*j] |= (unsigned char)((unsigned)(val >> (dat_len - *buf_len)) & ~((unsigned)(~0) << *buf_len));
dat_len -= *buf_len;
- H5Z_nbit_next_byte(j, buf_len);
+ H5Z__nbit_next_byte(j, buf_len);
if(dat_len == 0)
return;
@@ -1406,7 +1384,7 @@ H5Z_nbit_compress_one_byte(unsigned char *data, size_t data_offset, unsigned k,
}
static void
-H5Z_nbit_compress_one_nooptype(unsigned char *data, size_t data_offset,
+H5Z__nbit_compress_one_nooptype(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, unsigned size)
{
unsigned i; /* index */
@@ -1420,7 +1398,7 @@ H5Z_nbit_compress_one_nooptype(unsigned char *data, size_t data_offset,
buffer[*j] |= (unsigned char)((unsigned)(val >> (dat_len - *buf_len)) & ~((unsigned)(~0) << *buf_len));
dat_len -= *buf_len;
- H5Z_nbit_next_byte(j, buf_len);
+ H5Z__nbit_next_byte(j, buf_len);
if(dat_len == 0)
continue;
@@ -1430,7 +1408,7 @@ H5Z_nbit_compress_one_nooptype(unsigned char *data, size_t data_offset,
}
static void
-H5Z_nbit_compress_one_atomic(unsigned char *data, size_t data_offset,
+H5Z__nbit_compress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const parms_atomic *p)
{
/* begin_i: the index of byte having first significant bit
@@ -1450,7 +1428,7 @@ H5Z_nbit_compress_one_atomic(unsigned char *data, size_t data_offset,
end_i = p->offset / 8;
for(k = (int)begin_i; k >= (int)end_i; k--)
- H5Z_nbit_compress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
+ H5Z__nbit_compress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
buffer, j, buf_len, p, datatype_len);
}
else { /* big endian */
@@ -1465,13 +1443,13 @@ H5Z_nbit_compress_one_atomic(unsigned char *data, size_t data_offset,
end_i = ((unsigned)datatype_len - p->offset) / 8 - 1;
for(k = (int)begin_i; k <= (int)end_i; k++)
- H5Z_nbit_compress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
+ H5Z__nbit_compress_one_byte(data, data_offset, (unsigned)k, begin_i, end_i,
buffer, j, buf_len, p, datatype_len);
}
}
static void
-H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
+H5Z__nbit_compress_one_array(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const unsigned parms[],
unsigned *parms_index)
{
@@ -1489,7 +1467,7 @@ H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
p.offset = parms[(*parms_index)++];
n = total_size / p.size;
for(i = 0; i < n; i++)
- H5Z_nbit_compress_one_atomic(data, data_offset + i * p.size,
+ H5Z__nbit_compress_one_atomic(data, data_offset + i * p.size,
buffer, j, buf_len, &p);
break;
@@ -1498,7 +1476,7 @@ H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
n = total_size / base_size; /* number of base_type elements inside the array datatype */
begin_index = *parms_index;
for(i = 0; i < n; i++) {
- H5Z_nbit_compress_one_array(data, data_offset + i * base_size,
+ H5Z__nbit_compress_one_array(data, data_offset + i * base_size,
buffer, j, buf_len, parms, parms_index);
*parms_index = begin_index;
}
@@ -1509,7 +1487,7 @@ H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
n = total_size / base_size; /* number of base_type elements inside the array datatype */
begin_index = *parms_index;
for(i = 0; i < n; i++) {
- H5Z_nbit_compress_one_compound(data, data_offset + i * base_size,
+ H5Z__nbit_compress_one_compound(data, data_offset + i * base_size,
buffer, j, buf_len, parms, parms_index);
*parms_index = begin_index;
}
@@ -1517,7 +1495,7 @@ H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
case H5Z_NBIT_NOOPTYPE:
(*parms_index)++; /* skip size of no-op type */
- H5Z_nbit_compress_one_nooptype(data, data_offset, buffer, j, buf_len, total_size);
+ H5Z__nbit_compress_one_nooptype(data, data_offset, buffer, j, buf_len, total_size);
break;
default:
@@ -1526,7 +1504,7 @@ H5Z_nbit_compress_one_array(unsigned char *data, size_t data_offset,
}
static void
-H5Z_nbit_compress_one_compound(unsigned char *data, size_t data_offset,
+H5Z__nbit_compress_one_compound(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, size_t *buf_len, const unsigned parms[],
unsigned *parms_index)
{
@@ -1546,23 +1524,23 @@ H5Z_nbit_compress_one_compound(unsigned char *data, size_t data_offset,
p.order = parms[(*parms_index)++];
p.precision = parms[(*parms_index)++];
p.offset = parms[(*parms_index)++];
- H5Z_nbit_compress_one_atomic(data, data_offset + member_offset,
+ H5Z__nbit_compress_one_atomic(data, data_offset + member_offset,
buffer, j, buf_len, &p);
break;
case H5Z_NBIT_ARRAY:
- H5Z_nbit_compress_one_array(data, data_offset + member_offset,
+ H5Z__nbit_compress_one_array(data, data_offset + member_offset,
buffer, j, buf_len, parms, parms_index);
break;
case H5Z_NBIT_COMPOUND:
- H5Z_nbit_compress_one_compound(data, data_offset+member_offset,
+ H5Z__nbit_compress_one_compound(data, data_offset+member_offset,
buffer, j, buf_len, parms, parms_index);
break;
case H5Z_NBIT_NOOPTYPE:
size = parms[(*parms_index)++];
- H5Z_nbit_compress_one_nooptype(data, data_offset+member_offset,
+ H5Z__nbit_compress_one_nooptype(data, data_offset+member_offset,
buffer, j, buf_len, size);
break;
@@ -1573,7 +1551,7 @@ H5Z_nbit_compress_one_compound(unsigned char *data, size_t data_offset,
}
static void
-H5Z_nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
+H5Z__nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
size_t *buffer_size, const unsigned parms[])
{
/* i: index of data, new_size: index of buffer,
@@ -1599,14 +1577,14 @@ H5Z_nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
p.offset = parms[7];
for(i = 0; i < d_nelmts; i++)
- H5Z_nbit_compress_one_atomic(data, i * p.size, buffer, &new_size, &buf_len, &p);
+ H5Z__nbit_compress_one_atomic(data, i * p.size, buffer, &new_size, &buf_len, &p);
break;
case H5Z_NBIT_ARRAY:
size = parms[4];
parms_index = 4;
for(i = 0; i < d_nelmts; i++) {
- H5Z_nbit_compress_one_array(data, i * size, buffer, &new_size, &buf_len, parms, &parms_index);
+ H5Z__nbit_compress_one_array(data, i * size, buffer, &new_size, &buf_len, parms, &parms_index);
parms_index = 4;
}
break;
@@ -1615,7 +1593,7 @@ H5Z_nbit_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
size = parms[4];
parms_index = 4;
for(i = 0; i < d_nelmts; i++) {
- H5Z_nbit_compress_one_compound(data, i * size, buffer, &new_size, &buf_len, parms, &parms_index);
+ H5Z__nbit_compress_one_compound(data, i * size, buffer, &new_size, &buf_len, parms, &parms_index);
parms_index = 4;
}
break;
diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h
index fbc6fc4..6868da6 100644
--- a/src/H5Zprivate.h
+++ b/src/H5Zprivate.h
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Thursday, April 16, 1998
*/
diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h
index a2a44fa..b37dcf3 100644
--- a/src/H5Zpublic.h
+++ b/src/H5Zpublic.h
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Thursday, April 16, 1998
*/
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 7bdc283..83f170e 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -36,55 +36,55 @@ enum H5Z_scaleoffset_t {t_bad=0, t_uchar=1, t_ushort, t_uint, t_ulong, t_ulong_l
t_float, t_double};
/* Local function prototypes */
-static htri_t H5Z_can_apply_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static enum H5Z_scaleoffset_t H5Z_scaleoffset_get_type(unsigned dtype_class,
+static htri_t H5Z__can_apply_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static enum H5Z_scaleoffset_t H5Z__scaleoffset_get_type(unsigned dtype_class,
unsigned dtype_size, unsigned dtype_sign);
-static herr_t H5Z_scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist,
+static herr_t H5Z__scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist,
H5T_t *type, enum H5Z_scaleoffset_t scale_type, unsigned cd_values[],
int need_convert);
-static herr_t H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static size_t H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts,
+static herr_t H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static size_t H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
-static void H5Z_scaleoffset_convert(void *buf, unsigned d_nelmts, unsigned dtype_size);
-static H5_ATTR_CONST unsigned H5Z_scaleoffset_log2(unsigned long long num);
-static void H5Z_scaleoffset_precompress_i(void *data, unsigned d_nelmts,
+static void H5Z__scaleoffset_convert(void *buf, unsigned d_nelmts, unsigned dtype_size);
+static H5_ATTR_CONST unsigned H5Z__scaleoffset_log2(unsigned long long num);
+static void H5Z__scaleoffset_precompress_i(void *data, unsigned d_nelmts,
enum H5Z_scaleoffset_t type, unsigned filavail, const unsigned cd_values[],
uint32_t *minbits, unsigned long long *minval);
-static void H5Z_scaleoffset_postdecompress_i(void *data, unsigned d_nelmts,
+static void H5Z__scaleoffset_postdecompress_i(void *data, unsigned d_nelmts,
enum H5Z_scaleoffset_t type, unsigned filavail, const unsigned cd_values[],
uint32_t minbits, unsigned long long minval);
-static herr_t H5Z_scaleoffset_precompress_fd(void *data, unsigned d_nelmts,
+static herr_t H5Z__scaleoffset_precompress_fd(void *data, unsigned d_nelmts,
enum H5Z_scaleoffset_t type, unsigned filavail, const unsigned cd_values[],
uint32_t *minbits, unsigned long long *minval, double D_val);
-static herr_t H5Z_scaleoffset_postdecompress_fd(void *data, unsigned d_nelmts,
+static herr_t H5Z__scaleoffset_postdecompress_fd(void *data, unsigned d_nelmts,
enum H5Z_scaleoffset_t type, unsigned filavail, const unsigned cd_values[],
uint32_t minbits, unsigned long long minval, double D_val);
-static void H5Z_scaleoffset_next_byte(size_t *j, unsigned *buf_len);
-static void H5Z_scaleoffset_decompress_one_byte(unsigned char *data, size_t data_offset,
+static void H5Z__scaleoffset_next_byte(size_t *j, unsigned *buf_len);
+static void H5Z__scaleoffset_decompress_one_byte(unsigned char *data, size_t data_offset,
unsigned k, unsigned begin_i, unsigned char *buffer, size_t *j, unsigned *buf_len,
parms_atomic p, unsigned dtype_len);
-static void H5Z_scaleoffset_compress_one_byte(unsigned char *data, size_t data_offset,
+static void H5Z__scaleoffset_compress_one_byte(unsigned char *data, size_t data_offset,
unsigned k, unsigned begin_i, unsigned char *buffer, size_t *j, unsigned *buf_len,
parms_atomic p, unsigned dtype_len);
-static void H5Z_scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
+static void H5Z__scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, unsigned *buf_len, parms_atomic p);
-static void H5Z_scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset,
+static void H5Z__scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, unsigned *buf_len, parms_atomic p);
-static void H5Z_scaleoffset_decompress(unsigned char *data, unsigned d_nelmts,
+static void H5Z__scaleoffset_decompress(unsigned char *data, unsigned d_nelmts,
unsigned char *buffer, parms_atomic p);
-static void H5Z_scaleoffset_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
+static void H5Z__scaleoffset_compress(unsigned char *data, unsigned d_nelmts, unsigned char *buffer,
size_t buffer_size, parms_atomic p);
/* This message derives from H5Z */
H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_SCALEOFFSET, /* Filter id number */
- 1, /* Assume encoder present: check before registering */
- 1, /* decoder_present flag (set to true) */
- "scaleoffset", /* Filter name for debugging */
- H5Z_can_apply_scaleoffset, /* The "can apply" callback */
- H5Z_set_local_scaleoffset, /* The "set local" callback */
- H5Z_filter_scaleoffset, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_SCALEOFFSET, /* Filter id number */
+ 1, /* Assume encoder present: check before registering */
+ 1, /* decoder_present flag (set to true) */
+ "scaleoffset", /* Filter name for debugging */
+ H5Z__can_apply_scaleoffset, /* The "can apply" callback */
+ H5Z__set_local_scaleoffset, /* The "set local" callback */
+ H5Z__filter_scaleoffset, /* The actual filter function */
}};
/* Local macros */
@@ -192,7 +192,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value") \
\
if(need_convert) \
- H5Z_scaleoffset_convert(&fill_val, 1, sizeof(type)); \
+ H5Z__scaleoffset_convert(&fill_val, 1, sizeof(type)); \
\
H5Z_scaleoffset_save_filval(type, cd_values, fill_val) \
}
@@ -207,7 +207,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value") \
\
if(need_convert) \
- H5Z_scaleoffset_convert(&fill_val, 1, sizeof(type)); \
+ H5Z__scaleoffset_convert(&fill_val, 1, sizeof(type)); \
\
H5Z_scaleoffset_save_filval(unsigned type, cd_values, fill_val) \
}
@@ -235,7 +235,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get fill value") \
\
if(need_convert) \
- H5Z_scaleoffset_convert(&fill_val, 1, sizeof(type)); \
+ H5Z__scaleoffset_convert(&fill_val, 1, sizeof(type)); \
\
H5Z_scaleoffset_save_filval(type, cd_values, fill_val) \
}
@@ -422,7 +422,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
H5Z_scaleoffset_max_min_1(i, d_nelmts, buf, filval, max, min) \
H5Z_scaleoffset_check_1(type, max, min, minbits) \
span = (type)(max - min + 1); \
- *minbits = H5Z_scaleoffset_log2((unsigned long long)(span+1)); \
+ *minbits = H5Z__scaleoffset_log2((unsigned long long)(span+1)); \
} else /* minbits already set, only calculate min */ \
H5Z_scaleoffset_min_1(i, d_nelmts, buf, filval, min) \
if(*minbits != sizeof(type)*8) /* change values if minbits != full precision */ \
@@ -433,7 +433,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
H5Z_scaleoffset_max_min_2(i, d_nelmts, buf, max, min) \
H5Z_scaleoffset_check_1(type, max, min, minbits) \
span = (type)(max - min + 1); \
- *minbits = H5Z_scaleoffset_log2((unsigned long long)span); \
+ *minbits = H5Z__scaleoffset_log2((unsigned long long)span); \
} else /* minbits already set, only calculate min */ \
H5Z_scaleoffset_min_2(i, d_nelmts, buf, min) \
if(*minbits != sizeof(type)*8) /* change values if minbits != full precision */ \
@@ -455,7 +455,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
H5Z_scaleoffset_max_min_1(i, d_nelmts, buf, filval, max, min) \
H5Z_scaleoffset_check_2(type, max, min, minbits) \
span = (unsigned type)(max - min + 1); \
- *minbits = H5Z_scaleoffset_log2((unsigned long long)(span + 1)); \
+ *minbits = H5Z__scaleoffset_log2((unsigned long long)(span + 1)); \
} else /* minbits already set, only calculate min */ \
H5Z_scaleoffset_min_1(i, d_nelmts, buf, filval, min) \
if(*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
@@ -466,7 +466,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
H5Z_scaleoffset_max_min_2(i, d_nelmts, buf, max, min) \
H5Z_scaleoffset_check_2(type, max, min, minbits) \
span = (unsigned type)(max - min + 1); \
- *minbits = H5Z_scaleoffset_log2((unsigned long long)span); \
+ *minbits = H5Z__scaleoffset_log2((unsigned long long)span); \
} else /* minbits already set, only calculate min */ \
H5Z_scaleoffset_min_2(i, d_nelmts, buf, min) \
if(*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
@@ -553,14 +553,14 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
H5Z_scaleoffset_max_min_3(i, d_nelmts, buf, filval, max, min, D_val) \
H5Z_scaleoffset_check_3(i, type, pow_fun, round_fun, max, min, minbits, D_val) \
span = (unsigned long long)(llround_fun(max * pow_fun(10.0f, (type)D_val) - min * pow_fun(10.0f, (type)D_val)) + 1); \
- *minbits = H5Z_scaleoffset_log2(span + 1); \
+ *minbits = H5Z__scaleoffset_log2(span + 1); \
if(*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
H5Z_scaleoffset_modify_1(i, type, pow_fun, abs_fun, lround_fun, llround_fun, buf, d_nelmts, filval, minbits, min, D_val) \
} else { /* fill value undefined */ \
H5Z_scaleoffset_max_min_2(i, d_nelmts, buf, max, min) \
H5Z_scaleoffset_check_3(i, type, pow_fun, round_fun, max, min, minbits, D_val) \
span = (unsigned long long)(llround_fun(max * pow_fun(10.0f, (type)D_val) - min * pow_fun(10.0f, (type)D_val)) + 1); \
- *minbits = H5Z_scaleoffset_log2(span); \
+ *minbits = H5Z__scaleoffset_log2(span); \
if(*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
H5Z_scaleoffset_modify_2(i, type, pow_fun, lround_fun, llround_fun, buf, d_nelmts, min, D_val) \
} \
@@ -667,7 +667,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5Z_can_apply_scaleoffset
+ * Function: H5Z__can_apply_scaleoffset
*
* Purpose: Check the parameters for scaleoffset compression for
* validity and whether they fit a particular dataset.
@@ -678,19 +678,17 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
* Programmer: Xiaowen Wu
* Friday, February 4, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static htri_t
-H5Z_can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
+H5Z__can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
{
const H5T_t *type; /* Datatype */
H5T_class_t dtype_class; /* Datatype's class */
H5T_order_t dtype_order; /* Datatype's endianness order */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Get datatype */
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -717,11 +715,11 @@ H5Z_can_apply_scaleoffset(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_can_apply_scaleoffset() */
+} /* end H5Z__can_apply_scaleoffset() */
/*-------------------------------------------------------------------------
- * Function: H5Z_scaleoffset_get_type
+ * Function: H5Z__scaleoffset_get_type
*
* Purpose: Get the specific integer type based on datatype size and sign
* or floating-point type based on size
@@ -732,17 +730,15 @@ done:
* Programmer: Xiaowen Wu
* Wednesday, April 13, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static enum H5Z_scaleoffset_t
-H5Z_scaleoffset_get_type(unsigned dtype_class, unsigned dtype_size, unsigned dtype_sign)
+H5Z__scaleoffset_get_type(unsigned dtype_class, unsigned dtype_size, unsigned dtype_sign)
{
enum H5Z_scaleoffset_t type = t_bad; /* integer type */
enum H5Z_scaleoffset_t ret_value = t_bad; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(dtype_class==H5Z_SCALEOFFSET_CLS_INTEGER) {
if(dtype_sign==H5Z_SCALEOFFSET_SGN_NONE) { /* unsigned integer */
@@ -786,7 +782,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_scaleoffset_set_parms_fillval
+ * Function: H5Z__scaleoffset_set_parms_fillval
*
* Purpose: Get the fill value of the dataset and store in cd_values[]
*
@@ -799,13 +795,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist,
+H5Z__scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist,
H5T_t *type, enum H5Z_scaleoffset_t scale_type,
unsigned cd_values[], int need_convert)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(scale_type == t_uchar)
H5Z_scaleoffset_set_filval_3(unsigned char, dcpl_plist, type, cd_values, need_convert)
@@ -834,11 +830,11 @@ H5Z_scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_scaleoffset_set_parms_fillval() */
+} /* end H5Z__scaleoffset_set_parms_fillval() */
/*-------------------------------------------------------------------------
- * Function: H5Z_set_local_scaleoffset
+ * Function: H5Z__set_local_scaleoffset
*
* Purpose: Set the "local" dataset parameters for scaleoffset
* compression.
@@ -849,12 +845,10 @@ done:
* Programmer: Xiaowen Wu
* Friday, February 4, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
+H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
{
H5P_genplist_t *dcpl_plist; /* Property list pointer */
H5T_t *type; /* Datatype */
@@ -871,7 +865,7 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
H5D_fill_value_t status; /* Status of fill value in property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Get the plist structure */
if(NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -997,12 +991,12 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
need_convert = TRUE;
/* Before getting fill value, get its type */
- if((scale_type = H5Z_scaleoffset_get_type(cd_values[H5Z_SCALEOFFSET_PARM_CLASS],
+ if((scale_type = H5Z__scaleoffset_get_type(cd_values[H5Z_SCALEOFFSET_PARM_CLASS],
cd_values[H5Z_SCALEOFFSET_PARM_SIZE], cd_values[H5Z_SCALEOFFSET_PARM_SIGN])) == 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot use C integer datatype for cast")
/* Get dataset fill value and store in cd_values[] */
- if(H5Z_scaleoffset_set_parms_fillval(dcpl_plist, type, scale_type, cd_values, need_convert) < 0)
+ if(H5Z__scaleoffset_set_parms_fillval(dcpl_plist, type, scale_type, cd_values, need_convert) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "unable to set fill value")
} /* end else */
@@ -1012,11 +1006,11 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_local_scaleoffset() */
+} /* end H5Z__set_local_scaleoffset() */
/*-------------------------------------------------------------------------
- * Function: H5Z_filter_scaleoffset
+ * Function: H5Z__filter_scaleoffset
*
* Purpose: Implement an I/O filter for storing packed integer
* data using scale and offset method.
@@ -1027,12 +1021,10 @@ done:
* Programmer: Xiaowen Wu
* Monday, February 7, 2005
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static size_t
-H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
+H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t nbytes, size_t *buf_size, void **buf)
{
size_t ret_value = 0; /* return value */
@@ -1053,7 +1045,7 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
unsigned i; /* index */
parms_atomic p; /* parameters needed for compress/decompress functions */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check arguments */
if(cd_nelmts != H5Z_SCALEOFFSET_TOTAL_NPARMS)
@@ -1179,7 +1171,7 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
/* convert to dataset datatype endianness order if needed */
if(need_convert)
- H5Z_scaleoffset_convert(outbuf, d_nelmts, p.size);
+ H5Z__scaleoffset_convert(outbuf, d_nelmts, p.size);
*buf = outbuf;
outbuf = NULL;
@@ -1190,31 +1182,31 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
/* decompress the buffer if minbits not equal to zero */
if(minbits != 0)
- H5Z_scaleoffset_decompress(outbuf, d_nelmts, (unsigned char*)(*buf)+buf_offset, p);
+ H5Z__scaleoffset_decompress(outbuf, d_nelmts, (unsigned char*)(*buf)+buf_offset, p);
else {
/* fill value is not defined and all data elements have the same value */
for(i = 0; i < size_out; i++) outbuf[i] = 0;
}
/* before postprocess, get memory type */
- if((type = H5Z_scaleoffset_get_type(dtype_class, p.size, dtype_sign)) == 0)
+ if((type = H5Z__scaleoffset_get_type(dtype_class, p.size, dtype_sign)) == 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "cannot use C integer datatype for cast")
/* postprocess after decompression */
if(dtype_class==H5Z_SCALEOFFSET_CLS_INTEGER)
- H5Z_scaleoffset_postdecompress_i(outbuf, d_nelmts, type, filavail,
+ H5Z__scaleoffset_postdecompress_i(outbuf, d_nelmts, type, filavail,
cd_values, minbits, minval);
if(dtype_class==H5Z_SCALEOFFSET_CLS_FLOAT)
if(scale_type==0) { /* variable-minimum-bits method */
- if(H5Z_scaleoffset_postdecompress_fd(outbuf, d_nelmts, type, filavail,
+ if(H5Z__scaleoffset_postdecompress_fd(outbuf, d_nelmts, type, filavail,
cd_values, minbits, minval, D_val)==FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "post-decompression failed")
}
/* after postprocess, convert to dataset datatype endianness order if needed */
if(need_convert)
- H5Z_scaleoffset_convert(outbuf, d_nelmts, p.size);
+ H5Z__scaleoffset_convert(outbuf, d_nelmts, p.size);
}
/* output; compress */
else {
@@ -1222,20 +1214,20 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
/* before preprocess, convert to memory endianness order if needed */
if(need_convert)
- H5Z_scaleoffset_convert(*buf, d_nelmts, p.size);
+ H5Z__scaleoffset_convert(*buf, d_nelmts, p.size);
/* before preprocess, get memory type */
- if((type = H5Z_scaleoffset_get_type(dtype_class, p.size, dtype_sign))==0)
+ if((type = H5Z__scaleoffset_get_type(dtype_class, p.size, dtype_sign))==0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "cannot use C integer datatype for cast")
/* preprocess before compression */
if(dtype_class==H5Z_SCALEOFFSET_CLS_INTEGER)
- H5Z_scaleoffset_precompress_i(*buf, d_nelmts, type, filavail,
+ H5Z__scaleoffset_precompress_i(*buf, d_nelmts, type, filavail,
cd_values, &minbits, &minval);
if(dtype_class==H5Z_SCALEOFFSET_CLS_FLOAT)
if(scale_type==0) { /* variable-minimum-bits method */
- if(H5Z_scaleoffset_precompress_fd(*buf, d_nelmts, type, filavail,
+ if(H5Z__scaleoffset_precompress_fd(*buf, d_nelmts, type, filavail,
cd_values, &minbits, &minval, D_val)==FAIL)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "pre-compression failed")
}
@@ -1289,7 +1281,7 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
* all data elements have the same value
*/
if(minbits != 0)
- H5Z_scaleoffset_compress((unsigned char *)*buf, d_nelmts, outbuf + buf_offset, size_out - buf_offset, p);
+ H5Z__scaleoffset_compress((unsigned char *)*buf, d_nelmts, outbuf + buf_offset, size_out - buf_offset, p);
}
/* free the input buffer */
@@ -1320,7 +1312,7 @@ done:
* or from big-endian to little-endian 2/21/2005
*/
static void
-H5Z_scaleoffset_convert(void *buf, unsigned d_nelmts, unsigned dtype_size)
+H5Z__scaleoffset_convert(void *buf, unsigned d_nelmts, unsigned dtype_size)
{
if(dtype_size > 1) {
size_t i, j;
@@ -1335,13 +1327,13 @@ H5Z_scaleoffset_convert(void *buf, unsigned d_nelmts, unsigned dtype_size)
buffer[i + dtype_size - 1 - j] = temp;
} /* end for */
} /* end if */
-} /* end H5Z_scaleoffset_convert() */
+} /* end H5Z__scaleoffset_convert() */
/* return ceiling of floating-point log2 function
* receive unsigned integer as argument 3/10/2005
*/
static unsigned
-H5Z_scaleoffset_log2(unsigned long long num)
+H5Z__scaleoffset_log2(unsigned long long num)
{
unsigned v = 0;
unsigned long long lower_bound = 1; /* is power of 2, largest value <= num */
@@ -1360,7 +1352,7 @@ H5Z_scaleoffset_log2(unsigned long long num)
/* precompress for integer type */
static void
-H5Z_scaleoffset_precompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
+H5Z__scaleoffset_precompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
unsigned filavail, const unsigned cd_values[], uint32_t *minbits, unsigned long long *minval)
{
if(type == t_uchar)
@@ -1392,7 +1384,7 @@ H5Z_scaleoffset_precompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffse
return;
}
span = (unsigned char)(max - min + 1);
- *minbits = H5Z_scaleoffset_log2((unsigned long long)(span+1));
+ *minbits = H5Z__scaleoffset_log2((unsigned long long)(span+1));
} else /* minbits already set, only calculate min */
H5Z_scaleoffset_min_1(i, d_nelmts, buf, filval, min)
if(*minbits != sizeof(signed char)*8) /* change values if minbits != full precision */
@@ -1407,7 +1399,7 @@ H5Z_scaleoffset_precompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffse
return;
}
span = (unsigned char)(max - min + 1);
- *minbits = H5Z_scaleoffset_log2((unsigned long long)span);
+ *minbits = H5Z__scaleoffset_log2((unsigned long long)span);
} else /* minbits already set, only calculate min */
H5Z_scaleoffset_min_2(i, d_nelmts, buf, min)
if(*minbits != sizeof(signed char) * 8) /* change values if minbits != full precision */
@@ -1432,7 +1424,7 @@ H5Z_scaleoffset_precompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffse
/* postdecompress for integer type */
static void
-H5Z_scaleoffset_postdecompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
+H5Z__scaleoffset_postdecompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
unsigned filavail, const unsigned cd_values[], uint32_t minbits, unsigned long long minval)
{
long long sminval = *(long long*)&minval; /* for signed integer types */
@@ -1481,13 +1473,13 @@ H5Z_scaleoffset_postdecompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleof
/* precompress for floating-point type, variable-minimum-bits method
success: non-negative, failure: negative 4/15/05 */
static herr_t
-H5Z_scaleoffset_precompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
+H5Z__scaleoffset_precompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
unsigned filavail, const unsigned cd_values[], uint32_t *minbits,
unsigned long long *minval, double D_val)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(type == t_float)
H5Z_scaleoffset_precompress_3(float, HDpowf, HDfabsf, HDroundf, HDlroundf, HDllroundf, data, d_nelmts,
@@ -1503,14 +1495,14 @@ done:
/* postdecompress for floating-point type, variable-minimum-bits method
success: non-negative, failure: negative 4/15/05 */
static herr_t
-H5Z_scaleoffset_postdecompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
+H5Z__scaleoffset_postdecompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoffset_t type,
unsigned filavail, const unsigned cd_values[], uint32_t minbits,
unsigned long long minval, double D_val)
{
long long sminval = (long long)minval; /* for signed integer types */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(type == t_float)
H5Z_scaleoffset_postdecompress_3(float, HDpowf, data, d_nelmts, filavail,
@@ -1524,14 +1516,14 @@ done:
}
static void
-H5Z_scaleoffset_next_byte(size_t *j, unsigned *buf_len)
+H5Z__scaleoffset_next_byte(size_t *j, unsigned *buf_len)
{
++(*j);
*buf_len = 8 * sizeof(unsigned char);
}
static void
-H5Z_scaleoffset_decompress_one_byte(unsigned char *data, size_t data_offset,
+H5Z__scaleoffset_decompress_one_byte(unsigned char *data, size_t data_offset,
unsigned k, unsigned begin_i, unsigned char *buffer, size_t *j, unsigned *buf_len,
parms_atomic p, unsigned dtype_len)
{
@@ -1552,7 +1544,7 @@ H5Z_scaleoffset_decompress_one_byte(unsigned char *data, size_t data_offset,
else {
data[data_offset + k] = (unsigned char)((val & ~((unsigned)(~0) << *buf_len)) << (dat_len - *buf_len));
dat_len -= *buf_len;
- H5Z_scaleoffset_next_byte(j, buf_len);
+ H5Z__scaleoffset_next_byte(j, buf_len);
if(dat_len == 0)
return;
@@ -1563,7 +1555,7 @@ H5Z_scaleoffset_decompress_one_byte(unsigned char *data, size_t data_offset,
}
static void
-H5Z_scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
+H5Z__scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, unsigned *buf_len, parms_atomic p)
{
/* begin_i: the index of byte having first significant bit */
@@ -1579,7 +1571,7 @@ H5Z_scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
begin_i = p.size - 1 - (dtype_len - p.minbits) / 8;
for(k = (int)begin_i; k >= 0; k--)
- H5Z_scaleoffset_decompress_one_byte(data, data_offset, (unsigned)k, begin_i,
+ H5Z__scaleoffset_decompress_one_byte(data, data_offset, (unsigned)k, begin_i,
buffer, j, buf_len, p, dtype_len);
}
else { /* big endian */
@@ -1588,13 +1580,13 @@ H5Z_scaleoffset_decompress_one_atomic(unsigned char *data, size_t data_offset,
begin_i = (dtype_len - p.minbits) / 8;
for(k = (int)begin_i; k <= (int)(p.size - 1); k++)
- H5Z_scaleoffset_decompress_one_byte(data, data_offset, (unsigned)k, begin_i,
+ H5Z__scaleoffset_decompress_one_byte(data, data_offset, (unsigned)k, begin_i,
buffer, j, buf_len, p, dtype_len);
}
}
static void
-H5Z_scaleoffset_decompress(unsigned char *data, unsigned d_nelmts,
+H5Z__scaleoffset_decompress(unsigned char *data, unsigned d_nelmts,
unsigned char *buffer, parms_atomic p)
{
/* i: index of data, j: index of buffer,
@@ -1612,11 +1604,11 @@ H5Z_scaleoffset_decompress(unsigned char *data, unsigned d_nelmts,
/* decompress */
for(i = 0; i < d_nelmts; i++)
- H5Z_scaleoffset_decompress_one_atomic(data, i * p.size, buffer, &j, &buf_len, p);
+ H5Z__scaleoffset_decompress_one_atomic(data, i * p.size, buffer, &j, &buf_len, p);
}
static void
-H5Z_scaleoffset_compress_one_byte(unsigned char *data, size_t data_offset,
+H5Z__scaleoffset_compress_one_byte(unsigned char *data, size_t data_offset,
unsigned k, unsigned begin_i, unsigned char *buffer, size_t *j, unsigned *buf_len,
parms_atomic p, unsigned dtype_len)
{
@@ -1636,7 +1628,7 @@ H5Z_scaleoffset_compress_one_byte(unsigned char *data, size_t data_offset,
} else {
buffer[*j] |= (unsigned char)((unsigned)(val >> (dat_len - *buf_len)) & ~((unsigned)(~0) << *buf_len));
dat_len -= *buf_len;
- H5Z_scaleoffset_next_byte(j, buf_len);
+ H5Z__scaleoffset_next_byte(j, buf_len);
if(dat_len == 0)
return;
@@ -1646,7 +1638,7 @@ H5Z_scaleoffset_compress_one_byte(unsigned char *data, size_t data_offset,
}
static void
-H5Z_scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset,
+H5Z__scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset,
unsigned char *buffer, size_t *j, unsigned *buf_len, parms_atomic p)
{
/* begin_i: the index of byte having first significant bit */
@@ -1662,7 +1654,7 @@ H5Z_scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset,
begin_i = p.size - 1 - (dtype_len - p.minbits) / 8;
for(k = (int)begin_i; k >= 0; k--)
- H5Z_scaleoffset_compress_one_byte(data, data_offset, (unsigned)k, begin_i,
+ H5Z__scaleoffset_compress_one_byte(data, data_offset, (unsigned)k, begin_i,
buffer, j, buf_len, p, dtype_len);
}
else { /* big endian */
@@ -1670,13 +1662,13 @@ H5Z_scaleoffset_compress_one_atomic(unsigned char *data, size_t data_offset,
begin_i = (dtype_len - p.minbits) / 8;
for(k = (int)begin_i; k <= (int)(p.size - 1); k++)
- H5Z_scaleoffset_compress_one_byte(data, data_offset, (unsigned)k, begin_i,
+ H5Z__scaleoffset_compress_one_byte(data, data_offset, (unsigned)k, begin_i,
buffer, j, buf_len, p, dtype_len);
}
}
static void
-H5Z_scaleoffset_compress(unsigned char *data, unsigned d_nelmts,
+H5Z__scaleoffset_compress(unsigned char *data, unsigned d_nelmts,
unsigned char *buffer, size_t buffer_size, parms_atomic p)
{
/* i: index of data, j: index of buffer,
@@ -1694,6 +1686,6 @@ H5Z_scaleoffset_compress(unsigned char *data, unsigned d_nelmts,
/* compress */
for(i = 0; i < d_nelmts; i++)
- H5Z_scaleoffset_compress_one_atomic(data, i * p.size, buffer, &j, &buf_len, p);
+ H5Z__scaleoffset_compress_one_atomic(data, i * p.size, buffer, &j, &buf_len, p);
}
diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c
index b1d0722..224c78e 100644
--- a/src/H5Zshuffle.c
+++ b/src/H5Zshuffle.c
@@ -23,20 +23,20 @@
#include "H5Zpkg.h" /* Data filters */
/* Local function prototypes */
-static herr_t H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static size_t H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts,
+static herr_t H5Z__set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static size_t H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
/* This message derives from H5Z */
const H5Z_class2_t H5Z_SHUFFLE[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_SHUFFLE, /* Filter id number */
- 1, /* encoder_present flag (set to true) */
- 1, /* decoder_present flag (set to true) */
+ 1, /* encoder_present flag (set to true) */
+ 1, /* decoder_present flag (set to true) */
"shuffle", /* Filter name for debugging */
NULL, /* The "can apply" callback */
- H5Z_set_local_shuffle, /* The "set local" callback */
- H5Z_filter_shuffle, /* The actual filter function */
+ H5Z__set_local_shuffle, /* The "set local" callback */
+ H5Z__filter_shuffle, /* The actual filter function */
}};
/* Local macros */
@@ -44,7 +44,7 @@ const H5Z_class2_t H5Z_SHUFFLE[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5Z_set_local_shuffle
+ * Function: H5Z__set_local_shuffle
*
* Purpose: Set the "local" dataset parameter for data shuffling to be
* the size of the datatype.
@@ -55,12 +55,10 @@ const H5Z_class2_t H5Z_SHUFFLE[1] = {{
* Programmer: Quincey Koziol
* Monday, April 7, 2003
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
+H5Z__set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
{
H5P_genplist_t *dcpl_plist; /* Property list pointer */
const H5T_t *type; /* Datatype */
@@ -69,7 +67,7 @@ H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_i
unsigned cd_values[H5Z_SHUFFLE_TOTAL_NPARMS]; /* Filter parameters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Get the plist structure */
if(NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -93,11 +91,11 @@ H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_i
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_local_shuffle() */
+} /* end H5Z__set_local_shuffle() */
/*-------------------------------------------------------------------------
- * Function: H5Z_filter_shuffle
+ * Function: H5Z__filter_shuffle
*
* Purpose: Implement an I/O filter which "de-interlaces" a block of data
* by putting all the bytes in a byte-position for each element
@@ -112,14 +110,10 @@ done:
* Programmer: Kent Yang
* Wednesday, November 13, 2002
*
- * Modifications:
- * Quincey Koziol, November 13, 2002
- * Cleaned up code.
- *
*-------------------------------------------------------------------------
*/
static size_t
-H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
+H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t nbytes, size_t *buf_size, void **buf)
{
void *dest = NULL; /* Buffer to deposit [un]shuffled bytes into */
@@ -134,7 +128,7 @@ H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t leftover; /* Extra bytes at end of buffer */
size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI(0)
+ FUNC_ENTER_STATIC
/* Check arguments */
if (cd_nelmts!=H5Z_SHUFFLE_TOTAL_NPARMS || cd_values[H5Z_SHUFFLE_PARM_SIZE]==0)
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index 8ed173e..c72c499 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -32,27 +32,27 @@
#endif
/* Local function prototypes */
-static htri_t H5Z_can_apply_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static herr_t H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static size_t H5Z_filter_szip (unsigned flags, size_t cd_nelmts,
+static htri_t H5Z__can_apply_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static herr_t H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
+static size_t H5Z__filter_szip(unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
/* This message derives from H5Z */
H5Z_class2_t H5Z_SZIP[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_SZIP, /* Filter id number */
- 1, /* Assume encoder present: check before registering */
- 1, /* decoder_present flag (set to true) */
- "szip", /* Filter name for debugging */
- H5Z_can_apply_szip, /* The "can apply" callback */
- H5Z_set_local_szip, /* The "set local" callback */
- H5Z_filter_szip, /* The actual filter function */
+ 1, /* Assume encoder present: check before registering */
+ 1, /* decoder_present flag (set to true) */
+ "szip", /* Filter name for debugging */
+ H5Z__can_apply_szip, /* The "can apply" callback */
+ H5Z__set_local_szip, /* The "set local" callback */
+ H5Z__filter_szip, /* The actual filter function */
}};
/*-------------------------------------------------------------------------
- * Function: H5Z_can_apply_szip
+ * Function: H5Z__can_apply_szip
*
* Purpose: Check the parameters for szip compression for validity and
* whether they fit a particular dataset.
@@ -73,14 +73,14 @@ H5Z_class2_t H5Z_SZIP[1] = {{
*-------------------------------------------------------------------------
*/
static htri_t
-H5Z_can_apply_szip(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
+H5Z__can_apply_szip(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
{
const H5T_t *type; /* Datatype */
unsigned dtype_size; /* Datatype's size (in bits) */
H5T_order_t dtype_order; /* Datatype's endianness order */
htri_t ret_value = TRUE; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Get datatype */
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@@ -105,11 +105,11 @@ H5Z_can_apply_szip(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UN
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_can_apply_szip() */
+} /* end H5Z__can_apply_szip() */
/*-------------------------------------------------------------------------
- * Function: H5Z_set_local_szip
+ * Function: H5Z__set_local_szip
*
* Purpose: Set the "local" dataset parameters for szip compression.
*
@@ -119,18 +119,10 @@ done:
* Programmer: Quincey Koziol
* Monday, April 7, 2003
*
- * Modifications: Used new logic to set the size of the scanline parameter.
- * Now SZIP compression can be applied to the chunk
- * of any shape and size with only one restriction: the number
- * of elements in the chunk has to be not less than number
- * of elements (pixels) in the block (cd_values[H5Z_SZIP_PARM_PPB]
- * parameter).
- * Elena Pourmal, July 20, 2004
- *
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
+H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
{
H5P_genplist_t *dcpl_plist; /* Property list pointer */
const H5T_t *type; /* Datatype */
@@ -147,7 +139,7 @@ H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
hsize_t scanline; /* Size of dataspace's fastest changing dimension */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Get the plist structure */
if(NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
@@ -253,11 +245,11 @@ H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_set_local_szip() */
+} /* end H5Z__set_local_szip() */
/*-------------------------------------------------------------------------
- * Function: H5Z_filter_szip
+ * Function: H5Z__filter_szip
*
* Purpose: Implement an I/O filter around the 'rice' algorithm in
* libsz
@@ -271,7 +263,7 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5Z_filter_szip (unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
+H5Z__filter_szip(unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
size_t nbytes, size_t *buf_size, void **buf)
{
size_t ret_value = 0; /* Return value */
@@ -280,7 +272,7 @@ H5Z_filter_szip (unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
unsigned char *newbuf = NULL; /* Pointer to input buffer */
SZ_com_t sz_param; /* szip parameter block */
- FUNC_ENTER_NOAPI(0)
+ FUNC_ENTER_STATIC
/* Sanity check to make certain that we haven't drifted out of date with
* the mask options from the szlib.h header */
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 1c8d415..6f53ae0 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -86,24 +86,20 @@ typedef struct {
} H5Z_token;
/* Local function prototypes */
-static H5Z_token *H5Z_get_token(H5Z_token *current);
-static H5Z_node *H5Z_parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
-static H5Z_node *H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
-static H5Z_node *H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
-static H5Z_node *H5Z_new_node(H5Z_token_type type);
-static void H5Z_do_op(H5Z_node* tree);
-static hbool_t H5Z_op_is_numbs(H5Z_node* _tree);
-static hbool_t H5Z_op_is_numbs2(H5Z_node* _tree);
-static hid_t H5Z_xform_find_type(const H5T_t* type);
-static herr_t H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_type, H5Z_result* res);
-static void H5Z_xform_destroy_parse_tree(H5Z_node *tree);
-static void* H5Z_xform_parse(const char *expression, H5Z_datval_ptrs* dat_val_pointers);
-static void* H5Z_xform_copy_tree(H5Z_node* tree, H5Z_datval_ptrs* dat_val_pointers, H5Z_datval_ptrs* new_dat_val_pointers);
-static void H5Z_xform_reduce_tree(H5Z_node* tree);
-#ifdef H5Z_XFORM_DEBUG
-static void H5Z_XFORM_DEBUG(H5Z_node *tree);
-static void H5Z_print(H5Z_node *tree, FILE *stream);
-#endif /* H5Z_XFORM_DEBUG */
+static H5Z_token *H5Z__get_token(H5Z_token *current);
+static H5Z_node *H5Z__parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
+static H5Z_node *H5Z__parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
+static H5Z_node *H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers);
+static H5Z_node *H5Z__new_node(H5Z_token_type type);
+static void H5Z__do_op(H5Z_node* tree);
+static hbool_t H5Z__op_is_numbs(H5Z_node* _tree);
+static hbool_t H5Z__op_is_numbs2(H5Z_node* _tree);
+static hid_t H5Z__xform_find_type(const H5T_t* type);
+static herr_t H5Z__xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_type, H5Z_result* res);
+static void H5Z__xform_destroy_parse_tree(H5Z_node *tree);
+static void* H5Z__xform_parse(const char *expression, H5Z_datval_ptrs* dat_val_pointers);
+static void* H5Z__xform_copy_tree(H5Z_node* tree, H5Z_datval_ptrs* dat_val_pointers, H5Z_datval_ptrs* new_dat_val_pointers);
+static void H5Z__xform_reduce_tree(H5Z_node* tree);
/* PGCC (11.8-0) has trouble with the command *p++ = *p OP tree_val. It increments P first before
* doing the operation. So I break down the command into two lines:
@@ -312,11 +308,11 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
{ \
ret_value->type = (TYPE); \
if(tree->lchild) \
- ret_value->lchild = (H5Z_node*) H5Z_xform_copy_tree(tree->lchild, dat_val_pointers, new_dat_val_pointers); \
+ ret_value->lchild = (H5Z_node*) H5Z__xform_copy_tree(tree->lchild, dat_val_pointers, new_dat_val_pointers); \
else \
ret_value->lchild = NULL; \
if(tree->rchild) \
- ret_value->rchild = (H5Z_node*) H5Z_xform_copy_tree(tree->rchild, dat_val_pointers, new_dat_val_pointers); \
+ ret_value->rchild = (H5Z_node*) H5Z__xform_copy_tree(tree->rchild, dat_val_pointers, new_dat_val_pointers); \
else \
ret_value->rchild = NULL; \
} \
@@ -329,7 +325,7 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
}
/* The difference of this macro from H5Z_XFORM_DO_OP3 is that it handles the operations when the left operand is empty, like -x or +x.
- * The reason that it's separated from H5Z_XFORM_DO_OP3 is because compilers don't accept operations like *x or /x. So in H5Z_do_op,
+ * The reason that it's separated from H5Z_XFORM_DO_OP3 is because compilers don't accept operations like *x or /x. So in H5Z__do_op,
* these two macros are called in different ways. (SLU 2012/3/20)
*/
#define H5Z_XFORM_DO_OP6(OP) \
@@ -371,7 +367,7 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
}
/*
- * Programmer: Bill Wendling <wendling@ncsa.uiuc.edu>
+ * Programmer: Bill Wendling
* 25. August 2003
*/
@@ -393,20 +389,23 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
/*-------------------------------------------------------------------------
- * Function: H5Z_unget_token
+ * Function: H5Z__unget_token
+ *
* Purpose: Rollback the H5Z_token to the previous H5Z_token retrieved. There
* should only need to be one level of rollback necessary
* for our grammar.
+ *
* Return: Always succeeds.
+ *
* Programmer: Bill Wendling
* 26. August 2003
-*
+ *
*-------------------------------------------------------------------------
*/
static void
-H5Z_unget_token(H5Z_token *current)
+H5Z__unget_token(H5Z_token *current)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(current);
@@ -420,7 +419,7 @@ H5Z_unget_token(H5Z_token *current)
/*-------------------------------------------------------------------------
- * Function: H5Z_get_token
+ * Function: H5Z__get_token
*
* Purpose: Determine what the next valid H5Z_token is in the expression
* string. The current position within the H5Z_token string is
@@ -438,11 +437,11 @@ H5Z_unget_token(H5Z_token *current)
*-------------------------------------------------------------------------
*/
static H5Z_token *
-H5Z_get_token(H5Z_token *current)
+H5Z__get_token(H5Z_token *current)
{
H5Z_token *ret_value = current;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(current);
@@ -558,7 +557,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_xform_destroy_parse_tree
+ * Function: H5Z__xform_destroy_parse_tree
* Purpose: Recursively destroys the expression tree.
* Return: Nothing
* Programmer: Bill Wendling
@@ -567,14 +566,13 @@ done:
*-------------------------------------------------------------------------
*/
static void
-H5Z_xform_destroy_parse_tree(H5Z_node *tree)
+H5Z__xform_destroy_parse_tree(H5Z_node *tree)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
- if (tree)
- {
- H5Z_xform_destroy_parse_tree(tree->lchild);
- H5Z_xform_destroy_parse_tree(tree->rchild);
+ if(tree) {
+ H5Z__xform_destroy_parse_tree(tree->lchild);
+ H5Z__xform_destroy_parse_tree(tree->rchild);
H5MM_xfree(tree);
tree = NULL;
}
@@ -589,7 +587,7 @@ H5Z_xform_destroy_parse_tree(H5Z_node *tree)
* Purpose: Entry function for parsing the expression string.
*
* Return: Success: Valid H5Z_node ptr to an expression tree.
- * NULLure: NULL
+ * Failure: NULL
*
* Programmer: Bill Wendling
* 26. August 2003
@@ -597,12 +595,12 @@ H5Z_xform_destroy_parse_tree(H5Z_node *tree)
*-------------------------------------------------------------------------
*/
static void *
-H5Z_xform_parse(const char *expression, H5Z_datval_ptrs* dat_val_pointers)
+H5Z__xform_parse(const char *expression, H5Z_datval_ptrs* dat_val_pointers)
{
H5Z_token tok;
void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_STATIC
if(!expression)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "No expression provided?")
@@ -610,9 +608,9 @@ H5Z_xform_parse(const char *expression, H5Z_datval_ptrs* dat_val_pointers)
/* Set up the initial H5Z_token for parsing */
tok.tok_expr = tok.tok_begin = tok.tok_end = expression;
- ret_value = (void*)H5Z_parse_expression(&tok, dat_val_pointers);
+ ret_value = (void*)H5Z__parse_expression(&tok, dat_val_pointers);
- H5Z_xform_reduce_tree((H5Z_node*)ret_value);
+ H5Z__xform_reduce_tree((H5Z_node*)ret_value);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -620,48 +618,49 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_parse_expression
+ * Function: H5Z__parse_expression
* Purpose: Beginning of the recursive descent parser to parse the
* expression. An expression is:
*
* expr := term | term '+' term | term '-' term
*
* Return: Success: Valid H5Z_node ptr to expression tree
- * NULLure: NULL
+ * Failure: NULL
+ *
* Programmer: Bill Wendling
* 26. August 2003
*
*-------------------------------------------------------------------------
*/
static H5Z_node *
-H5Z_parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
+H5Z__parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
{
H5Z_node *expr;
H5Z_node *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- expr = H5Z_parse_term(current, dat_val_pointers);
+ expr = H5Z__parse_term(current, dat_val_pointers);
for (;;) {
H5Z_node *new_node;
- current = H5Z_get_token(current);
+ current = H5Z__get_token(current);
switch(current->tok_type) {
case H5Z_XFORM_PLUS:
- new_node = H5Z_new_node(H5Z_XFORM_PLUS);
+ new_node = H5Z__new_node(H5Z_XFORM_PLUS);
if (!new_node) {
- H5Z_xform_destroy_parse_tree(expr);
+ H5Z__xform_destroy_parse_tree(expr);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
}
new_node->lchild = expr;
- new_node->rchild = H5Z_parse_term(current, dat_val_pointers);
+ new_node->rchild = H5Z__parse_term(current, dat_val_pointers);
if (!new_node->rchild) {
- H5Z_xform_destroy_parse_tree(new_node);
+ H5Z__xform_destroy_parse_tree(new_node);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
@@ -669,18 +668,18 @@ H5Z_parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
break;
case H5Z_XFORM_MINUS:
- new_node = H5Z_new_node(H5Z_XFORM_MINUS);
+ new_node = H5Z__new_node(H5Z_XFORM_MINUS);
if (!new_node) {
- H5Z_xform_destroy_parse_tree(expr);
+ H5Z__xform_destroy_parse_tree(expr);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
}
new_node->lchild = expr;
- new_node->rchild = H5Z_parse_term(current, dat_val_pointers);
+ new_node->rchild = H5Z__parse_term(current, dat_val_pointers);
if (!new_node->rchild) {
- H5Z_xform_destroy_parse_tree(new_node);
+ H5Z__xform_destroy_parse_tree(new_node);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
@@ -688,7 +687,7 @@ H5Z_parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
break;
case H5Z_XFORM_RPAREN:
- H5Z_unget_token(current);
+ H5Z__unget_token(current);
HGOTO_DONE(expr)
case H5Z_XFORM_END:
@@ -702,7 +701,7 @@ H5Z_parse_expression(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
case H5Z_XFORM_DIVIDE:
case H5Z_XFORM_LPAREN:
default:
- H5Z_xform_destroy_parse_tree(expr);
+ H5Z__xform_destroy_parse_tree(expr);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
}
@@ -713,47 +712,48 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_parse_term
+ * Function: H5Z__parse_term
* Purpose: Parses a term in our expression language. A term is:
*
* term := factor | factor '*' factor | factor '/' factor
*
* Return: Success: Valid H5Z_node ptr to expression tree
- * NULLure: NULL
+ * Failure: NULL
+ *
* Programmer: Bill Wendling
* 26. August 2003
-*
+ *
*-------------------------------------------------------------------------
*/
static H5Z_node *
-H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
+H5Z__parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
{
H5Z_node *term = NULL;
H5Z_node *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- term = H5Z_parse_factor(current, dat_val_pointers);
+ term = H5Z__parse_factor(current, dat_val_pointers);
for (;;) {
H5Z_node *new_node;
- current = H5Z_get_token(current);
+ current = H5Z__get_token(current);
switch (current->tok_type) {
case H5Z_XFORM_MULT:
- new_node = H5Z_new_node(H5Z_XFORM_MULT);
+ new_node = H5Z__new_node(H5Z_XFORM_MULT);
if (!new_node) {
- H5Z_xform_destroy_parse_tree(term);
+ H5Z__xform_destroy_parse_tree(term);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
}
new_node->lchild = term;
- new_node->rchild = H5Z_parse_factor(current, dat_val_pointers);
+ new_node->rchild = H5Z__parse_factor(current, dat_val_pointers);
if (!new_node->rchild) {
- H5Z_xform_destroy_parse_tree(new_node);
+ H5Z__xform_destroy_parse_tree(new_node);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
@@ -761,25 +761,25 @@ H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
break;
case H5Z_XFORM_DIVIDE:
- new_node = H5Z_new_node(H5Z_XFORM_DIVIDE);
+ new_node = H5Z__new_node(H5Z_XFORM_DIVIDE);
if (!new_node) {
- H5Z_xform_destroy_parse_tree(term);
+ H5Z__xform_destroy_parse_tree(term);
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
}
new_node->lchild = term;
- new_node->rchild = H5Z_parse_factor(current, dat_val_pointers);
+ new_node->rchild = H5Z__parse_factor(current, dat_val_pointers);
term = new_node;
if (!new_node->rchild) {
- H5Z_xform_destroy_parse_tree(new_node);
+ H5Z__xform_destroy_parse_tree(new_node);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
break;
case H5Z_XFORM_RPAREN:
- H5Z_unget_token(current);
+ H5Z__unget_token(current);
HGOTO_DONE(term)
case H5Z_XFORM_END:
@@ -791,12 +791,12 @@ H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
case H5Z_XFORM_PLUS:
case H5Z_XFORM_MINUS:
case H5Z_XFORM_LPAREN:
- H5Z_unget_token(current);
+ H5Z__unget_token(current);
HGOTO_DONE(term)
case H5Z_XFORM_ERROR:
default:
- H5Z_xform_destroy_parse_tree(term);
+ H5Z__xform_destroy_parse_tree(term);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "bad transform type passed to data transform expression")
} /* end switch */
} /* end for */
@@ -807,7 +807,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_parse_factor
+ * Function: H5Z__parse_factor
* Purpose: Parses a factor in our expression language. A factor is:
*
* factor := number | // C long or double
@@ -817,26 +817,27 @@ done:
* '(' expr ')'
*
* Return: Success: Valid H5Z_node ptr to expression tree
- * NULLure: NULL
+ * Failure: NULL
+ *
* Programmer: Bill Wendling
* 26. August 2003
*
*-------------------------------------------------------------------------
*/
static H5Z_node *
-H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
+H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
{
H5Z_node *factor=NULL;
H5Z_node *new_node;
H5Z_node *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- current = H5Z_get_token(current);
+ current = H5Z__get_token(current);
switch (current->tok_type) {
case H5Z_XFORM_INTEGER:
- factor = H5Z_new_node(H5Z_XFORM_INTEGER);
+ factor = H5Z__new_node(H5Z_XFORM_INTEGER);
if (!factor)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
@@ -844,7 +845,7 @@ H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
break;
case H5Z_XFORM_FLOAT:
- factor = H5Z_new_node(H5Z_XFORM_FLOAT);
+ factor = H5Z__new_node(H5Z_XFORM_FLOAT);
if (!factor)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
@@ -852,7 +853,7 @@ H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
break;
case H5Z_XFORM_SYMBOL:
- factor = H5Z_new_node(H5Z_XFORM_SYMBOL);
+ factor = H5Z__new_node(H5Z_XFORM_SYMBOL);
if (!factor)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
@@ -862,76 +863,76 @@ H5Z_parse_factor(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
break;
case H5Z_XFORM_LPAREN:
- factor = H5Z_parse_expression(current, dat_val_pointers);
+ factor = H5Z__parse_expression(current, dat_val_pointers);
if (!factor)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Unable to allocate new node")
- current = H5Z_get_token(current);
+ current = H5Z__get_token(current);
if (current->tok_type != H5Z_XFORM_RPAREN) {
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error in data transform expression")
}
break;
case H5Z_XFORM_RPAREN:
/* We shouldn't see a ) right now */
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Syntax error: unexpected ')' ")
case H5Z_XFORM_PLUS:
/* unary + */
- new_node = H5Z_parse_factor(current, dat_val_pointers);
+ new_node = H5Z__parse_factor(current, dat_val_pointers);
if (new_node) {
if (new_node->type != H5Z_XFORM_INTEGER && new_node->type != H5Z_XFORM_FLOAT &&
new_node->type != H5Z_XFORM_SYMBOL) {
- H5Z_xform_destroy_parse_tree(new_node);
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(new_node);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
factor = new_node;
- new_node = H5Z_new_node(H5Z_XFORM_PLUS);
+ new_node = H5Z__new_node(H5Z_XFORM_PLUS);
if (!new_node) {
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
new_node->rchild = factor;
factor = new_node;
} else {
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
break;
case H5Z_XFORM_MINUS:
/* unary - */
- new_node = H5Z_parse_factor(current, dat_val_pointers);
+ new_node = H5Z__parse_factor(current, dat_val_pointers);
if (new_node) {
if (new_node->type != H5Z_XFORM_INTEGER && new_node->type != H5Z_XFORM_FLOAT &&
new_node->type != H5Z_XFORM_SYMBOL) {
- H5Z_xform_destroy_parse_tree(new_node);
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(new_node);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
factor = new_node;
- new_node = H5Z_new_node(H5Z_XFORM_MINUS);
+ new_node = H5Z__new_node(H5Z_XFORM_MINUS);
if (!new_node) {
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
new_node->rchild = factor;
factor = new_node;
} else {
- H5Z_xform_destroy_parse_tree(factor);
+ H5Z__xform_destroy_parse_tree(factor);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Error parsing data transform expression")
}
break;
@@ -956,21 +957,24 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_new_node
+ * Function: H5Z__new_node
+ *
* Purpose: Create and initialize a new H5Z_node structure.
+ *
* Return: Success: Valid H5Z_node ptr
- * NULLure: NULL
+ * Failure: NULL
+ *
* Programmer: Bill Wendling
* 26. August 2003
*
*-------------------------------------------------------------------------
*/
static H5Z_node *
-H5Z_new_node(H5Z_token_type type)
+H5Z__new_node(H5Z_token_type type)
{
H5Z_node *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(NULL == (ret_value = (H5Z_node *)H5MM_calloc(sizeof(H5Z_node))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "Ran out of memory trying to allocate space for nodes in the parse tree")
@@ -985,7 +989,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Z_xform_eval
* Purpose: If the transform is trivial, this function applies it.
- * Otherwise, it calls H5Z_xform_eval_full to do the full
+ * Otherwise, it calls H5Z__xform_eval_full to do the full
* transform.
* Return: SUCCEED if transform applied successfully, FAIL otherwise
* Programmer: Leon Arber
@@ -1009,7 +1013,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void* array, size_t array_size
tree = data_xform_prop->parse_root;
/* Get the datatype ID for the buffer's type */
- if((array_type = H5Z_xform_find_type(buf_type)) < 0)
+ if((array_type = H5Z__xform_find_type(buf_type)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Cannot perform data transform on this type.")
/* After this point, we're assured that the type of the array is handled by the eval code,
@@ -1069,7 +1073,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void* array, size_t array_size
} /* end for */
} /* end else */
- if(H5Z_xform_eval_full(tree, array_size, array_type, &res) < 0)
+ if(H5Z__xform_eval_full(tree, array_size, array_type, &res) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform")
if(data_xform_prop->dat_val_pointers->num_ptrs > 1)
@@ -1096,25 +1100,30 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_xform_eval_full
+ * Function: H5Z__xform_eval_full
+ *
* Purpose: Does a full evaluation of the parse tree contained in tree
* and applies this transform to array.
+ *
+ * Notes: In the case of a polynomial data transform (ie, the left and right
+ * subtree are both of type H5Z_XFORM_SYMBOL), the convention is
+ * that the left hand side will accumulate changes and, at the end,
+ * the new data will be copied from the lhs.
+ *
* Return: Nothing
+ *
* Programmer: Leon Arber
* 5/1/04
*
- * Notes: In the case of a polynomial data transform (ie, the left and right subtree
- * are both of type H5Z_XFORM_SYMBOL), the convention is that the left hand side
- * will accumulate changes and, at the end, the new data will be copied from the lhs.
*-------------------------------------------------------------------------
*/
static herr_t
-H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_type, H5Z_result *res)
+H5Z__xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_type, H5Z_result *res)
{
H5Z_result resl, resr;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(tree);
@@ -1139,9 +1148,9 @@ H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
res->value.dat_val = *((void**)(tree->value.dat_val));
} /* end if */
else {
- if(tree->lchild && H5Z_xform_eval_full(tree->lchild, array_size, array_type, &resl) < 0)
+ if(tree->lchild && H5Z__xform_eval_full(tree->lchild, array_size, array_type, &resl) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform")
- if(H5Z_xform_eval_full(tree->rchild, array_size, array_type, &resr) < 0)
+ if(H5Z__xform_eval_full(tree->rchild, array_size, array_type, &resr) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error while performing data transform")
res->type = H5Z_XFORM_SYMBOL;
@@ -1191,23 +1200,25 @@ H5Z_xform_eval_full(H5Z_node *tree, const size_t array_size, const hid_t array_
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_xform_eval_full() */
+} /* end H5Z__xform_eval_full() */
/*-------------------------------------------------------------------------
* Function: H5Z_find_type
+ *
* Return: Native type of datatype that is passed in
+ *
* Programmer: Leon Arber, 4/20/04
*
*-------------------------------------------------------------------------
*/
static hid_t
-H5Z_xform_find_type(const H5T_t* type)
+H5Z__xform_find_type(const H5T_t* type)
{
H5T_t *tmp; /* Temporary datatype */
hid_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(type);
@@ -1274,25 +1285,28 @@ H5Z_xform_find_type(const H5T_t* type)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5Z_xform_find_type() */
+} /* end H5Z__xform_find_type() */
/*-------------------------------------------------------------------------
- * Function: H5Z_xform_copy_tree
+ * Function: H5Z__xform_copy_tree
+ *
* Purpose: Makes a copy of the parse tree passed in.
+ *
* Return: A pointer to a root for a new parse tree which is a copy
* of the one passed in.
+ *
* Programmer: Leon Arber
* April 1, 2004.
*
*-------------------------------------------------------------------------
*/
static void *
-H5Z_xform_copy_tree(H5Z_node* tree, H5Z_datval_ptrs* dat_val_pointers, H5Z_datval_ptrs* new_dat_val_pointers)
+H5Z__xform_copy_tree(H5Z_node* tree, H5Z_datval_ptrs* dat_val_pointers, H5Z_datval_ptrs* new_dat_val_pointers)
{
H5Z_node* ret_value=NULL;
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_STATIC
HDassert(tree);
@@ -1351,21 +1365,24 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Z_op_is_numbs
+ * Function: H5Z__op_is_numbs
+ *
* Purpose: Internal function to facilitate the condition check in
- * H5Z_xform_reduce_tree to reduce the bulkiness of the code.
+ * H5Z__xform_reduce_tree to reduce the bulkiness of the code.
+ *
* Return: TRUE or FALSE
+ *
* Programmer: Raymond Lu
* 15 March 2012
*
*-------------------------------------------------------------------------
*/
static hbool_t
-H5Z_op_is_numbs(H5Z_node* _tree)
+H5Z__op_is_numbs(H5Z_node* _tree)
{
hbool_t ret_value = FALSE;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(_tree);
@@ -1377,23 +1394,26 @@ H5Z_op_is_numbs(H5Z_node* _tree)
/*-------------------------------------------------------------------------
- * Function: H5Z_op_is_numbs2
+ * Function: H5Z__op_is_numbs2
+ *
* Purpose: Internal function to facilitate the condition check in
- * H5Z_xform_reduce_tree to reduce the bulkiness of the code.
- * The difference from H5Z_op_is_numbs is that the left child
+ * H5Z__xform_reduce_tree to reduce the bulkiness of the code.
+ * The difference from H5Z__op_is_numbs is that the left child
* can be empty, like -x or +x.
+ *
* Return: TRUE or FALSE
+ *
* Programmer: Raymond Lu
* 15 March 2012
*
*-------------------------------------------------------------------------
*/
static hbool_t
-H5Z_op_is_numbs2(H5Z_node* _tree)
+H5Z__op_is_numbs2(H5Z_node* _tree)
{
hbool_t ret_value = FALSE;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(_tree);
@@ -1406,50 +1426,51 @@ H5Z_op_is_numbs2(H5Z_node* _tree)
/*-------------------------------------------------------------------------
- * Function: H5Z_xform_reduce_tree
+ * Function: H5Z__xform_reduce_tree
+ *
* Purpose: Simplifies parse tree passed in by performing any obvious
* and trivial arithemtic calculations.
*
* Return: None.
+ *
* Programmer: Leon Arber
* April 1, 2004.
- * Modifications:
*
*-------------------------------------------------------------------------
*/
static void
-H5Z_xform_reduce_tree(H5Z_node* tree)
+H5Z__xform_reduce_tree(H5Z_node* tree)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
if(tree) {
if((tree->type == H5Z_XFORM_DIVIDE) || (tree->type == H5Z_XFORM_MULT))
{
- if(H5Z_op_is_numbs(tree))
- H5Z_do_op(tree);
+ if(H5Z__op_is_numbs(tree))
+ H5Z__do_op(tree);
else
{
- H5Z_xform_reduce_tree(tree->lchild);
- if(H5Z_op_is_numbs(tree))
- H5Z_do_op(tree);
+ H5Z__xform_reduce_tree(tree->lchild);
+ if(H5Z__op_is_numbs(tree))
+ H5Z__do_op(tree);
else {
- H5Z_xform_reduce_tree(tree->rchild);
- if(H5Z_op_is_numbs(tree))
- H5Z_do_op(tree);
+ H5Z__xform_reduce_tree(tree->rchild);
+ if(H5Z__op_is_numbs(tree))
+ H5Z__do_op(tree);
}
}
} else if((tree->type == H5Z_XFORM_PLUS) || (tree->type == H5Z_XFORM_MINUS)) {
- if(H5Z_op_is_numbs2(tree))
- H5Z_do_op(tree);
+ if(H5Z__op_is_numbs2(tree))
+ H5Z__do_op(tree);
else
{
- H5Z_xform_reduce_tree(tree->lchild);
- if(H5Z_op_is_numbs2(tree))
- H5Z_do_op(tree);
+ H5Z__xform_reduce_tree(tree->lchild);
+ if(H5Z__op_is_numbs2(tree))
+ H5Z__do_op(tree);
else {
- H5Z_xform_reduce_tree(tree->rchild);
- if(H5Z_op_is_numbs2(tree))
- H5Z_do_op(tree);
+ H5Z__xform_reduce_tree(tree->rchild);
+ if(H5Z__op_is_numbs2(tree))
+ H5Z__do_op(tree);
}
}
}
@@ -1461,22 +1482,25 @@ H5Z_xform_reduce_tree(H5Z_node* tree)
/*-------------------------------------------------------------------------
- * Function: H5Z_do_op
+ * Function: H5Z__do_op
+ *
* Purpose: If the root of the tree passed in points to a simple
* arithmetic operation and the left and right subtrees are both
* integer or floating point values, this function does that
* operation, free the left and right subtrees, and replaces
* the root with the result of the operation.
+ *
* Return: None.
+ *
* Programmer: Leon Arber
* April 1, 2004.
*
*-------------------------------------------------------------------------
*/
static void
-H5Z_do_op(H5Z_node* tree)
+H5Z__do_op(H5Z_node* tree)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
if(tree->type == H5Z_XFORM_DIVIDE)
H5Z_XFORM_DO_OP3(/)
@@ -1492,7 +1516,7 @@ H5Z_do_op(H5Z_node* tree)
/*-------------------------------------------------------------------------
- * Function: H5D_xform_create
+ * Function: H5Z_xform_create
*
* Purpose: Create a new data transform object from a string.
*
@@ -1546,7 +1570,7 @@ H5Z_xform_create(const char *expr)
data_xform_prop->dat_val_pointers->num_ptrs = 0;
/* we generate the parse tree right here and store a pointer to its root in the property. */
- if((data_xform_prop->parse_root = (H5Z_node *)H5Z_xform_parse(expr, data_xform_prop->dat_val_pointers))==NULL)
+ if((data_xform_prop->parse_root = (H5Z_node *)H5Z__xform_parse(expr, data_xform_prop->dat_val_pointers))==NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to generate parse tree from expression")
/* Sanity check
@@ -1563,7 +1587,7 @@ done:
if(ret_value==NULL) {
if(data_xform_prop) {
if(data_xform_prop->parse_root)
- H5Z_xform_destroy_parse_tree(data_xform_prop->parse_root);
+ H5Z__xform_destroy_parse_tree(data_xform_prop->parse_root);
if(data_xform_prop->xform_exp)
H5MM_xfree(data_xform_prop->xform_exp);
if(count > 0 && data_xform_prop->dat_val_pointers->ptr_dat_val)
@@ -1600,7 +1624,7 @@ H5Z_xform_destroy(H5Z_data_xform_t *data_xform_prop)
if(data_xform_prop) {
/* Destroy the parse tree */
- H5Z_xform_destroy_parse_tree(data_xform_prop->parse_root);
+ H5Z__xform_destroy_parse_tree(data_xform_prop->parse_root);
/* Free the expression */
H5MM_xfree(data_xform_prop->xform_exp);
@@ -1674,7 +1698,7 @@ H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop)
new_data_xform_prop->dat_val_pointers->num_ptrs = 0;
/* Copy parse tree */
- if((new_data_xform_prop->parse_root = (H5Z_node*)H5Z_xform_copy_tree((*data_xform_prop)->parse_root, (*data_xform_prop)->dat_val_pointers, new_data_xform_prop->dat_val_pointers)) == NULL)
+ if((new_data_xform_prop->parse_root = (H5Z_node*)H5Z__xform_copy_tree((*data_xform_prop)->parse_root, (*data_xform_prop)->dat_val_pointers, new_data_xform_prop->dat_val_pointers)) == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "error copying the parse tree")
/* Sanity check
@@ -1691,7 +1715,7 @@ done:
if(ret_value<0) {
if(new_data_xform_prop) {
if(new_data_xform_prop->parse_root)
- H5Z_xform_destroy_parse_tree(new_data_xform_prop->parse_root);
+ H5Z__xform_destroy_parse_tree(new_data_xform_prop->parse_root);
if(new_data_xform_prop->xform_exp)
H5MM_xfree(new_data_xform_prop->xform_exp);
H5MM_xfree(new_data_xform_prop);
diff --git a/src/H5checksum.c b/src/H5checksum.c
index 4e98976..a9d2b4e 100644
--- a/src/H5checksum.c
+++ b/src/H5checksum.c
@@ -15,7 +15,7 @@
*
* Created: H5checksum.c
* Aug 21 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Internal code for computing fletcher32 checksums
*
@@ -152,7 +152,7 @@ H5_checksum_fletcher32(const void *_data, size_t _len)
/*-------------------------------------------------------------------------
- * Function: H5_checksum_crc_make_table
+ * Function: H5__checksum_crc_make_table
*
* Purpose: Compute the CRC table for the CRC checksum algorithm
*
@@ -164,12 +164,12 @@ H5_checksum_fletcher32(const void *_data, size_t _len)
*-------------------------------------------------------------------------
*/
static void
-H5_checksum_crc_make_table(void)
+H5__checksum_crc_make_table(void)
{
uint32_t c; /* Checksum for each byte value */
unsigned n, k; /* Local index variables */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Compute the checksum for each possible byte value */
for(n = 0; n < 256; n++) {
@@ -184,11 +184,11 @@ H5_checksum_crc_make_table(void)
H5_crc_table_computed = TRUE;
FUNC_LEAVE_NOAPI_VOID
-} /* end H5_checksum_crc_make_table() */
+} /* end H5__checksum_crc_make_table() */
/*-------------------------------------------------------------------------
- * Function: H5_checksum_crc_make_table
+ * Function: H5__checksum_crc_update
*
* Purpose: Update a running CRC with the bytes buf[0..len-1]--the CRC
* should be initialized to all 1's, and the transmitted value
@@ -203,22 +203,22 @@ H5_checksum_crc_make_table(void)
*-------------------------------------------------------------------------
*/
static uint32_t
-H5_checksum_crc_update(uint32_t crc, const uint8_t *buf, size_t len)
+H5__checksum_crc_update(uint32_t crc, const uint8_t *buf, size_t len)
{
size_t n; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Initialize the CRC table if necessary */
if(!H5_crc_table_computed)
- H5_checksum_crc_make_table();
+ H5__checksum_crc_make_table();
/* Update the CRC with the results from this buffer */
for(n = 0; n < len; n++)
crc = H5_crc_table[(crc ^ buf[n]) & 0xff] ^ (crc >> 8);
FUNC_LEAVE_NOAPI(crc)
-} /* end H5_checksum_crc_update() */
+} /* end H5__checksum_crc_update() */
/*-------------------------------------------------------------------------
@@ -247,7 +247,7 @@ H5_checksum_crc(const void *_data, size_t len)
HDassert(_data);
HDassert(len > 0);
- FUNC_LEAVE_NOAPI(H5_checksum_crc_update((uint32_t)0xffffffffL, (const uint8_t *)_data, len) ^ 0xffffffffL)
+ FUNC_LEAVE_NOAPI(H5__checksum_crc_update((uint32_t)0xffffffffL, (const uint8_t *)_data, len) ^ 0xffffffffL)
} /* end H5_checksum_crc() */
/*
diff --git a/src/H5detect.c b/src/H5detect.c
index 655b05c..138695b 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -221,25 +221,6 @@ precision (detected_t *d)
*
* Return: void
*
- * Modifications:
- *
- * Robb Matzke, 4 Nov 1996
- * The INFO.perm now contains `-1' for bytes that aren't used and
- * are always zero. This happens on the Cray for `short' where
- * sizeof(short) is 8, but only the low-order 4 bytes are ever used.
- *
- * Robb Matzke, 4 Nov 1996
- * Added a `padding' field to indicate how many zero bytes appear to
- * the left (N) or right (-N) of the value.
- *
- * Robb Matzke, 5 Nov 1996
- * Removed HFILE and CFILE arguments.
- *
- * Neil Fortner, 6 Sep 2013
- * Split macro into DETECT_I and DETECT_BYTE macros, extracted
- * common code into DETECT_I_BYTE_CORE. This was done to remove
- * "will never be executed" warnings.
- *
*-------------------------------------------------------------------------
*/
#define DETECT_I_BYTE_CORE(TYPE,VAR,INFO,DETECT_TYPE) { \
@@ -1617,12 +1598,6 @@ static int verify_signal_handlers(int signum, void (*handler)(int))
*
* Return: Success: EXIT_SUCCESS
*
- * Modifications:
- * Some compilers, e.g., Intel C v7.0, took a long time to compile
- * with optimization when a module routine contains many code lines.
- * Divide up all those types detections macros into subroutines, both
- * to avoid the compiler optimization error and cleaner codes.
- *
*-------------------------------------------------------------------------
*/
int HDF_NO_UBSAN
diff --git a/src/H5private.h b/src/H5private.h
index 08aebdf..0c3dcd1 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
+/* Programmer: Robb Matzke
* Friday, October 30, 1998
*
* Purpose: This file is included by all HDF5 library source files to
@@ -1515,6 +1515,9 @@ typedef off_t h5_stat_size_t;
#ifndef HDstrtoull
#define HDstrtoull(S,R,N) strtoull(S,R,N)
#endif /* HDstrtoul */
+#ifndef HDstrtoumax
+ #define HDstrtoumax(S,R,N) strtoumax(S,R,N)
+#endif /* HDstrtoul */
#ifndef HDstrxfrm
#define HDstrxfrm(X,Y,Z) strxfrm(X,Y,Z)
#endif /* HDstrxfrm */
diff --git a/src/H5system.c b/src/H5system.c
index fbfd500..c5fea9f 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -516,8 +516,6 @@ H5_GCC_DIAG_ON(format-nonliteral)
* Programmer: Robb Matzke
* Thursday, April 9, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef HDstrtoll
diff --git a/src/H5timer.c b/src/H5timer.c
index cef7bf9..61d6f0f 100644
--- a/src/H5timer.c
+++ b/src/H5timer.c
@@ -14,7 +14,7 @@
/*-------------------------------------------------------------------------
* Created: H5timer.c
* Aug 21 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Internal, platform-independent 'timer' support routines.
*
diff --git a/src/H5trace.c b/src/H5trace.c
index db33673..40967ee 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -15,7 +15,7 @@
*
* Created: H5trace.c
* Aug 21 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Internal code for tracing API calls
*
diff --git a/src/hdf5.lnt b/src/hdf5.lnt
index 995e3f6..7b0f384 100644
--- a/src/hdf5.lnt
+++ b/src/hdf5.lnt
@@ -2,7 +2,7 @@
// Turn off warnings about not using the inlined H5V* functions:
-esym(528, H5VM_vector_reduce_product, H5VM_vector_inc)
--esym(528, H5VM_vector_cmp, H5VM_vector_cmp_s, H5VM_vector_cmp_u)
+-esym(528, H5VM_vector_cmp_s)
-esym(528, H5VM_vector_zerop_s, H5VM_vector_zerop_u)
// Suppress message about using 'goto' in a few functions
diff --git a/test/accum.c b/test/accum.c
index 548a04d..3947aff 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -1708,10 +1708,10 @@ test_random_write(H5F_t *f)
/* Choose random # seed */
seed = (unsigned)HDtime(NULL);
-#ifdef QAK
+#if 0
/* seed = (unsigned)1155438845; */
HDfprintf(stderr, "Random # seed was: %u\n", seed);
-#endif /* QAK */
+#endif
HDsrandom(seed);
/* Allocate space for the segment length buffer */
diff --git a/test/big.c b/test/big.c
index c4f8e88..fee7813 100644
--- a/test/big.c
+++ b/test/big.c
@@ -803,10 +803,10 @@ main (int ac, char **av)
/* Choose random # seed */
seed = (unsigned long)HDtime(NULL);
-#ifdef QAK
+#if 0
/* seed = (unsigned long)1155438845; */
HDfprintf(stderr, "Random # seed was: %lu\n", seed);
-#endif /* QAK */
+#endif
HDsrandom((unsigned)seed);
/* run VFD-specific test */
diff --git a/test/btree2.c b/test/btree2.c
index e91808d..b85f033 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -2982,10 +2982,10 @@ test_insert_lots(hid_t fapl, const H5B2_create_t *cparam,
/* Initialize random number seed */
curr_time=HDtime(NULL);
-#ifdef QAK
+#if 0
curr_time=1109170019;
HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
-#endif /* QAK */
+#endif
HDsrandom((unsigned)curr_time);
/*
@@ -4975,10 +4975,10 @@ test_update_lots(hid_t fapl, const H5B2_create_t *cparam,
/* Initialize random number seed */
curr_time = HDtime(NULL);
-#ifdef QAK
+#if 0
curr_time = 1451342093;
HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
-#endif /* QAK */
+#endif
HDsrandom((unsigned)curr_time);
/*
@@ -8652,10 +8652,10 @@ test_remove_lots(const char *env_h5_drvr, hid_t fapl, const H5B2_create_t *cpara
/* Initialize random number seed */
curr_time = HDtime(NULL);
-#ifdef QAK
+#if 0
curr_time = 1163537969;
HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
-#endif /* QAK */
+#endif
HDsrandom((unsigned)curr_time);
/*
diff --git a/test/earray.c b/test/earray.c
index f9bb56e..f593212 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -381,10 +381,6 @@ check_stats(const H5EA_t *ea, const earray_state_t *state)
TEST_ERROR
} /* end if */
#endif /* NOT_YET */
-#ifdef QAK
-HDfprintf(stderr, "nelmts = %Hu, total EA size = %Hu\n", earray_stats.stored.nelmts,
- (earray_stats.computed.hdr_size + earray_stats.computed.index_blk_size + earray_stats.stored.super_blk_size + earray_stats.stored.data_blk_size));
-#endif /* QAK */
/* All tests passed */
return(0);
@@ -560,12 +556,6 @@ finish(hid_t file, hid_t fapl, H5F_t *f, H5EA_t *ea, haddr_t ea_addr)
if(H5EA_close(ea) < 0)
FAIL_STACK_ERROR
-#ifdef QAK
-HDfprintf(stderr, "ea_addr = %a\n", ea_addr);
-H5Fflush(file, H5F_SCOPE_GLOBAL);
-HDsystem("cp earray.h5 earray.h5.save");
-#endif /* QAK */
-
/* Delete array */
if(H5EA_delete(f, ea_addr, NULL) < 0)
FAIL_STACK_ERROR
@@ -1384,19 +1374,8 @@ eiter_fw_state(void *_eiter, const H5EA_create_t *cparam,
/* Compute super block index for element index */
/* (same eqn. as in H5EA__dblock_sblk_idx()) */
sblk_idx = H5VM_log2_gen((uint64_t)(((idx - cparam->idx_blk_elmts) / cparam->data_blk_min_elmts) + 1));
-#ifdef QAK
-HDfprintf(stderr, "idx = %Hu, tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", idx, sblk_idx, tparam->sblk_info[sblk_idx].ndblks, tparam->sblk_info[sblk_idx].dblk_nelmts, tparam->sblk_info[sblk_idx].start_idx, tparam->sblk_info[sblk_idx].start_dblk);
-#endif /* QAK */
-
state->nelmts = EA_NELMTS(cparam, tparam, idx, sblk_idx);
-#ifdef QAK
-HDfprintf(stderr, "state->nelmts = %Hu\n", state->nelmts);
-#endif /* QAK */
-
state->ndata_blks = EA_NDATA_BLKS(cparam, tparam, idx, sblk_idx);
-#ifdef QAK
-HDfprintf(stderr, "state->ndata_blks = %Hu\n", state->ndata_blks);
-#endif /* QAK */
/* Check if we have any super blocks yet */
if(tparam->sblk_info[sblk_idx].ndblks >= cparam->sup_blk_min_data_ptrs) {
@@ -1405,9 +1384,6 @@ HDfprintf(stderr, "state->ndata_blks = %Hu\n", state->ndata_blks);
eiter->base_sblk_idx = sblk_idx;
state->nsuper_blks = (sblk_idx - eiter->base_sblk_idx) + 1;
-#ifdef QAK
-HDfprintf(stderr, "state->nsuper_blks = %Hu\n", state->nsuper_blks);
-#endif /* QAK */
} /* end if */
else
state->nsuper_blks = 0;
@@ -1619,29 +1595,18 @@ eiter_rv_state(void *_eiter, const H5EA_create_t *cparam,
loc_idx = cparam->idx_blk_elmts + tparam->sblk_info[idx_sblk_idx].start_idx - 1;
loc_sblk_idx = H5VM_log2_gen((uint64_t)(((loc_idx - cparam->idx_blk_elmts) / cparam->data_blk_min_elmts) + 1));
} /* end else */
-#ifdef QAK
-HDfprintf(stderr, "idx = %Hu, loc_idx = %Hu, eiter->max_sblk_idx = %u, idx_sblk_idx = %u, loc_sblk_idx = %u\n", idx, loc_idx, eiter->max_sblk_idx, idx_sblk_idx, loc_sblk_idx);
-HDfprintf(stderr, "tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", idx_sblk_idx, tparam->sblk_info[idx_sblk_idx].ndblks, tparam->sblk_info[idx_sblk_idx].dblk_nelmts, tparam->sblk_info[idx_sblk_idx].start_idx, tparam->sblk_info[idx_sblk_idx].start_dblk);
-HDfprintf(stderr, "tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", eiter->max_sblk_idx, tparam->sblk_info[eiter->max_sblk_idx].ndblks, tparam->sblk_info[eiter->max_sblk_idx].dblk_nelmts, tparam->sblk_info[eiter->max_sblk_idx].start_idx, tparam->sblk_info[eiter->max_sblk_idx].start_dblk);
-#endif /* QAK */
if(idx < cparam->idx_blk_elmts + cparam->data_blk_min_elmts)
idx_nelmts = (hsize_t)cparam->idx_blk_elmts;
else
idx_nelmts = EA_NELMTS(cparam, tparam, loc_idx, loc_sblk_idx);
state->nelmts = (eiter->max_nelmts - idx_nelmts) + cparam->idx_blk_elmts;
-#ifdef QAK
-HDfprintf(stderr, "eiter->max_nelmts = %Hu, idx_nelmts = %Hu, state->nelmts = %Hu\n", eiter->max_nelmts, idx_nelmts, state->nelmts);
-#endif /* QAK */
if(idx < cparam->idx_blk_elmts + cparam->data_blk_min_elmts)
idx_ndata_blks = 0;
else
idx_ndata_blks = EA_NDATA_BLKS(cparam, tparam, loc_idx, loc_sblk_idx);
state->ndata_blks = eiter->max_ndata_blks - idx_ndata_blks;
-#ifdef QAK
-HDfprintf(stderr, "eiter->max_ndata_blks = %Hu, idx_ndata_blks = %Hu, state->ndata_blks = %Hu\n", eiter->max_ndata_blks, idx_ndata_blks, state->ndata_blks);
-#endif /* QAK */
/* Check if we have any super blocks yet */
if(tparam->sblk_info[eiter->max_sblk_idx].ndblks >= cparam->sup_blk_min_data_ptrs) {
@@ -1649,9 +1614,6 @@ HDfprintf(stderr, "eiter->max_ndata_blks = %Hu, idx_ndata_blks = %Hu, state->nda
state->nsuper_blks = (eiter->max_sblk_idx - idx_sblk_idx) + 1;
else
state->nsuper_blks = (eiter->max_sblk_idx - eiter->idx_blk_nsblks) + 1;
-#ifdef QAK
-HDfprintf(stderr, "eiter->idx_blk_nsblks = %Hu, state->nsuper_blks = %Hu\n", eiter->idx_blk_nsblks, state->nsuper_blks);
-#endif /* QAK */
} /* end if */
} /* end else */
diff --git a/test/fheap.c b/test/fheap.c
index ef459d3..ed82ce3 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -3195,7 +3195,6 @@ error:
return(1);
} /* test_reopen_hdr() */
-#ifndef QAK2
/*-------------------------------------------------------------------------
* Function: test_man_insert_weird
@@ -6237,7 +6236,6 @@ error:
} /* test_man_fill_all_4th_recursive_indirect() */
#endif /* ALL_INSERT_TESTS */
-#ifndef QAK
/*-------------------------------------------------------------------------
* Function: test_man_start_5th_recursive_indirect
@@ -6369,9 +6367,7 @@ error:
} H5E_END_TRY;
return(1);
} /* test_man_start_5th_recursive_indirect() */
-#endif /* QAK */
-#ifndef QAK
/*-------------------------------------------------------------------------
* Function: test_man_remove_bogus
@@ -6448,10 +6444,10 @@ test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
/* Choose random # seed */
seed = (unsigned long)HDtime(NULL);
-#ifdef QAK
+#if 0
/* seed = (unsigned long)1155438845; */
HDfprintf(stderr, "Random # seed was: %lu\n", seed);
-#endif /* QAK */
+#endif
HDsrandom((unsigned)seed);
/* Set heap ID to random (non-null) value */
@@ -7270,10 +7266,6 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
TEST_ERROR
/* Verify the file is correct size */
-#ifdef QAK
-HDfprintf(stderr, "empty_size = %lu\n", (unsigned long)empty_size);
-HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
if(file_size != empty_size)
TEST_ERROR
@@ -7573,10 +7565,6 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
TEST_ERROR
/* Verify the file is correct size */
-#ifdef QAK
-HDfprintf(stderr, "empty_size = %lu\n", (unsigned long)empty_size);
-HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
if(file_size != empty_size)
TEST_ERROR
@@ -7720,9 +7708,7 @@ error:
return 1;
} /* test_man_incr_insert_remove() */
-#endif /* QAK */
-#ifndef QAK
/*-------------------------------------------------------------------------
* Function: test_man_remove_root_direct
@@ -8323,9 +8309,7 @@ error:
} H5E_END_TRY;
return(1);
} /* test_man_remove_3rd_indirect() */
-#endif /* QAK */
-#ifndef QAK
/*-------------------------------------------------------------------------
* Function: test_man_skip_start_block
@@ -9589,9 +9573,6 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9725,9 +9706,6 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9747,9 +9725,6 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object too large for initial block size in skipped indirect blocks */
obj_size = (size_t)DBLOCK_SIZE(fh, 3) + 1;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, 4);
if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9760,9 +9735,6 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (medium) block just created */
obj_size = (size_t)DBLOCK_FREE(fh, 4) - obj_size;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10506,9 +10478,6 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10627,9 +10596,6 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
/* Retrieve info about heap */
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
-#ifdef QAK
-HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
-#endif /* QAK */
/* Fill direct blocks in root indirect block */
if(fill_root_direct(fh, fill_size, &state, &keep_ids))
@@ -10660,9 +10626,6 @@ HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows) + 1;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows + 1);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10673,9 +10636,6 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows + 1) - obj_size;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10829,9 +10789,6 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10998,9 +10955,6 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11155,9 +11109,6 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11332,9 +11283,6 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11544,9 +11492,6 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11740,9 +11685,6 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11972,9 +11914,6 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
-HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -12043,9 +11982,7 @@ error:
} H5E_END_TRY;
return(1);
} /* test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped() */
-#endif /* QAK */
-#ifndef QAK
/*-------------------------------------------------------------------------
* Function: test_man_frag_simple
@@ -12396,9 +12333,6 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
/* Compute # of bits used in first row */
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
-#ifdef QAK
-HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
-#endif /* QAK */
/* Fill direct blocks in root indirect block */
if(fill_root_direct(fh, fill_size, &state, &keep_ids))
@@ -12576,9 +12510,7 @@ error:
} H5E_END_TRY;
return(1);
} /* test_man_frag_3rd_direct() */
-#endif /* QAK */
-#ifndef QAK
/*-------------------------------------------------------------------------
* Function: test_huge_insert_one
@@ -12699,9 +12631,6 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
-HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if(file_size != empty_size)
@@ -12929,9 +12858,6 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
-HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if(file_size != empty_size)
@@ -13234,9 +13160,6 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
/* Get the size of the file */
if((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
-HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if(file_size != empty_size)
@@ -13657,9 +13580,6 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
-HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if(file_size != empty_size)
@@ -13879,9 +13799,6 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
/* Get the size of the file */
if((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
-HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_size, (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if(file_size != empty_size)
@@ -13911,9 +13828,7 @@ error:
} H5E_END_TRY;
return(1);
} /* test_filtered_huge() */
-#endif /* QAK */
-#ifndef QAK
/*-------------------------------------------------------------------------
* Function: test_tiny_insert_one
@@ -14034,9 +13949,6 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
-HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if(file_size != empty_size)
@@ -14264,9 +14176,6 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
-HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if(file_size != empty_size)
@@ -14864,9 +14773,6 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
-HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if(file_size != empty_size)
@@ -14907,10 +14813,7 @@ error:
} H5E_END_TRY;
return(1);
} /* test_tiny_insert_mix() */
-#endif /* QAK */
-#endif /* QAK2 */
-#ifndef QAK
/*-------------------------------------------------------------------------
* Function: test_filtered_man_root_direct
@@ -15060,9 +14963,6 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
/* Get the size of the file */
if((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
-HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_size, (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if(file_size != empty_size)
@@ -15388,9 +15288,6 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
/* Get the size of the file */
if((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
-HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_size, (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if(file_size != empty_size)
@@ -15413,9 +15310,7 @@ error:
} H5E_END_TRY;
return(1);
} /* test_filtered_man_root_indirect() */
-#endif /* QAK */
-#ifndef QAK
/*-------------------------------------------------------------------------
* Function: test_random
@@ -15498,10 +15393,10 @@ test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
/* Choose random # seed */
seed = (unsigned long)HDtime(NULL);
-#ifdef QAK
+#if 0
/* seed = (unsigned long)1156158635; */
HDfprintf(stderr, "Random # seed was: %lu\n", seed);
-#endif /* QAK */
+#endif
HDsrandom((unsigned)seed);
/* Loop over adding objects to the heap, until the size limit is reached */
@@ -15522,9 +15417,6 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
/* Increment the amount of objects added */
total_obj_added += obj_size;
} /* end while */
-#ifdef QAK
-HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %Hu\n", keep_ids.num_ids, total_obj_added, size_limit);
-#endif /* QAK */
/* Randomize the order of the IDs kept */
for(u = 0; u < keep_ids.num_ids; u++) {
@@ -15583,9 +15475,6 @@ HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %
/* Get the size of the file */
if((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
-HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if(file_size != empty_size)
@@ -15704,10 +15593,10 @@ test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_te
/* Choose random # seed */
seed = (unsigned long)HDtime(NULL);
-#ifdef QAK
+#if 0
/* seed = (unsigned long)1155181717; */
HDfprintf(stderr, "Random # seed was: %lu\n", seed);
-#endif /* QAK */
+#endif
HDsrandom((unsigned)seed);
/* Loop over adding objects to the heap, until the size limit is reached */
@@ -15740,9 +15629,6 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
/* Increment the amount of objects added */
total_obj_added += obj_size;
} /* end while */
-#ifdef QAK
-HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %Hu\n", keep_ids.num_ids, total_obj_added, size_limit);
-#endif /* QAK */
/* Randomize the order of the IDs kept */
for(u = 0; u < keep_ids.num_ids; u++) {
@@ -15801,10 +15687,6 @@ HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %
/* Get the size of the file */
if((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
-HDfprintf(stderr, "empty_size = %lu\n", (unsigned long)empty_size);
-HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if(file_size != empty_size)
@@ -15838,9 +15720,7 @@ error:
} H5E_END_TRY;
return(1);
} /* test_random_pow2() */
-#endif /* QAK */
-#ifndef QAK
/*-------------------------------------------------------------------------
* Function: test_write
@@ -16124,9 +16004,7 @@ error:
} H5E_END_TRY;
return(1);
} /* test_write() */
-#endif /* QAK */
-#ifndef QAK
/*-------------------------------------------------------------------------
* Function: test_bug1
@@ -16301,7 +16179,6 @@ error:
} H5E_END_TRY;
return(1);
} /* test_bug1() */
-#endif /* QAK */
/*-------------------------------------------------------------------------
diff --git a/test/hdfs.c b/test/hdfs.c
index 3112dcc..0f4969e 100644
--- a/test/hdfs.c
+++ b/test/hdfs.c
@@ -30,7 +30,6 @@
#ifdef H5_HAVE_LIBHDFS
#define HDFS_TEST_DEBUG 0
#define HDFS_TEST_MAX_BUF_SIZE 256
-#endif /* H5_HAVE_LIBHDFS */
/*****************************************************************************
*
@@ -372,11 +371,8 @@ if (strcmp((actual), (expected)) != 0) { \
* OTHER MACROS AND DEFINITIONS *
********************************/
-/* copied from src/hdfs.c
- */
-#ifdef H5_HAVE_LIBHDFS
+/* copied from src/hdfs.c */
#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
-#endif /* H5_HAVE_LIBHDFS */
#define HDFS_NAMENODE_NAME_MAX_SIZE 128
@@ -384,12 +380,10 @@ if (strcmp((actual), (expected)) != 0) { \
* FILE-LOCAL GLOBAL VARIABLES *
*******************************/
-#ifdef H5_HAVE_LIBHDFS
static const char filename_missing[] = "/tmp/missing.txt";
static const char filename_bard[] = "/tmp/t8.shakespeare.txt";
static const char filename_raven[] = "/tmp/Poe_Raven.txt";
static const char filename_example_h5[] = "/tmp/t.h5";
-#endif /* H5_HAVE_LIBHDFS */
static H5FD_hdfs_fapl_t default_fa = {
1, /* fa version */
@@ -399,6 +393,7 @@ static H5FD_hdfs_fapl_t default_fa = {
"", /* kerberos path */
1024, /* buffer size */
};
+#endif /* H5_HAVE_LIBHDFS */
/******************
* TEST FUNCTIONS *
@@ -429,6 +424,14 @@ static H5FD_hdfs_fapl_t default_fa = {
static int
test_fapl_config_validation(void)
{
+#ifndef H5_HAVE_LIBHDFS
+ TESTING("HDFS fapl configuration validation");
+ SKIPPED();
+ puts(" HDFS VFD is not enabled");
+ fflush(stdout);
+ return 0;
+
+#else
/*********************
* test-local macros *
*********************/
@@ -604,6 +607,7 @@ error:
} H5E_END_TRY;
}
return 1;
+#endif /* H5_HAVE_LIBHDFS */
} /* end test_fapl_config_validation() */
@@ -630,6 +634,14 @@ error:
static int
test_hdfs_fapl(void)
{
+#ifndef H5_HAVE_LIBHDFS
+ TESTING("HDFS fapl ");
+ SKIPPED();
+ puts(" HDFS VFD is not enabled");
+ fflush(stdout);
+ return 0;
+
+#else
/************************
* test-local variables *
************************/
@@ -681,6 +693,7 @@ error:
} H5E_END_TRY;
return 1;
+#endif /* H5_HAVE_LIBHDFS */
} /* end test_hdfs_fapl() */
@@ -1723,6 +1736,7 @@ main(void)
* commence tests *
******************/
+#ifdef H5_HAVE_LIBHDFS
static char hdfs_namenode_name[HDFS_NAMENODE_NAME_MAX_SIZE] = "";
const char *hdfs_namenode_name_env = NULL;
@@ -1736,6 +1750,7 @@ main(void)
hdfs_namenode_name_env,
HDFS_NAMENODE_NAME_MAX_SIZE);
}
+#endif /* H5_HAVE_LIBHDFS */
h5_reset();
diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c
index 4da742f..35c3f90 100644
--- a/test/mirror_vfd.c
+++ b/test/mirror_vfd.c
@@ -28,6 +28,8 @@
#ifdef H5_HAVE_MIRROR_VFD
+#include "H5FDmirror_priv.h" /* Private header for the mirror VFD */
+
/* For future consideration, IP address and port number might be
* environment variables?
*/
diff --git a/test/pool.c b/test/pool.c
index 648a501..59f9201 100644
--- a/test/pool.c
+++ b/test/pool.c
@@ -636,10 +636,10 @@ test_allocate_random(void)
/* Initialize random number seed */
curr_time = HDtime(NULL);
-#ifdef QAK
+#if 0
curr_time=1115412944;
HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
-#endif /* QAK */
+#endif
HDsrandom((unsigned)curr_time);
/* Create a memory pool */
diff --git a/test/swmr_addrem_writer.c b/test/swmr_addrem_writer.c
index 71e4929..7ad74ed 100644
--- a/test/swmr_addrem_writer.c
+++ b/test/swmr_addrem_writer.c
@@ -88,26 +88,6 @@ open_skeleton(const char *filename, unsigned verbose)
if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
return -1;
-#ifdef QAK
- /* Increase the initial size of the metadata cache */
- {
- H5AC_cache_config_t mdc_config;
-
- mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
- H5Pget_mdc_config(fapl, &mdc_config);
- HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
- mdc_config.set_initial_size = 1;
- mdc_config.initial_size = 16 * 1024 * 1024;
- /* mdc_config.epoch_length = 5000; */
- H5Pset_mdc_config(fapl, &mdc_config);
- }
-#endif /* QAK */
-
-#ifdef QAK
- H5Pset_fapl_log(fapl, "append.log", H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
-#endif /* QAK */
-
/* Open the file */
if((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
return -1;
diff --git a/test/swmr_generator.c b/test/swmr_generator.c
index f6a4fe2..7fb08df 100644
--- a/test/swmr_generator.c
+++ b/test/swmr_generator.c
@@ -121,38 +121,10 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write,
if(!HDstrcmp(index_type, "b2"))
max_dims[0] = H5S_UNLIMITED;
-#ifdef QAK
- /* Increase the initial size of the metadata cache */
- {
- H5AC_cache_config_t mdc_config;
-
- mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
- H5Pget_mdc_config(fapl, &mdc_config);
- HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
- mdc_config.set_initial_size = 1;
- mdc_config.initial_size = 16 * 1024 * 1024;
- /* mdc_config.epoch_length = 5000; */
- H5Pset_mdc_config(fapl, &mdc_config);
- }
-#endif /* QAK */
-
-#ifdef QAK
- H5Pset_small_data_block_size(fapl, (hsize_t)(50 * CHUNK_SIZE * DTYPE_SIZE));
-#endif /* QAK */
-
-#ifdef QAK
- H5Pset_fapl_log(fapl, "append.log", H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
-#endif /* QAK */
-
/* Create file creation property list */
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
-#ifdef QAK
- H5Pset_link_phase_change(fcpl, 0, 0);
-#endif /* QAK */
-
/* Emit informational message */
if(verbose)
HDfprintf(stderr, "Creating file\n");
diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c
index 2bebab9..504ea8a 100644
--- a/test/swmr_remove_writer.c
+++ b/test/swmr_remove_writer.c
@@ -90,26 +90,6 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old)
return -1;
}
-#ifdef QAK
-/* Increase the initial size of the metadata cache */
- {
- H5AC_cache_config_t mdc_config;
-
- mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
- H5Pget_mdc_config(fapl, &mdc_config);
- HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
- mdc_config.set_initial_size = 1;
- mdc_config.initial_size = 16 * 1024 * 1024;
- /* mdc_config.epoch_length = 5000; */
- H5Pset_mdc_config(fapl, &mdc_config);
- }
-#endif /* QAK */
-
-#ifdef QAK
- H5Pset_fapl_log(fapl, "append.log", H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
-#endif /* QAK */
-
/* Open the file */
if((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
return -1;
diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c
index 5173c71..1892fe2 100644
--- a/test/swmr_sparse_writer.c
+++ b/test/swmr_sparse_writer.c
@@ -87,26 +87,6 @@ open_skeleton(const char *filename, unsigned verbose)
if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
return -1;
-#ifdef QAK
- /* Increase the initial size of the metadata cache */
- {
- H5AC_cache_config_t mdc_config;
-
- mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
- H5Pget_mdc_config(fapl, &mdc_config);
- HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- HDfprintf(stderr,"mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
- mdc_config.set_initial_size = 1;
- mdc_config.initial_size = 16 * 1024 * 1024;
- /* mdc_config.epoch_length = 5000; */
- H5Pset_mdc_config(fapl, &mdc_config);
- }
-#endif /* QAK */
-
-#ifdef QAK
- H5Pset_fapl_log(fapl, "append.log", H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
-#endif /* QAK */
-
/* Open the file */
if((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
return -1;
diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c
index fc7e7a5..0527229 100644
--- a/test/swmr_start_write.c
+++ b/test/swmr_start_write.c
@@ -85,16 +85,6 @@ create_file(const char *filename, hbool_t verbose, FILE *verbose_file,
if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
return -1;
-#ifdef QAK
- if(verbose) {
- char verbose_name[1024];
-
- HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_start_write.log.%u", random_seed);
-
- H5Pset_fapl_log(fapl, verbose_name, H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024));
- } /* end if */
-#endif /* QAK */
-
/* Create file creation property list */
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
diff --git a/test/swmr_writer.c b/test/swmr_writer.c
index d4387aa..656a5b2 100644
--- a/test/swmr_writer.c
+++ b/test/swmr_writer.c
@@ -90,22 +90,6 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file,
return -1;
}
-#ifdef QAK
- /* Increase the initial size of the metadata cache */
- {
- H5AC_cache_config_t mdc_config;
-
- mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
- H5Pget_mdc_config(fapl, &mdc_config);
- HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
- mdc_config.set_initial_size = 1;
- mdc_config.initial_size = 16 * 1024 * 1024;
- /* mdc_config.epoch_length = 5000; */
- H5Pset_mdc_config(fapl, &mdc_config);
- }
-#endif /* QAK */
-
if(use_log_vfd) {
char verbose_name[1024];
diff --git a/test/tattr.c b/test/tattr.c
index dab03a7..496dd6c 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -542,7 +542,7 @@ test_attr_flush(hid_t fapl)
ret=H5Aread(att, H5T_NATIVE_DOUBLE, &rdata);
CHECK(ret, FAIL, "H5Awrite");
- if(!H5_DBL_ABS_EQUAL(rdata, 0.0))
+ if(!H5_DBL_ABS_EQUAL(rdata, (double)0.0f))
TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n",rdata,(double)0.0F);
ret=H5Fflush(fil, H5F_SCOPE_GLOBAL);
@@ -551,7 +551,7 @@ test_attr_flush(hid_t fapl)
ret=H5Aread(att, H5T_NATIVE_DOUBLE, &rdata);
CHECK(ret, FAIL, "H5Awrite");
- if(!H5_DBL_ABS_EQUAL(rdata, 0.0))
+ if(!H5_DBL_ABS_EQUAL(rdata, (double)0.0f))
TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n",rdata,(double)0.0F);
ret=H5Awrite(att, H5T_NATIVE_DOUBLE, &wdata);
@@ -6773,13 +6773,6 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info,
char attrname[NAME_BUF_SIZE]; /* Object name */
H5A_info_t my_info; /* Local attribute info */
-#ifdef QAK
-HDfprintf(stderr, "attr_name = '%s'\n", attr_name);
-if(info)
- HDfprintf(stderr, "info->corder = %u\n", (unsigned)info->corder);
-HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr);
-#endif /* QAK */
-
/* Increment # of times the callback was called */
op_data->ncalled++;
diff --git a/test/thread_id.c b/test/thread_id.c
index 24aef80..0c804ed 100644
--- a/test/thread_id.c
+++ b/test/thread_id.c
@@ -25,6 +25,8 @@
*/
#include "testhdf5.h"
+#if defined(H5_HAVE_THREADSAFE) && !defined(H5_HAVE_WIN_THREADS)
+
static void my_errx(int, const char *, ...) H5_ATTR_FORMAT(printf, 2, 3);
static void
@@ -40,8 +42,6 @@ my_errx(int code, const char *fmt, ...)
HDexit(code);
}
-#if defined(H5_HAVE_THREADSAFE) && !defined(H5_HAVE_WIN_THREADS)
-
#if defined(H5_HAVE_DARWIN)
typedef struct _pthread_barrierattr {
diff --git a/test/trefer.c b/test/trefer.c
index b90ec45..4bf5c17 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -1135,11 +1135,11 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
hsize_t *coords; /* Coordinate buffer */
hsize_t low[SPACE2_RANK]; /* Selection bounds */
hsize_t high[SPACE2_RANK]; /* Selection bounds */
- H5R_ref_t *wbuf, /* buffer to write to disk */
- *rbuf; /* buffer read from disk */
+ H5R_ref_t *wbuf = NULL, /* buffer to write to disk */
+ *rbuf = NULL; /* buffer read from disk */
H5R_ref_t nvrbuf[3]={{{{0}}},{{{101}}},{{{255}}}}; /* buffer with non-valid refs */
- uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
- *drbuf; /* Buffer for reading numeric data from disk */
+ uint8_t *dwbuf = NULL, /* Buffer for writing numeric data to disk */
+ *drbuf = NULL; /* Buffer for reading numeric data from disk */
uint8_t *tu8; /* Temporary pointer to uint8 data */
H5O_type_t obj_type; /* Type of object */
int i, j; /* Counters */
@@ -1537,13 +1537,14 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
CHECK(ret, FAIL, "H5Rdestroy");
}
- /* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
-
}
+
+ /* Free memory buffers */
+ HDfree(wbuf);
+ HDfree(rbuf);
+ HDfree(dwbuf);
+ HDfree(drbuf);
+
} /* test_reference_region() */
/****************************************************************
@@ -1576,10 +1577,10 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
hsize_t *coords; /* Coordinate buffer */
hsize_t low[SPACE3_RANK]; /* Selection bounds */
hsize_t high[SPACE3_RANK]; /* Selection bounds */
- H5R_ref_t *wbuf, /* buffer to write to disk */
- *rbuf; /* buffer read from disk */
- uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
- *drbuf; /* Buffer for reading numeric data from disk */
+ H5R_ref_t *wbuf = NULL, /* buffer to write to disk */
+ *rbuf = NULL; /* buffer read from disk */
+ uint8_t *dwbuf = NULL, /* Buffer for writing numeric data to disk */
+ *drbuf = NULL; /* Buffer for reading numeric data from disk */
uint8_t *tu8; /* Temporary pointer to uint8 data */
H5O_type_t obj_type; /* Object type */
int i; /* Counter */
@@ -1876,13 +1877,14 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
CHECK(ret, FAIL, "H5Rdestroy");
}
- /* Free memory buffers */
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
-
}
+
+ /* Free memory buffers */
+ HDfree(wbuf);
+ HDfree(rbuf);
+ HDfree(dwbuf);
+ HDfree(drbuf);
+
} /* test_reference_region_1D() */
/****************************************************************
@@ -2718,10 +2720,10 @@ test_reference_compat_conv(void)
hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
- hobj_ref_t *wbuf_obj; /* Buffer to write to disk */
- H5R_ref_t *rbuf_obj; /* Buffer read from disk */
- hdset_reg_ref_t *wbuf_reg; /* Buffer to write to disk */
- H5R_ref_t *rbuf_reg; /* Buffer read from disk */
+ hobj_ref_t *wbuf_obj = NULL; /* Buffer to write to disk */
+ H5R_ref_t *rbuf_obj = NULL; /* Buffer read from disk */
+ hdset_reg_ref_t *wbuf_reg = NULL; /* Buffer to write to disk */
+ H5R_ref_t *rbuf_reg = NULL; /* Buffer read from disk */
H5O_type_t obj_type; /* Object type */
herr_t ret; /* Generic return value */
unsigned int i; /* Counter */
diff --git a/test/ttsafe_attr_vlen.c b/test/ttsafe_attr_vlen.c
index b07e362..43a5e9a 100644
--- a/test/ttsafe_attr_vlen.c
+++ b/test/ttsafe_attr_vlen.c
@@ -54,13 +54,13 @@ void *tts_attr_vlen_thread(void *);
void
tts_attr_vlen(void)
{
- pthread_t threads[NUM_THREADS] = {0}; /* Thread declaration */
+ H5TS_thread_t threads[NUM_THREADS] = {0}; /* Thread declaration */
hid_t fid = H5I_INVALID_HID; /* File ID */
hid_t gid = H5I_INVALID_HID; /* Group ID */
hid_t atid = H5I_INVALID_HID; /* Datatype ID for attribute */
hid_t asid = H5I_INVALID_HID; /* Dataspace ID for attribute */
hid_t aid = H5I_INVALID_HID; /* The attribute ID */
- char *string_attr = "2.0"; /* The attribute data */
+ const char *string_attr = "2.0"; /* The attribute data */
int ret; /* Return value */
int i; /* Local index variable */
@@ -106,26 +106,27 @@ tts_attr_vlen(void)
CHECK(ret, H5I_INVALID_HID, "H5Tclose");
/* Start multiple threads and execute tts_attr_vlen_thread() for each thread */
- for(i = 0; i < NUM_THREADS; i++)
- pthread_create(&threads[i], NULL, tts_attr_vlen_thread, NULL);
+ for(i = 0; i < NUM_THREADS; i++) {
+ threads[i] = H5TS_create_thread(tts_attr_vlen_thread, NULL, NULL);
+ }
/* Wait for the threads to end */
for(i = 0; i < NUM_THREADS; i++)
- pthread_join(threads[i], NULL);
+ H5TS_wait_for_thread(threads[i]);
} /* end tts_attr_vlen() */
/* Start execution for each thread */
void *
-tts_attr_vlen_thread(void *client_data)
+tts_attr_vlen_thread(void H5_ATTR_UNUSED *client_data)
{
- hid_t fid = H5I_INVALID_HID; /* File ID */
- hid_t gid = H5I_INVALID_HID; /* Group ID */
- hid_t aid = H5I_INVALID_HID; /* Attribute ID */
- hid_t atid = H5I_INVALID_HID; /* Datatype ID for the attribute */
- char *string_attr_check; /* The attribute data being read */
- char *string_attr = "2.0"; /* The expected attribute data */
- herr_t ret; /* Return value */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
+ hid_t aid = H5I_INVALID_HID; /* Attribute ID */
+ hid_t atid = H5I_INVALID_HID; /* Datatype ID for the attribute */
+ char *string_attr_check; /* The attribute data being read */
+ const char *string_attr = "2.0"; /* The expected attribute data */
+ herr_t ret; /* Return value */
/* Open the test file */
fid = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
diff --git a/utils/mirror_vfd/mirror_remote.h b/utils/mirror_vfd/mirror_remote.h
index 9132d51..67e95a5 100644
--- a/utils/mirror_vfd/mirror_remote.h
+++ b/utils/mirror_vfd/mirror_remote.h
@@ -20,6 +20,8 @@
#ifdef H5_HAVE_MIRROR_VFD
+#include "H5FDmirror_priv.h" /* Private header for the mirror VFD */
+
#define V_NONE 0
#define V_ERR 1
#define V_WARN 2