From 37232bd4f0f8199f956c823cdff72ece2ca9aa16 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 29 Dec 2004 09:32:06 -0500 Subject: [svn-r9729] Purpose: Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-) Description: Generally speaking, this is the "signed->unsigned" change to selections. However, in the process of merging code back, things got stickier and stickier until I ended up doing a big "sync the two branches up" operation. So... I brought back all the "infrastructure" fixes from the development branch to the release branch (which I think were actually making some improvement in performance) as well as fixed several bugs which had been fixed in one branch, but not the other. I've also tagged the repository before making this checkin with the label "before_signed_unsigned_changes". Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel & fphdf5 FreeBSD 4.10 (sleipnir) w/threadsafe FreeBSD 4.10 (sleipnir) w/backward compatibility Solaris 2.7 (arabica) w/"purify options" Solaris 2.8 (sol) w/FORTRAN & C++ AIX 5.x (copper) w/parallel & FORTRAN IRIX64 6.5 (modi4) w/FORTRAN Linux 2.4 (heping) w/FORTRAN & C++ Misc. update: --- MANIFEST | 8 +- Makefile.in | 12 +- bin/buildhdf5 | 13 + bin/trace | 171 +-- c++/examples/chunks.cpp | 2 +- c++/examples/extend_ds.cpp | 3 +- c++/examples/readdata.cpp | 4 +- c++/examples/writedata.cpp | 6 +- c++/src/H5AbstractDs.cpp | 14 +- c++/src/H5ArrayType.cpp | 32 +- c++/src/H5ArrayType.h | 4 +- c++/src/H5AtomType.cpp | 18 +- c++/src/H5AtomType.h | 2 +- c++/src/H5CompType.cpp | 18 +- c++/src/H5CompType.h | 8 +- c++/src/H5DataSpace.cpp | 6 +- c++/src/H5DataSpace.h | 6 +- c++/src/H5DataType.cpp | 327 ++--- c++/src/H5DataType.h | 70 +- c++/src/H5DcreatProp.cpp | 459 +++---- c++/src/H5DcreatProp.h | 2 +- c++/src/H5DxferProp.h | 13 +- c++/src/H5EnumType.cpp | 2 +- c++/src/H5EnumType.h | 2 +- c++/src/H5FaccProp.cpp | 127 +- c++/src/H5FaccProp.h | 2 +- c++/src/H5FcreatProp.cpp | 169 +-- c++/src/H5FcreatProp.h | 36 +- c++/src/H5Group.cpp | 4 +- c++/src/H5IdComponent.cpp | 25 +- c++/src/H5IdComponent.h | 10 +- c++/src/H5Library.h | 2 +- c++/src/H5PredType.h | 2 +- c++/src/H5PropList.cpp | 79 +- c++/src/H5PropList.h | 8 +- c++/src/H5StrType.cpp | 10 +- c++/src/H5VarLenType.cpp | 10 +- c++/src/H5VarLenType.h | 4 +- c++/src/h5c++.in | 13 +- c++/test/dsets.cpp | 19 +- c++/test/h5cpputil.cpp | 1 - c++/test/h5cpputil.h | 2 +- c++/test/tfile.cpp | 12 +- c++/test/th5s.cpp | 75 +- config/commence.in | 1 + config/conclude.in | 34 +- config/dec-flags | 2 +- config/depend1.in | 16 +- config/freebsd | 4 +- config/gnu-flags | 1 - config/hpux10.20 | 40 +- config/hpux11.00 | 40 +- config/hpux9.03 | 42 +- config/i386-pc-cygwin32 | 6 +- config/ia64-linux-gnu | 10 +- config/irix5.x | 60 +- config/irix6.x | 110 +- config/powerpc-ibm-aix5.x | 53 +- config/solaris2.x | 29 +- config/sv1-cray | 63 +- config/unicos | 59 +- config/unicos10.0.X | 60 +- config/unicosmk | 58 +- config/unicosmk2.0.5.X | 58 +- config/unicosmk2.0.6.X | 62 +- config/unicosmk2.0.X | 56 +- configure | 39 +- configure.in | 34 +- doc/html/Copyright.html | 19 +- doc/html/Datasets.html | 4 +- doc/html/Dataspaces.html | 4 +- doc/html/Datatypes.html | 31 +- doc/html/DatatypesEnum.html | 25 +- doc/html/H5.intro.html | 4 +- doc/html/Intro/IntroExamples.html | 40 +- doc/html/RM_H5.html | 72 +- doc/html/RM_H5A.html | 200 +-- doc/html/RM_H5D.html | 398 +++--- doc/html/RM_H5E.html | 137 +- doc/html/RM_H5F.html | 284 ++-- doc/html/RM_H5G.html | 419 +++--- doc/html/RM_H5I.html | 58 +- doc/html/RM_H5P.html | 2059 ++++++++++++++++------------- doc/html/RM_H5R.html | 114 +- doc/html/RM_H5S.html | 410 +++--- doc/html/RM_H5T.html | 920 +++++++------ doc/html/RM_H5Z.html | 79 +- doc/html/References.html | 2 +- doc/html/Tutor/examples/h5_copy.c | 4 +- doc/html/Tutor/examples/h5_extend.c | 2 +- doc/html/Tutor/examples/h5_hyperslab.c | 4 +- doc/html/Tutor/examples/h5_read.c | 4 +- doc/html/Tutor/examples/h5_ref2regr.c | 4 +- doc/html/Tutor/examples/h5_ref2regw.c | 20 +- doc/html/Tutor/examples/refregexample.f90 | 4 +- doc/html/Tutor/examples/selectele.f90 | 2 +- doc/html/Tutor/select.html | 4 +- doc/html/Tutor/selectc.html | 4 +- doc/html/cpplus/CppInterfaces.html | 24 +- doc/html/h5s.examples | 6 +- doc/html/ph5example.c | 16 +- examples/h5_chunk_read.c | 106 +- examples/h5_compound.c | 1 - examples/h5_drivers.c | 1 - examples/h5_extend_write.c | 7 +- examples/h5_group.c | 1 - examples/h5_mount.c | 1 - examples/h5_read.c | 5 +- examples/h5_reference.c | 1 - examples/h5_select.c | 7 +- examples/h5_write.c | 1 - examples/ph5example.c | 80 +- fortran/examples/refregexample.f90 | 4 +- fortran/examples/selectele.f90 | 2 +- fortran/src/Dependencies | 74 +- fortran/src/H5Af.c | 239 ++-- fortran/src/H5Aff.f90 | 48 +- fortran/src/H5Df.c | 133 +- fortran/src/H5Dff.f90 | 15 +- fortran/src/H5FDmpiof.c | 9 +- fortran/src/H5Gf.c | 53 +- fortran/src/H5Git.c | 239 ---- fortran/src/H5Git.h | 25 - fortran/src/H5If.c | 3 +- fortran/src/H5Iff.f90 | 2 +- fortran/src/H5Pf.c | 156 ++- fortran/src/H5Pff.f90 | 33 +- fortran/src/H5Rf.c | 6 +- fortran/src/H5Sf.c | 38 +- fortran/src/H5Sff.f90 | 18 +- fortran/src/H5Tf.c | 26 +- fortran/src/H5_f.c | 12 +- fortran/src/H5f90global.f90 | 6 +- fortran/src/H5f90i.h | 154 +-- fortran/src/H5f90kit.c | 73 +- fortran/src/H5f90proto.h | 849 +++++------- fortran/src/Makefile.in | 2 +- fortran/test/Makefile.in | 6 +- fortran/test/fflush1.f90 | 4 +- fortran/test/fflush2.f90 | 4 +- fortran/test/t.c | 42 +- fortran/test/t.h | 14 +- fortran/test/tH5A.f90 | 2 +- fortran/test/tH5F.f90 | 2 +- fortran/test/tH5G.f90 | 2 +- fortran/test/tH5I.f90 | 6 +- fortran/test/tH5R.f90 | 8 +- fortran/test/tH5Sselect.f90 | 6 +- fortran/test/tH5Z.f90 | 17 +- fortran/test/tf.f90 | 52 +- hl/src/H5IM.c | 14 +- hl/src/H5TA.c | 61 +- hl/src/Makefile.in | 2 +- hl/test/test_image.c | 11 +- hl/test/test_table.c | 8 +- hl/tools/gif2h5/Makefile.in | 3 +- pablo/PabloHDF.c | 8 +- perform/Makefile.in | 3 +- perform/chunk.c | 4 +- perform/iopipe.c | 2 +- perform/overhead.c | 2 +- perform/perf_meta.c | 4 +- perform/pio_engine.c | 4 +- perform/zip_perf.c | 2 - src/H5.c | 245 ++-- src/H5A.c | 71 +- src/H5AC.c | 61 +- src/H5ACprivate.h | 4 +- src/H5B.c | 74 +- src/H5Bprivate.h | 12 +- src/H5C.c | 8 +- src/H5Cprivate.h | 9 +- src/H5D.c | 66 +- src/H5Dcompact.c | 20 +- src/H5Dcontig.c | 127 +- src/H5Defl.c | 68 +- src/H5Dio.c | 158 ++- src/H5Distore.c | 495 ++++--- src/H5Dmpio.c | 228 +++- src/H5Dpkg.h | 38 +- src/H5Dprivate.h | 8 +- src/H5Dpublic.h | 6 +- src/H5Dselect.c | 4 - src/H5Dtest.c | 4 - src/H5E.c | 151 ++- src/H5Eprivate.h | 49 +- src/H5F.c | 1293 +++++++++--------- src/H5FD.c | 45 +- src/H5FDcore.c | 7 +- src/H5FDfamily.c | 58 +- src/H5FDgass.c | 7 +- src/H5FDlog.c | 16 +- src/H5FDmpi.c | 4 - src/H5FDmpio.c | 7 +- src/H5FDmpiposix.c | 7 +- src/H5FDmulti.c | 81 +- src/H5FDprivate.h | 2 +- src/H5FDsec2.c | 8 +- src/H5FDsrb.c | 7 +- src/H5FDstdio.c | 51 +- src/H5FDstream.c | 6 +- src/H5FL.c | 73 +- src/H5FO.c | 13 +- src/H5FS.c | 18 +- src/H5Fpkg.h | 2 - src/H5Fprivate.h | 8 +- src/H5Fpublic.h | 8 +- src/H5G.c | 24 +- src/H5Gent.c | 27 +- src/H5Gnode.c | 50 +- src/H5Gpkg.h | 22 +- src/H5Gstab.c | 8 +- src/H5HG.c | 23 +- src/H5HGdbg.c | 4 - src/H5HGprivate.h | 4 +- src/H5HL.c | 10 +- src/H5HLdbg.c | 4 - src/H5HLprivate.h | 2 +- src/H5HP.c | 26 +- src/H5I.c | 24 +- src/H5Iprivate.h | 1 - src/H5Ipublic.h | 1 - src/H5MF.c | 16 +- src/H5MM.c | 4 - src/H5O.c | 22 +- src/H5Oattr.c | 7 +- src/H5Obogus.c | 8 +- src/H5Ocont.c | 3 - src/H5Odtype.c | 34 +- src/H5Oefl.c | 7 +- src/H5Ofill.c | 15 +- src/H5Olayout.c | 9 +- src/H5Omtime.c | 11 +- src/H5Oname.c | 7 +- src/H5Opkg.h | 2 +- src/H5Opline.c | 7 +- src/H5Oprivate.h | 4 +- src/H5Osdspace.c | 12 +- src/H5Oshared.c | 7 +- src/H5Ostab.c | 7 +- src/H5P.c | 14 +- src/H5Pdcpl.c | 70 +- src/H5Pdxpl.c | 11 +- src/H5Pfapl.c | 13 +- src/H5Pfcpl.c | 39 +- src/H5Pprivate.h | 2 - src/H5Ppublic.h | 22 +- src/H5Ptest.c | 11 +- src/H5R.c | 25 +- src/H5RC.c | 4 - src/H5RS.c | 55 +- src/H5Rpublic.h | 4 +- src/H5S.c | 48 +- src/H5SL.c | 7 +- src/H5SLprivate.h | 2 +- src/H5ST.c | 18 +- src/H5Sall.c | 104 +- src/H5Shyper.c | 393 +++--- src/H5Smpio.c | 360 ++++- src/H5Snone.c | 125 +- src/H5Spkg.h | 10 +- src/H5Spoint.c | 141 +- src/H5Sprivate.h | 29 +- src/H5Spublic.h | 19 +- src/H5Sselect.c | 142 +- src/H5Stest.c | 6 +- src/H5T.c | 116 +- src/H5TB.c | 43 +- src/H5TS.c | 7 +- src/H5Tarray.c | 8 +- src/H5Tbit.c | 27 +- src/H5Tcommit.c | 80 +- src/H5Tcompound.c | 73 +- src/H5Tconv.c | 77 +- src/H5Tcset.c | 52 +- src/H5Tenum.c | 38 +- src/H5Tfields.c | 128 +- src/H5Tfixed.c | 46 +- src/H5Tfloat.c | 134 +- src/H5Tnative.c | 382 +++--- src/H5Toffset.c | 59 +- src/H5Topaque.c | 46 +- src/H5Torder.c | 52 +- src/H5Tpad.c | 52 +- src/H5Tpkg.h | 39 +- src/H5Tprecis.c | 102 +- src/H5Tprivate.h | 4 +- src/H5Tpublic.h | 22 +- src/H5Tstrpad.c | 60 +- src/H5Tvlen.c | 96 +- src/H5V.c | 504 +++---- src/H5Vprivate.h | 77 +- src/H5Z.c | 16 +- src/H5Zdeflate.c | 75 +- src/H5Zfletcher32.c | 22 +- src/H5Zpublic.h | 2 +- src/H5Zshuffle.c | 32 +- src/H5Zszip.c | 59 +- src/H5config.h.in | 3 - src/H5detect.c | 34 +- src/H5private.h | 74 +- src/H5public.h | 19 +- src/Makefile.in | 2 +- test/big.c | 4 +- test/cache.c | 10 +- test/cmpd_dset.c | 26 +- test/dsets.c | 463 ++++--- test/dtypes.c | 63 +- test/extend.c | 2 +- test/external.c | 4 +- test/file_handle.c | 36 +- test/filename.c | 2 - test/fillval.c | 68 +- test/getname.c | 2 +- test/h5test.c | 150 ++- test/h5test.h | 4 + test/hyperslab.c | 60 +- test/istore.c | 21 +- test/ntypes.c | 703 +++++----- test/ohdr.c | 4 +- test/reserved.c | 26 +- test/stab.c | 4 +- test/stream_test.c | 2 - test/tarray.c | 86 +- test/tattr.c | 2 +- test/testhdf5.h | 37 +- test/tfile.c | 168 ++- test/tgenprop.c | 79 +- test/th5s.c | 9 +- test/theap.c | 16 +- test/titerate.c | 36 +- test/tmeta.c | 17 +- test/tmisc.c | 50 +- test/trefer.c | 116 +- test/trefstr.c | 6 +- test/tselect.c | 453 +++++-- test/tskiplist.c | 16 +- test/ttbbt.c | 2 - test/ttime.c | 18 +- test/ttsafe_acreate.c | 197 ++- test/ttsafe_cancel.c | 218 ++- test/ttsafe_dcreate.c | 2 +- test/ttsafe_error.c | 183 ++- test/ttst.c | 19 +- test/tvlstr.c | 48 +- test/tvltypes.c | 84 +- test/unlink.c | 4 +- testpar/Makefile.in | 2 +- testpar/t_coll_chunk.c | 54 +- testpar/t_dset.c | 45 +- testpar/t_file.c | 8 +- testpar/t_mdset.c | 69 +- testpar/t_mpi.c | 15 +- testpar/testphdf5.c | 27 +- testpar/testphdf5.h | 102 +- tools/gifconv/Makefile.in | 3 +- tools/h5dump/h5dump.c | 266 ++-- tools/h5dump/h5dumpgentest.c | 58 +- tools/h5dump/testh5dump.sh.in | 29 +- tools/h5import/Makefile.in | 2 +- tools/h5import/h5import.c | 92 +- tools/h5import/h5import.h | 4 +- tools/h5jam/getub.c | 4 +- tools/h5jam/h5jam.c | 4 +- tools/h5jam/h5jamgentest.c | 17 +- tools/h5jam/h5unjam.c | 4 +- tools/h5jam/tellub.c | 16 +- tools/h5ls/Makefile.in | 3 +- tools/h5ls/h5ls.c | 75 +- tools/h5repack/Makefile.in | 10 +- tools/h5repack/h5repack.c | 3 + tools/h5repack/h5repack.h | 2 +- tools/h5repack/h5repack.sh.in | 13 +- tools/h5repack/h5repack_copy.c | 27 +- tools/h5repack/h5repack_filters.c | 18 +- tools/h5repack/h5repack_refs.c | 18 +- tools/h5repack/testh5repack_dset.c | 2 +- tools/h5repack/testh5repack_main.c | 46 +- tools/h5repack/testh5repack_make.c | 36 +- tools/lib/h5diff.c | 12 +- tools/lib/h5diff.h | 1 - tools/lib/h5diff_array.c | 28 +- tools/lib/h5diff_attr.c | 2 +- tools/lib/h5tools.c | 43 +- tools/lib/h5tools.h | 7 +- tools/lib/h5tools_filters.c | 95 +- tools/lib/h5tools_ref.c | 150 +-- tools/lib/h5tools_ref.h | 6 +- tools/lib/h5tools_str.c | 4 +- tools/lib/h5trav.c | 1 - tools/misc/Makefile.in | 6 +- tools/misc/h5cc.in | 8 +- tools/misc/h5debug.c | 7 +- tools/testfiles/help-1.ls | 1 + tools/testfiles/help-2.ls | 1 + tools/testfiles/help-3.ls | 1 + 396 files changed, 12605 insertions(+), 11586 deletions(-) delete mode 100644 fortran/src/H5Git.c delete mode 100644 fortran/src/H5Git.h diff --git a/MANIFEST b/MANIFEST index 5b8ed73..e758413 100644 --- a/MANIFEST +++ b/MANIFEST @@ -839,8 +839,6 @@ ./fortran/src/H5Fff.f90 ./fortran/src/H5Gf.c ./fortran/src/H5Gff.f90 -./fortran/src/H5Git.c -./fortran/src/H5Git.h ./fortran/src/H5If.c ./fortran/src/H5Iff.f90 ./fortran/src/H5Pf.c @@ -1076,6 +1074,9 @@ ./release_docs/RELEASE.txt ./src/.indent.pro _DO_NOT_DISTRIBUTE_ +./src/hdf5.lnt _DO_NOT_DISTRIBUTE_ +./src/hdf5-lin.lnt _DO_NOT_DISTRIBUTE_ +./src/hdf5-win.lnt _DO_NOT_DISTRIBUTE_ ./src/Dependencies ./src/H5.c ./src/H5api_adpt.h @@ -1109,6 +1110,7 @@ ./src/H5Eprivate.h ./src/H5Epublic.h ./src/H5F.c +./src/H5Fdbg.c ./src/H5Fpkg.h ./src/H5Fprivate.h ./src/H5Fpublic.h @@ -1368,6 +1370,7 @@ ./testpar/t_mpi.c ./testpar/t_ph5basic.c ./testpar/t_coll_chunk.c +./testpar/t_span_tree.c ./testpar/testphdf5.c ./testpar/testphdf5.h ./testpar/testph5.sh.in @@ -1463,6 +1466,7 @@ ./tools/h5repack/testh5repack_main.c ./tools/h5repack/testh5repack_make.c ./tools/h5repack/testh5repack_util.c +./tools/h5repack/testh5repack_detect_szip.c ./tools/h5ls/Dependencies ./tools/h5ls/Makefile.in diff --git a/Makefile.in b/Makefile.in index 56695dd..ebed7d7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,3 @@ -## Top-level HDF5 Makefile(.in) -## ## ## Copyright by the Board of Trustees of the University of Illinois. ## All rights reserved. @@ -17,6 +15,8 @@ ## but does so in the correct order. You can alternatively invoke make from ## each subdirectory manually. ## +## Top-level HDF5 Makefile(.in) +## top_srcdir=@top_srcdir@ top_builddir=. srcdir=@srcdir@ @@ -72,7 +72,7 @@ lib progs check test _test uninstall: done tests TAGS dep depend: - @@SETX@; for d in $(SUBDIRS) perform; do \ + @@SETX@; for d in $(SUBDIRS) perform; do \ (cd $$d && $(MAKE) $@) || exit 1; \ done @@ -142,13 +142,13 @@ H5Tinit.c: mostlyclean distclean maintainer-clean clean mostlyclean: - @@SETX@; for d in $(SUBDIRS) doc perform examples; do \ + @@SETX@; for d in $(SUBDIRS) doc perform examples; do \ (cd $$d && $(MAKE) $@); \ done -$(RM) conftest conftest.c distclean: - @@SETX@; for d in $(SUBDIRS) doc perform examples; do \ + @@SETX@; for d in $(SUBDIRS) doc perform examples; do \ (cd $$d && $(MAKE) $@); \ done -$(RM) config/commence config/conclude @@ -160,7 +160,7 @@ distclean: maintainer-clean: @echo "This target is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." - @@SETX@; for d in $(SUBDIRS) doc perform examples; do \ + @@SETX@; for d in $(SUBDIRS) doc perform examples; do \ (cd $$d && $(MAKE) $@); \ done -$(RM) config.cache config.log config.status src/H5config.h diff --git a/bin/buildhdf5 b/bin/buildhdf5 index 4ceec6d..03b6ade 100755 --- a/bin/buildhdf5 +++ b/bin/buildhdf5 @@ -1,4 +1,17 @@ #!/bin/sh +## +## Copyright by the Board of Trustees of the University of Illinois. +## 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 files COPYING and Copyright.html. COPYING can be found at the root +## of the source code distribution tree; Copyright.html can be found at the +## root level of an installed copy of the electronic HDF5 document set and +## is linked from the top-level documents page. It can also be found at +## http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have +## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. +## # Build HDF5 library by doing configure, make, and tests. # Usage: See USAGE() # Programmer: Albert Cheng diff --git a/bin/trace b/bin/trace index a8b261e..c29d616 100755 --- a/bin/trace +++ b/bin/trace @@ -1,4 +1,17 @@ #!/usr/bin/perl -w +## +## Copyright by the Board of Trustees of the University of Illinois. +## 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 files COPYING and Copyright.html. COPYING can be found at the root +## of the source code distribution tree; Copyright.html can be found at the +## root level of an installed copy of the electronic HDF5 document set and +## is linked from the top-level documents page. It can also be found at +## http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have +## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. +## require 5.003; $Source = ""; @@ -14,83 +27,85 @@ $Source = ""; # Two-character strings begin with an upper-case letter which is # usually the same as the package name. # -%TypeString = ("haddr_t" => "a", - "hbool_t" => "b", - "double" => "d", - "H5D_alloc_time_t" => "Da", - "H5D_fill_time_t" => "Df", - "H5D_fill_value_t" => "DF", - "H5D_layout_t" => "Dl", - "H5FD_mpio_xfer_t" => "Dt", - "herr_t" => "e", - "H5E_direction_t" => "Ed", - "H5E_error_t*" => "Ee", - "H5E_major_t" => "Ej", - "H5E_minor_t" => "En", - "H5F_close_degree_t" => "Fd", - "H5F_scope_t" => "Fs", - "H5FD_t*" => "x", - "H5FD_class_t*" => "x", - "H5FD_stream_fapl_t*" => "x", - "H5G_link_t" => "Gl", - "H5G_stat_t*" => "Gs", - "hsize_t" => "h", - "hssize_t" => "Hs", - "hid_t" => "i", - "int" => "Is", - "unsigned" => "Iu", - "unsigned int" => "Iu", - "H5I_type_t" => "It", - "MPI_Comm" => "Mc", - "MPI_Info" => "Mi", - "H5FD_mem_t" => "Mt", - "off_t" => "o", - "H5P_class_t" => "p", - "href_t" => "r", - "H5R_type_t" => "Rt", - "char*" => "s", - "H5S_class_t" => "Sc", - "H5S_seloper_t" => "Ss", - "H5S_sel_type" => "St", - "htri_t" => "t", - "H5T_cset_t", => "Tc", - "H5T_direction_t", => "Td", - "H5T_norm_t" => "Tn", - "H5T_order_t" => "To", - "H5T_pad_t" => "Tp", - "H5T_pers_t" => "Te", - "H5T_sign_t" => "Ts", - "H5T_class_t" => "Tt", - "H5T_str_t" => "Tz", - "void*" => "x", - "void**" => "x", - "FILE*" => "x", - "H5A_operator_t" => "x", - "H5D_operator_t" => "x", - "H5E_auto_t" => "x", - "H5E_walk_t" => "x", - "H5G_iterate_t" => "x", - "H5MM_allocate_t" => "x", - "H5MM_free_t" => "x", - "H5P_cls_create_func_t" => "x", - "H5P_cls_copy_func_t" => "x", - "H5P_cls_close_func_t" => "x", - "H5P_iterate_t" => "x", - "H5P_prp_create_func_t" => "x", - "H5P_prp_copy_func_t" => "x", - "H5P_prp_close_func_t" => "x", - "H5P_prp_delete_func_t" => "x", - "H5P_prp_get_func_t" => "x", - "H5P_prp_set_func_t" => "x", - "H5T_cdata_t**" => "x", - "H5T_conv_t" => "x", - "H5T_overflow_t" => "x", - "H5Z_func_t" => "x", - "H5Z_filter_func_t" => "x", - "size_t" => "z", - "H5Z_EDC_t" => "Ze", - "H5Z_filter_t" => "Zf", - "ssize_t" => "Zs", +%TypeString = ("haddr_t" => "a", + "hbool_t" => "b", + "double" => "d", + "H5D_alloc_time_t" => "Da", + "H5D_fill_time_t" => "Df", + "H5D_fill_value_t" => "DF", + "H5D_layout_t" => "Dl", + "H5D_space_status_t" => "Ds", + "H5FD_mpio_xfer_t" => "Dt", + "herr_t" => "e", + "H5E_direction_t" => "Ed", + "H5E_error_t*" => "Ee", + "H5E_major_t" => "Ej", + "H5E_minor_t" => "En", + "H5F_close_degree_t" => "Fd", + "H5F_scope_t" => "Fs", + "H5FD_t*" => "x", + "H5FD_class_t*" => "x", + "H5FD_stream_fapl_t*" => "x", + "H5G_link_t" => "Gl", + "H5G_obj_t" => "Go", + "H5G_stat_t*" => "Gs", + "hsize_t" => "h", + "hssize_t" => "Hs", + "hid_t" => "i", + "int" => "Is", + "unsigned" => "Iu", + "unsigned int" => "Iu", + "H5I_type_t" => "It", + "MPI_Comm" => "Mc", + "MPI_Info" => "Mi", + "H5FD_mem_t" => "Mt", + "off_t" => "o", + "H5P_class_t" => "p", + "H5R_type_t" => "Rt", + "char*" => "s", + "H5S_class_t" => "Sc", + "H5S_seloper_t" => "Ss", + "H5S_sel_type" => "St", + "htri_t" => "t", + "H5T_cset_t", => "Tc", + "H5T_direction_t", => "Td", + "H5T_norm_t" => "Tn", + "H5T_order_t" => "To", + "H5T_pad_t" => "Tp", + "H5T_pers_t" => "Te", + "H5T_sign_t" => "Ts", + "H5T_class_t" => "Tt", + "H5T_str_t" => "Tz", + "void*" => "x", + "void**" => "x", + "FILE*" => "x", + "H5A_operator_t" => "x", + "H5D_operator_t" => "x", + "H5E_auto_t" => "x", + "H5E_walk_t" => "x", + "H5G_iterate_t" => "x", + "H5MM_allocate_t" => "x", + "H5MM_free_t" => "x", + "H5P_cls_create_func_t" => "x", + "H5P_cls_copy_func_t" => "x", + "H5P_cls_close_func_t" => "x", + "H5P_iterate_t" => "x", + "H5P_prp_create_func_t" => "x", + "H5P_prp_copy_func_t" => "x", + "H5P_prp_close_func_t" => "x", + "H5P_prp_delete_func_t" => "x", + "H5P_prp_get_func_t" => "x", + "H5P_prp_set_func_t" => "x", + "H5T_cdata_t**" => "x", + "H5T_conv_t" => "x", + "H5T_overflow_t" => "x", + "H5Z_func_t" => "x", + "H5Z_filter_func_t" => "x", + "size_t" => "z", + "H5Z_class_t*" => "Zc", + "H5Z_EDC_t" => "Ze", + "H5Z_filter_t" => "Zf", + "ssize_t" => "Zs", ); ############################################################################## @@ -227,7 +242,7 @@ sub rewrite_func ($$$$$) { } } elsif ($body =~ s/((\n[ \t]*)H5TRACE\d+\s*\(.*?\);)\n/"$2$trace"/es) { # Replaced an H5TRACE macro - } elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*\s*\(.*?\);)\n/"$1$2$trace"/es) { + } elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*\s*\(.*?\);??)\n/"$1$2$trace"/es) { # Added an H5TRACE macro after a FUNC_ENTER macro. } else { errmesg $file, $name, "unable to insert tracing information"; diff --git a/c++/examples/chunks.cpp b/c++/examples/chunks.cpp index 3cc4e20..0efd95d 100644 --- a/c++/examples/chunks.cpp +++ b/c++/examples/chunks.cpp @@ -144,7 +144,7 @@ int main (void) /* * Define the column (hyperslab) to read. */ - hssize_t offset[2] = { 0, 2 }; + hsize_t offset[2] = { 0, 2 }; hsize_t count[2] = { 10, 1 }; int column[10]; // buffer for column to be read diff --git a/c++/examples/extend_ds.cpp b/c++/examples/extend_ds.cpp index 4c4476a..9c12304 100644 --- a/c++/examples/extend_ds.cpp +++ b/c++/examples/extend_ds.cpp @@ -81,7 +81,6 @@ int main (void) * Create a new dataset within the file using cparms * creation properties. */ - DataSet dataset = file.createDataSet( DATASET_NAME, PredType::NATIVE_INT, mspace1, cparms); /* @@ -96,7 +95,7 @@ int main (void) * Select a hyperslab. */ DataSpace fspace1 = dataset.getSpace (); - hssize_t offset[2]; + hsize_t offset[2]; offset[0] = 0; offset[1] = 0; hsize_t dims1[2] = { 3, 3}; /* data1 dimensions */ diff --git a/c++/examples/readdata.cpp b/c++/examples/readdata.cpp index 1797d27..7e5b195 100644 --- a/c++/examples/readdata.cpp +++ b/c++/examples/readdata.cpp @@ -128,7 +128,7 @@ int main (void) * Define hyperslab in the dataset; implicitly giving strike and * block NULL. */ - hssize_t offset[2]; // hyperslab offset in the file + hsize_t offset[2]; // hyperslab offset in the file hsize_t count[2]; // size of the hyperslab in the file offset[0] = 1; offset[1] = 2; @@ -148,7 +148,7 @@ int main (void) /* * Define memory hyperslab. */ - hssize_t offset_out[3]; // hyperslab offset in memory + hsize_t offset_out[3]; // hyperslab offset in memory hsize_t count_out[3]; // size of the hyperslab in memory offset_out[0] = 3; offset_out[1] = 0; diff --git a/c++/examples/writedata.cpp b/c++/examples/writedata.cpp index 8e0404c..0bed680 100644 --- a/c++/examples/writedata.cpp +++ b/c++/examples/writedata.cpp @@ -98,7 +98,7 @@ int main (void) * Select hyperslab for the dataset in the file, using 3x2 blocks, * (4,3) stride and (2,4) count starting at the position (0,1). */ - hssize_t start[2]; // Start of hyperslab + hsize_t start[2]; // Start of hyperslab hsize_t stride[2]; // Stride of hyperslab hsize_t count[2]; // Block count hsize_t block[2]; // Block sizes @@ -156,14 +156,14 @@ int main (void) /* * Select sequence of NPOINTS points in the file dataspace. */ - hssize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points + hsize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points from the file dataspace */ coord[0][0] = 0; coord[0][1] = 0; coord[1][0] = 3; coord[1][1] = 3; coord[2][0] = 3; coord[2][1] = 5; coord[3][0] = 5; coord[3][1] = 6; - fspace.selectElements( H5S_SELECT_SET, NPOINTS, (const hssize_t **)coord); + fspace.selectElements( H5S_SELECT_SET, NPOINTS, (const hsize_t **)coord); /* * Write new selection of points to the dataset. diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp index 0968344..7771c6a 100644 --- a/c++/src/H5AbstractDs.cpp +++ b/c++/src/H5AbstractDs.cpp @@ -54,7 +54,7 @@ AbstractDs::AbstractDs( const AbstractDs& original ) : H5Object( original ) {} // Function: AbstractDs::getTypeClass ///\brief Returns the class of the datatype that is used by this /// object, which can be a dataset or an attribute. -///\return Datatype class identifier +///\return Datatype class identifier ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -80,7 +80,7 @@ H5T_class_t AbstractDs::getTypeClass() const // Function: AbstractDs::getDataType ///\brief Returns the generic datatype of this abstract dataset, which /// can be a dataset or an attribute. -///\return DataType instance +///\return DataType instance ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -100,7 +100,7 @@ DataType AbstractDs::getDataType() const // Function: AbstractDs::getEnumType ///\brief Returns the enumeration datatype of this abstract dataset which /// can be a dataset or an attribute. -///\return EnumType instance +///\return EnumType instance ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -114,7 +114,7 @@ EnumType AbstractDs::getEnumType() const // Function: AbstractDs::getCompType ///\brief Returns the compound datatype of this abstract dataset which /// can be a dataset or an attribute. -///\return CompType instance +///\return CompType instance ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -128,7 +128,7 @@ CompType AbstractDs::getCompType() const // Function: AbstractDs::getIntType ///\brief Returns the integer datatype of this abstract dataset which /// can be a dataset or an attribute. -///\return IntType instance +///\return IntType instance ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -142,7 +142,7 @@ IntType AbstractDs::getIntType() const // Function: AbstractDs::getFloatType ///\brief Returns the floating-point datatype of this abstract dataset, /// which can be a dataset or an attribute. -///\return FloatType instance +///\return FloatType instance ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -156,7 +156,7 @@ FloatType AbstractDs::getFloatType() const // Function: AbstractDs::getStrType ///\brief Returns the string datatype of this abstract dataset which /// can be a dataset or an attribute. -///\return StrType instance +///\return StrType instance ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp index 8859123..681b9c4 100644 --- a/c++/src/H5ArrayType.cpp +++ b/c++/src/H5ArrayType.cpp @@ -42,10 +42,10 @@ ArrayType::ArrayType() : DataType() } //-------------------------------------------------------------------------- -// Function: ArrayType overloaded constructor -///\brief Creates an ArrayType object using an existing id. -///\param existing_id - IN: Id of an existing datatype -///\exception H5::DataTypeIException +// Function: ArrayType overloaded constructor +///\brief Creates an ArrayType object using an existing id. +///\param existing_id - IN: Id of an existing datatype +///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May 2004 //-------------------------------------------------------------------------- ArrayType::ArrayType( const hid_t existing_id ) : DataType( existing_id ) @@ -81,13 +81,13 @@ ArrayType::ArrayType( const ArrayType& original ) : DataType( original ) } //-------------------------------------------------------------------------- -// Function: ArrayType overloaded constructor -///\brief Creates a new array data type based on the specified +// Function: ArrayType overloaded constructor +///\brief Creates a new array data type based on the specified /// \a base_type. -///\param base_type - IN: Existing datatype -///\param ndims - IN: Rank of the array, [0..H5S_MAX_RANK] -///\param dims - IN: Size of each array dimension -///\exception H5::DataTypeIException +///\param base_type - IN: Existing datatype +///\param ndims - IN: Rank of the array, [0..H5S_MAX_RANK] +///\param dims - IN: Size of each array dimension +///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May 2004 //-------------------------------------------------------------------------- ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims) : DataType() @@ -105,10 +105,10 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims) } //-------------------------------------------------------------------------- -// Function: ArrayType::getArrayNDims -///\brief Returns the number of dimensions for an array datatype. +// Function: ArrayType::getArrayNDims +///\brief Returns the number of dimensions for an array datatype. ///\return Number of dimensions -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May 2004 //-------------------------------------------------------------------------- int ArrayType::getArrayNDims() @@ -127,11 +127,11 @@ int ArrayType::getArrayNDims() } //-------------------------------------------------------------------------- -// Function: ArrayType::getArrayDims -///\brief Retrieves the size of all dimensions of an array datatype. +// Function: ArrayType::getArrayDims +///\brief Retrieves the size of all dimensions of an array datatype. ///\param dims - OUT: Sizes of dimensions ///\return Number of dimensions -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May 2004 //-------------------------------------------------------------------------- int ArrayType::getArrayDims(hsize_t* dims) diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h index d98488e..fb5eb2e 100644 --- a/c++/src/H5ArrayType.h +++ b/c++/src/H5ArrayType.h @@ -34,10 +34,10 @@ class H5_DLLCPP ArrayType : public DataType { // Returns the sizes of dimensions of this array datatype. int getArrayDims(hsize_t* dims); - // Copy constructor - makes copy of the original object + // Copy constructor: makes copy of the original object. ArrayType( const ArrayType& original ); - // Default destructor + // Noop destructor virtual ~ArrayType(); protected: diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp index 0d84bd4..fb4c81a 100644 --- a/c++/src/H5AtomType.cpp +++ b/c++/src/H5AtomType.cpp @@ -58,7 +58,7 @@ AtomType::AtomType( const AtomType& original ) : DataType( original ) {} // Function: AtomType::setSize ///\brief Sets the total size for an atomic datatype. ///\param size - IN: Size to set -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void AtomType::setSize( size_t size ) const @@ -79,7 +79,7 @@ void AtomType::setSize( size_t size ) const /// \li \c H5T_ORDER_LE /// \li \c H5T_ORDER_BE /// \li \c H5T_ORDER_VAX -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5T_order_t AtomType::getOrder( string& order_string ) const @@ -109,7 +109,7 @@ H5T_order_t AtomType::getOrder( string& order_string ) const /// \li \c H5T_ORDER_LE /// \li \c H5T_ORDER_BE /// \li \c H5T_ORDER_VAX -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void AtomType::setOrder( H5T_order_t order ) const @@ -126,7 +126,7 @@ void AtomType::setOrder( H5T_order_t order ) const // Function: AtomType::getPrecision ///\brief Returns the precision of an atomic datatype. ///\return Number of significant bits -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException ///\par Description /// The precision is the number of significant bits which, /// unless padding is present, is 8 times larger than the @@ -150,7 +150,7 @@ size_t AtomType::getPrecision() const // Function: AtomType::setPrecision ///\brief Sets the precision of an atomic datatype. ///\param precision - IN: Number of bits of precision -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException ///\par Description /// For information, please see C layer Reference Manuat at: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetPrecision @@ -170,7 +170,7 @@ void AtomType::setPrecision( size_t precision ) const // Function: AtomType::getOffset ///\brief Retrieves the bit offset of the first significant bit. ///\return Offset value -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException ///\par Description /// For information, please see C layer Reference Manuat at: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-GetOffset @@ -197,7 +197,7 @@ int AtomType::getOffset() const // Function: AtomType::setOffset ///\brief Sets the bit offset of the first significant bit. ///\param offset - IN: Offset of first significant bit -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException ///\par Description /// For information, please see C layer Reference Manuat at: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetOffset @@ -219,7 +219,7 @@ void AtomType::setOffset( size_t offset ) const /// bit padding. ///\param lsb - OUT: Least-significant bit padding type ///\param msb - OUT: Most-significant bit padding type -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException ///\par Description /// Possible values for \a lsb and \a msb include: /// \li \c H5T_PAD_ZERO (0) - Set background to zeros. @@ -242,7 +242,7 @@ void AtomType::getPad( H5T_pad_t& lsb, H5T_pad_t& msb ) const ///\brief Sets the least and most-significant bits padding types. ///\param lsb - IN: Least-significant bit padding type ///\param msb - IN: Most-significant bit padding type -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException ///\par Description /// Valid values for \a lsb and \a msb include: /// \li \c H5T_PAD_ZERO (0) - Set background to zeros. diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h index e1b1eb9..4190b80 100644 --- a/c++/src/H5AtomType.h +++ b/c++/src/H5AtomType.h @@ -57,7 +57,7 @@ class H5_DLLCPP AtomType : public DataType { // Copy constructor - makes copy of the original object AtomType( const AtomType& original ); - // Default destructor + // Noop destructor virtual ~AtomType(); protected: diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp index 72341f4..e004ab9 100644 --- a/c++/src/H5CompType.cpp +++ b/c++/src/H5CompType.cpp @@ -114,7 +114,7 @@ int CompType::getNmembers() const ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -string CompType::getMemberName( int member_num ) const +string CompType::getMemberName( unsigned member_num ) const { char* member_name_C = H5Tget_member_name( id, member_num ); if( member_name_C == NULL ) // NULL means failure @@ -170,7 +170,7 @@ int CompType::getMemberIndex(const string& name) const // Note that byte offset being returned as 0 doesn't indicate // a failure. (According to Quincey) //-------------------------------------------------------------------------- -size_t CompType::getMemberOffset( int member_num ) const +size_t CompType::getMemberOffset( unsigned member_num ) const { size_t offset = H5Tget_member_offset( id, member_num ); return( offset ); @@ -192,7 +192,7 @@ int CompType::getMemberDims( int member_num, size_t* dims, int* perm ) const ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -H5T_class_t CompType::getMemberClass( int member_num ) const +H5T_class_t CompType::getMemberClass( unsigned member_num ) const { // get the member datatype first hid_t member_type_id = H5Tget_member_type( id, member_num ); @@ -216,7 +216,7 @@ H5T_class_t CompType::getMemberClass( int member_num ) const // of the specified member. It provides the id to construct appropriate // sub-types in the functions getMemberXxxType below, where Xxx indicates // the sub-types. -hid_t CompType::p_get_member_type(int member_num) const +hid_t CompType::p_get_member_type(unsigned member_num) const { // get the id of the specified member first hid_t member_type_id = H5Tget_member_type( id, member_num ); @@ -326,27 +326,27 @@ StrType CompType::getMemberStrType( int member_num ) const May, 2004: These should be reconsidered to provide more convenience. // Returns the datatype of the specified member in this compound datatype. // Several overloading of getMemberType are for different datatypes -void CompType::getMemberType( int member_num, EnumType& enumtype ) const +void CompType::getMemberType( unsigned member_num, EnumType& enumtype ) const { p_get_member_type(member_num, enumtype); } -void CompType::getMemberType( int member_num, CompType& comptype ) const +void CompType::getMemberType( unsigned member_num, CompType& comptype ) const { p_get_member_type(member_num, comptype); } -void CompType::getMemberType( int member_num, IntType& inttype ) const +void CompType::getMemberType( unsigned member_num, IntType& inttype ) const { p_get_member_type(member_num, inttype); } -void CompType::getMemberType( int member_num, FloatType& floatype ) const +void CompType::getMemberType( unsigned member_num, FloatType& floatype ) const { p_get_member_type(member_num, floatype); } -void CompType::getMemberType( int member_num, StrType& strtype ) const +void CompType::getMemberType( unsigned member_num, StrType& strtype ) const { p_get_member_type(member_num, strtype); } diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h index 0c530b1..bc96969 100644 --- a/c++/src/H5CompType.h +++ b/c++/src/H5CompType.h @@ -34,7 +34,7 @@ class H5_DLLCPP CompType : public DataType { // Returns the type class of the specified member of this compound // datatype. It provides to the user a way of knowing what type // to create another datatype of the same class - H5T_class_t getMemberClass( int member_num ) const; + H5T_class_t getMemberClass( unsigned member_num ) const; // Returns the dimensionality of the specified member. int getMemberDims( int member_num, size_t* dims, int* perm ) const; @@ -44,10 +44,10 @@ class H5_DLLCPP CompType : public DataType { int getMemberIndex(const string& name) const; // Returns the offset of a member of this compound datatype. - size_t getMemberOffset( int memb_no ) const; + size_t getMemberOffset( unsigned memb_no ) const; // Returns the name of a member of this compound datatype. - string getMemberName( int member_num ) const; + string getMemberName( unsigned member_num ) const; // Returns the compound datatype of the specified member in // this compound datatype. @@ -97,7 +97,7 @@ class H5_DLLCPP CompType : public DataType { private: // Contains common code that is used by the member functions // getMemberXxxType - hid_t p_get_member_type(int member_num) const; + hid_t p_get_member_type(unsigned member_num) const; }; #ifndef H5_NO_NAMESPACE } diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp index 7e0f317..1dc7b43 100644 --- a/c++/src/H5DataSpace.cpp +++ b/c++/src/H5DataSpace.cpp @@ -419,7 +419,7 @@ void DataSpace::getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints, /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectBounds // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DataSpace::getSelectBounds ( hssize_t* start, hssize_t* end ) const +void DataSpace::getSelectBounds ( hsize_t* start, hsize_t* end ) const { herr_t ret_value = H5Sget_select_bounds( id, start, end ); if( ret_value < 0 ) @@ -445,7 +445,7 @@ void DataSpace::getSelectBounds ( hssize_t* start, hssize_t* end ) const /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectElements // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DataSpace::selectElements ( H5S_seloper_t op, const size_t num_elements, const hssize_t *coord[ ] ) const +void DataSpace::selectElements ( H5S_seloper_t op, const size_t num_elements, const hsize_t *coord[ ] ) const { herr_t ret_value; ret_value = H5Sselect_elements( id, op, num_elements, coord ); @@ -525,7 +525,7 @@ bool DataSpace::selectValid () const /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectHyperslab // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride, const hsize_t *block ) const +void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride, const hsize_t *block ) const { herr_t ret_value; ret_value = H5Sselect_hyperslab( id, op, start, stride, count, block ); diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h index 5e20730..a07289b 100644 --- a/c++/src/H5DataSpace.h +++ b/c++/src/H5DataSpace.h @@ -41,7 +41,7 @@ class H5_DLLCPP DataSpace : public IdComponent { void extentCopy( DataSpace& dest_space ) const; // Gets the bounding box containing the current selection. - void getSelectBounds( hssize_t* start, hssize_t* end ) const; + void getSelectBounds( hsize_t* start, hsize_t* end ) const; // Gets the number of element points in the current selection. hssize_t getSelectElemNpoints() const; @@ -82,10 +82,10 @@ class H5_DLLCPP DataSpace : public IdComponent { // Selects array elements to be included in the selection for // this dataspace. - void selectElements( H5S_seloper_t op, const size_t num_elements, const hssize_t *coord[ ] ) const; + void selectElements( H5S_seloper_t op, const size_t num_elements, const hsize_t *coord[ ] ) const; // Selects a hyperslab region to add to the current selected region. - void selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL ) const; + void selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL ) const; // Resets the selection region to include no elements. void selectNone() const; diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index 1f01aa2..8dcb7bd 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -39,29 +39,29 @@ namespace H5 { #endif //-------------------------------------------------------------------------- -// Function: DataType overloaded constructor -///\brief Creates a datatype using an existing datatype's id -///\param existing_id - IN: Id of the existing datatype -///\param predefined - IN: Indicates whether or not this datatype is -/// a predefined datatype; default to \c false +// Function: DataType overloaded constructor +///\brief Creates a datatype using an existing datatype's id +///\param existing_id - IN: Id of the existing datatype +///\param predefined - IN: Indicates whether or not this datatype is +/// a predefined datatype; default to \c false // Description -// Constructor creates a copy of an existing DataType using -// its id. The argument "predefined" is default to false; -// when a default datatype is created, this argument is set -// to true so H5Tclose will not be called on it later. - need -// a reassessment after changing to the new ref counting mech. -// - BMR 5/2004 -// Programmer Binh-Minh Ribler - 2000 +// Constructor creates a copy of an existing DataType using +// its id. The argument "predefined" is default to false; +// when a default datatype is created, this argument is set +// to true so H5Tclose will not be called on it later. - need +// a reassessment after changing to the new ref counting mech. +// - BMR 5/2004 +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType::DataType(const hid_t existing_id, bool predefined) : H5Object(existing_id), is_predtype(predefined) {} //-------------------------------------------------------------------------- -// Function: DataType overloaded constructor -///\brief Creates a object given its class and size -///\param type_class - IN: Class of datatype to create -///\param size - IN: Number of bytes in the datatype to create -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType overloaded constructor +///\brief Creates a object given its class and size +///\param type_class - IN: Class of datatype to create +///\param size - IN: Number of bytes in the datatype to create +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object(), is_predtype( false ) { @@ -74,16 +74,16 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object(), is } //-------------------------------------------------------------------------- -// Function: DataType default constructor -///\brief Default constructor: Creates a stub datatype -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType default constructor +///\brief Default constructor: Creates a stub datatype +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType::DataType() : H5Object(), is_predtype( false ) {} //-------------------------------------------------------------------------- -// Function: DataType copy constructor -///\brief Copy constructor: makes a copy of the original DataType object. -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType copy constructor +///\brief Copy constructor: makes a copy of the original DataType object. +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType::DataType(const DataType& original) : H5Object(original) { @@ -91,11 +91,11 @@ DataType::DataType(const DataType& original) : H5Object(original) } //-------------------------------------------------------------------------- -// Function: DataType::copy -///\brief Copies an existing datatype to this datatype object -///\param like_type - IN: Datatype to be copied -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::copy +///\brief Copies an existing datatype to this datatype object +///\param like_type - IN: Datatype to be copied +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::copy( const DataType& like_type ) { @@ -114,21 +114,19 @@ void DataType::copy( const DataType& like_type ) ref_count = new RefCounter; if( id <= 0 ) - { throw DataTypeIException("DataType::copy", "H5Tcopy failed"); - } } //-------------------------------------------------------------------------- -// Function: DataType::operator= -///\brief Assignment operator -///\param rhs - IN: Reference to the existing datatype -///\return Reference to DataType instance -///\exception H5::DataTypeIException +// Function: DataType::operator= +///\brief Assignment operator +///\param rhs - IN: Reference to the existing datatype +///\return Reference to DataType instance +///\exception H5::DataTypeIException // Description -// Makes a copy of the type on the right hand side and stores -// the new id in the left hand side object. -// Programmer Binh-Minh Ribler - 2000 +// Makes a copy of the type on the right hand side and stores +// the new id in the left hand side object. +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType& DataType::operator=( const DataType& rhs ) { @@ -137,13 +135,13 @@ DataType& DataType::operator=( const DataType& rhs ) } //-------------------------------------------------------------------------- -// Function: DataType::operator== -///\brief Compares this DataType against the given one to determines -/// whether the two objects refer to the same actual datatype. -///\param compared_type - IN: Reference to the datatype to compare -///\return true if the datatypes are equal, and false, otherwise. -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::operator== +///\brief Compares this DataType against the given one to determines +/// whether the two objects refer to the same actual datatype. +///\param compared_type - IN: Reference to the datatype to compare +///\return true if the datatypes are equal, and false, otherwise. +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- bool DataType::operator==(const DataType& compared_type ) const { @@ -162,16 +160,15 @@ bool DataType::operator==(const DataType& compared_type ) const } //-------------------------------------------------------------------------- -// Function: DataType::commit -///\brief Commits a transient datatype to a file, creating a new -/// named datatype -///\param loc - IN: Either a file or a group -///\param name - IN: Name of the datatype -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::commit +///\brief Commits a transient datatype to a file, creating a new +/// named datatype +///\param loc - IN: Either a file or a group +///\param name - IN: Name of the datatype +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -// Commits a transient datatype to a file, creating a new named datatype -void DataType::commit( CommonFG& loc, const char* name ) const +void DataType::commit(CommonFG& loc, const char* name) const { hid_t loc_id = loc.getLocId(); // get location id for C API @@ -182,25 +179,26 @@ void DataType::commit( CommonFG& loc, const char* name ) const throw DataTypeIException("DataType::commit", "H5Tcommit failed"); } } + //-------------------------------------------------------------------------- -// Function: DataType::commit -///\brief This is an overloaded member function, provided for convenience. -/// It differs from the above function only in the type of the -/// argument \a name. -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::commit +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function only in the type of the +/// argument \a name. +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DataType::commit( CommonFG& loc, const string& name ) const +void DataType::commit(CommonFG& loc, const string& name) const { commit( loc, name.c_str() ); } //-------------------------------------------------------------------------- -// Function: DataType::committed -///\brief Determines whether a datatype is a named type or a -/// transient type. -///\return true if the datatype is a named type, and false, otherwise. -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::committed +///\brief Determines whether a datatype is a named type or a +/// transient type. +///\return true if the datatype is a named type, and false, otherwise. +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- bool DataType::committed() const { @@ -217,14 +215,14 @@ bool DataType::committed() const } //-------------------------------------------------------------------------- -// Function: DataType::find -///\brief Finds a conversion function that can handle a conversion -/// from this datatype to the specified datatype, \a dest. -///\param dest - IN: Destination datatype -///\param pcdata - IN: Pointer to type conversion data -///\return Pointer to a suitable conversion function -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::find +///\brief Finds a conversion function that can handle a conversion +/// from this datatype to the specified datatype, \a dest. +///\param dest - IN: Destination datatype +///\param pcdata - IN: Pointer to type conversion data +///\return Pointer to a suitable conversion function +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const { @@ -238,17 +236,17 @@ H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const } //-------------------------------------------------------------------------- -// Function: DataType::convert -///\brief Converts data from this datatype to the specified datatypes. -///\param dest - IN: Destination datatype -///\param nelmts - IN: Size of array \a buf -///\param buf - IN/OUT: Array containing pre- and post-conversion -/// values -///\param background - IN: Optional backgroud buffer -///\param plist - IN: Dataset transfer property list -///\return Pointer to a suitable conversion function -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::convert +///\brief Converts data from this datatype to the specified datatypes. +///\param dest - IN: Destination datatype +///\param nelmts - IN: Size of array \a buf +///\param buf - IN/OUT: Array containing pre- and post-conversion +/// values +///\param background - IN: Optional backgroud buffer +///\param plist - IN: Dataset transfer property list +///\return Pointer to a suitable conversion function +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::convert( const DataType& dest, hsize_t nelmts, void *buf, void *background, PropList& plist ) const { @@ -284,17 +282,17 @@ H5T_overflow_t DataType::getOverflow(void) const } //-------------------------------------------------------------------------- -// Function: DataType::lock -///\brief Locks a datatype, making it read-only and non-destructible. -///\exception H5::DataTypeIException +// Function: DataType::lock +///\brief Locks a datatype, making it read-only and non-destructible. +///\exception H5::DataTypeIException ///\par Descrition -/// This is normally done by the library for predefined data -/// types so the application doesn't inadvertently change or -/// delete a predefined type. +/// This is normally done by the library for predefined data +/// types so the application doesn't inadvertently change or +/// delete a predefined type. /// -/// Once a data type is locked it can never be unlocked unless -/// the entire library is closed. -// Programmer Binh-Minh Ribler - 2000 +/// Once a data type is locked it can never be unlocked unless +/// the entire library is closed. +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::lock() const { @@ -307,11 +305,11 @@ void DataType::lock() const } //-------------------------------------------------------------------------- -// Function: DataType::getClass -///\brief Returns the datatype class identifier. -///\return Datatype class identifier -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::getClass +///\brief Returns the datatype class identifier. +///\return Datatype class identifier +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5T_class_t DataType::getClass() const { @@ -327,11 +325,11 @@ H5T_class_t DataType::getClass() const } //-------------------------------------------------------------------------- -// Function: DataType::getSize -///\brief Returns the size of a datatype. -///\return Datatype size in bytes -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::getSize +///\brief Returns the size of a datatype. +///\return Datatype size in bytes +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- size_t DataType::getSize() const { @@ -346,11 +344,11 @@ size_t DataType::getSize() const } //-------------------------------------------------------------------------- -// Function: DataType::getSuper -///\brief Returns the base datatype from which a datatype is derived. -///\return DataType object -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::getSuper +///\brief Returns the base datatype from which a datatype is derived. +///\return DataType object +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType DataType::getSuper() const { @@ -372,20 +370,20 @@ DataType DataType::getSuper() const } //-------------------------------------------------------------------------- -// Function: DataType::registerFunc -///\brief Registers the specified conversion function. -///\param pers - IN: Conversion option -/// \li \c H5T_PERS_HARD for hard conversion functions -/// \li \c H5T_PERS_SOFT for soft conversion functions. -///\param name - IN: Name displayed in diagnostic output. -///\param dest - IN: Destination datatype. -///\param func - IN: Function to convert between source and -/// destination datatypes. -///\exception H5::DataTypeIException +// Function: DataType::registerFunc +///\brief Registers the specified conversion function. +///\param pers - IN: Conversion option +/// \li \c H5T_PERS_HARD for hard conversion functions +/// \li \c H5T_PERS_SOFT for soft conversion functions. +///\param name - IN: Name displayed in diagnostic output. +///\param dest - IN: Destination datatype. +///\param func - IN: Function to convert between source and +/// destination datatypes. +///\exception H5::DataTypeIException ///\par Description -/// For more information, please see: +/// For more information, please see: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-Register -// Programmer Binh-Minh Ribler - 2000 +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::registerFunc( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const { @@ -398,12 +396,13 @@ void DataType::registerFunc( H5T_pers_t pers, const char* name, const DataType& throw DataTypeIException("DataType::registerFunc", "H5Tregister failed"); } } + //-------------------------------------------------------------------------- -// Function: DataType::registerFunc -///\brief This is an overloaded member function, provided for convenience. -/// It differs from the above function only in the type of the -/// argument \a name. -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::registerFunc +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function only in the type of the +/// argument \a name. +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::registerFunc( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const { @@ -411,17 +410,17 @@ void DataType::registerFunc( H5T_pers_t pers, const string& name, const DataType } //-------------------------------------------------------------------------- -// Function: DataType::unregister -///\brief Removes a conversion function from all conversion paths. -///\param pers - IN: Conversion option -/// \li \c H5T_PERS_HARD for hard conversion functions -/// \li \c H5T_PERS_SOFT for soft conversion functions. -///\param name - IN: Name displayed in diagnostic output. -///\param dest - IN: Destination datatype. -///\param func - IN: Function to convert between source and -/// destination datatypes. -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::unregister +///\brief Removes a conversion function from all conversion paths. +///\param pers - IN: Conversion option +/// \li \c H5T_PERS_HARD for hard conversion functions +/// \li \c H5T_PERS_SOFT for soft conversion functions. +///\param name - IN: Name displayed in diagnostic output. +///\param dest - IN: Destination datatype. +///\param func - IN: Function to convert between source and +/// destination datatypes. +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::unregister( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const { @@ -434,12 +433,13 @@ void DataType::unregister( H5T_pers_t pers, const char* name, const DataType& de throw DataTypeIException("DataType::unregister", "H5Tunregister failed"); } } + //-------------------------------------------------------------------------- -// Function: DataType::unregister -///\brief This is an overloaded member function, provided for convenience. -/// It differs from the above function only in the type of the -/// argument \a name. -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::unregister +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function only in the type of the +/// argument \a name. +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::unregister( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const { @@ -447,12 +447,12 @@ void DataType::unregister( H5T_pers_t pers, const string& name, const DataType& } //-------------------------------------------------------------------------- -// Function: DataType::setTag -///\brief Tags an opaque datatype. -///\param tag - IN: Descriptive ASCII string with which the opaque -/// datatype is to be tagged. -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::setTag +///\brief Tags an opaque datatype. +///\param tag - IN: Descriptive ASCII string with which the opaque +/// datatype is to be tagged. +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::setTag( const char* tag ) const { @@ -463,12 +463,13 @@ void DataType::setTag( const char* tag ) const throw DataTypeIException("DataType::setTag", "H5Tset_tag failed"); } } + //-------------------------------------------------------------------------- -// Function: DataType::setTag -///\brief This is an overloaded member function, provided for convenience. -/// It differs from the above function only in the type of the -/// argument \a name. -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::setTag +///\brief This is an overloaded member function, provided for convenience. +/// It differs from the above function only in the type of the +/// argument \a name. +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::setTag( const string& tag ) const { @@ -476,11 +477,11 @@ void DataType::setTag( const string& tag ) const } //-------------------------------------------------------------------------- -// Function: DataType::getTag -///\brief Gets the tag associated with an opaque datatype. -///\return Tag associated with the opaque datatype -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: DataType::getTag +///\brief Gets the tag associated with an opaque datatype. +///\return Tag associated with the opaque datatype +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- string DataType::getTag() const { @@ -507,7 +508,7 @@ string DataType::getTag() const /// datatype. ///\return true if this datatype contains or is the specified type, /// and false, otherwise. -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- bool DataType::detectClass(H5T_class_t cls) const @@ -529,7 +530,7 @@ bool DataType::detectClass(H5T_class_t cls) const ///\brief Check whether this datatype is a variable-length string. ///\return true if this datatype is a variable-length string, and /// false, otherwise. -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- bool DataType::isVariableStr() const @@ -638,8 +639,8 @@ void DataType::p_close() const #endif // DOXYGEN_SHOULD_SKIP_THIS //-------------------------------------------------------------------------- -// Function: DataType destructor -///\brief Properly terminates access to this datatype. +// Function: DataType destructor +///\brief Properly terminates access to this datatype. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType::~DataType() diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h index 7714231..df3ca59 100644 --- a/c++/src/H5DataType.h +++ b/c++/src/H5DataType.h @@ -25,30 +25,39 @@ class H5_DLLCPP DataType : public H5Object { // Creates a datatype given its class and size DataType( const H5T_class_t type_class, size_t size ); + // Copy constructor: makes a copy of the original object + DataType( const DataType& original ); + // Copies an existing datatype to this datatype object void copy( const DataType& like_type ); + // Returns the datatype class identifier. + H5T_class_t getClass() const; + // Commits a transient datatype to a file; this datatype becomes // a named datatype which can be accessed from the location. - void commit( CommonFG& loc, const char* name ) const; void commit( CommonFG& loc, const string& name ) const; + void commit( CommonFG& loc, const char* name ) const; // Determines whether this datatype is a named datatype or // a transient datatype. bool committed() const; + // Finds a conversion function that can handle the conversion + // this datatype to the given datatype, dest. + H5T_conv_t find( const DataType& dest, H5T_cdata_t **pcdata ) const; + // Converts data from between specified datatypes. void convert( const DataType& dest, hsize_t nelmts, void *buf, void *background, PropList& plist ) const; - // Checks whether this datatype contains (or is) a certain type class. - bool detectClass(H5T_class_t cls) const; + // Assignment operator + DataType& operator=( const DataType& rhs ); - // Finds a conversion function that can handle the conversion - // this datatype to the given datatype, dest. - H5T_conv_t find( const DataType& dest, H5T_cdata_t **pcdata ) const; + // Determines whether two datatypes are the same. + bool operator==(const DataType& compared_type ) const; - // Returns the datatype class identifier. - H5T_class_t getClass() const; + // Locks a datatype. + void lock() const; // Returns a pointer to the current global overflow function. H5T_overflow_t getOverflow(void) const; @@ -63,45 +72,39 @@ class H5_DLLCPP DataType : public H5Object { // Note: not quite right for specific types yet??? DataType getSuper() const; - // Gets the tag associated with an opaque datatype. - string getTag() const; + // Registers a conversion function. + void registerFunc(H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const; + void registerFunc(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const; + + // Removes a conversion function from all conversion paths. + void unregister( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const; + void unregister( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const; // Tags an opaque datatype. void setTag( const string& tag ) const; void setTag( const char* tag ) const; - // Checks whether this datatype is a variable-length string. - bool isVariableStr() const; - - // Locks a datatype. - void lock() const; + // Gets the tag associated with an opaque datatype. + string getTag() const; - // Assignment operator - DataType& operator=( const DataType& rhs ); + // Checks whether this datatype contains (or is) a certain type class. + bool detectClass(H5T_class_t cls) const; - // Determines whether two datatypes are the same. - bool operator==(const DataType& compared_type ) const; + // Checks whether this datatype is a variable-length string. + bool isVariableStr() const; - // Registers a conversion function. - void registerFunc(H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const; - void registerFunc(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const; + // Creates a reference to a named Hdf5 object in this object. + void* Reference(const char* name) const; - // Removes a conversion function from all conversion paths. - void unregister( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const; - void unregister( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const; + // Creates a reference to a named Hdf5 object or to a dataset region + // in this object. + void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const; // Retrieves the type of object that an object reference points to. H5G_obj_t getObjType(void *ref, H5R_type_t ref_type) const; // Retrieves a dataspace with the region pointed to selected. DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const; - - // Creates a reference to a named Hdf5 object or to a dataset region - // in this object. - void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const; - - // Creates a reference to a named Hdf5 object in this object. - void* Reference(const char* name) const; // Creates a copy of an existing DataType using its id DataType( const hid_t type_id, bool predtype = false ); @@ -109,9 +112,6 @@ class H5_DLLCPP DataType : public H5Object { // Default constructor DataType(); - // Copy constructor: makes a copy of the original object - DataType( const DataType& original ); - #ifndef DOXYGEN_SHOULD_SKIP_THIS // Used by the API to appropriately close a datatype void p_close() const; diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index a6260dc..c9a16ba 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -34,22 +34,22 @@ namespace H5 { const DSetCreatPropList DSetCreatPropList::DEFAULT( H5P_DEFAULT ); //-------------------------------------------------------------------------- -// Function: DSetCreatPropList default constructor -///\brief Default constructor: creates a stub dataset creation property list +// Function: DSetCreatPropList default constructor +///\brief Default constructor: creates a stub dataset creation property list // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetCreatPropList::DSetCreatPropList() : PropList( H5P_DATASET_CREATE) {} //-------------------------------------------------------------------------- -// Function: DSetCreatPropList copy constructor -///\brief Copy constructor: makes a copy of the original -/// DSetCreatPropList object +// Function: DSetCreatPropList copy constructor +///\brief Copy constructor: makes a copy of the original +/// DSetCreatPropList object // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetCreatPropList::DSetCreatPropList( const DSetCreatPropList& orig ) : PropList( orig ) {} //-------------------------------------------------------------------------- -// Function: DSetCreatPropList overloaded constructor +// Function: DSetCreatPropList overloaded constructor ///\brief Creates a DSetCreatPropList object using the id of an /// existing dataset creation property list. // Programmer Binh-Minh Ribler - 2000 @@ -57,18 +57,18 @@ DSetCreatPropList::DSetCreatPropList( const DSetCreatPropList& orig ) : PropList DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : PropList( plist_id ) {} //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::setChunk -///\brief Sets the size of the chunks used to store a chunked layout -/// dataset. -///\param ndims - IN: Number of dimensions of each chunk -///\param dim - IN: Array containing the size of each chunk -///\exception H5::PropListIException +// Function: DSetCreatPropList::setChunk +///\brief Sets the size of the chunks used to store a chunked layout +/// dataset. +///\param ndims - IN: Number of dimensions of each chunk +///\param dim - IN: Array containing the size of each chunk +///\exception H5::PropListIException ///\par Description -/// The \a ndims parameter currently must have the same value as -/// the rank of the dataset. The values of the \a dim array -/// define the size of the chunks to store the dataset's raw -/// data. As a side-effect, the layout of the dataset will be -/// changed to \c H5D_CHUNKED, if it is not so already. +/// The \a ndims parameter currently must have the same value as +/// the rank of the dataset. The values of the \a dim array +/// define the size of the chunks to store the dataset's raw +/// data. As a side-effect, the layout of the dataset will be +/// changed to \c H5D_CHUNKED, if it is not so already. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setChunk( int ndims, const hsize_t* dim ) const @@ -81,12 +81,12 @@ void DSetCreatPropList::setChunk( int ndims, const hsize_t* dim ) const } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::getChunk -///\brief Retrieves the size of the chunks used to store a chunked -/// layout dataset. -///\param max_ndims - IN: Size of \a dim array -///\param dim - OUT: Array to store the chunk dimensions -///\exception H5::PropListIException +// Function: DSetCreatPropList::getChunk +///\brief Retrieves the size of the chunks used to store a chunked +/// layout dataset. +///\param max_ndims - IN: Size of \a dim array +///\param dim - OUT: Array to store the chunk dimensions +///\exception H5::PropListIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int DSetCreatPropList::getChunk( int max_ndims, hsize_t* dim ) const @@ -101,12 +101,12 @@ int DSetCreatPropList::getChunk( int max_ndims, hsize_t* dim ) const } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::setLayout -///\brief Sets the type of storage used store the raw data for a dataset. -///\param layout - IN: Type of storage layout for raw data -///\exception H5::PropListIException +// Function: DSetCreatPropList::setLayout +///\brief Sets the type of storage used store the raw data for a dataset. +///\param layout - IN: Type of storage layout for raw data +///\exception H5::PropListIException ///\par Description -/// For information on setting layout type, please refer to +/// For information on setting layout type, please refer to /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetLayout // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -121,18 +121,18 @@ void DSetCreatPropList::setLayout(H5D_layout_t layout) const } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::getLayout -///\brief Retrieves the layout type of this property list -///\return Layout type, which can be: -/// \li \c H5D_COMPACT - raw data is stored in the object -/// header in the file. -/// \li \c H5D_CONTIGUOUS - raw data is stored separately from the -/// object header in one contiguous chunk in -/// the file. -/// \li \c H5D_CHUNKED - raw data is stored separately from the -/// object header in chunks in separate locations -/// in the file. -///\exception H5::PropListIException +// Function: DSetCreatPropList::getLayout +///\brief Retrieves the layout type of this property list +///\return Layout type, which can be: +/// \li \c H5D_COMPACT - raw data is stored in the object +/// header in the file. +/// \li \c H5D_CONTIGUOUS - raw data is stored separately from the +/// object header in one contiguous chunk in +/// the file. +/// \li \c H5D_CHUNKED - raw data is stored separately from the +/// object header in chunks in separate locations +/// in the file. +///\exception H5::PropListIException ///\par Description // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -148,15 +148,15 @@ H5D_layout_t DSetCreatPropList::getLayout() const } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::setDeflate -///\brief Sets compression method and compression level -///\param level - IN: Compression level, should [0..9], inclusive -///\exception H5::PropListIException +// Function: DSetCreatPropList::setDeflate +///\brief Sets compression method and compression level +///\param level - IN: Compression level, should [0..9], inclusive +///\exception H5::PropListIException ///\par Description -/// The function sets the compression method for this property -/// list to \c H5D_COMPRESS_DEFLATE and the compression level to -/// \a level. Lower compression levels are faster but result in -/// less compression. +/// The function sets the compression method for this property +/// list to \c H5D_COMPRESS_DEFLATE and the compression level to +/// \a level. Lower compression levels are faster but result in +/// less compression. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setDeflate( int level ) const @@ -170,20 +170,20 @@ void DSetCreatPropList::setDeflate( int level ) const } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::setFillValue -///\brief Sets a dataset fill value -///\param fvalue_type - IN: Data type for the value passed via \a value -///\param value - IN: Pointer to buffer containing the fill value -///\exception H5::PropListIException +// Function: DSetCreatPropList::setFillValue +///\brief Sets a dataset fill value +///\param fvalue_type - IN: Data type for the value passed via \a value +///\param value - IN: Pointer to buffer containing the fill value +///\exception H5::PropListIException ///\par Description -/// The datatype may differ from that of the dataset, but it must -/// be one that the HDF5 library is able to convert \a value to -/// the dataset datatype when the dataset is created. -/// The default fill value is 0 (zero,) which is interpreted -/// according to the actual dataset datatype. +/// The datatype may differ from that of the dataset, but it must +/// be one that the HDF5 library is able to convert \a value to +/// the dataset datatype when the dataset is created. +/// The default fill value is 0 (zero,) which is interpreted +/// according to the actual dataset datatype. ///\par -/// For information on setting fill value, please refer to the -/// C layer Reference Manual at: +/// For information on setting fill value, please refer to the +/// C layer Reference Manual at: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFillValue // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -198,16 +198,16 @@ void DSetCreatPropList::setFillValue( const DataType& fvalue_type, const void* v } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::getFillValue -///\brief Retrieves a dataset fill value -///\param fvalue_type - IN: Data type for the value passed via \a value -///\param value - OUT: Pointer to buffer to hold the retrieved fill value -///\exception H5::PropListIException +// Function: DSetCreatPropList::getFillValue +///\brief Retrieves a dataset fill value +///\param fvalue_type - IN: Data type for the value passed via \a value +///\param value - OUT: Pointer to buffer to hold the retrieved fill value +///\exception H5::PropListIException ///\par Description -/// The fill value is returned through \a value pointer -/// and the memory is allocated by the caller. The fill -/// value will be converted from its current data type to the -/// specified by \a fvalue_type. +/// The fill value is returned through \a value pointer +/// and the memory is allocated by the caller. The fill +/// value will be converted from its current data type to the +/// specified by \a fvalue_type. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::getFillValue( const DataType& fvalue_type, void* value ) const @@ -221,13 +221,13 @@ void DSetCreatPropList::getFillValue( const DataType& fvalue_type, void* value ) } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::isFillValueDefined -///\brief Check if fill value has been defined for this property +// Function: DSetCreatPropList::isFillValueDefined +///\brief Check if fill value has been defined for this property ///\return -/// \li \c H5D_FILL_VALUE_UNDEFINED =0, -/// \li \c H5D_FILL_VALUE_DEFAULT =1, -/// \li \c H5D_FILL_VALUE_USER_DEFINED =2 -///\exception H5::PropListIException +/// \li \c H5D_FILL_VALUE_UNDEFINED =0, +/// \li \c H5D_FILL_VALUE_DEFAULT =1, +/// \li \c H5D_FILL_VALUE_USER_DEFINED =2 +///\exception H5::PropListIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5D_fill_value_t DSetCreatPropList::isFillValueDefined() @@ -244,23 +244,23 @@ H5D_fill_value_t DSetCreatPropList::isFillValueDefined() } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::setFilter -///\brief Adds a filter to the filter pipeline -///\param filter_id - IN: Filter to add -///\param flags - IN: Specifies general properties of the filter -///\param cd_nelmts - IN: Number of elements in cd_values -///\param cd_values - IN: Auxiliary data for the filter -///\exception H5::PropListIException +// Function: DSetCreatPropList::setFilter +///\brief Adds a filter to the filter pipeline +///\param filter_id - IN: Filter to add +///\param flags - IN: Specifies general properties of the filter +///\param cd_nelmts - IN: Number of elements in cd_values +///\param cd_values - IN: Auxiliary data for the filter +///\exception H5::PropListIException ///\par Description -/// The \a flags argument is a bit vector of the field: -/// \c H5Z_FLAG_OPTIONAL(0x0001) +/// The \a flags argument is a bit vector of the field: +/// \c H5Z_FLAG_OPTIONAL(0x0001) ///\par -/// If this bit is set then the filter is optional. If the filter -/// fails during a \c DataSet::write() operation then the filter -/// is just excluded from the pipeline for the chunk for which it -/// failed; the filter will not participate in the pipeline -/// during a \c DataSet::read() of the chunk. If this bit is clear -/// and the filter fails then the entire I/O operation fails. +/// If this bit is set then the filter is optional. If the filter +/// fails during a \c DataSet::write() operation then the filter +/// is just excluded from the pipeline for the chunk for which it +/// failed; the filter will not participate in the pipeline +/// during a \c DataSet::read() of the chunk. If this bit is clear +/// and the filter fails then the entire I/O operation fails. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const @@ -274,13 +274,13 @@ void DSetCreatPropList::setFilter( H5Z_filter_t filter_id, unsigned int flags, s } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::removeFilter -///\brief Removes one or more filters -///\param filter_id - IN: Filter to remove -///\exception H5::PropListIException +// Function: DSetCreatPropList::removeFilter +///\brief Removes one or more filters +///\param filter_id - IN: Filter to remove +///\exception H5::PropListIException ///\par Description -/// Deletes a filter from the dataset creation property list; -/// deletes all filters if \a filter_id is \c H5Z_FILTER_NONE. +/// Deletes a filter from the dataset creation property list; +/// deletes all filters if \a filter_id is \c H5Z_FILTER_NONE. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const @@ -294,10 +294,10 @@ void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::getNfilters -///\brief Returns the number of filters in the pipeline -///\return Number of filters -///\exception H5::PropListIException +// Function: DSetCreatPropList::getNfilters +///\brief Returns the number of filters in the pipeline +///\return Number of filters +///\exception H5::PropListIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int DSetCreatPropList::getNfilters() const @@ -313,28 +313,28 @@ int DSetCreatPropList::getNfilters() const } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::getFilter -///\brief Returns information about a filter in a pipeline -///\param filter_number - IN: Filter to get, range [0..N-1], where -/// N is returned by H5Pget_nfilters() -///\param flags - OUT: General properties of the filter -///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number -/// of values defined by the filter -///\param cd_values - OUT: Array to hold the data; allocated by the user -///\param namelen - OUT: Length of \a name -///\param name - OUT: Name of the filter -///\return Filter id -///\exception H5::PropListIException +// Function: DSetCreatPropList::getFilter +///\brief Returns information about a filter in a pipeline +///\param filter_number - IN: Filter to get, range [0..N-1], where +/// N is returned by H5Pget_nfilters() +///\param flags - OUT: General properties of the filter +///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number +/// of values defined by the filter +///\param cd_values - OUT: Array to hold the data; allocated by the user +///\param namelen - OUT: Length of \a name +///\param name - OUT: Name of the filter +///\return Filter id +///\exception H5::PropListIException ///\par Description -/// Failure occurs when \a filter_number is out of range. -// Programmer Binh-Minh Ribler - 2000 +/// Failure occurs when \a filter_number is out of range. //-------------------------------------------------------------------------- -H5Z_filter_t DSetCreatPropList::getFilter( int filter_number, unsigned int& flags, size_t& cd_nelmts, unsigned int* cd_values, size_t namelen, char name[] ) const +H5Z_filter_t DSetCreatPropList::getFilter(int filter_number, unsigned int &flags, size_t &cd_nelmts, + unsigned int* cd_values, size_t namelen, char name[] ) const { H5Z_filter_t filter_id; - filter_id = H5Pget_filter(id, filter_number, &flags, &cd_nelmts, + filter_id = H5Pget_filter( id, filter_number, &flags, &cd_nelmts, cd_values, namelen, name); - if (filter_id == H5Z_FILTER_ERROR) + if( filter_id == H5Z_FILTER_ERROR ) { throw PropListIException("DSetCreatPropList::getFilter", "H5Pget_filter returned H5Z_FILTER_ERROR"); @@ -344,20 +344,21 @@ H5Z_filter_t DSetCreatPropList::getFilter( int filter_number, unsigned int& flag } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::getFilterById -///\brief Returns information about a filter in a pipeline given the -/// filter id -///\param filter_id - IN: Filter to get -///\param flags - OUT: General properties of the filter -///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number -/// of values defined by the filter -///\param cd_values - OUT: Array to hold the data; allocated by the user -///\param namelen - IN: Length of \a name -///\param name - OUT: Name of the filter -///\exception H5::PropListIException +// Function: DSetCreatPropList::getFilterById +///\brief Returns information about a filter in a pipeline given the +/// filter id +///\param filter_id - IN: Filter to get +///\param flags - OUT: General properties of the filter +///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number +/// of values defined by the filter +///\param cd_values - OUT: Array to hold the data; allocated by the user +///\param namelen - IN: Length of \a name +///\param name - OUT: Name of the filter +///\exception H5::PropListIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values, size_t namelen, char name[]) const +void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, + unsigned int* cd_values, size_t namelen, char name[]) const { herr_t ret_value = H5Pget_filter_by_id(id, filter_id, &flags, &cd_nelmts, cd_values, namelen, name ); @@ -369,24 +370,24 @@ void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flag } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::modifyFilter -///\brief Modifies the specified filter -///\param filter_id - IN: Filter to get -///\param flags - OUT: General properties of the filter -///\param cd_nelmts - IN: Number of elements in \a cd_values -/// \n OUT: Number of values defined by the filter -///\param cd_values - OUT: Array to hold the data; allocated by the user -///\exception H5::PropListIException +// Function: DSetCreatPropList::modifyFilter +///\brief Modifies the specified filter +///\param filter_id - IN: Filter to get +///\param flags - OUT: General properties of the filter +///\param cd_nelmts - IN: Number of elements in \a cd_values +/// \n OUT: Number of values defined by the filter +///\param cd_values - OUT: Array to hold the data; allocated by the user +///\exception H5::PropListIException ///\par Description -/// The \a flags argument is a bit vector of the field: -/// \c H5Z_FLAG_OPTIONAL(0x0001) +/// The \a flags argument is a bit vector of the field: +/// \c H5Z_FLAG_OPTIONAL(0x0001) ///\par -/// If this bit is set then the filter is optional. If the filter -/// fails during a DataSet::write() operation then the filter -/// is just excluded from the pipeline for the chunk for which it -/// failed; the filter will not participate in the pipeline -/// during a DataSet::read() of the chunk. If this bit is clear -/// and the filter fails then the entire I/O operation fails. +/// If this bit is set then the filter is optional. If the filter +/// fails during a DataSet::write() operation then the filter +/// is just excluded from the pipeline for the chunk for which it +/// failed; the filter will not participate in the pipeline +/// during a DataSet::read() of the chunk. If this bit is clear +/// and the filter fails then the entire I/O operation fails. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::modifyFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const @@ -400,12 +401,12 @@ void DSetCreatPropList::modifyFilter( H5Z_filter_t filter_id, unsigned int flags } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::allFiltersAvail -///\brief Queries whether all the filters set in this property list -/// are available currently. -///\return true if all filters available, and false if one or more -/// filters not currently available -///\exception H5::PropListIException +// Function: DSetCreatPropList::allFiltersAvail +///\brief Queries whether all the filters set in this property list +/// are available currently. +///\return true if all filters available, and false if one or more +/// filters not currently available +///\exception H5::PropListIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- bool DSetCreatPropList::allFiltersAvail() @@ -422,12 +423,12 @@ bool DSetCreatPropList::allFiltersAvail() } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::setShuffle -///\brief Sets method of the shuffle filter -///\exception H5::PropListIException +// Function: DSetCreatPropList::setShuffle +///\brief Sets method of the shuffle filter +///\exception H5::PropListIException ///\par Description -/// Please refer to the Reference Manual of \c H5Pset_shuffle for -/// details. +/// Please refer to the Reference Manual of \c H5Pset_shuffle for +/// details. /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetShuffle // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -442,17 +443,17 @@ void DSetCreatPropList::setShuffle() } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::getAllocTime -///\brief Get space allocation time for this property. -///\return Space allocation time. -///\exception H5::PropListIException +// Function: DSetCreatPropList::getAllocTime +///\brief Get space allocation time for this property. +///\return Space allocation time. +///\exception H5::PropListIException ///\par Description -/// The values of space allocation time can be one of the -/// followings: -/// \li \c H5D_ALLOC_TIME_DEFAULT -/// \li \c H5D_ALLOC_TIME_EARLY -/// \li \c H5D_ALLOC_TIME_LATE -/// \li \c H5D_ALLOC_TIME_INCR +/// The values of space allocation time can be one of the +/// followings: +/// \li \c H5D_ALLOC_TIME_DEFAULT +/// \li \c H5D_ALLOC_TIME_EARLY +/// \li \c H5D_ALLOC_TIME_LATE +/// \li \c H5D_ALLOC_TIME_INCR // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5D_alloc_time_t DSetCreatPropList::getAllocTime() @@ -469,14 +470,14 @@ H5D_alloc_time_t DSetCreatPropList::getAllocTime() } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::getFillTime -///\brief Gets fill value writing time. -///\return Fill value writing time -///\exception H5::PropListIException +// Function: DSetCreatPropList::getFillTime +///\brief Gets fill value writing time. +///\return Fill value writing time +///\exception H5::PropListIException ///\par Description -/// Valid values for fill value writing time include -/// \li \c H5D_FILL_TIME_NEVER -/// \li \c H5D_FILL_TIME_ALLOC. +/// Valid values for fill value writing time include +/// \li \c H5D_FILL_TIME_NEVER +/// \li \c H5D_FILL_TIME_ALLOC. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- H5D_fill_time_t DSetCreatPropList::getFillTime() @@ -493,16 +494,16 @@ H5D_fill_time_t DSetCreatPropList::getFillTime() } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::setAllocTime -///\brief Sets space allocation time for dataset during creation. -///\param alloc_time - IN: Allocation time -///\exception H5::PropListIException +// Function: DSetCreatPropList::setAllocTime +///\brief Sets space allocation time for dataset during creation. +///\param alloc_time - IN: Allocation time +///\exception H5::PropListIException ///\par Description -/// Valid values for space allocation time include: -/// \li \c H5D_ALLOC_TIME_DEFAULT -/// \li \c H5D_ALLOC_TIME_EARLY -/// \li \c H5D_ALLOC_TIME_LATE -/// \li \c H5D_ALLOC_TIME_INCR +/// Valid values for space allocation time include: +/// \li \c H5D_ALLOC_TIME_DEFAULT +/// \li \c H5D_ALLOC_TIME_EARLY +/// \li \c H5D_ALLOC_TIME_LATE +/// \li \c H5D_ALLOC_TIME_INCR // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) @@ -516,14 +517,14 @@ void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::setFillTime -///\brief Sets fill value writing time for dataset. -///\return Fill value writing time -///\exception H5::PropListIException +// Function: DSetCreatPropList::setFillTime +///\brief Sets fill value writing time for dataset. +///\return Fill value writing time +///\exception H5::PropListIException ///\par Description -/// Valid values for fill value writing time include -/// \li \c H5D_FILL_TIME_NEVER -/// \li \c H5D_FILL_TIME_ALLOC. +/// Valid values for fill value writing time include +/// \li \c H5D_FILL_TIME_NEVER +/// \li \c H5D_FILL_TIME_ALLOC. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) @@ -537,9 +538,9 @@ void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::setFletcher32 -///\brief Sets Fletcher32 checksum of EDC for this property list. -///\exception H5::PropListIException +// Function: DSetCreatPropList::setFletcher32 +///\brief Sets Fletcher32 checksum of EDC for this property list. +///\exception H5::PropListIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setFletcher32() @@ -553,19 +554,19 @@ void DSetCreatPropList::setFletcher32() } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::setExternal -///\brief Adds an external file to the list of external files -///\param name - IN: Name of the external file -///\param offset - IN: Location where the data starts in the file -///\param size - IN: Number of bytes reserved in the file for the data -///\exception H5::PropListIException +// Function: DSetCreatPropList::setExternal +///\brief Adds an external file to the list of external files +///\param name - IN: Name of the external file +///\param offset - IN: Location where the data starts in the file +///\param size - IN: Number of bytes reserved in the file for the data +///\exception H5::PropListIException ///\par Description -/// If a dataset is splitted across multiple files then the files -/// should be defined in order. The total size of the dataset is -/// the sum of the \a size arguments for all the external files. If -/// the total size is larger than the size of a dataset then the -/// dataset can be extended (provided the data space also allows -/// the extending). +/// If a dataset is splitted across multiple files then the files +/// should be defined in order. The total size of the dataset is +/// the sum of the \a size arguments for all the external files. If +/// the total size is larger than the size of a dataset then the +/// dataset can be extended (provided the data space also allows +/// the extending). // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DSetCreatPropList::setExternal( const char* name, off_t offset, hsize_t size ) const @@ -579,10 +580,10 @@ void DSetCreatPropList::setExternal( const char* name, off_t offset, hsize_t siz } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::getExternalCount -///\brief Returns the number of external files for a dataset -///\return Number of external files -///\exception H5::PropListIException +// Function: DSetCreatPropList::getExternalCount +///\brief Returns the number of external files for a dataset +///\return Number of external files +///\exception H5::PropListIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int DSetCreatPropList::getExternalCount() const @@ -598,28 +599,28 @@ int DSetCreatPropList::getExternalCount() const } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList::getExternal -///\brief Returns information about an external file -///\param idx - IN: Index of the external file, ranges [0-(N-1)] and -/// returned by getExternalCount() -///\param name_size - IN: Maximum length of \a name -///\param name - IN: Name of the external file -///\param offset - IN: Location to return an offset value -///\param size - OUT: Location to return the size of the external file data -///\exception H5::PropListIException +// Function: DSetCreatPropList::getExternal +///\brief Returns information about an external file +///\param idx - IN: Index of the external file, ranges [0-(N-1)] and +/// returned by getExternalCount() +///\param name_size - IN: Maximum length of \a name +///\param name - IN: Name of the external file +///\param offset - IN: Location to return an offset value +///\param size - OUT: Location to return the size of the external file data +///\exception H5::PropListIException ///\par Description -/// The parameter \a idx ranges [0..N-1] where N is returned by -/// getExternalCount(). At most \a name_size characters are copied -/// into the name array. If the external file name is longer than -/// name_size with the null terminator, the return value is not -/// null terminated (similar to strncpy()). -/// If \a name_size is zero or \a name is a null pointer, the -/// external file name will not be returned. If \a offset or -/// \a size are null pointers then the corresponding information -/// will not be returned. +/// The parameter \a idx ranges [0..N-1] where N is returned by +/// getExternalCount(). At most \a name_size characters are copied +/// into the name array. If the external file name is longer than +/// name_size with the null terminator, the return value is not +/// null terminated (similar to strncpy()). +/// If \a name_size is zero or \a name is a null pointer, the +/// external file name will not be returned. If \a offset or +/// \a size are null pointers then the corresponding information +/// will not be returned. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void DSetCreatPropList::getExternal( int idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const +void DSetCreatPropList::getExternal( unsigned idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const { herr_t ret_value = H5Pget_external( id, idx, name_size, name, &offset, &size ); if( ret_value < 0 ) @@ -630,8 +631,8 @@ void DSetCreatPropList::getExternal( int idx, size_t name_size, char* name, off_ } //-------------------------------------------------------------------------- -// Function: DSetCreatPropList destructor -///\brief Noop destructor. +// Function: DSetCreatPropList destructor +///\brief Noop destructor. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DSetCreatPropList::~DSetCreatPropList () {} diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h index 69388ed..61fa860 100644 --- a/c++/src/H5DcreatProp.h +++ b/c++/src/H5DcreatProp.h @@ -42,7 +42,7 @@ class H5_DLLCPP DSetCreatPropList : public PropList { void setChunk( int ndims, const hsize_t* dim ) const; // Returns information about an external file. - void getExternal( int idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const; + void getExternal( unsigned idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const; // Returns the number of external files for a dataset. int getExternalCount() const; diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h index 7b29fe5..c3fbee4 100644 --- a/c++/src/H5DxferProp.h +++ b/c++/src/H5DxferProp.h @@ -22,7 +22,6 @@ namespace H5 { class H5_DLLCPP DSetMemXferPropList : public PropList { public: - // Default dataset memory and transfer property list. static const DSetMemXferPropList DEFAULT; #ifdef H5_WANT_H5_V1_4_COMPAT @@ -46,10 +45,10 @@ class H5_DLLCPP DSetMemXferPropList : public PropList { size_t getBuffer( void** tconv, void** bkg ) const; #endif /* H5_WANT_H5_V1_4_COMPAT */ - // Sets B-tree split ratios for a dataset transfer property list. + // Sets B-tree split ratios for a dataset transfer property list void setBtreeRatios( double left, double middle, double right ) const; - // Gets B-tree split ratios for a dataset transfer property list. + // Gets B-tree split ratios for a dataset transfer property list void getBtreeRatios( double& left, double& middle, double& right ) const; // Sets the dataset transfer property list status to TRUE or FALSE. @@ -59,16 +58,16 @@ class H5_DLLCPP DSetMemXferPropList : public PropList { bool getPreserve() const; // Sets the memory manager for variable-length datatype - // allocation in H5Dread and H5Dvlen_reclaim. + // allocation in H5Dread and H5Dvlen_reclaim void setVlenMemManager( H5MM_allocate_t alloc, void* alloc_info, H5MM_free_t free, void* free_info ) const; // alloc and free are set to NULL, indicating that system - // malloc and free are to be used. + // malloc and free are to be used void setVlenMemManager() const; // Gets the memory manager for variable-length datatype - // allocation in H5Dread and H5Tvlen_reclaim. + // allocation in H5Dread and H5Tvlen_reclaim void getVlenMemManager( H5MM_allocate_t& alloc, void** alloc_info, H5MM_free_t& free, void** free_info ) const; @@ -108,7 +107,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList { // property list using the property list id. DSetMemXferPropList (const hid_t plist_id); - // Noop destructor. + // Noop destructor virtual ~DSetMemXferPropList(); }; diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp index 0421707..f40ae06 100644 --- a/c++/src/H5EnumType.cpp +++ b/c++/src/H5EnumType.cpp @@ -256,7 +256,7 @@ int EnumType::getNmembers() const ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void EnumType::getMemberValue( int memb_no, void *value ) const +void EnumType::getMemberValue( unsigned memb_no, void *value ) const { // Call C routine H5Tget_member_value to get the datatype member's value hid_t ret_value = H5Tget_member_value( id, memb_no, value ); diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h index 4cb6cbd..f88b337 100644 --- a/c++/src/H5EnumType.h +++ b/c++/src/H5EnumType.h @@ -41,7 +41,7 @@ class H5_DLLCPP EnumType : public DataType { int getMemberIndex(const string& name) const; // Returns the value of an enumeration datatype member - void getMemberValue( int memb_no, void *value ) const; + void getMemberValue( unsigned memb_no, void *value ) const; // Inserts a new member to this enumeration type. void insert( const char* name, void *value ) const; diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp index 8892e58..515e883 100644 --- a/c++/src/H5FaccProp.cpp +++ b/c++/src/H5FaccProp.cpp @@ -31,32 +31,32 @@ namespace H5 { const FileAccPropList FileAccPropList::DEFAULT( H5P_DEFAULT ); //-------------------------------------------------------------------------- -// Function: FileAccPropList default constructor -///\brief Default constructor: creates a file access property list. -// Programmer: Binh-Minh Ribler - 2000 +// Function: Default Constructor +///\brief Default constructor: creates a file access property list +// Programmer: Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FileAccPropList::FileAccPropList() : PropList( H5P_FILE_ACCESS ) {} //-------------------------------------------------------------------------- -// Function: FileAccPropList copy constructor -///\brief Copy constructor: makes a copy of the original FileAccPropList. -/// FileAccPropList object -// Programmer: Binh-Minh Ribler - 2000 +// Function: FileAccPropList copy constructor +///\brief Copy Constructor: makes a copy of the original +/// FileAccPropList object. +// Programmer: Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FileAccPropList::FileAccPropList(const FileAccPropList& orig) : PropList(orig) {} //-------------------------------------------------------------------------- -// Function: FileAccPropList overloaded constructor -///\brief Creates a file access property list using the id of an -/// existing one. +// Function: FileAccPropList overloaded constructor +///\brief Creates a file access property list using the id of an +/// existing one. // Programmer: Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FileAccPropList::FileAccPropList(const hid_t plist_id) : PropList(plist_id) {} //-------------------------------------------------------------------------- -// Function: FileAccPropList::setStdio -///\brief Modifies this property list to use the \c H5FD_STDIO driver. -///\exception H5::PropListIException +// Function: FileAccPropList::setStdio +///\brief Modifies this property list to use the \c H5FD_STDIO driver. +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setStdio() const @@ -69,34 +69,35 @@ void FileAccPropList::setStdio() const } //-------------------------------------------------------------------------- -// Function: FileAccPropList::getDriver -///\brief Return the ID of the low-level file driver. -///\return A low-level driver ID which is the same ID used when the -/// driver was set for the property list. The driver ID is -/// only valid as long as the file driver remains registered. -/// Valid driver identifiers can be found at: +// Function: FileAccPropList::getDriver +///\brief Return the ID of the low-level file driver. +///\return A low-level driver ID which is the same ID used when the +/// driver was set for the property list. The driver ID is +/// only valid as long as the file driver remains registered. +/// Valid driver identifiers can be found at: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetDriver -///\exception H5::PropListIException +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- hid_t FileAccPropList::getDriver() const { - hid_t driver = H5Pget_driver( id ); + hid_t driver = H5Pget_driver(id); if (driver < 0) { throw PropListIException("FileAccPropList::getDriver", "H5Pget_driver failed"); } - return( driver ); + return(driver); } //-------------------------------------------------------------------------- -// Function: FileAccPropList::setDriver +// Function: FileAccPropList::setDriver ///\brief Set file driver for this property list. -///\param new_driver_id - IN: File driver -///\param new_driver_info - IN: Struct containing the driver-specific properites -///\exception H5::PropListIException +///\param new_driver_id - IN: File driver +///\param new_driver_info - IN: Struct containing the driver-specific properites +///\exception H5::PropListIException ///\par Description -/// For a list of valid driver identifiers, please refer to +/// For a list of valid driver identifiers, please see the C +/// layer Reference Manual at: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetDriver // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- @@ -126,10 +127,10 @@ void FileAccPropList::setFamilyOffset(hsize_t offset) const } //-------------------------------------------------------------------------- -// Function: FileAccPropList::getFamilyOffset +// Function: FileAccPropList::getFamilyOffset ///\brief Get offset for family driver. -///\return Offset for family driver -///\exception H5::PropListIException +///\return Offset for family driver +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- hsize_t FileAccPropList::getFamilyOffset() const @@ -151,7 +152,7 @@ hsize_t FileAccPropList::getFamilyOffset() const /// time more memory is needed, in bytes ///\param backing_store - IN: Indicating whether to write the file /// contents to disk when the file is closed -///\exception H5::PropListIException +///\exception H5::PropListIException ///\par Description /// For more details on the use of \c H5FD_CORE driver, please /// refer to @@ -170,10 +171,10 @@ void FileAccPropList::setCore (size_t increment, hbool_t backing_store) const //-------------------------------------------------------------------------- // Function: FileAccPropList::getCore ///\brief Queries core file driver properties. -///\param increment - OUT: Size of memory increment, in bytes +///\param increment - OUT: Size of memory increment, in bytes ///\param backing_store - OUT: Indicating whether to write the file /// contents to disk when the file is closed -///\exception H5::PropListIException +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::getCore (size_t& increment, hbool_t& backing_store) const @@ -191,7 +192,7 @@ void FileAccPropList::getCore (size_t& increment, hbool_t& backing_store) const ///\param memb_size - IN: Size in bytes of each file member ///\param memb_plist - IN: File access property list to be used for /// each family member -///\exception H5::PropListIException +///\exception H5::PropListIException ///\par Description /// Note that \a memb_size is used only when creating a new file. // Programmer: Binh-Minh Ribler - April, 2004 @@ -212,7 +213,7 @@ void FileAccPropList::setFamily( hsize_t memb_size, const FileAccPropList& memb_ ///\param memb_size - OUT: Size in bytes of each file member ///\param memb_plist - OUT: Retrieved file access property list for each /// file member -///\exception H5::PropListIException +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::getFamily(hsize_t& memb_size, FileAccPropList& memb_plist) const @@ -228,12 +229,12 @@ void FileAccPropList::getFamily(hsize_t& memb_size, FileAccPropList& memb_plist) //-------------------------------------------------------------------------- // Function: FileAccPropList::getFamily -///\brief This is an overloaded member function, provided for convenience. +///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function only in what arguments it /// accepts and its return value. ///\param memb_size - OUT: Size in bytes of each file member ///\return The file access property list for each file member -///\exception H5::PropListIException +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const @@ -256,7 +257,7 @@ FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const ///\param raw_plist - IN: File access plist for the raw data file ///\param meta_ext - IN: Metadata filename extension as \c char* ///\param raw_ext - IN: Raw data filename extension as \c char* -///\exception H5::PropListIException +///\exception H5::PropListIException ///\par Description /// Temporary - For information, please refer to: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplSplit @@ -275,14 +276,14 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra //-------------------------------------------------------------------------- // Function: FileAccPropList::setSplit -///\brief This is an overloaded member function, provided for convenience. +///\brief This is an overloaded member function, provided for convenience. /// It differs from the above function only in what arguments it /// accepts. ///\param meta_plist - IN: File access plist for the metadata file ///\param raw_plist - IN: File access plist for the raw data file ///\param meta_ext - IN: Metadata filename extension as \c string ///\param raw_ext - IN: Raw data filename extension as \c string -///\exception H5::PropListIException +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const string& meta_ext, const string& raw_ext ) const @@ -297,7 +298,7 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra ///\return The streaming I/O file access property list structure /// For detail on this structure, please refer to /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream -///\exception H5::PropListIException +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- H5FD_stream_fapl_t FileAccPropList::getStream() const @@ -316,7 +317,7 @@ H5FD_stream_fapl_t FileAccPropList::getStream() const ///\brief Modifies this file access property list to use the Stream /// driver. ///\param fapl - IN: The streaming I/O file access property list -///\exception H5::PropListIException +///\exception H5::PropListIException ///\par Description /// For detail on \a fapl, please refer to /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream @@ -337,7 +338,7 @@ void FileAccPropList::setStream(H5FD_stream_fapl_t &fapl) const ///\brief Returns the current settings for the data sieve buffer size /// property from this property list. ///\return Data sieve buffer size, in bytes -///\exception H5::PropListIException +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- size_t FileAccPropList::getSieveBufSize() const @@ -355,7 +356,7 @@ size_t FileAccPropList::getSieveBufSize() const // Function: FileAccPropList::setSieveBufSize ///\brief Sets the maximum size of the data sieve buffer. ///\param bufsize - IN: Maximum size, in bytes, of data sieve buffer -///\exception H5::PropListIException +///\exception H5::PropListIException ///\par Description /// For detail on data sieving, please refer to /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSieveBufSize @@ -374,8 +375,8 @@ void FileAccPropList::setSieveBufSize(size_t bufsize) const // Function: FileAccPropList::setMetaBlockSize ///\brief Sets the minimum size of metadata block allocations. ///\param block_size - IN: Minimum size, in bytes, of metadata -/// block allocations -///\exception H5::PropListIException +/// block allocations +///\exception H5::PropListIException ///\par Description /// For more detail, please see the C layer Reference Manual at: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMetaBlockSize @@ -394,7 +395,7 @@ void FileAccPropList::setMetaBlockSize(hsize_t &block_size) const // Function: FileAccPropList::getMetaBlockSize ///\brief Returns the current metadata block size setting. ///\return Metadata block size -///\exception H5::PropListIException +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- hsize_t FileAccPropList::getMetaBlockSize() const @@ -415,7 +416,7 @@ hsize_t FileAccPropList::getMetaBlockSize() const ///\param logfile - IN: Name of the log file ///\param flags - IN: Flags specifying the types of logging activity ///\param buf_size - IN: Size of the logging buffer -///\exception H5::PropListIException +///\exception H5::PropListIException ///\par Description /// For detail on \a flags, please refer to /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream @@ -449,7 +450,7 @@ void FileAccPropList::setLog(const string& logfile, unsigned flags, size_t buf_s // Function: FileAccPropList::setSec2 ///\brief Modifies this file access property list to use the sec2 /// driver. -///\exception H5::PropListIException +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setSec2() const @@ -466,7 +467,7 @@ void FileAccPropList::setSec2() const ///\brief Sets the alignment properties of this property list. ///\param threshold - IN: Threshold value for file object size ///\param alignment - IN: Alignment value -///\exception H5::PropListIException +///\exception H5::PropListIException ///\par Description /// The parameter \a threshold must have a non-negative value. /// Note that setting the threshold value to 0 (zero) has the @@ -475,6 +476,7 @@ void FileAccPropList::setSec2() const /// /// For detail on \a setting alignment, please refer to /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetAlignment +// Programmer: Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileAccPropList::setAlignment( hsize_t threshold, hsize_t alignment ) const { @@ -491,7 +493,8 @@ void FileAccPropList::setAlignment( hsize_t threshold, hsize_t alignment ) const /// this property list. ///\param threshold - OUT: Retrieved threshold value for file object size ///\param alignment - OUT: Retrieved alignment value -///\exception H5::PropListIException +///\exception H5::PropListIException +// Programmer: Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileAccPropList::getAlignment( hsize_t &threshold, hsize_t &alignment ) const { @@ -506,7 +509,7 @@ void FileAccPropList::getAlignment( hsize_t &threshold, hsize_t &alignment ) con // Function: FileAccPropList::setMultiType ///\brief Sets data type for \c MULTI driver. ///\param dtype - IN: Type of data -///\exception H5::PropListIException +///\exception H5::PropListIException ///\par Description /// More details and valid values for \a dtype can be found at: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMultiType @@ -525,7 +528,7 @@ void FileAccPropList::setMultiType(H5FD_mem_t dtype) const // Function: FileAccPropList::getMultiType ///\brief Returns the data type property for \c MULTI driver. ///\return The data type property -///\exception H5::PropListIException +///\exception H5::PropListIException ///\par Description /// More details and possible returned values can be found at: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetMultiType @@ -601,6 +604,7 @@ void FileAccPropList::getCache( int& mdc_nelmts, int& rdcc_nelmts, size_t& rdcc_ /// means fully read chunks are treated no differently than other /// chunks (the preemption is strictly LRU) while a value of one /// means fully read chunks are always preempted before other chunks. +// Programmer: Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileAccPropList::setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const { @@ -618,7 +622,8 @@ void FileAccPropList::setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_ ///\param rdcc_nelmts - OUT: Number of elements in the raw data chunk cache ///\param rdcc_nbytes - OUT: Total size of the raw data chunk cache, in bytes ///\param rdcc_w0 - OUT: Preemption policy -///\exception H5::PropListIException +///\exception H5::PropListIException +// Programmer: Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileAccPropList::getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const { @@ -634,7 +639,7 @@ void FileAccPropList::getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rd // Function: FileAccPropList::setFcloseDegree ///\brief Sets the degree for the file close behavior. ///\param degree - IN: -///\exception H5::PropListIException +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree) @@ -650,7 +655,7 @@ void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree) // Function: FileAccPropList::getFcloseDegree ///\brief Returns the degree for the file close behavior. ///\return The degree for the file close behavior -///\exception H5::PropListIException +///\exception H5::PropListIException // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- H5F_close_degree_t FileAccPropList::getFcloseDegree() @@ -669,10 +674,11 @@ H5F_close_degree_t FileAccPropList::getFcloseDegree() ///\brief Sets garbage collecting references flag. ///\param gc_ref - IN: Flag setting reference garbage collection to /// on (1) or off (0). -///\exception H5::PropListIException +///\exception H5::PropListIException ///\par Description /// For detail on \a fapl, please refer to /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream +// Programmer: Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileAccPropList::setGcReferences( unsigned gc_ref ) const { @@ -687,7 +693,8 @@ void FileAccPropList::setGcReferences( unsigned gc_ref ) const // Function: FileAccPropList::getGcReferences ///\brief Returns the garbage collecting references setting. ///\return Garbage collecting references setting, 0 (off) or 1 (on) -///\exception H5::PropListIException +///\exception H5::PropListIException +// Programmer: Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- unsigned FileAccPropList::getGcReferences() const { @@ -703,9 +710,9 @@ unsigned FileAccPropList::getGcReferences() const } //-------------------------------------------------------------------------- -// Function: FileAccPropList destructor +// Function: FileAccPropList destructor ///\brief Noop destructor -// Programmer Binh-Minh Ribler - 2000 +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FileAccPropList::~FileAccPropList() {} diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h index 8b014ce..6a447b0 100644 --- a/c++/src/H5FaccProp.h +++ b/c++/src/H5FaccProp.h @@ -129,7 +129,7 @@ class H5_DLLCPP FileAccPropList : public PropList { // using the property list id. FileAccPropList (const hid_t plist_id); - // Default destructor + // Noop destructor virtual ~FileAccPropList(); }; #ifndef H5_NO_NAMESPACE diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp index cd79b93..ff8eb47 100644 --- a/c++/src/H5FcreatProp.cpp +++ b/c++/src/H5FcreatProp.cpp @@ -26,48 +26,48 @@ namespace H5 { #endif //-------------------------------------------------------------------------- -///\brief Constant for default property +///\brief Constant for default property //-------------------------------------------------------------------------- const FileCreatPropList FileCreatPropList::DEFAULT( H5P_DEFAULT ); //-------------------------------------------------------------------------- -// Function: FileCreatPropList default constructor -///\brief Default constructor: creates a file creation property list. -// Programmer Binh-Minh Ribler - 2000 +// Function: FileCreatPropList default constructor +///\brief Default constructor: Creates a file create property list +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- FileCreatPropList::FileCreatPropList() : PropList( H5P_FILE_CREATE ) {} //-------------------------------------------------------------------------- -// Function: FileCreatPropList overloaded constructor -///\brief Creates a file creation property list using the id of an -/// existing one. -///\param plist_id - IN: FileCreatPropList id to use -// Programmer Binh-Minh Ribler - 2000 +// Function: FileCreatPropList copy constructor +///\brief Copy constructor: makes a copy of the original +/// FileCreatPropList object. +///\param original - IN: FileCreatPropList instance to copy +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -FileCreatPropList::FileCreatPropList(const hid_t plist_id) : PropList(plist_id) {} +FileCreatPropList::FileCreatPropList( const FileCreatPropList& original ) : PropList( original ) {} //-------------------------------------------------------------------------- -// Function: FileCreatPropList copy constructor -///\brief Copy constructor: makes a copy of the original FileCreatPropList object. -///\param original - IN: FileCreatPropList instance to copy -// Programmer Binh-Minh Ribler - 2000 +// Function: FileCreatPropList overloaded constructor +///\brief Creates a file creation property list using the id of an +/// existing one. +///\param plist_id - IN: FileCreatPropList id to use +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -FileCreatPropList::FileCreatPropList(const FileCreatPropList& original) : PropList(original) {} +FileCreatPropList::FileCreatPropList(const hid_t plist_id) : PropList(plist_id) {} //-------------------------------------------------------------------------- -// Function: FileCreatPropList::getVersion -///\brief Retrieves version information for various parts of a file. -///\param super - OUT: The file super block. -///\param freelist - OUT: The global free list. -///\param stab - OUT: The root symbol table entry. -///\param shhdr - OUT: Shared object headers. -///\exception H5::PropListIException +// Function: FileCreatPropList::getVersion +///\brief Retrieves version information for various parts of a file. +///\param super - OUT: The file super block. +///\param freelist - OUT: The global free list. +///\param stab - OUT: The root symbol table entry. +///\param shhdr - OUT: Shared object headers. +///\exception H5::PropListIException ///\par Description -/// Any (or even all) of the output arguments can be null pointers. -// Programmer Binh-Minh Ribler - 2000 +/// Any (or even all) of the output arguments can be null pointers. +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void FileCreatPropList::getVersion( - int& super, int& freelist, int& stab, int& shhdr ) const +void FileCreatPropList::getVersion(unsigned& super, unsigned& freelist, unsigned& stab, unsigned& shhdr) const { herr_t ret_value = H5Pget_version( id, &super, &freelist, &stab, &shhdr ); if( ret_value < 0 ) @@ -78,14 +78,14 @@ void FileCreatPropList::getVersion( } //-------------------------------------------------------------------------- -// Function: FileCreatPropList::setUserblock -///\brief Sets the user block size field of this file creation property list. -///\param size - IN: User block size to be set, in bytes -///\exception H5::PropListIException +// Function: FileCreatPropList::setUserblock +///\brief Sets the user block size field of this file creation property list. +///\param size - IN: User block size to be set, in bytes +///\exception H5::PropListIException ///\par Description -/// The default user block size is 0; it may be set to any power -/// of 2 equal to 512 or greater (512, 1024, 2048, etc.) -// Programmer Binh-Minh Ribler - 2000 +/// The default user block size is 0; it may be set to any power +/// of 2 equal to 512 or greater (512, 1024, 2048, etc.) +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::setUserblock( hsize_t size ) const { @@ -98,11 +98,11 @@ void FileCreatPropList::setUserblock( hsize_t size ) const } //-------------------------------------------------------------------------- -// Function: FileCreatPropList::getUserblock -///\brief Returns the user block size of this file creation property list. -///\return User block size -///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 +// Function: FileCreatPropList::getUserblock +///\brief Returns the user block size of this file creation property list. +///\return User block size +///\exception H5::PropListIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- hsize_t FileCreatPropList::getUserblock() const { @@ -117,17 +117,17 @@ hsize_t FileCreatPropList::getUserblock() const } //-------------------------------------------------------------------------- -// Function: FileCreatPropList::setSizes -///\brief Sets the byte size of the offsets and lengths used to -/// address objects in an HDF5 file. -///\param sizeof_addr - IN: Size of an object offset in bytes -///\param sizeof_size - IN: Size of an object length in bytes. -///\exception H5::PropListIException +// Function: FileCreatPropList::setSizes +///\brief Sets the byte size of the offsets and lengths used to +/// address objects in an HDF5 file. +///\param sizeof_addr - IN: Size of an object offset in bytes +///\param sizeof_size - IN: Size of an object length in bytes. +///\exception H5::PropListIException ///\par Description -/// For information on setting sizes, please refer to the -/// C layer Reference Manual at: +/// For information on setting sizes, please refer to the +/// C layer Reference Manual at: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSizes -// Programmer Binh-Minh Ribler - 2000 +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::setSizes( size_t sizeof_addr, size_t sizeof_size ) const { @@ -140,11 +140,11 @@ void FileCreatPropList::setSizes( size_t sizeof_addr, size_t sizeof_size ) const } //-------------------------------------------------------------------------- -// Function: FileCreatPropList::getSizes -///\brief Retrieves the size of the offsets and lengths used in an -/// HDF5 file. -///\exception H5::PropListIException -// Programmer Binh-Minh Ribler - 2000 +// Function: FileCreatPropList::getSizes +///\brief Retrieves the size of the offsets and lengths used in an +/// HDF5 file. +///\exception H5::PropListIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void FileCreatPropList::getSizes( size_t& sizeof_addr, size_t& sizeof_size ) const { @@ -200,18 +200,18 @@ void FileCreatPropList::getSymk( int& ik, int& lk ) const } #else /* H5_WANT_H5_V1_4_COMPAT */ //-------------------------------------------------------------------------- -// Function: FileCreatPropList::setSymk -///\brief Sets the size of parameters used to control the symbol table -/// nodes. -///\param ik - IN: Symbol table tree rank -///\param lk - IN: Symbol table node size -///\exception H5::PropListIException +// Function: FileCreatPropList::setSymk +///\brief Sets the size of parameters used to control the symbol table +/// nodes. +///\param ik - IN: Symbol table tree rank +///\param lk - IN: Symbol table node size +///\exception H5::PropListIException ///\par Description -/// For information, please see the C layer Reference Manual at: +/// For information, please see the C layer Reference Manual at: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK -// Programmer Binh-Minh Ribler - 2000 +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void FileCreatPropList::setSymk( int ik, unsigned lk ) const +void FileCreatPropList::setSymk( unsigned ik, unsigned lk ) const { herr_t ret_value = H5Pset_sym_k( id, ik, lk ); if( ret_value < 0 ) @@ -222,16 +222,16 @@ void FileCreatPropList::setSymk( int ik, unsigned lk ) const } //-------------------------------------------------------------------------- -// Function: FileCreatPropList::getSymk -///\brief Retrieves the size of the symbol table B-tree 1/2 rank and -/// the symbol table leaf node 1/2 size. -///\exception H5::PropListIException +// Function: FileCreatPropList::getSymk +///\brief Retrieves the size of the symbol table B-tree 1/2 rank and +/// the symbol table leaf node 1/2 size. +///\exception H5::PropListIException ///\par Description -/// For information, please see +/// For information, please see /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK -// Programmer Binh-Minh Ribler - 2000 +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void FileCreatPropList::getSymk( int& ik, unsigned& lk ) const +void FileCreatPropList::getSymk( unsigned& ik, unsigned& lk ) const { herr_t ret_value = H5Pget_sym_k( id, &ik, &lk ); if( ret_value < 0 ) @@ -243,17 +243,17 @@ void FileCreatPropList::getSymk( int& ik, unsigned& lk ) const #endif /* H5_WANT_H5_V1_4_COMPAT */ //-------------------------------------------------------------------------- -// Function: FileCreatPropList::setIstorek -///\brief Sets the size of the parameter used to control the B-trees -/// for indexing chunked datasets. -///\param ik - IN: 1/2 rank of chunked storage B-tree -///\exception H5::PropListIException +// Function: FileCreatPropList::setIstorek +///\brief Sets the size of the parameter used to control the B-trees +/// for indexing chunked datasets. +///\param ik - IN: 1/2 rank of chunked storage B-tree +///\exception H5::PropListIException ///\par Description -/// For information, please see the C layer Reference Manual at: +/// For information, please see the C layer Reference Manual at: /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetIstoreK -// Programmer Binh-Minh Ribler - 2000 +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -void FileCreatPropList::setIstorek( int ik ) const +void FileCreatPropList::setIstorek( unsigned ik ) const { herr_t ret_value = H5Pset_istore_k( id, ik ); if( ret_value < 0 ) @@ -262,19 +262,20 @@ void FileCreatPropList::setIstorek( int ik ) const "H5Pset_istore_k failed"); } } + //-------------------------------------------------------------------------- -// Function: FileCreatPropList::getIstorek -///\brief Returns the 1/2 rank of an indexed storage B-tree. -///\return 1/2 rank of chunked storage B-tree -///\exception H5::PropListIException +// Function: FileCreatPropList::getIstorek +///\brief Returns the 1/2 rank of an indexed storage B-tree. +///\return 1/2 rank of chunked storage B-tree +///\exception H5::PropListIException ///\par Description -/// For information, please see +/// For information, please see /// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetIstoreK -// Programmer Binh-Minh Ribler - 2000 +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -int FileCreatPropList::getIstorek() const +unsigned FileCreatPropList::getIstorek() const { - int ik; + unsigned ik; herr_t ret_value = H5Pget_istore_k( id, &ik ); if( ret_value < 0 ) { diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h index 493e28e..66678e2 100644 --- a/c++/src/H5FcreatProp.h +++ b/c++/src/H5FcreatProp.h @@ -26,15 +26,14 @@ class H5_DLLCPP FileCreatPropList : public PropList { // Default file creation property list. static const FileCreatPropList DEFAULT; - // Creates a file creation property list. - FileCreatPropList(); + // Retrieves version information for various parts of a file. + void getVersion( unsigned& super, unsigned& freelist, unsigned& stab, unsigned& shhdr ) const; - // Returns the 1/2 rank of an indexed storage B-tree. - int getIstorek() const; + // Sets the userblock size field of a file creation property list. + void setUserblock( hsize_t size ) const; - // Sets the size of parameter used to control the B-trees for - // indexing chunked datasets. - void setIstorek( int ik ) const; + // Gets the size of a user block in this file creation property list. + hsize_t getUserblock() const; // Retrieves the size-of address and size quantities stored in a // file according to this file creation property list. @@ -53,29 +52,30 @@ class H5_DLLCPP FileCreatPropList : public PropList { #else /* H5_WANT_H5_V1_4_COMPAT */ // Retrieves the size of the symbol table B-tree 1/2 rank and the // symbol table leaf node 1/2 size. - void getSymk( int& int_nodes_k, unsigned& leaf_nodes_k ) const; + void getSymk( unsigned& int_nodes_k, unsigned& leaf_nodes_k ) const; // Sets the size of parameters used to control the symbol table nodes. - void setSymk( int int_nodes_k, unsigned leaf_nodes_k ) const; + void setSymk( unsigned int_nodes_k, unsigned leaf_nodes_k ) const; #endif /* H5_WANT_H5_V1_4_COMPAT */ - // Gets the size of a user block in this file creation property list. - hsize_t getUserblock() const; + // Returns the 1/2 rank of an indexed storage B-tree. + unsigned getIstorek() const; - // Sets the userblock size field of a file creation property list. - void setUserblock( hsize_t size ) const; + // Sets the size of parameter used to control the B-trees for + // indexing chunked datasets. + void setIstorek( unsigned ik ) const; - // Retrieves version information for various parts of a file. - void getVersion( int& boot, int& freelist, int& stab, int& shhdr ) const; + // Creates a file create property list. + FileCreatPropList(); - // Copy constructor: creates a copy of a FileCreatPropList object + // Copy constructor: creates a copy of a FileCreatPropList object. FileCreatPropList(const FileCreatPropList& orig); // Creates a copy of an existing file create property list - // using the property list id + // using the property list id. FileCreatPropList (const hid_t plist_id); - // Noop destructor. + // Noop destructor virtual ~FileCreatPropList(); }; #ifndef H5_NO_NAMESPACE diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp index dd03df1..32a4478 100644 --- a/c++/src/H5Group.cpp +++ b/c++/src/H5Group.cpp @@ -1,7 +1,7 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * + * 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 files COPYING and Copyright.html. COPYING can be found at the root * diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp index 0508657..f7f8573 100644 --- a/c++/src/H5IdComponent.cpp +++ b/c++/src/H5IdComponent.cpp @@ -1,7 +1,7 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by the Board of Trustees of the University of Illinois. * - * All rights reserved. * - * * + * 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 files COPYING and Copyright.html. COPYING can be found at the root * @@ -53,14 +53,14 @@ IdComponent::IdComponent( const IdComponent& original ) //-------------------------------------------------------------------------- // Function: IdComponent::incRefCount -///\brief Increments id reference counter. +///\brief Increment id reference counter. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void IdComponent::incRefCount() { ref_count->increment(); } //-------------------------------------------------------------------------- // Function: IdComponent::decRefCount -///\brief Decrements id reference counter. +///\brief Decrement id reference counter. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void IdComponent::decRefCount() { ref_count->decrement(); } @@ -68,7 +68,7 @@ void IdComponent::decRefCount() { ref_count->decrement(); } //-------------------------------------------------------------------------- // Function: IdComponent::getCounter ///\brief Returns the reference counter to this identifier. -///\return Reference count +///\return Reference count // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- int IdComponent::getCounter() { return( ref_count->getCounter()); } @@ -94,9 +94,9 @@ bool IdComponent::noReference() // Function: IdComponent::operator= ///\brief Assignment operator. ///\param rhs - IN: Reference to the existing object -///\return Reference to IdComponent instance +///\return Reference to IdComponent instance ///\exception H5::IdComponentException when attempt to close the HDF5 -/// object fails +/// object fails // Description // Reset the identifier of this object so that the HDF5 id can // be properly closed. Copy the id from rhs to this object, @@ -147,6 +147,7 @@ void IdComponent::setId( hid_t new_id ) throw IdComponentException("IdComponent::setId", close_error.getDetailMsg()); } + // reset object's id to the given id id = new_id; // starts counting object references @@ -155,8 +156,8 @@ void IdComponent::setId( hid_t new_id ) //-------------------------------------------------------------------------- // Function: IdComponent::getId -///\brief Returns the id of this object. -///\return HDF5 object id +///\brief Returns the id of this object +///\return HDF5 id // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- hid_t IdComponent::getId () const @@ -269,7 +270,7 @@ void* IdComponent::p_reference(const char* name, hid_t space_id, H5R_type_t ref_ if (ret_value < 0) { throw IdComponentException("IdComponent::p_reference", - "H5Rcreate failed"); + "H5Rcreate failed"); } return(ref); } @@ -294,7 +295,7 @@ H5G_obj_t IdComponent::p_get_obj_type(void *ref, H5R_type_t ref_type) const if (obj_type == H5G_UNKNOWN) { throw IdComponentException("IdComponent::p_get_obj_type", - "H5R_get_obj_type failed"); + "H5R_get_obj_type failed"); } return(obj_type); } @@ -316,7 +317,7 @@ hid_t IdComponent::p_get_region(void *ref, H5R_type_t ref_type) const if (space_id < 0) { throw IdComponentException("IdComponent::p_get_region", - "H5Rget_region failed"); + "H5Rget_region failed"); } return(space_id); } diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h index 5c84990..c01cd08 100644 --- a/c++/src/H5IdComponent.h +++ b/c++/src/H5IdComponent.h @@ -25,13 +25,13 @@ namespace H5 { class H5_DLLCPP IdComponent { public: - // Increment reference counter + // Increment reference counter. void incRefCount(); - // Decrement reference counter + // Decrement reference counter. void decRefCount(); - // Get the reference counter to this identifier + // Get the reference counter to this identifier. int getCounter(); // Decrements the reference counter then determines if there are no more @@ -46,13 +46,13 @@ class H5_DLLCPP IdComponent { // Sets the identifier of this object to a new value. void setId( hid_t new_id ); - // Creates an object to hold an HDF5 identifier + // Creates an object to hold an HDF5 identifier. IdComponent( const hid_t h5_id ); // Copy constructor: makes copy of the original IdComponent object. IdComponent( const IdComponent& original ); - // Gets the value of IdComponent's data member + // Gets the value of IdComponent's data member. virtual hid_t getId () const; // Pure virtual function so appropriate close function can diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h index 404fda6..4208cfb 100644 --- a/c++/src/H5Library.h +++ b/c++/src/H5Library.h @@ -22,11 +22,11 @@ namespace H5 { #ifndef DOXYGEN_SHOULD_SKIP_THIS #define NOTATEXIT (-10) // just in case the HDF5 library use more -#endif // DOXYGEN_SHOULD_SKIP_THIS // negative constants. Note: the solution used for the atexit/global // destructors is not reliable, and desperately needs improvement // It is not even working, inifiteloop message still printed when // calling H5close +#endif // DOXYGEN_SHOULD_SKIP_THIS class H5_DLLCPP H5Library { public: diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h index b51aca0..d75cdcc 100644 --- a/c++/src/H5PredType.h +++ b/c++/src/H5PredType.h @@ -34,7 +34,7 @@ class H5_DLLCPP PredType : public AtomType { // Returns the HDF5 predefined type id. virtual hid_t getId() const; - // Default destructor + // Noop destructor virtual ~PredType(); // Declaration of predefined types; their definition is in H5PredType.cpp diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index 065e77a..02c1bde 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -36,32 +36,32 @@ namespace H5 { const PropList PropList::DEFAULT( H5P_DEFAULT ); //-------------------------------------------------------------------------- -// Function Default constructor -///\brief Default constructor: creates a stub property list object. +// Function Default constructor +///\brief Default constructor: creates a stub property list object. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -PropList::PropList() : IdComponent(0) {} +PropList::PropList() : IdComponent( 0 ) {} //-------------------------------------------------------------------------- -// Function: PropList copy constructor -///\brief Copy constructor -///\param original - IN: The original property list to copy +// Function: PropList copy constructor +///\brief Copy constructor +///\param original - IN: The original property list to copy // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- PropList::PropList( const PropList& original ) : IdComponent( original ) {} //-------------------------------------------------------------------------- -// Function: PropList overloaded constructor -///\brief Creates a property list using the id of an existing property. -///\param plist_id - IN: Id of the existing property list -///\exception H5::PropListIException +// Function: PropList overloaded constructor +///\brief Creates a property list using the id of an existing property. +///\param plist_id - IN: Id of the existing property list +///\exception H5::PropListIException // Description -// This function calls H5Pcreate to create a new property list -// if the given id, plist_id, is that of a property class. If -// the given id is equal to H5P_NO_CLASS, then set this -// property's id to H5P_DEFAULT, otherwise, to the given id. -// Note: someone else added this code without comments and this -// description was what I came up with from reading the code. +// This function calls H5Pcreate to create a new property list +// if the given id, plist_id, is that of a property class. If +// the given id is equal to H5P_NO_CLASS, then set this +// property's id to H5P_DEFAULT, otherwise, to the given id. +// Note: someone else added this code without comments and this +// description was what I came up with from reading the code. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- PropList::PropList( const hid_t plist_id ) : IdComponent(0) @@ -83,10 +83,10 @@ PropList::PropList( const hid_t plist_id ) : IdComponent(0) } //-------------------------------------------------------------------------- -// Function: PropList::copy -///\brief Makes a copy of an existing property list -///\param like_plist - IN: Reference to the existing property list -///\exception H5::PropListIException +// Function: PropList::copy +///\brief Makes a copy of an existing property list. +///\param like_plist - IN: Reference to the existing property list +///\exception H5::PropListIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void PropList::copy( const PropList& like_plist ) @@ -106,9 +106,7 @@ void PropList::copy( const PropList& like_plist ) ref_count = new RefCounter; if( id <= 0 ) - { throw PropListIException("PropList::copy", "H5Pcopy failed"); - } } //-------------------------------------------------------------------------- @@ -118,8 +116,8 @@ void PropList::copy( const PropList& like_plist ) ///\return Reference to PropList instance ///\exception H5::PropListIException // Description -// Makes a copy of the property list on the right hand side -// and stores the new id in the left hand side object. +// Makes a copy of the property list on the right hand side +// and stores the new id in the left hand side object. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- PropList& PropList::operator=( const PropList& rhs ) @@ -129,12 +127,12 @@ PropList& PropList::operator=( const PropList& rhs ) } //-------------------------------------------------------------------------- -// Function: PropList::copyProp -///\brief Copies a property from one list or class to another. -///\param dest - IN: Destination property list or class -///\param src - IN: Source property list or class -///\param name - IN: Name of the property to copy - \c char pointer -///\exception H5::PropListIException +// Function: PropList::copyProp +///\brief Copies a property from one list or class to another +///\param dest - IN: Destination property list or class +///\param src - IN: Source property list or class +///\param name - IN: Name of the property to copy - \c char pointer +///\exception H5::PropListIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void PropList::copyProp( PropList& dest, PropList& src, const char *name ) const @@ -146,7 +144,9 @@ void PropList::copyProp( PropList& dest, PropList& src, const char *name ) const { throw PropListIException("PropList::copyProp", "H5Pcopy_prop failed"); } + } + //-------------------------------------------------------------------------- // Function: PropList::copyProp ///\brief This is an overloaded member function, provided for convenience. @@ -187,11 +187,11 @@ void PropList::p_close() const #endif // DOXYGEN_SHOULD_SKIP_THIS //-------------------------------------------------------------------------- -// Function: PropList::getClass -///\brief Returns the class of this property list, i.e. \c H5P_FILE_CREATE... -///\return The property list class if it is not equal to \c H5P_NO_CLASS -///\exception H5::PropListIException -// Programmer: Binh-Minh Ribler - April, 2004 +// Function: PropList::getClass +///\brief Returns the class of this property list, i.e. \c H5P_FILE_CREATE... +///\return The property list class if it is not equal to \c H5P_NO_CLASS +///\exception H5::PropListIException +// Programmer Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- hid_t PropList::getClass() const { @@ -249,7 +249,7 @@ bool PropList::propExist(const string& name ) const ///\brief Close a property list class. ///\exception H5::PropListIException ///\par Description -/// Releases memory and de-attaches a class from the property +/// Releases memory and detaches a class from the property /// list class hierarchy. // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- @@ -269,8 +269,9 @@ void PropList::closeClass() const ///\param value - OUT: Pointer to the buffer for the property value ///\exception H5::PropListIException ///\par Description -/// Retrieves a copy of the value for a property in a property list. The -/// property name must exist or this routine will throw an exception. +/// Retrieves a copy of the value for a property in a property +/// list. The property name must exist or this routine will +/// throw an exception. // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void PropList::getProperty(const char* name, void* value) const @@ -373,7 +374,7 @@ size_t PropList::getPropSize(const string& name) const //-------------------------------------------------------------------------- // Function: PropList::getClassName -///\brief Return the name of a generic property list class +///\brief Return the name of a generic property list class. ///\return A string containing the class name, if success, otherwise, /// a NULL string. // Programmer: Binh-Minh Ribler - April, 2004 diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h index 557a39b..b8fa735 100644 --- a/c++/src/H5PropList.h +++ b/c++/src/H5PropList.h @@ -25,6 +25,10 @@ class H5_DLLCPP PropList : public IdComponent { // Default property list static const PropList DEFAULT; + // Creates a property list of a given type or creates a copy of an + // existing property list giving the property list id. + PropList(const hid_t plist_id); + // Make a copy of the given property list using assignment statement PropList& operator=( const PropList& rhs ); @@ -85,10 +89,6 @@ class H5_DLLCPP PropList : public IdComponent { // Default constructor: creates a stub PropList object. PropList(); - // Creates a property list of a given type or creates a copy of an - // existing property list giving the property list id. - PropList(const hid_t plist_id); - // Copy constructor: creates a copy of a PropList object. PropList(const PropList& original); diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp index d213841..4d30be1 100644 --- a/c++/src/H5StrType.cpp +++ b/c++/src/H5StrType.cpp @@ -106,11 +106,11 @@ StrType::StrType( const hid_t existing_id ) : AtomType( existing_id ) {} StrType::StrType( const StrType& original ) : AtomType ( original ) {} //-------------------------------------------------------------------------- -// Function: EnumType overloaded constructor -///\brief Gets the string datatype of the specified dataset -///\param dataset - IN: Dataset that this string datatype associates with -///\exception H5::DataTypeIException -// Programmer Binh-Minh Ribler - 2000 +// Function: EnumType overloaded constructor +///\brief Gets the string datatype of the specified dataset +///\param dataset - IN: Dataset that this string datatype associates with +///\exception H5::DataTypeIException +// Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- StrType::StrType( const DataSet& dataset ) : AtomType () { diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp index 882dccc..9cb3bac 100644 --- a/c++/src/H5VarLenType.cpp +++ b/c++/src/H5VarLenType.cpp @@ -37,10 +37,10 @@ namespace H5 { VarLenType::VarLenType() : DataType() {} //-------------------------------------------------------------------------- -// Function: VarLenType overloaded constructor -///\brief Creates an VarLenType object using an existing id. -///\param existing_id - IN: Id of an existing datatype -///\exception H5::DataTypeIException +// Function: VarLenType overloaded constructor +///\brief Creates an VarLenType object using an existing id. +///\param existing_id - IN: Id of an existing datatype +///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- VarLenType::VarLenType(const hid_t existing_id) : DataType(existing_id) {} @@ -57,7 +57,7 @@ VarLenType::VarLenType(const VarLenType& original) : DataType(original) {} ///\brief Creates a new variable-length datatype based on the specified /// \a base_type. ///\param base_type - IN: Pointer to existing datatype -///\exception H5::DataTypeIException +///\exception H5::DataTypeIException // Description // DataType passed by pointer to avoid clashing with copy // constructor. diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h index 8a2572b..c31946a 100644 --- a/c++/src/H5VarLenType.h +++ b/c++/src/H5VarLenType.h @@ -28,10 +28,10 @@ class H5_DLLCPP VarLenType : public DataType { // on the specified base type. VarLenType(const DataType* base_type); - // Copy constructor - makes copy of the original object + // Copy constructor: makes copy of the original object. VarLenType( const VarLenType& original ); - // Default destructor + // Noop destructor virtual ~VarLenType(); protected: diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in index 21e07fa..e9e1b86 100755 --- a/c++/src/h5c++.in +++ b/c++/src/h5c++.in @@ -27,6 +27,7 @@ prefix="@prefix@" exec_prefix="@exec_prefix@" libdir="@libdir@" includedir="@includedir@" +HL="@HL@" ############################################################################ ## ## @@ -54,7 +55,6 @@ get_output_file="no" SHOW="eval" CXXBASE="@CXX@" CXXLINKERBASE="@CXX@" -CFLAGS="@CFLAGS@" CXXFLAGS="@CXXFLAGS@" CPPFLAGS="@CPPFLAGS@" LDFLAGS="@LDFLAGS@" @@ -229,7 +229,7 @@ if test "x$do_compile" = "xyes"; then compile_args="-c $compile_args" fi - $SHOW $CXX -I$includedir $CPPFLAGS $CXXFLAGS $CFLAGS $compile_args + $SHOW $CXX -I$includedir $CPPFLAGS $CXXFLAGS $compile_args status=$? if test "$status" != "0"; then @@ -238,8 +238,13 @@ if test "x$do_compile" = "xyes"; then fi if test "x$do_link" = "xyes"; then - link_args="$link_args ${libdir}/libhdf5_cpp.a ${libdir}/libhdf5.a $LIBS" - $SHOW $CXXLINKER -I$includedir $CPPFLAGS $CXXFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $link_args + # conditionnaly link with the hl library + if test "X$HL" = "Xhl"; then + link_args="$link_args ${libdir}/libhdf5_cpp.a ${libdir}/libhdf5.a ${libdir}/libhdf5_hl.a $LIBS" + else + link_args="$link_args ${libdir}/libhdf5_cpp.a ${libdir}/libhdf5.a $LIBS" + fi + $SHOW $CXXLINKER -I$includedir $CPPFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $link_args status=$? fi diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index 97c5e51..8903cd7 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -33,7 +33,6 @@ #endif #include "testhdf5.h" -#include "h5test.h" #include "H5Cpp.h" #ifndef H5_NO_NAMESPACE @@ -42,15 +41,15 @@ using namespace H5; #include "h5cpputil.h" -const string FILE1("dataset.h5"); -#define DSET_DEFAULT_NAME "default" -#define DSET_CHUNKED_NAME "chunked" -#define DSET_SIMPLE_IO_NAME "simple_io" -#define DSET_TCONV_NAME "tconv" -#define DSET_COMPRESS_NAME "compressed" -#define DSET_BOGUS_NAME "bogus" +const string FILE1("dataset.h5"); +const string DSET_DEFAULT_NAME("default"); +const string DSET_CHUNKED_NAME("chunked"); +const string DSET_SIMPLE_IO_NAME("simple_io"); +const string DSET_TCONV_NAME ("tconv"); +const string DSET_COMPRESS_NAME("compressed"); +const string DSET_BOGUS_NAME ("bogus"); -#define H5Z_FILTER_BOGUS 305 +const int H5Z_FILTER_BOGUS = 305; // Local prototypes static size_t bogus(unsigned int flags, size_t cd_nelmts, @@ -601,7 +600,7 @@ test_compression(H5File& file) TESTING("compression (partial I/O)"); const hsize_t hs_size[2] = {4, 50}; - const hssize_t hs_offset[2] = {7, 30}; + const hsize_t hs_offset[2] = {7, 30}; for (i = 0; i < hs_size[0]; i++) { for (j = 0; j < hs_size[1]; j++) { points[hs_offset[0]+i][hs_offset[1]+j] = rand (); diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp index 020bab0..8bb0d85 100644 --- a/c++/test/h5cpputil.cpp +++ b/c++/test/h5cpputil.cpp @@ -93,4 +93,3 @@ void issue_fail_msg(const char* where, int line, const char* file_name) } } - diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h index d67c459..93ba1b9 100644 --- a/c++/test/h5cpputil.h +++ b/c++/test/h5cpputil.h @@ -46,7 +46,7 @@ template cerr << "*** UNEXPECTED VALUE from " << where << " should be " << value << ", but is " << x << " at line " << line << " in " << file_name << endl; - H5Eprint (stdout); + H5Eprint (stderr); } } diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index 858c74c..02cee3e 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -104,7 +104,7 @@ test_file_create(void) // name, that skips the comparison b/w the 1st & 2nd args would // be more appropriate, but verify_val can be used for now; // also, more text about what is testing would be better. - verify_val(file2.getId(), FAIL, "H5File constructor", __LINE__, __FILE__); + verify_val(file2.getId(), FAIL, "H5File constructor", __LINE__, __FILE__); } catch( FileIException E ) {} // do nothing, FAIL expected @@ -156,10 +156,11 @@ test_file_create(void) verify_val(parm1, F1_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); verify_val(parm2, F1_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); - int iparm1; /*file-creation parameters */ #ifdef H5_WANT_H5_V1_4_COMPAT + int iparm1; /*file-creation parameters */ int iparm2; /*file-creation parameters */ #else /* H5_WANT_H5_V1_4_COMPAT */ + unsigned iparm1; /*file-creation parameters */ unsigned iparm2; /*file-creation parameters */ #endif /* H5_WANT_H5_V1_4_COMPAT */ tmpl1.getSymk( iparm1, iparm2); @@ -210,10 +211,11 @@ test_file_create(void) verify_val(parm1, F2_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); verify_val(parm2, F2_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); - int iparm1; /*file-creation parameters */ #ifdef H5_WANT_H5_V1_4_COMPAT + int iparm1; /*file-creation parameters */ int iparm2; /*file-creation parameters */ #else /* H5_WANT_H5_V1_4_COMPAT */ + unsigned iparm1; /*file-creation parameters */ unsigned iparm2; /*file-creation parameters */ #endif /* H5_WANT_H5_V1_4_COMPAT */ tmpl1->getSymk( iparm1, iparm2); @@ -291,17 +293,17 @@ test_file_open(void) /* Get the file-creation parameters */ hsize_t ublock = tmpl1.getUserblock(); verify_val(ublock, F2_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__); - verify_val(ublock, F2_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__); size_t parm1, parm2; /*file-creation parameters */ tmpl1.getSizes( parm1, parm2); verify_val(parm1, F2_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); verify_val(parm2, F2_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__); - int iparm1; /*file-creation parameters */ #ifdef H5_WANT_H5_V1_4_COMPAT + int iparm1; /*file-creation parameters */ int iparm2; /*file-creation parameters */ #else /* H5_WANT_H5_V1_4_COMPAT */ + unsigned iparm1; /*file-creation parameters */ unsigned iparm2; /*file-creation parameters */ #endif /* H5_WANT_H5_V1_4_COMPAT */ tmpl1.getSymk( iparm1, iparm2); diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index 5f62ed5..ff7e0bf 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -35,8 +35,8 @@ using namespace H5; #endif /* !H5_NO_NAMESPACE */ -const char* TESTFILE = "th5s.h5"; -const char* DATAFILE = "th5s1.h5"; +const string TESTFILE("th5s.h5"); +const string DATAFILE("th5s1.h5"); /* 3-D dataset with fixed dimensions */ const string SPACE1_NAME("Space1"); @@ -118,20 +118,20 @@ test_h5s_basic(void) // Get simple extent npoints of the dataspace sid1 and verify it hssize_t n; /* Number of dataspace elements */ n = sid1.getSimpleExtentNpoints(); - verify_val(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, - "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__); + verify_val(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, + "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__); // Get the logical rank of dataspace sid1 and verify it int rank; /* Logical rank of dataspace */ rank = sid1.getSimpleExtentNdims(); - verify_val(rank, SPACE1_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); + verify_val(rank, SPACE1_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); // Retrieves dimension size of dataspace sid1 and verify it int ndims; /* Number of dimensions */ hsize_t tdims[4]; /* Dimension array to test with */ ndims = sid1.getSimpleExtentDims( tdims ); - verify_val(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(unsigned)), 0, - "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); + verify_val(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(unsigned)), 0, + "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); // Create simple dataspace sid2 hsize_t max2[] = {SPACE2_MAX1, SPACE2_MAX2, SPACE2_MAX3, SPACE2_MAX4}; @@ -139,20 +139,20 @@ test_h5s_basic(void) // Get simple extent npoints of dataspace sid2 and verify it n = sid2.getSimpleExtentNpoints(); - verify_val(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4, - "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__); + verify_val(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4, + "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__); // Get the logical rank of dataspace sid2 and verify it rank = sid2.getSimpleExtentNdims(); - verify_val(rank, SPACE2_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); + verify_val(rank, SPACE2_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); // Retrieves dimension size and max size of dataspace sid2 and // verify them ndims = sid2.getSimpleExtentDims( tdims, tmax ); - verify_val(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(unsigned)), 0, - "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); - verify_val(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(unsigned)), 0, - "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); + verify_val(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(unsigned)), 0, + "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); + verify_val(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(unsigned)), 0, + "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); } // end of first try block catch( DataSpaceIException error ) { @@ -166,8 +166,8 @@ test_h5s_basic(void) try { DataSpace manydims_ds(H5S_MAX_RANK+1, dims3, NULL); - // Should FAIL but didn't, so issue an error message - issue_fail_msg("DataSpace constructor", __LINE__, __FILE__); + // Should FAIL but didn't, so issue an error message + issue_fail_msg("DataSpace constructor", __LINE__, __FILE__); } catch( DataSpaceIException error ) {} // do nothing, FAIL expected @@ -180,11 +180,11 @@ test_h5s_basic(void) */ char testfile[512]=""; char *srcdir = getenv("srcdir"); - if (srcdir && ((strlen(srcdir) + strlen(TESTFILE) + 1) < sizeof(testfile))){ + if (srcdir && ((strlen(srcdir) + strlen(TESTFILE.c_str()) + 1) < sizeof(testfile))){ strcpy(testfile, srcdir); strcat(testfile, "/"); } - strcat(testfile, TESTFILE); + strcat(testfile, TESTFILE.c_str()); try { // try block for testing higher dimensionality // Create file @@ -195,8 +195,8 @@ test_h5s_basic(void) try { DataSet dset1 = fid1.openDataSet( "dset" ); - // but didn't, issue an error message - issue_fail_msg("H5File::openDataSet", __LINE__, __FILE__); + // but didn't, issue an error message + issue_fail_msg("H5File::openDataSet", __LINE__, __FILE__); } catch( FileIException error ) { } // do nothing, FAIL expected } // end of try block for testing higher dimensionality @@ -215,8 +215,7 @@ test_h5s_basic(void) dims1[0] = 0; try { DataSpace wrongdim_ds (SPACE1_RANK, dims1); - verify_val(wrongdim_ds.getId(), FAIL, "DataSpace constructor", __LINE__, __FILE__); - + verify_val(wrongdim_ds.getId(), FAIL, "DataSpace constructor", __LINE__, __FILE__); } catch( DataSpaceIException error ) {} // do nothing; FAIL expected @@ -225,7 +224,7 @@ test_h5s_basic(void) // Attempts to use incorrect dimensions, should fail try { - sid3.setExtentSimple( SPACE1_RANK, dims1 ); + sid3.setExtentSimple( SPACE1_RANK, dims1 ); // but didn't, issue an error message issue_fail_msg("DataSpace::setExtentSimple", __LINE__, __FILE__); @@ -265,11 +264,11 @@ test_h5s_scalar_write(void) //n = H5Sget_simple_extent_npoints(sid1); hssize_t n; /* Number of dataspace elements */ n = sid1.getSimpleExtentNpoints(); - verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__); + verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__); int rank; /* Logical rank of dataspace */ rank = sid1.getSimpleExtentNdims(); - verify_val(rank, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); + verify_val(rank, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); // Retrieves dimension size of dataspace sid1 and verify it int ndims; /* Number of dimensions */ @@ -280,7 +279,7 @@ test_h5s_scalar_write(void) /* Verify extent type */ H5S_class_t ext_type; /* Extent type */ ext_type = sid1.getSimpleExtentType(); - verify_val(ext_type, H5S_SCALAR, "DataSpace::getSimpleExtentType", __LINE__, __FILE__); + verify_val(ext_type, H5S_SCALAR, "DataSpace::getSimpleExtentType", __LINE__, __FILE__); /* Create a dataset */ DataSet dataset = fid1.createDataSet("Dataset1", PredType::NATIVE_UINT,sid1); @@ -327,18 +326,18 @@ test_h5s_scalar_read(void) // Get the number of dataspace elements hssize_t n = sid1.getSimpleExtentNpoints(); - verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__); + verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__); // Get the logical rank of the dataspace int ndims = sid1.getSimpleExtentNdims(); - verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); + verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); ndims = sid1.getSimpleExtentDims(tdims); - verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); + verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); unsigned rdata; /* Scalar data read in */ dataset.read(&rdata, PredType::NATIVE_UINT); - verify_val(rdata, space3_data, "DataSet::read", __LINE__, __FILE__); + verify_val(rdata, space3_data, "DataSet::read", __LINE__, __FILE__); } // end of try block catch (Exception error) { @@ -395,15 +394,15 @@ test_h5s_compound_scalar_write(void) // Get the number of dataspace elements hssize_t n = sid1.getSimpleExtentNpoints(); - verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__); + verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__); // Get the logical rank of the dataspace int ndims = sid1.getSimpleExtentNdims(); - verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); + verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); hsize_t tdims[4]; /* Dimension array to test with */ ndims = sid1.getSimpleExtentDims(tdims); - verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); + verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); /* Create a dataset */ DataSet dataset = fid1.createDataSet("Dataset1", tid1, sid1); @@ -452,14 +451,14 @@ test_h5s_compound_scalar_read(void) // Get the number of dataspace elements hssize_t n = sid1.getSimpleExtentNpoints(); - verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__); + verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__); // Get the logical rank of the dataspace int ndims = sid1.getSimpleExtentNdims(); - verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); + verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); ndims = sid1.getSimpleExtentDims(tdims); - verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); + verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); // Get the datatype of this dataset. CompType type(dataset); @@ -509,7 +508,7 @@ test_h5s(void) test_h5s_basic(); /* Test basic H5S code */ test_h5s_scalar_write(); /* Test scalar H5S writing code */ - test_h5s_scalar_read(); /* Test scalar H5S reading code */ + test_h5s_scalar_read(); /* Test scalar H5S reading code */ test_h5s_compound_scalar_write(); /* Test compound datatype scalar H5S writing code */ test_h5s_compound_scalar_read(); /* Test compound datatype scalar H5S reading code */ } /* test_h5s() */ @@ -532,6 +531,6 @@ test_h5s(void) void cleanup_h5s(void) { - remove(DATAFILE); + remove(DATAFILE.c_str()); } diff --git a/config/commence.in b/config/commence.in index 16f13ca..7328296 100644 --- a/config/commence.in +++ b/config/commence.in @@ -70,6 +70,7 @@ PUB_DOCS= PUB_SUBDOCS= PROGS= TEST_PROGS= +PRIV_PROGS= TEST_PROGS_PARA= TEST_FLAGS= TEST_SCRIPTS= diff --git a/config/conclude.in b/config/conclude.in index 5a19a48..587a48e 100644 --- a/config/conclude.in +++ b/config/conclude.in @@ -108,19 +108,19 @@ check-vfd: ## Make installation directories directories if they don't exist. ## $(libdir): - $(top_srcdir)/bin/mkdirs $@ + -$(top_srcdir)/bin/mkdirs $@ $(includedir): - $(top_srcdir)/bin/mkdirs $@ + -$(top_srcdir)/bin/mkdirs $@ $(bindir): - $(top_srcdir)/bin/mkdirs $@ + -$(top_srcdir)/bin/mkdirs $@ $(DOCDIR): - $(top_srcdir)/bin/mkdirs $@ + -$(top_srcdir)/bin/mkdirs $@ $(EXAMPLEDIR): - $(top_srcdir)/bin/mkdirs $@ + -$(top_srcdir)/bin/mkdirs $@ ## Install the library, the public header files, and public programs. ## @@ -223,10 +223,10 @@ install-doc: $(PUB_DOCS) $(DOCDIR) ## uninstall: @for f in libhdf5.settings $(LIB); do \ - $(LT_UNINSTALL) $(libdir)/$$f; \ + $(LT_UNINSTALL) $(libdir)/$$f; \ done @if test -n "$(PUB_HDR)"; then \ - set -x; cd $(includedir) && $(RM) $(PUB_HDR); \ + set -x; cd $(includedir) && $(RM) $(PUB_HDR); \ fi @for f in X $(PUB_PROGS); do \ if test $$f != X; then \ @@ -238,15 +238,15 @@ uninstall: ## uninstall-doc: @for d in X $(SUBDIRS); do \ - if test $$d != X; then \ - (set -x; cd $$d && $(MAKE) $@) || exit 1; \ - fi; \ + if test $$d != X; then \ + (set -x; cd $$d && $(MAKE) $@) || exit 1; \ + fi; \ done @if test -n "$(PUB_DOCS)"; then \ - set -x; cd $(DOCDIR) && $(RM) $(PUB_DOCS); \ + set -x; cd $(DOCDIR) && $(RM) $(PUB_DOCS); \ fi - @if test -n "$(PUB_SUBDOCS)"; then \ - set -x; cd $(DOCDIR) && $(RM) $(PUB_SUBDOCS); \ + @if test -n "$(PUB_SUBDOCS)"; then \ + set -x; cd $(DOCDIR) && $(RM) $(PUB_SUBDOCS); \ fi ## Removes temporary files without removing the final target files. That is, @@ -290,10 +290,10 @@ clean: mostlyclean ## distclean: clean -$(RM) .depend TAGS *~ core *.core *.bak *.old *.new $(DISTCLEAN) - @for d in X $(SUBDIRS); do \ - if test $$d != X; then \ - (set -x; cd $$d; $(MAKE) $@) || exit 1; \ - fi; \ + @for d in X $(SUBDIRS); do \ + if test $$d != X; then \ + (set -x; cd $$d; $(MAKE) $@) || exit 1; \ + fi; \ done @if test -f $(srcdir)/Makefile.in; then \ (set -x; $(RM) Makefile); \ diff --git a/config/dec-flags b/config/dec-flags index 6368ee7..32922bb 100644 --- a/config/dec-flags +++ b/config/dec-flags @@ -49,7 +49,7 @@ esac case "$cc_vendor-$cc_version" in DEC-V5.*) # Production - PROD_CFLAGS="-std -verbose -warnprotos -ieee -misalign -O4 -ansi_args -fp_reorder -readonly_strings -inline speed" + PROD_CFLAGS="-std -verbose -warnprotos -ieee -misalign -O4 -ansi_args -fp_reorder -readonly_strings -inline speed" PROD_CPPFLAGS="-D_INTRINSICS -D_INLINE_INTRINSICS" # Debug diff --git a/config/depend1.in b/config/depend1.in index eaa7488..fc2545d 100644 --- a/config/depend1.in +++ b/config/depend1.in @@ -21,14 +21,14 @@ ## tilde to the file name. ## $(srcdir)/Dependencies: .depend - @if test "$(srcdir)" != "."; then \ - echo '## This file is machine generated on GNU systems.' >$@; \ - echo '## Only temporary changes may be made here.' >>$@; \ - echo >>$@; \ - $(PERL) -p $(top_srcdir)/bin/distdep .depend >>$@; \ - else \ - echo 'Dependencies cannot be built when $$srcdir == $$builddir'; \ - fi + @if test "$(srcdir)" != "."; then \ + echo '## This file is machine generated on GNU systems.' >$@; \ + echo '## Only temporary changes may be made here.' >>$@; \ + echo >>$@; \ + $(PERL) -p $(top_srcdir)/bin/distdep .depend >>$@; \ + else \ + echo 'Dependencies cannot be built when $$srcdir == $$builddir'; \ + fi .depend: $(LIB_SRC) $(TEST_SRC) $(PROG_SRC) @touch .depend diff --git a/config/freebsd b/config/freebsd index 8bdad05..4619beb 100644 --- a/config/freebsd +++ b/config/freebsd @@ -7,8 +7,8 @@ # The default compiler is `gcc' if test "X-" = "X-$CC"; then - CC=gcc - CC_BASENAME=gcc + CC=gcc + CC_BASENAME=gcc fi # Add "_POSIX_C_SOURCE" define to cpp flags, to quiet warnings diff --git a/config/gnu-flags b/config/gnu-flags index ae40c33..354c7ab 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -92,7 +92,6 @@ fi # Common GCC flags for various situations case "$cc_vendor-$cc_version" in gcc*|egcs*|pgcc*) - # Architecture-specific flags arch= case "$host_os-$host_cpu" in diff --git a/config/hpux10.20 b/config/hpux10.20 index 0b39f3c..472dbe7 100644 --- a/config/hpux10.20 +++ b/config/hpux10.20 @@ -8,29 +8,29 @@ # Default compiler is `cc' if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc + CC=cc + CC_BASENAME=cc fi # Flags case "X-$CC" in - X-gcc) - CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O3" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + X-gcc) + CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O3" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; - *) - CFLAGS="$CFLAGS -Ae" - DEBUG_CFLAGS=-g - DEBUG_CPPFLAGS="-Ae" - PROD_CFLAGS=-O - PROD_CPPFLAGS="-Ae" - PROFILE_CFLAGS= - PROFILE_CPPFLAGS="-Ae" - ;; + *) + CFLAGS="$CFLAGS -Ae" + DEBUG_CFLAGS=-g + DEBUG_CPPFLAGS="-Ae" + PROD_CFLAGS=-O + PROD_CPPFLAGS="-Ae" + PROFILE_CFLAGS= + PROFILE_CPPFLAGS="-Ae" + ;; esac diff --git a/config/hpux11.00 b/config/hpux11.00 index 0b39f3c..472dbe7 100644 --- a/config/hpux11.00 +++ b/config/hpux11.00 @@ -8,29 +8,29 @@ # Default compiler is `cc' if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc + CC=cc + CC_BASENAME=cc fi # Flags case "X-$CC" in - X-gcc) - CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O3" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + X-gcc) + CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O3" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; - *) - CFLAGS="$CFLAGS -Ae" - DEBUG_CFLAGS=-g - DEBUG_CPPFLAGS="-Ae" - PROD_CFLAGS=-O - PROD_CPPFLAGS="-Ae" - PROFILE_CFLAGS= - PROFILE_CPPFLAGS="-Ae" - ;; + *) + CFLAGS="$CFLAGS -Ae" + DEBUG_CFLAGS=-g + DEBUG_CPPFLAGS="-Ae" + PROD_CFLAGS=-O + PROD_CPPFLAGS="-Ae" + PROFILE_CFLAGS= + PROFILE_CPPFLAGS="-Ae" + ;; esac diff --git a/config/hpux9.03 b/config/hpux9.03 index abed0b3..6603aab 100644 --- a/config/hpux9.03 +++ b/config/hpux9.03 @@ -7,30 +7,30 @@ # See BlankForm in this directory for details # Default compiler is `cc' -if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc +if test "X$CC" = "X"; then + CC=cc + CC_BASENAME=cc fi # Flags case "X-$CC" in - X-gcc) - CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O3" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + X-gcc) + CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O3" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; - *) - CFLAGS="$CFLAGS -Ae" - DEBUG_CFLAGS=-g - DEBUG_CPPFLAGS= - PROD_CFLAGS= - PROD_CPPFLAGS= - PROFILE_CFLAGS= - PROFILE_CPPFLAGS= - ;; + *) + CFLAGS="$CFLAGS -Ae" + DEBUG_CFLAGS=-g + DEBUG_CPPFLAGS= + PROD_CFLAGS= + PROD_CPPFLAGS= + PROFILE_CFLAGS= + PROFILE_CPPFLAGS= + ;; esac diff --git a/config/i386-pc-cygwin32 b/config/i386-pc-cygwin32 index 474903b..0d63288 100644 --- a/config/i386-pc-cygwin32 +++ b/config/i386-pc-cygwin32 @@ -8,9 +8,9 @@ # The default compiler is `gcc'. if test "X-" = "X-$CC"; then - CC=gcc - CC_BASENAME=gcc - LD=ld + CC=gcc + CC_BASENAME=gcc + LD=ld fi # Figure out compiler flags diff --git a/config/ia64-linux-gnu b/config/ia64-linux-gnu index b212670..76f669f3 100644 --- a/config/ia64-linux-gnu +++ b/config/ia64-linux-gnu @@ -6,18 +6,14 @@ # Use Intel C compiler by default (if it's available). if test "X$CC" = "X" && which icc > /dev/null; then - CC=icc - CC_BASENAME=icc + CC=icc + CC_BASENAME=icc fi #---------------------------------------------------------------------------- # Compiler flags. The CPPFLAGS values should not include package debug # flags like `-DH5G_DEBUG' since these are added with the -# `--enable-debug' switch of configure. After titan's ecc was updated to 7.1, -# int64_t couldn't be found because of overlapping definitions in stdint.h -# and sys/types.h. So added -D__GNUC__ to CFLAGS. (This problem is no longer -# there since the C library has been updated. So -D__GNUC__ has been taken -# out.) +# `--enable-debug' switch of configure. case $CC_BASENAME in ecc|icc) diff --git a/config/irix5.x b/config/irix5.x index bd757e1..3624e7f 100644 --- a/config/irix5.x +++ b/config/irix5.x @@ -7,44 +7,44 @@ # See BlankForm in this directory for details # The default compiler is `cc' and there is no ranlib. -if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc +if test "X-" = "X-$CC"; then + CC=cc + CC_BASENAME=cc fi RANLIB=: case "X-$CC_BASENAME" in - X-gcc) - CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O3" + X-gcc) + CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O3" PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; - *) - # Do *not* use -ansi because it prevents hdf5 from being able - # to read modification dates from the file. On some systems it - # can also result in compile errors in system header files - # since hdf5 includes a couple non-ANSI header files. - #CFLAGS="$CFLAGS -ansi" + *) + # Do *not* use -ansi because it prevents hdf5 from being able + # to read modification dates from the file. On some systems it + # can also result in compile errors in system header files + # since hdf5 includes a couple non-ANSI header files. + #CFLAGS="$CFLAGS -ansi" - # Always turn off these compiler warnings: - CFLAGS="$CFLAGS -woff 799" + # Always turn off these compiler warnings: + CFLAGS="$CFLAGS -woff 799" - # Extra debugging flags - DEBUG_CFLAGS=-g - DEBUG_CPPFLAGS= + # Extra debugging flags + DEBUG_CFLAGS=-g + DEBUG_CPPFLAGS= - # Extra production flags - # Note: higher optimizations relax alignment requirements needed. - PROD_CFLAGS="-O -s" - PROD_CPPFLAGS= + # Extra production flags + # Note: higher optimizations relax alignment requirements needed. + PROD_CFLAGS="-O -s" + PROD_CPPFLAGS= - # Extra profiling flags - PROFILE_CFLAGS=-pg - PROFILE_CPPFLAGS= - ;; + # Extra profiling flags + PROFILE_CFLAGS=-pg + PROFILE_CPPFLAGS= + ;; esac diff --git a/config/irix6.x b/config/irix6.x index e9bb680..c8918a1 100644 --- a/config/irix6.x +++ b/config/irix6.x @@ -7,78 +7,76 @@ # See BlankForm in this directory for details. # Use SGI supplied C compiler by default. There is no ranlib -if test "X-" = "X-$CC"; then +if test "X-" = "X-$CC"; then CC='cc' CC_BASENAME=cc # use c99 compiler if available. if `c99 -version >/dev/null 2>&1` ; then - CC='c99' + CC='c99' fi fi RANLIB=: # Compiler flags case "X-$CC_BASENAME" in - X-gcc) - . $srcdir/config/gnu-flags - ;; + X-gcc) + . $srcdir/config/gnu-flags + ;; - *) - if [ "$CC_BASENAME" = cc ] || - ($CC -version 2>&1 | grep -s "MIPSpro Compilers") 2>&1 > /dev/null - then - # use these flags if this is the SGI cc compiler or some compiler - # command that eventually uses the SGI cc compiler. + *) + if [ "$CC_BASENAME" = "cc" ] || ($CC -version 2>&1 | grep -s "MIPSpro Compilers") 2>&1 > /dev/null; then + # use these flags if this is the SGI cc compiler or some compiler + # command that eventually uses the SGI cc compiler. - # Check for old versions of the compiler that don't work right. - case "`$CC -version 2>&1 |head -1`" in - "Mongoose Compilers: Version 7.00") - echo " +---------------------------------------------------+" - echo " | You have an old version of cc (Mongoose Compilers |" - echo " | version 7.00). Please upgrade to MIPSpro version |" - echo " | 7.2.1.2m (patches are available from the SGI web |" - echo " | site). The 7.00 version may generate incorrect |" - echo " | code, especially when optimizations are enabled. |" - echo " +---------------------------------------------------+" - sleep 5 - ;; - esac + # Check for old versions of the compiler that don't work right. + case "`$CC -version 2>&1 |head -1`" in + "Mongoose Compilers: Version 7.00") + echo " +---------------------------------------------------+" + echo " | You have an old version of cc (Mongoose Compilers |" + echo " | version 7.00). Please upgrade to MIPSpro version |" + echo " | 7.2.1.2m (patches are available from the SGI web |" + echo " | site). The 7.00 version may generate incorrect |" + echo " | code, especially when optimizations are enabled. |" + echo " +---------------------------------------------------+" + sleep 5 + ;; + esac - # Always turn off these compiler warnings for the -64 compiler: - # 1174: function declared but not used - # 1196: __vfork() (this is an SGI config problem) - # 1209: constant expressions - # 1429: the `long long' type is not standard - # 1685: turn off warnings about turning off invalid warnings - # 3201: remark - parameter not referenced -# CFLAGS="$CFLAGS -woff 1174,1429,1209,1196,1685,3201" - CFLAGS="$CFLAGS -woff 1209,3201" + # Always turn off these compiler warnings for the -64 compiler: + # 1174: function declared but not used + # 1196: __vfork() (this is an SGI config problem) + # 1209: constant expressions + # 1429: the `long long' type is not standard + # 1685: turn off warnings about turning off invalid warnings + # 3201: remark - parameter not referenced + #CFLAGS="$CFLAGS -woff 1174,1429,1209,1196,1685,3201" + CFLAGS="$CFLAGS -woff 1209,3201" - # Always turn off these compiler warnings for the old compiler: - # 799: the `long long' type is not standard - # 803: turn off warnings about turning off invalid warnings - # 835: __vfork() (this is an SGI config problem) -# CFLAGS="$CFLAGS -woff 799,803,835" + # Always turn off these compiler warnings for the old compiler: + # 799: the `long long' type is not standard + # 803: turn off warnings about turning off invalid warnings + # 835: __vfork() (this is an SGI config problem) + #CFLAGS="$CFLAGS -woff 799,803,835" - # Always turn off these loader warnings: - # (notice the peculiar syntax) - # 47: branch instructions that degrade performance on R4000 - # 84: a library is not used - # 85: duplicate definition preemption (from -lnsl) - # 134: duplicate weak definition preemption (from -lnsl) - CFLAGS="$CFLAGS -Wl,-woff,47,-woff,84,-woff,85,-woff,134" - fi + # Always turn off these loader warnings: + # (notice the peculiar syntax) + # 47: branch instructions that degrade performance on R4000 + # 84: a library is not used + # 85: duplicate definition preemption (from -lnsl) + # 134: duplicate weak definition preemption (from -lnsl) + CFLAGS="$CFLAGS -Wl,-woff,47,-woff,84,-woff,85,-woff,134" + fi - # Extra debugging flags - DEBUG_CFLAGS="-g -fullwarn" - DEBUG_CPPFLAGS= + # Extra debugging flags + DEBUG_CFLAGS="-g -fullwarn" + DEBUG_CPPFLAGS= - # Extra production flags - PROD_CFLAGS="-O -OPT:Olimit=0 -s" - PROD_CPPFLAGS= + # Extra production flags + PROD_CFLAGS="-O -OPT:Olimit=0 -s" + PROD_CPPFLAGS= - # Extra profiling flags - PROFILE_CFLAGS= - PROFILE_CPPFLAGS= - ;; + # Extra profiling flags + PROFILE_CFLAGS= + PROFILE_CPPFLAGS= + ;; esac diff --git a/config/powerpc-ibm-aix5.x b/config/powerpc-ibm-aix5.x index e9b9446..485ef6c 100644 --- a/config/powerpc-ibm-aix5.x +++ b/config/powerpc-ibm-aix5.x @@ -5,6 +5,7 @@ # the various compile modes. # Use AIX supplied C compiler by default, xlc for serial, mpcc_r for parallel. +# Use -D_LARGE_FILES by default to support large file size. if test "X-" = "X-$CC"; then if test "X-$enable_parallel" = "X-yes"; then CC=mpcc_r @@ -17,7 +18,7 @@ fi # Define RUNPARALLEL if parallel mode is enabled or a parallel compiler used. if test "X-$enable_parallel" = "X-yes" -o X-$CC_BASENAME = X-mpcc_r; then - RUNPARALLEL=${RUNPARALLEL="MP_PROCS=\$\${NPROCS:=3} MP_TASKS_PER_NODE=\$\${NPROCS:=3} poe"} + RUNPARALLEL=${RUNPARALLEL="MP_PROCS=\$\${NPROCS:=3} MP_TASKS_PER_NODE=\$\${NPROCS:=3} poe"} fi @@ -27,33 +28,33 @@ fi # `--enable-debug' switch of configure. case $CC_BASENAME in - xlc|mpcc_r) - # Turn off shared lib option. It causes some test suite to fail. - enable_shared="${enable_shared:-no}" - # Use -D_LARGE_FILES by default to support large file size. - CFLAGS="-qlanglvl=ansi -D_LARGE_FILES $CFLAGS" - DEBUG_CFLAGS="-g" - DEBUG_CPPFLAGS= - # -O causes test/dtypes to fail badly. Turn it off for now. - PROD_CFLAGS="" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + xlc|mpcc_r) + # Turn off shared lib option. It causes some test suite to fail. + enable_shared="${enable_shared:-no}" + # Use -D_LARGE_FILES by default to support large file size. + CFLAGS="-qlanglvl=ansi -D_LARGE_FILES -DSTDC $CFLAGS" + DEBUG_CFLAGS="-g -qfullpath" + DEBUG_CPPFLAGS= + # -O causes test/dtypes to fail badly. Turn it off for now. + PROD_CFLAGS="" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-g -qfullpath -pg" + PROFILE_CPPFLAGS= + ;; - gcc) - . $srcdir/config/gnu-flags - ;; + gcc) + . $srcdir/config/gnu-flags + ;; - *) - CFLAGS="$CFLAGS -ansi" - DEBUG_CFLAGS="-g" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + *) + CFLAGS="$CFLAGS -ansi" + DEBUG_CFLAGS="-g" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; esac #---------------------------------------------------------------------------- diff --git a/config/solaris2.x b/config/solaris2.x index 5c904f6..775becb 100644 --- a/config/solaris2.x +++ b/config/solaris2.x @@ -8,8 +8,8 @@ # The default compiler is `sunpro cc' if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc + CC=cc + CC_BASENAME=cc fi # Try gcc compiler flags @@ -17,18 +17,19 @@ fi # Try solaris native compiler flags if test "X-" = "X-$cc_flags_set"; then - CFLAGS="$CFLAGS -erroff=%none -DBSD_COMP" - DEBUG_CFLAGS="-g -xildoff" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O -s" - PROD_CPPFLAGS= - PROFILE_CFLAGS=-xpg - PROFILE_CPPFLAGS= - cc_flags_set=yes - # Turn off optimization flag for SUNpro compiler versions 4.x which - # have an optimization bug. Version 5.0 works. - ($CC -V 2>&1) | grep -s 'cc: .* C 4\.' >/dev/null 2>&1 \ - && PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O//'`" + CFLAGS="$CFLAGS -erroff=%none -DBSD_COMP" + DEBUG_CFLAGS="-g -xildoff" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O -s" + PROD_CPPFLAGS= + PROFILE_CFLAGS=-xpg + PROFILE_CPPFLAGS= + cc_flags_set=yes + + # Turn off optimization flag for SUNpro compiler versions 4.x which + # have an optimization bug. Version 5.0 works. + ($CC -V 2>&1) | grep -s 'cc: .* C 4\.' >/dev/null 2>&1 \ + && PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O//'`" fi # Add socket lib for the Stream Virtual File Driver diff --git a/config/sv1-cray b/config/sv1-cray index 3eb53ef..168e78a 100644 --- a/config/sv1-cray +++ b/config/sv1-cray @@ -28,8 +28,8 @@ # used within this file. if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc + CC=cc + CC_BASENAME=cc fi # no need to use RANLIB RANLIB=: @@ -88,39 +88,38 @@ RANLIB=: # above). case $CC_BASENAME in - gcc) - CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O3 -fomit-frame-pointer" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; - - cc) - CFLAGS="$CFLAGS" - DEBUG_CFLAGS="-g -h zero" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O2 -h scalar0 -h vector0 -h task1" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; - - *) - CFLAGS="$CFLAGS -ansi" - DEBUG_CFLAGS="-g" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + gcc) + CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O3 -fomit-frame-pointer" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; + + cc) + CFLAGS="$CFLAGS" + DEBUG_CFLAGS="-g -h zero" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O2 -h scalar0 -h vector0 -h task1" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; + + *) + CFLAGS="$CFLAGS -ansi" + DEBUG_CFLAGS="-g" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; esac - # Overriding Configure Tests # -------------------------- # diff --git a/config/unicos b/config/unicos index 43c1bd9..cc0f478 100644 --- a/config/unicos +++ b/config/unicos @@ -28,13 +28,12 @@ # used within this file. if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc + CC=cc + CC_BASENAME=cc fi # no need to use RANLIB RANLIB=: - # C Compiler and Preprocessor Flags # --------------------------------- # @@ -88,39 +87,37 @@ RANLIB=: # above). case $CC_BASENAME in - gcc) - CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS="-DH5F_OPT_SEEK=0 -DH5F_LOW_DFLT=H5F_LOW_SEC2" - PROD_CFLAGS="-O3 -fomit-frame-pointer" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + gcc) + CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS="-DH5F_OPT_SEEK=0 -DH5F_LOW_DFLT=H5F_LOW_SEC2" + PROD_CFLAGS="-O3 -fomit-frame-pointer" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; - cc) - CFLAGS="$CFLAGS" - DEBUG_CFLAGS="-g -h zero -h scalar0" - DEBUG_CPPFLAGS="-DH5F_OPT_SEEK=0 -DH5F_LOW_DFLT=H5F_LOW_SEC2" + cc) + CFLAGS="$CFLAGS" + DEBUG_CFLAGS="-g -h zero -h scalar0" + DEBUG_CPPFLAGS="-DH5F_OPT_SEEK=0 -DH5F_LOW_DFLT=H5F_LOW_SEC2" PROD_CFLAGS="-O2 -h scalar0" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; - *) - CFLAGS="$CFLAGS -ansi" - DEBUG_CFLAGS="-g" - DEBUG_CPPFLAGS="-DH5F_OPT_SEEK=0 -DH5F_LOW_DFLT=H5F_LOW_SEC2" - PROD_CFLAGS="-O" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + *) + CFLAGS="$CFLAGS -ansi" + DEBUG_CFLAGS="-g" + DEBUG_CPPFLAGS="-DH5F_OPT_SEEK=0 -DH5F_LOW_DFLT=H5F_LOW_SEC2" + PROD_CFLAGS="-O" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; esac - - # Overriding Configure Tests # -------------------------- # diff --git a/config/unicos10.0.X b/config/unicos10.0.X index 2a7a944..b9aa87d 100644 --- a/config/unicos10.0.X +++ b/config/unicos10.0.X @@ -28,8 +28,8 @@ # used within this file. if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc + CC=cc + CC_BASENAME=cc fi # no need to use RANLIB RANLIB=: @@ -88,35 +88,35 @@ RANLIB=: # above). case $CC_BASENAME in - gcc) - CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS="-DH5F_OPT_SEEK=0 -DH5F_LOW_DFLT=H5F_LOW_SEC2" - PROD_CFLAGS="-O3 -fomit-frame-pointer" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; - - cc) - CFLAGS="$CFLAGS" - DEBUG_CFLAGS="-g -h zero -h scalar0" - DEBUG_CPPFLAGS="-DH5F_OPT_SEEK=0 -DH5F_LOW_DFLT=H5F_LOW_SEC2" + gcc) + CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS="-DH5F_OPT_SEEK=0 -DH5F_LOW_DFLT=H5F_LOW_SEC2" + PROD_CFLAGS="-O3 -fomit-frame-pointer" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; + + cc) + CFLAGS="$CFLAGS" + DEBUG_CFLAGS="-g -h zero -h scalar0" + DEBUG_CPPFLAGS="-DH5F_OPT_SEEK=0 -DH5F_LOW_DFLT=H5F_LOW_SEC2" PROD_CFLAGS="-O2 -h scalar0" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; - - *) - CFLAGS="$CFLAGS -ansi" - DEBUG_CFLAGS="-g" - DEBUG_CPPFLAGS="-DH5F_OPT_SEEK=0 -DH5F_LOW_DFLT=H5F_LOW_SEC2" - PROD_CFLAGS="-O" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; + + *) + CFLAGS="$CFLAGS -ansi" + DEBUG_CFLAGS="-g" + DEBUG_CPPFLAGS="-DH5F_OPT_SEEK=0 -DH5F_LOW_DFLT=H5F_LOW_SEC2" + PROD_CFLAGS="-O" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; esac diff --git a/config/unicosmk b/config/unicosmk index 66f7c4c..57c04fb 100644 --- a/config/unicosmk +++ b/config/unicosmk @@ -28,8 +28,8 @@ # used within this file. if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc + CC=cc + CC_BASENAME=cc fi # no need to use RANLIB RANLIB=: @@ -88,35 +88,35 @@ RANLIB=: # above). case $CC_BASENAME in - gcc) - CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O3 -fomit-frame-pointer" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + gcc) + CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O3 -fomit-frame-pointer" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; - cc) - CFLAGS="$CFLAGS" - DEBUG_CFLAGS="-g -h zero" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O2 -h scalar0" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + cc) + CFLAGS="$CFLAGS" + DEBUG_CFLAGS="-g -h zero" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O2 -h scalar0" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; - *) - CFLAGS="$CFLAGS -ansi" - DEBUG_CFLAGS="-g" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + *) + CFLAGS="$CFLAGS -ansi" + DEBUG_CFLAGS="-g" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; esac diff --git a/config/unicosmk2.0.5.X b/config/unicosmk2.0.5.X index 66f7c4c..57c04fb 100644 --- a/config/unicosmk2.0.5.X +++ b/config/unicosmk2.0.5.X @@ -28,8 +28,8 @@ # used within this file. if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc + CC=cc + CC_BASENAME=cc fi # no need to use RANLIB RANLIB=: @@ -88,35 +88,35 @@ RANLIB=: # above). case $CC_BASENAME in - gcc) - CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O3 -fomit-frame-pointer" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + gcc) + CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O3 -fomit-frame-pointer" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; - cc) - CFLAGS="$CFLAGS" - DEBUG_CFLAGS="-g -h zero" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O2 -h scalar0" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + cc) + CFLAGS="$CFLAGS" + DEBUG_CFLAGS="-g -h zero" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O2 -h scalar0" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; - *) - CFLAGS="$CFLAGS -ansi" - DEBUG_CFLAGS="-g" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + *) + CFLAGS="$CFLAGS -ansi" + DEBUG_CFLAGS="-g" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; esac diff --git a/config/unicosmk2.0.6.X b/config/unicosmk2.0.6.X index 171c95b..638c740 100644 --- a/config/unicosmk2.0.6.X +++ b/config/unicosmk2.0.6.X @@ -28,8 +28,8 @@ # used within this file. if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc + CC=cc + CC_BASENAME=cc fi # no need to use RANLIB RANLIB=: @@ -88,35 +88,35 @@ RANLIB=: # above). case $CC_BASENAME in - gcc) - CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O3 -fomit-frame-pointer" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; - - cc) - CFLAGS="$CFLAGS" - DEBUG_CFLAGS="-g -h zero" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O2 -h scalar0" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; - - *) - CFLAGS="$CFLAGS -ansi" - DEBUG_CFLAGS="-g" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + gcc) + CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O3 -fomit-frame-pointer" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; + + cc) + CFLAGS="$CFLAGS" + DEBUG_CFLAGS="-g -h zero" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O2 -h scalar0" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; + + *) + CFLAGS="$CFLAGS -ansi" + DEBUG_CFLAGS="-g" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; esac diff --git a/config/unicosmk2.0.X b/config/unicosmk2.0.X index 66f7c4c..319390d 100644 --- a/config/unicosmk2.0.X +++ b/config/unicosmk2.0.X @@ -28,8 +28,8 @@ # used within this file. if test "X-" = "X-$CC"; then - CC=cc - CC_BASENAME=cc + CC=cc + CC_BASENAME=cc fi # no need to use RANLIB RANLIB=: @@ -88,35 +88,35 @@ RANLIB=: # above). case $CC_BASENAME in - gcc) - CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions - DEBUG_CFLAGS="-g -fverbose-asm" - DEBUG_CPPFLAGS= + gcc) + CFLAGS="$CFLAGS -Wsign-compare" #Only works for some versions + DEBUG_CFLAGS="-g -fverbose-asm" + DEBUG_CPPFLAGS= PROD_CFLAGS="-O3 -fomit-frame-pointer" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; - cc) - CFLAGS="$CFLAGS" - DEBUG_CFLAGS="-g -h zero" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O2 -h scalar0" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + cc) + CFLAGS="$CFLAGS" + DEBUG_CFLAGS="-g -h zero" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O2 -h scalar0" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; - *) - CFLAGS="$CFLAGS -ansi" - DEBUG_CFLAGS="-g" - DEBUG_CPPFLAGS= - PROD_CFLAGS="-O" - PROD_CPPFLAGS= - PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= - ;; + *) + CFLAGS="$CFLAGS -ansi" + DEBUG_CFLAGS="-g" + DEBUG_CPPFLAGS= + PROD_CFLAGS="-O" + PROD_CPPFLAGS= + PROFILE_CFLAGS="-pg" + PROFILE_CPPFLAGS= + ;; esac diff --git a/configure b/configure index ced3dd1..cb9f025 100755 --- a/configure +++ b/configure @@ -1513,6 +1513,8 @@ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + DEFAULT_LIBS="" + echo "$as_me:$LINENO: checking shell variables initial values" >&5 @@ -4155,7 +4157,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4158 "configure"' > conftest.$ac_ext + echo '#line 4160 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4696,7 +4698,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -6503,7 +6505,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <>confdefs.h <<\_ACEOF -#define SZIP_CAN_ENCODE 1 -_ACEOF - echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - USE_FILTER_SZIP_ENCODER="yes" else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 @@ -24189,6 +24184,11 @@ echo "${ECHO_T}no" >&6 EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," fi EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip" + if test ${hdf5_cv_szlib_can_encode} = "yes"; then + EXTERNAL_FILTERS="${EXTERNAL_FILTERS}(encoder)" + else + EXTERNAL_FILTERS="${EXTERNAL_FILTERS}(no encoder)" + fi fi PABLO="" @@ -25253,7 +25253,6 @@ else fi ;; - no) echo "$as_me:$LINENO: checking for GASS" >&5 echo $ECHO_N "checking for GASS... $ECHO_C" >&6 @@ -25261,7 +25260,6 @@ echo $ECHO_N "checking for GASS... $ECHO_C" >&6 echo "${ECHO_T}suppressed" >&6 unset GASS TESTGASS ;; - *) case "$withval" in *,*) @@ -30263,7 +30261,7 @@ else LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`" export LD_LIBRARY_PATH -for hdf5_cv_printf_ll in l L ll q unknown; do +for hdf5_cv_printf_ll in l ll L q unknown; do if test "$cross_compiling" = yes; then continue else @@ -30651,6 +30649,7 @@ if test "X-$TRACE" = X- ; then TRACE=yes fi fi + case "X-$TRACE" in X-yes) echo "$as_me:$LINENO: result: yes" >&5 @@ -31078,10 +31077,8 @@ echo "$as_me: error: \'$enable_parallel\' is not a valid parallel search type" > esac if test -n "$PARALLEL"; then - TESTPARALLEL=testpar -fi + TESTPARALLEL=testpar -if test -n "$PARALLEL"; then cat >>confdefs.h <<\_ACEOF #define HAVE_PARALLEL 1 @@ -32098,11 +32095,13 @@ if (grep '^build_libtool_libs=yes' libtool >/dev/null); then else enable_shared=no fi + if (grep '^build_old_libs=yes' libtool >/dev/null); then enable_static=yes else enable_static=no fi + if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then STATIC_SHARED="static, shared" elif test "X$enable_static" = "Xyes"; then @@ -32171,8 +32170,6 @@ if test -n "$CPPFLAGS"; then fi - - HL="" echo "$as_me:$LINENO: checking if high level library is enabled" >&5 echo $ECHO_N "checking if high level library is enabled... $ECHO_C" >&6 @@ -32191,7 +32188,6 @@ else echo "no" fi - COMMENCE=config/commence CONCLUDE=config/conclude @@ -32866,6 +32862,7 @@ s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@DEFAULT_LIBS@,$DEFAULT_LIBS,;t t s,@HSIZET@,$HSIZET,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t @@ -32894,7 +32891,6 @@ s,@LIBTOOL@,$LIBTOOL,;t t s,@DEPEND@,,;t t s,@USE_FILTER_DEFLATE@,$USE_FILTER_DEFLATE,;t t s,@USE_FILTER_SZIP@,$USE_FILTER_SZIP,;t t -s,@USE_FILTER_SZIP_ENCODER@,$USE_FILTER_SZIP_ENCODER,;t t s,@PABLO@,$PABLO,;t t s,@HAVE_PABLO@,$HAVE_PABLO,;t t s,@SSL@,$SSL,;t t @@ -33772,4 +33768,3 @@ IF_ENABLED_DISABLED "$THREADSAFE" PRINT_N " High Level library" IF_ENABLED_DISABLED "$HDF5_HL" - diff --git a/configure.in b/configure.in index 167327f..a7f21af 100644 --- a/configure.in +++ b/configure.in @@ -47,6 +47,12 @@ AC_OUTPUT_COMMANDS([ AC_CANONICAL_HOST AC_SUBST([CPPFLAGS]) +dnl Different compilers may need default libraries. They are specified in +dnl the config/* files, so we put this statement here so that it'll be +dnl set by the code which follows... +dnl +AC_SUBST(DEFAULT_LIBS) DEFAULT_LIBS="" + dnl ---------------------------------------------------------------------- dnl Set prefix default (install directory) to a directory in the build area. dnl This allows multiple src-dir builds within one host. @@ -894,7 +900,6 @@ dnl command-line switch. The value is an include path and/or a library path. dnl If the library path is specified then it must be preceded by a comma. dnl AC_SUBST(USE_FILTER_SZIP) USE_FILTER_SZIP="no" -AC_SUBST(USE_FILTER_SZIP_ENCODER) USE_FILTER_SZIP_ENCODER="no" AC_ARG_WITH([szlib], [AC_HELP_STRING([--with-szlib=DIR], [Use szlib library for external szlib I/O @@ -987,10 +992,7 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then ], [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)]) if test ${hdf5_cv_szlib_can_encode} = "yes"; then - AC_DEFINE([SZIP_CAN_ENCODE], [1], - [Define if szip encoder is present]) AC_MSG_RESULT([yes]) - USE_FILTER_SZIP_ENCODER="yes" else AC_MSG_RESULT([no]) fi @@ -1000,6 +1002,11 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then EXTERNAL_FILTERS="${EXTERNAL_FILTERS}," fi EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip" + if test ${hdf5_cv_szlib_can_encode} = "yes"; then + EXTERNAL_FILTERS="${EXTERNAL_FILTERS}(encoder)" + else + EXTERNAL_FILTERS="${EXTERNAL_FILTERS}(no encoder)" + fi fi dnl ---------------------------------------------------------------------- @@ -1140,13 +1147,11 @@ case "$withval" in AC_CHECK_LIB(globus_gass_transfer,main,,unset GASS TESTGASS) AC_CHECK_LIB(globus_gass_file,globus_gass_open,,unset GASS TESTGASS) ;; - no) AC_MSG_CHECKING([for GASS]) AC_MSG_RESULT([suppressed]) unset GASS TESTGASS ;; - *) case "$withval" in *,*) @@ -1613,7 +1618,7 @@ AC_CACHE_VAL([hdf5_cv_printf_ll], LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`" export LD_LIBRARY_PATH -for hdf5_cv_printf_ll in l L ll q unknown; do +for hdf5_cv_printf_ll in l ll L q unknown; do AC_TRY_RUN([ #include #include @@ -1785,6 +1790,7 @@ if test "X-$TRACE" = X- ; then TRACE=yes fi fi + case "X-$TRACE" in X-yes) AC_MSG_RESULT([yes]) @@ -2012,16 +2018,12 @@ case "X-$enable_parallel" in esac dnl ---------------------------------------------------------------------- -dnl Should the 'testpar' directory participate in the build? +dnl Print some other parallel information and do some sanity checks. dnl if test -n "$PARALLEL"; then + dnl The 'testpar' directory should participate in the build TESTPARALLEL=testpar -fi -dnl ---------------------------------------------------------------------- -dnl Print some other parallel information and do some sanity checks. -dnl -if test -n "$PARALLEL"; then dnl We are building a parallel library AC_DEFINE([HAVE_PARALLEL], [1], [Define if we have parallel support]) @@ -2267,11 +2269,13 @@ if (grep '^build_libtool_libs=yes' libtool >/dev/null); then else enable_shared=no fi + if (grep '^build_old_libs=yes' libtool >/dev/null); then enable_static=yes else enable_static=no fi + if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then STATIC_SHARED="static, shared" elif test "X$enable_static" = "Xyes"; then @@ -2357,12 +2361,10 @@ if test -n "$CPPFLAGS"; then CPPFLAGS=$TEMP_CPPFLAGS fi - dnl ---------------------------------------------------------------------- dnl Check if they would like the High Level library compiled dnl - AC_SUBST(HL) HL="" AC_MSG_CHECKING([if high level library is enabled]) AC_ARG_ENABLE([hl], @@ -2377,7 +2379,6 @@ if test "X$HDF5_HL" = "Xyes"; then else echo "no" fi - dnl ---------------------------------------------------------------------- dnl Build the Makefiles. Almost every Makefile.in will begin with the line @@ -2685,4 +2686,3 @@ IF_ENABLED_DISABLED "$THREADSAFE" PRINT_N " High Level library" IF_ENABLED_DISABLED "$HDF5_HL" - diff --git a/doc/html/Copyright.html b/doc/html/Copyright.html index f5ce1aa..cf187b1 100644 --- a/doc/html/Copyright.html +++ b/doc/html/Copyright.html @@ -16,27 +16,27 @@
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
- -

- + + NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the Board of Trustees of the University of Illinois
All rights reserved. -

+ Contributors: National Center for Supercomputing Applications (NCSA) at the University of Illinois at Urbana-Champaign (UIUC), Lawrence Livermore National Laboratory (LLNL), Sandia National Laboratories (SNL), Los Alamos National Laboratory (LANL), Jean-loup Gailly and Mark Adler (gzip library). -

+ Redistribution and use in source and binary forms, with or without modification, are permitted for any purpose (including commercial purposes) provided that the following conditions are met: +

  1. Redistributions of source code must retain the above copyright notice, @@ -65,10 +65,12 @@ WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. In no event shall the University or the Contributors be liable for any damages suffered by the users arising out of the use of this software, even if advised of the possibility of such damage. +
+
Portions of HDF5 were developed with support from the University of California, Lawrence Livermore National Laboratory (UC LLNL). @@ -82,8 +84,7 @@ documentation, and/or accompanying materials: W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy (DOE) and The Regents of the University of California (University) for the operation of UC LLNL. - -

+

DISCLAIMER: This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States @@ -101,7 +102,8 @@ documentation, and/or accompanying materials: United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. - + +


HDF Help Desk @@ -113,6 +115,7 @@ document.writeln("Last modified: 23 January 2004"); --> + diff --git a/doc/html/Datasets.html b/doc/html/Datasets.html index ccea555..eca195d 100644 --- a/doc/html/Datasets.html +++ b/doc/html/Datasets.html @@ -314,7 +314,7 @@ H5Pset_chunk (plist, 2, size); external data then zero is returned.

-
herr_t H5Pget_external (hid_t plist, int +
herr_t H5Pget_external (hid_t plist, unsigned idx, size_t name_size, char *name, off_t *offset, hsize_t *size)
This is the counterpart for the H5Pset_external() @@ -800,7 +800,7 @@ H5Pset_external (plist, "scan3.data", 0, 16);

  1 hid_t file, mem_space, file_space, dataset;
  2 double dd[200][400];
- 3 hssize_t offset[2];
+ 3 hsize_t offset[2];
  4 hsize size[2];
  5 
  6 /*
diff --git a/doc/html/Dataspaces.html b/doc/html/Dataspaces.html
index b19e0c3..c83d285 100644
--- a/doc/html/Dataspaces.html
+++ b/doc/html/Dataspaces.html
@@ -438,7 +438,7 @@ portions of a dataspace may be added in the future.
 
herr_t H5Sselect_hyperslab (hid_t space, h5s_seloper_t op, - const hssize_t * start, const hsize_t * stride, + const hsize_t * start, const hsize_t * stride, const hsize_t * count, const hsize_t * block)
@@ -488,7 +488,7 @@ I/O is performed.
herr_t H5Sselect_elements (hid_t space, h5s_seloper_t op, - const size_t num_elements, const hssize_t *coord[])
+ const size_t num_elements, const hsize_t *coord[])
This function selects array elements to be included in the selection for the diff --git a/doc/html/Datatypes.html b/doc/html/Datatypes.html index f738d44..232d7fb 100644 --- a/doc/html/Datatypes.html +++ b/doc/html/Datatypes.html @@ -610,7 +610,7 @@ H5Tget_nmembers() returns -1 on failure.

-
char *H5Tget_member_name (hid_t type, int +
char *H5Tget_member_name (hid_t type, unsigned membno)
Each member has a name which is unique among its siblings in a compound datatype. This function returns a pointer to a @@ -620,7 +620,7 @@ function.

-
size_t H5Tget_member_offset (hid_t type, int +
size_t H5Tget_member_offset (hid_t type, unsigned membno)
The byte offset of member number membno with respect to the beginning of the containing compound datum is @@ -631,7 +631,7 @@ membno arguments.

-
hid_t H5Tget_member_type (hid_t type, int +
hid_t H5Tget_member_type (hid_t type, unsigned membno)
Each member has its own datatype, a copy of which is returned by this function. The returned datatype identifier @@ -1297,7 +1297,7 @@ H5Tlock(hdf_fr_colors);
datatypes.

-
char *H5Tget_member_name(hid_t etype, int +
char *H5Tget_member_name(hid_t etype, unsigned membno)
Given an enumeration datatype etype this function returns the symbol name for the member indexed by @@ -1310,7 +1310,7 @@ H5Tlock(hdf_fr_colors); free().

-
herr_t H5Tget_member_value(hid_t etype, int +
herr_t H5Tget_member_value(hid_t etype, unsigned membno, void *value/*out*/)
Given an enumeration datatype etype this function returns the value associated with the member indexed by @@ -1325,12 +1325,13 @@ H5Tlock(hdf_fr_colors); when the type is not known by the C compiler.
-int i, n = H5Tget_nmembers(hdf_en_colors);
-for (i=0; i<n; i++) {
-    char *symbol = H5Tget_member_name(hdf_en_colors, i);
+int n = H5Tget_nmembers(hdf_en_colors);
+unsigned u;
+for (u=0; u<(unsigned)n; u++) {
+    char *symbol = H5Tget_member_name(hdf_en_colors, u);
     short val;
-    H5Tget_member_value(hdf_en_colors, i, &val);
-    printf("#%d %20s = %d\n", i, symbol, val);
+    H5Tget_member_value(hdf_en_colors, u, &val);
+    printf("#%u %20s = %d\n", u, symbol, val);
     free(symbol);
 }
@@ -1502,13 +1503,13 @@ int n = H5Tget_nmembers(foreign); hid_t itype = H5Tget_super(foreign); void *val = malloc(n * MAX(H5Tget_size(itype), sizeof(int))); char *name = malloc(n * sizeof(char*)); -int i; +unsigned u; /* Get foreign type information */ -for (i=0; i<n; i++) { - name[i] = H5Tget_member_name(foreign, i); - H5Tget_member_value(foreign, i, - (char*)val+i*H5Tget_size(foreign)); +for (u=0; u<(unsigned)n; u++) { + name[u] = H5Tget_member_name(foreign, u); + H5Tget_member_value(foreign, u, + (char*)val+u*H5Tget_size(foreign)); } /* Convert integer values to new type */ diff --git a/doc/html/DatatypesEnum.html b/doc/html/DatatypesEnum.html index 2926e7c..607030a 100644 --- a/doc/html/DatatypesEnum.html +++ b/doc/html/DatatypesEnum.html @@ -239,7 +239,7 @@ H5Tlock(hdf_fr_colors); types.

-
char *H5Tget_member_name(hid_t etype, int +
char *H5Tget_member_name(hid_t etype, unsigned membno)
Given an enumeration data type etype this function returns the symbol name for the member indexed by @@ -252,7 +252,7 @@ H5Tlock(hdf_fr_colors); free().

-
herr_t H5Tget_member_value(hid_t etype, int +
herr_t H5Tget_member_value(hid_t etype, unsigned membno, void *value/*out*/)
Given an enumeration data type etype this function returns the value associated with the member indexed by @@ -267,12 +267,13 @@ H5Tlock(hdf_fr_colors); when the type is not known by the C compiler.
-int i, n = H5Tget_nmembers(hdf_en_colors);
-for (i=0; i<n; i++) {
-    char *symbol = H5Tget_member_name(hdf_en_colors, i);
+int n = H5Tget_nmembers(hdf_en_colors);
+unsigned u;
+for (u=0; u<(unsigned)n; u++) {
+    char *symbol = H5Tget_member_name(hdf_en_colors, u);
     short val;
-    H5Tget_member_value(hdf_en_colors, i, &val);
-    printf("#%d %20s = %d\n", i, symbol, val);
+    H5Tget_member_value(hdf_en_colors, u, &val);
+    printf("#%u %20s = %d\n", u, symbol, val);
     free(symbol);
 }
@@ -445,13 +446,13 @@ int n = H5Tget_nmembers(foreign); hid_t itype = H5Tget_super(foreign); void *val = malloc(n * MAX(H5Tget_size(itype), sizeof(int))); char *name = malloc(n * sizeof(char*)); -int i; +unsigned u; /* Get foreign type information */ -for (i=0; i<n; i++) { - name[i] = H5Tget_member_name(foreign, i); - H5Tget_member_value(foreign, i, - (char*)val+i*H5Tget_size(foreign)); +for (u=0; u<(unsigned)n; u++) { + name[u] = H5Tget_member_name(foreign, u); + H5Tget_member_value(foreign, u, + (char*)val+u*H5Tget_size(foreign)); } /* Convert integer values to new type */ diff --git a/doc/html/H5.intro.html b/doc/html/H5.intro.html index d4689cd..b0cee5f 100644 --- a/doc/html/H5.intro.html +++ b/doc/html/H5.intro.html @@ -1387,7 +1387,7 @@ A hyperslab specifies a regular pattern of elements in a dataset. It is also po hsize_t dim2[] = {MSPACE2_DIM}; /* Dimension size of the second dataset (in memory) */ int values[] = {53, 59, 61, 67}; /* New values to be written */ -hssize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points +hsize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points from the file dataspace */ /* @@ -1404,7 +1404,7 @@ coord[2][0] = 3; coord[2][1] = 5; coord[3][0] = 5; coord[3][1] = 6; ret = H5Sselect_elements(fid, H5S_SELECT_SET, NPOINTS, - (const hssize_t **)coord); + (const hsize_t **)coord); /* * Write new selection of points to the dataset. diff --git a/doc/html/Intro/IntroExamples.html b/doc/html/Intro/IntroExamples.html index 9d1c833..dd4022a 100644 --- a/doc/html/Intro/IntroExamples.html +++ b/doc/html/Intro/IntroExamples.html @@ -246,9 +246,9 @@ main (void) int data_out[NX][NY][NZ ]; /* output buffer */ hsize_t count[2]; /* size of the hyperslab in the file */ - hssize_t offset[2]; /* hyperslab offset in the file */ + hsize_t offset[2]; /* hyperslab offset in the file */ hsize_t count_out[3]; /* size of the hyperslab in memory */ - hssize_t offset_out[3]; /* hyperslab offset in memory */ + hsize_t offset_out[3]; /* hyperslab offset in memory */ int i, j, k, status_n, rank; for (j = 0; j < NX; j++) { @@ -404,12 +404,12 @@ int main (void) hsize_t fdim[] = {FSPACE_DIM1, FSPACE_DIM2}; /* Dimension sizes of the dataset (on disk) */ - hssize_t start[2]; /* Start of hyperslab */ + hsize_t start[2]; /* Start of hyperslab */ hsize_t stride[2]; /* Stride of hyperslab */ hsize_t count[2]; /* Block count */ hsize_t block[2]; /* Block sizes */ - hssize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points + hsize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points from the file dataspace */ herr_t ret; uint i,j; @@ -504,7 +504,7 @@ int main (void) coord[3][0] = 5; coord[3][1] = 6; ret = H5Sselect_elements(fid, H5S_SELECT_SET, NPOINTS, - (const hssize_t **)coord); + (const hsize_t **)coord); /* * Write new selection of points to the dataset. @@ -779,7 +779,7 @@ main (void) hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; hsize_t chunk_dims[2] ={2, 5}; hsize_t size[2]; - hssize_t offset[2]; + hsize_t offset[2]; herr_t status; @@ -956,7 +956,7 @@ main (void) hsize_t chunk_dims[2]; hsize_t col_dims[1]; hsize_t count[2]; - hssize_t offset[2]; + hsize_t offset[2]; herr_t status, status_n; @@ -1117,7 +1117,7 @@ main (void) H5Fclose(file); return 0; -) +} @@ -1851,18 +1851,18 @@ and then written to the dataset in the file. int main(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dset1, /* Dataset ID */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dset1, /* Dataset ID */ dset2; /* Dereferenced dataset ID */ - hid_t sid1, /* Dataspace ID #1 */ + hid_t sid1, /* Dataspace ID #1 */ sid2; /* Dataspace ID #2 */ - hsize_t dims1[] = {SPACE1_DIM1}, + hsize_t dims1[] = {SPACE1_DIM1}, dims2[] = {SPACE2_DIM1, SPACE2_DIM2}; - hssize_t start[SPACE2_RANK]; /* Starting location of hyperslab */ - hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */ - hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */ - hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */ - hssize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; + hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */ + hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */ + 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 */ hdset_reg_ref_t *wbuf; /* buffer to write to disk */ int *dwbuf; /* Buffer for writing numeric data to disk */ @@ -1921,7 +1921,7 @@ main(void) coord1[7][0]=9; coord1[7][1]=0; coord1[8][0]=7; coord1[8][1]=1; coord1[9][0]=3; coord1[9][1]=3; - ret = H5Sselect_elements(sid2,H5S_SELECT_SET,POINT1_NPOINTS,(const hssize_t **)coord1); + ret = H5Sselect_elements(sid2,H5S_SELECT_SET,POINT1_NPOINTS,(const hsize_t **)coord1); /* Store second dataset region */ ret = H5Rcreate(&wbuf[1],fid1,"/Dataset2",H5R_DATASET_REGION,sid2); @@ -1988,8 +1988,8 @@ main(void) hid_t sid1, /* Dataspace ID #1 */ sid2; /* Dataspace ID #2 */ hsize_t * coords; /* Coordinate buffer */ - hssize_t low[SPACE2_RANK]; /* Selection bounds */ - hssize_t high[SPACE2_RANK]; /* Selection bounds */ + hsize_t low[SPACE2_RANK]; /* Selection bounds */ + hsize_t high[SPACE2_RANK]; /* Selection bounds */ hdset_reg_ref_t *rbuf; /* buffer to to read disk */ int *drbuf; /* Buffer for reading numeric data from disk */ int i, j; /* counting variables */ diff --git a/doc/html/RM_H5.html b/doc/html/RM_H5.html index 08eadf5..37fe74d 100644 --- a/doc/html/RM_H5.html +++ b/doc/html/RM_H5.html @@ -234,14 +234,17 @@ as the corresponding C function. the 1 is the release number, relnum. -->
Parameters: -
-
unsigned majnum -
IN: The major version of the library. -
unsigned minnum -
IN: The minor version of the library. -
unsigned relnum -
IN: The release number of the library. -
+
    + + + + + + + + + +
    unsigned majnumIN: The major version of the library.
    unsigned minnum    IN: The minor version of the library.
    unsigned relnumIN: The release number of the library.
Returns:
Returns a non-negative value if successful. Upon failure, this function causes the application to abort. @@ -423,14 +426,17 @@ END SUBROUTINE h5garbage_collect_f numbers of the version of the HDF library which is linked to the application.
Parameters: -
-
unsigned *majnum -
OUT: The major version of the library. -
unsigned *minnum -
OUT: The minor version of the library. -
unsigned *relnum -
OUT: The release number of the library. -
+
    + + + + + + + + + +
    unsigned *majnumOUT: The major version of the library.
    unsigned *minnum    OUT: The minor version of the library.
    unsigned *relnumOUT: The release number of the library.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -553,20 +559,26 @@ END SUBROUTINE h5open_f Using a value of -1 for a limit means that no limit is set for the specified type of free list.
Parameters: -
-
int reg_global_lim -
IN: The limit on all regular free list memory used -
int reg_list_lim -
IN: The limit on memory used in each regular free list -
int arr_global_lim -
IN: The limit on all array free list memory used -
int arr_list_lim -
IN: The limit on memory used in each array free list -
int blk_global_lim -
IN: The limit on all block free list memory used -
int blk_list_lim -
IN: The limit on memory used in each block free list -
+
    + + + + + + + + + + + + + + + + + + +
    int reg_global_lim    IN: The limit on all regular free list memory used
    int reg_list_limIN: The limit on memory used in each regular free list
    int arr_global_limIN: The limit on all array free list memory used
    int arr_list_limIN: The limit on memory used in each array free list
    int blk_global_limIN: The limit on all block free list memory used
    int blk_list_limIN: The limit on memory used in each block free list
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. diff --git a/doc/html/RM_H5A.html b/doc/html/RM_H5A.html index 82a3e61..334219a 100644 --- a/doc/html/RM_H5A.html +++ b/doc/html/RM_H5A.html @@ -208,10 +208,11 @@ See Attributes in the Further use of a released attribute identifier is illegal; a function using such an identifier will fail.
Parameters: -
-
hid_t attr_id -
IN: Attribute to release access to. -
+
    + + + +
    hid_t attr_idIN: Attribute to release access to.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -240,11 +241,11 @@ END SUBROUTINE h5aclose_f
Name: H5Acreate
Signature: -
hid_t H5Acreate(hid_t loc_id, +
hid_t H5Acreate(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, - hid_t create_plist + hid_t create_plist )
Purpose:
Creates a dataset as an attribute of another group, dataset, @@ -275,19 +276,24 @@ END SUBROUTINE h5aclose_f The attribute identifier returned from this function must be released with H5Aclose or resource leaks will develop.
Parameters: -
-
hid_t loc_id
-
IN: Object (dataset, group, or named datatype) to be attached to.
-
const char *name
-
IN: Name of attribute to create.
-
hid_t type_id
-
IN: Identifier of datatype for attribute.
-
hid_t space_id
-
IN: Identifier of dataspace for attribute.
-
hid_t create_plist
-
IN: Identifier of creation property list. (Currently unused; - the only accepted value is H5P_DEFAULT.)
-
+
    + + + + + + + + + + + + + + + +
    hid_t loc_idIN: Object (dataset, group, or named datatype) to be attached to.
    const char *nameIN: Name of attribute to create.
    hid_t type_idIN: Identifier of datatype for attribute.
    hid_t space_idIN: Identifier of dataspace for attribute.
    hid_t create_plist    IN: Identifier of creation property list. (Currently unused; + the only accepted value is H5P_DEFAULT.)
Returns:
Returns an attribute identifier if successful; otherwise returns a negative value. @@ -338,13 +344,15 @@ END SUBROUTINE h5acreate_f of the attributes to change and future writes to the open attributes to produce incorrect results.
Parameters: -
-
hid_t loc_id -
IN: Identifier of the dataset, group, or named datatype - to have the attribute deleted from. -
const char *name -
IN: Name of the attribute to delete. -
+
    + + + + + + +
    hid_t loc_idIN: Identifier of the dataset, group, or named datatype + to have the attribute deleted from.
    const char *name    IN: Name of the attribute to delete.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -389,14 +397,17 @@ END SUBROUTINE h5adelete_f (buf_size -1), the string terminator is stored in the last position of the buffer to properly terminate the string.
Parameters: -
-
hid_t attr_id -
IN: Identifier of the attribute. -
size_t buf_size -
IN: The size of the buffer to store the name in. -
char *buf -
IN: Buffer to store name in. -
+
    + + + + + + + + + +
    hid_t attr_idIN: Identifier of the attribute.
    size_t buf_size    IN: The size of the buffer to store the name in.
    char *bufIN: Buffer to store name in.
Returns:
Returns the length of the attribute's name, which may be longer than buf_size, if successful. @@ -437,10 +448,11 @@ END SUBROUTINE h5aget_name_f loc_id. The object can be a group, dataset, or named datatype.
Parameters: -
-
hid_t loc_id -
IN: Identifier of a group, dataset, or named datatype. -
+
    + + + +
    hid_t loc_id    IN: Identifier of a group, dataset, or named datatype.
Returns:
Returns the number of attributes if successful; otherwise returns a negative value. @@ -479,10 +491,11 @@ END SUBROUTINE h5aget_num_attrs_f this function must be released with H5Sclose or resource leaks will develop.
Parameters: -
-
hid_t attr_id -
IN: Identifier of an attribute. -
+
    + + + +
    hid_t attr_id    IN: Identifier of an attribute.
Returns:
Returns attribute dataspace identifier if successful; otherwise returns a negative value. @@ -527,10 +540,11 @@ END SUBROUTINE h5aget_space_f The datatype identifier returned from this function must be released with H5Tclose or resource leaks will develop.
Parameters: -
-
hid_t attr_id -
IN: Identifier of an attribute. -
+
    + + + +
    hid_t attr_id    IN: Identifier of an attribute.
Returns:
Returns a datatype identifier if successful; otherwise returns a negative value. @@ -603,16 +617,20 @@ END SUBROUTINE h5aget_type_f attribute.
Parameters: -
-
hid_t loc_id -
IN: Identifier of a group, dataset or named datatype. -
unsigned * idx -
IN/OUT: Starting (IN) and ending (OUT) attribute index. -
H5A_operator_t op -
IN: User's function to pass each attribute to -
void *op_data -
IN/OUT: User's data to pass through to iterator operator function -
+
    + + + + + + + + + + + + +
    hid_t loc_idIN: Identifier of a group, dataset or named datatype.
    unsigned * idxIN/OUT: Starting (IN) and ending (OUT) attribute index.
    H5A_operator_t op    IN: User's function to pass each attribute to
    void *op_dataIN/OUT: User's data to pass through to iterator operator function
Returns:
If successful, returns the return value of the last operator if it was non-zero, or zero if all attributes were processed. @@ -655,13 +673,15 @@ SUBROUTINE The attribute identifier returned from this function must be released with H5Aclose or resource leaks will develop.
Parameters: -
-
hid_t loc_id -
IN: Identifier of the group, dataset, or named datatype - attribute to be attached to. -
unsigned int idx -
IN: Index of the attribute to open. -
+
    + + + + + + +
    hid_t loc_idIN: Identifier of the group, dataset, or named datatype + attribute to be attached to.
    unsigned int idx    IN: Index of the attribute to open.
Returns:
Returns attribute identifier if successful; otherwise returns a negative value. @@ -707,13 +727,15 @@ END SUBROUTINE h5aopen_idx_f be released with H5Aclose or resource leaks will develop.
Parameters: -
-
hid_t loc_id -
IN: Identifier of a group, dataset, or named datatype - atttribute to be attached to. -
const char *name -
IN: Attribute name. -
+
    + + + + + + +
    hid_t loc_idIN: Identifier of a group, dataset, or named datatype + atttribute to be attached to.
    const char *name    IN: Attribute name.
Returns:
Returns attribute identifier if successful; otherwise returns a negative value. @@ -764,14 +786,17 @@ END SUBROUTINE h5aopen_name_f data conversion, including the range of conversions currently supported by the HDF5 libraries.
Parameters: -
-
hid_t attr_id -
IN: Identifier of an attribute to read. -
hid_t mem_type_id -
IN: Identifier of the attribute datatype (in memory). -
void *buf -
OUT: Buffer for data to be read. -
+
    + + + + + + + + + +
    hid_t attr_idIN: Identifier of an attribute to read.
    hid_t mem_type_id    IN: Identifier of the attribute datatype (in memory).
    void *bufOUT: Buffer for data to be read.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -831,14 +856,17 @@ END SUBROUTINE h5aread_f data conversion, including the range of conversions currently supported by the HDF5 libraries.
Parameters: -
-
hid_t attr_id -
IN: Identifier of an attribute to write. -
hid_t mem_type_id -
IN: Identifier of the attribute datatype (in memory). -
const void *buf -
IN: Data to be written. -
+
    + + + + + + + + + +
    hid_t attr_idIN: Identifier of an attribute to write.
    hid_t mem_type_id    IN: Identifier of the attribute datatype (in memory).
    const void *bufIN: Data to be written.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. diff --git a/doc/html/RM_H5D.html b/doc/html/RM_H5D.html index c185245..3c72863 100644 --- a/doc/html/RM_H5D.html +++ b/doc/html/RM_H5D.html @@ -210,10 +210,11 @@ as the corresponding C function. Further use of the dataset identifier is illegal in calls to the dataset API.
Parameters: -
-
hid_t dataset_id -
IN: Identifier of the dataset to close access to. -
+
    + + + +
    hid_t dataset_id    IN: Identifier of the dataset to close access to.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -297,15 +298,15 @@ END SUBROUTINE h5dclose_f
  - H5Dfill
- H5Pset_fill_value
- H5Pget_fill_value
- H5Pfill_value_defined + H5Dfill
+ H5Pset_fill_value
+ H5Pget_fill_value
+ H5Pfill_value_defined
- H5Pset_fill_time
- H5Pget_fill_time
- H5Pset_alloc_time
- H5Pget_alloc_time + H5Pset_fill_time
+ H5Pget_fill_time
+ H5Pset_alloc_time
+ H5Pget_alloc_time
This information is also included in the @@ -336,21 +337,27 @@ END SUBROUTINE h5dclose_f Other known similar problems can occur with . . . -->
Parameters: -
-
hid_t loc_id -
IN: Identifier of the file or group - within which to create the dataset. -
const char * name -
IN: The name of the dataset to create. -
hid_t type_id -
IN: Identifier of the datatype to use - when creating the dataset. -
hid_t space_id -
IN: Identifier of the dataspace to use - when creating the dataset. -
hid_t create_plist_id -
IN: Identifier of the set creation property list. -
+
    + + + + + + + + + + + + + + + +
    hid_t loc_idIN: Identifier of the file or group + within which to create the dataset.
    const char * nameIN: The name of the dataset to create.
    hid_t type_idIN: Identifier of the datatype to use + when creating the dataset.
    hid_t space_idIN: Identifier of the dataspace to use + when creating the dataset.
    hid_t create_plist_id    IN: Identifier of the set creation property list.
+
Returns:
Returns a dataset identifier if successful; otherwise returns a negative value. @@ -412,12 +419,14 @@ END SUBROUTINE h5dcreate_f H5Pset_alloc_time.)
Parameters: -
-
hid_t dataset_id -
IN: Identifier of the dataset. -
const hsize_t * size -
IN: Array containing the new magnitude of each dimension. -
+
    + + + + + + +
    hid_t dataset_idIN: Identifier of the dataset.
    const hsize_t * size    IN: Array containing the new magnitude of each dimension.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -491,20 +500,25 @@ END SUBROUTINE h5dextend_f and H5Dcreate.
Parameters: -
-
const void *fill -
IN: Pointer to the fill value to be used. -
hid_t fill_type_id -
IN: Fill value datatype identifier. -
void *buf -
IN/OUT: Pointer to the memory buffer containing the - selection to be filled. -
hid_t buf_type_id -
IN: Datatype of dataspace elements to be filled. -
hid_t space_id -
IN: Dataspace describing memory buffer and - containing the selection to be filled. -
+
    + + + + + + + + + + + + + + + +
    const void *fillIN: Pointer to the fill value to be used.
    hid_t fill_type_id    IN: Fill value datatype identifier.
    void *bufIN/OUT: Pointer to the memory buffer containing the + selection to be filled.
    hid_t buf_type_idIN: Datatype of dataspace elements to be filled.
    hid_t space_idIN: Dataspace describing memory buffer and + containing the selection to be filled.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -550,10 +564,11 @@ END SUBROUTINE h5dfill_f The creation property list identifier should be released with the H5Pclose function.
Parameters: -
-
hid_t dataset_id -
IN: Identifier of the dataset to query. -
+
    + + + +
    hid_t dataset_id    IN: Identifier of the dataset to query.
Returns:
Returns a dataset creation property list identifier if successful; otherwise returns a negative value. @@ -594,10 +609,11 @@ END SUBROUTINE h5dget_create_plist_f That address is expressed as the offset in bytes from the beginning of the file.
Parameters: -
-
hid_t dset_id -
Dataset identifier. -
+
    + + + +
    hid_t dset_id    Dataset identifier.
Returns:
Returns the offset in bytes; otherwise returns HADDR_UNDEF, a negative value. @@ -633,10 +649,11 @@ SUBROUTINE The dataspace identifier should be released with the H5Sclose function.
Parameters: -
-
hid_t dataset_id -
IN: Identifier of the dataset to query. -
+
    + + + +
    hid_t dataset_id    IN: Identifier of the dataset to query.
Returns:
Returns a dataspace identifier if successful; otherwise returns a negative value. @@ -679,15 +696,15 @@ END SUBROUTINE h5dget_space_f
     - H5D_SPACE_STATUS_NOT_ALLOCATED + H5D_SPACE_STATUS_NOT_ALLOCATED Space has not been allocated for this dataset.
- H5D_SPACE_STATUS_ALLOCATED + H5D_SPACE_STATUS_ALLOCATED Space has been allocated for this dataset.
- H5D_SPACE_STATUS_PART_ALLOCATED   + H5D_SPACE_STATUS_PART_ALLOCATED   Space has been partially allocated for this dataset. (Used only for datasets with chunked storage.) @@ -695,12 +712,14 @@ END SUBROUTINE h5dget_space_f
Parameters: -
-
hid_t dset_id -
IN: Identifier of the dataset to query. -
H5D_space_status_t *status -
OUT: Space allocation status. -
+
    + + + + + + +
    hid_t dset_idIN: Identifier of the dataset to query.
    H5D_space_status_t *status    OUT: Space allocation status.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -745,10 +764,11 @@ END SUBROUTINE h5dget_space_status_f the chunk size. The return value may be zero if no data has been stored.
Parameters: -
-
hid_t dataset_id -
IN: Identifier of the dataset to query. -
+
    + + + +
    hid_t dataset_id    IN: Identifier of the dataset to query.
Returns:
Returns the amount of storage space allocated for the dataset, not counting meta data; @@ -794,10 +814,11 @@ END SUBROUTINE h5dget_storage_size_f Otherwise, the returned datatype is read-only. If atomization of the datatype fails, then the datatype is closed.
Parameters: -
-
hid_t dataset_id -
IN: Identifier of the dataset to query. -
+
    + + + +
    hid_t dataset_id    IN: Identifier of the dataset to query.
Returns:
Returns a datatype identifier if successful; otherwise returns a negative value. @@ -848,23 +869,28 @@ END SUBROUTINE h5dget_type_f the iteration may then be re-started by the user where it left off.
Parameters: -
-
void *buf -
IN/OUT: Pointer to the buffer in memory containing the - elements to iterate over. -
hid_t type_id -
IN: Datatype identifier for the elements stored in - buf. -
hid_t space_id -
IN: Dataspace identifier for buf. - Also contains the selection to iterate over. -
H5D_operator_t operator -
IN: Function pointer to the routine to be called - for each element in buf iterated over. -
void *operator_data -
IN/OUT: Pointer to any user-defined data associated - with the operation. -
+
    + + + + + + + + + + + + + + + +
    void *bufIN/OUT: Pointer to the buffer in memory containing the + elements to iterate over.
    hid_t type_idIN: Datatype identifier for the elements stored in + buf.
    hid_t space_idIN: Dataspace identifier for buf. + Also contains the selection to iterate over.
    H5D_operator_t operator    IN: Function pointer to the routine to be called + for each element in buf iterated over.
    void *operator_dataIN/OUT: Pointer to any user-defined data associated + with the operation.
Returns:
Returns the return value of the last operator if it was non-zero, or zero if all elements have been processed. @@ -901,13 +927,15 @@ SUBROUTINE or group specified in loc_id. name is a dataset name and is used to identify the dataset in the file.
Parameters: -
-
hid_t loc_id -
IN: Identifier of the file or group - within which the dataset to be accessed will be found. -
const char * name -
IN: The name of the dataset to access. -
+
    + + + + + + +
    hid_t loc_idIN: Identifier of the file or group + within which the dataset to be accessed will be found.
    const char * name    IN: The name of the dataset to access.
Returns:
Returns a dataset identifier if successful; otherwise returns a negative value. @@ -1075,21 +1103,27 @@ END SUBROUTINE h5dopen_f data conversion, including the range of conversions currently supported by the HDF5 libraries.
Parameters: -
-
hid_t dataset_id -
IN: Identifier of the dataset read from. -
hid_t mem_type_id -
IN: Identifier of the memory datatype. -
hid_t mem_space_id -
IN: Identifier of the memory dataspace. -
hid_t file_space_id -
IN: Identifier of the dataset's dataspace in the file. -
hid_t xfer_plist_id -
IN: Identifier of a transfer property list - for this I/O operation. -
void * buf -
OUT: Buffer to receive data read from file. -
+
    + + + + + + + + + + + + + + + + + + +
    hid_t dataset_idIN: Identifier of the dataset read from.
    hid_t mem_type_idIN: Identifier of the memory datatype.
    hid_t mem_space_idIN: Identifier of the memory dataspace.
    hid_t file_space_id    IN: Identifier of the dataset's dataspace in the file.
    hid_t xfer_plist_id    IN: Identifier of a transfer property list + for this I/O operation.
    void * bufOUT: Buffer to receive data read from file.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -1101,33 +1135,32 @@ SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE, INTENT(INOUT) :: buf ! Data buffer; may be a scalar - ! or an array + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE, INTENT(INOUT) :: buf ! Data buffer; may be a scalar + ! or an array DIMENSION(*), INTEGER(HSIZE_T), INTENT(IN) :: dims - ! Array to hold corresponding - ! dimension sizes of data - ! buffer buf - ! dim(k) has value of the k-th - ! dimension of buffer buf - ! Values are ignored if buf is - ! a scalar - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure + ! Array to hold corresponding + ! dimension sizes of data + ! buffer buf + ! dim(k) has value of the k-th + ! dimension of buffer buf + ! Values are ignored if buf is + ! a scalar + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - ! Default value is H5S_ALL_F + ! Memory dataspace identfier + ! Default value is H5S_ALL_F INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - ! Default value is H5S_ALL_F + ! File dataspace identfier + ! Default value is H5S_ALL_F INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - ! Default value is H5P_DEFAULT_F + ! Transfer property list identifier + ! Default value is H5P_DEFAULT_F END SUBROUTINE h5dread_f - +
   DIMENSION(*), INTEGER(HSIZE_T), INTENT(IN)  :: dims 
                                              ! Array to hold corresponding 
                                              ! dimension sizes of data 
@@ -1455,10 +1505,8 @@ SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, dims, hdferr, &
                                              ! of the k-th dimension of 
                                              ! buffer buf; values are 
                                              ! ignored if buf is a scalar
-  INTEGER, INTENT(OUT) :: hdferr      ! Error code 
-                                             ! 0 on success and -1 on failure
- -
+  INTEGER, INTENT(OUT) :: hdferr             ! Error code 
+                                             ! 0 on success and -1 on failure
   INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id 
                                              ! Memory dataspace identfier 
                                              ! Default value is H5S_ALL_F
diff --git a/doc/html/RM_H5E.html b/doc/html/RM_H5E.html
index 284bb38..c1d5cfd 100644
--- a/doc/html/RM_H5E.html
+++ b/doc/html/RM_H5E.html
@@ -206,9 +206,9 @@ errors within the H5E package.
         H5Eclear can fail if there are problems initializing 
         the library.
 
Parameters: -
-
None -
+
    + +
    None
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -248,13 +248,15 @@ END SUBROUTINE h5eclear_f and its data, client_data. Either (or both) arguments may be null in which case the value is not returned.
Parameters: -
-
H5E_auto_t * func -
OUT: Current setting for the function to be called upon an - error condition. -
void **client_data -
OUT: Current setting for the data passed to the error function. -
+
    + + + + + + +
    H5E_auto_t * funcOUT: Current setting for the function to be called upon an + error condition.
    void **client_data    OUT: Current setting for the data passed to the error function.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -289,10 +291,11 @@ SUBROUTINE
Given a major error number, H5Eget_major returns a constant character string that describes the error.
Parameters: -
-
H5E_major_t n -
IN: Major error number. -
+
    + + + +
    H5E_major_t n    IN: Major error number.
Returns:
Returns a character string describing the error if successful. Otherwise returns "Invalid major error number." @@ -329,10 +332,11 @@ END SUBROUTINE h5eget_major_f
Given a minor error number, H5Eget_minor returns a constant character string that describes the error.
Parameters: -
-
H5E_minor_t n -
IN: Minor error number. -
+
    + + + +
    H5E_minor_t n    IN: Minor error number.
Returns:
Returns a character string describing the error if successful. Otherwise returns "Invalid minor error number." @@ -375,10 +379,11 @@ END SUBROUTINE h5eget_minor_f H5Ewalk with a function that prints error messages. Users are encouraged to write their own more specific error handlers.
Parameters: -
-
FILE * stream -
IN: File pointer, or stderr if NULL. -
+
    + + + +
    FILE * stream    IN: File pointer, or stderr if NULL.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -430,20 +435,26 @@ END SUBROUTINE h5eprint_f The function name, file name, and error description strings must be statically allocated.
Parameters: -
-
const char *file, -
IN: Name of the file in which the error was detected. -
const char *func, -
IN: Name of the function in which the error was detected. -
unsigned line, -
IN: Line within the file at which the error was detected. -
H5E_major_t maj_num, -
IN: Major error number. -
H5E_minor_t min_num, -
IN: Minor error number. -
const char *str -
IN: Error description string. -
+
    + + + + + + + + + + + + + + + + + + +
    const char *file,IN: Name of the file in which the error was detected.
    const char *func,IN: Name of the function in which the error was detected.
    unsigned line,IN: Line within the file at which the error was detected.
    H5E_major_t maj_num,    IN: Major error number.
    H5E_minor_t min_num,IN: Minor error number.
    const char *strIN: Error description string.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -490,12 +501,14 @@ SUBROUTINE Automatic stack traversal is always in the H5E_WALK_DOWNWARD direction.
Parameters: -
-
H5E_auto_t func -
IN: Function to be called upon an error condition. -
void *client_data -
IN: Data passed to the error function. -
+
    + + + + + + +
    H5E_auto_t funcIN: Function to be called upon an error condition.
    void *client_data    IN: Data passed to the error function.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -579,14 +592,17 @@ END SUBROUTINE h5eset_auto_f H5Ewalk can fail if there are problems initializing the library.
Parameters: -
-
H5E_direction_t direction -
IN: Direction in which the error stack is to be walked. -
H5E_walk_t func -
IN: Function to be called for each error encountered. -
void * client_data -
IN: Data to be passed with func. -
+
    + + + + + + + + + +
    H5E_direction_t direction    IN: Direction in which the error stack is to be walked.
    H5E_walk_t funcIN: Function to be called for each error encountered.
    void * client_dataIN: Data to be passed with func.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. @@ -642,15 +658,18 @@ SUBROUTINE client_data argument of H5Ewalk. It is expected to be a file pointer (or stderr if NULL).
Parameters: -
-
int n -
IN/OUT: Number of times this function has been called - for this traversal of the stack. -
H5E_error_t *err_desc -
OUT: Error description. -
void *client_data -
IN: A file pointer, or stderr if NULL. -
+
    + + + + + + + + + +
    int nIN/OUT: Number of times this function has been called + for this traversal of the stack.
    H5E_error_t *err_desc    OUT: Error description.
    void *client_dataIN: A file pointer, or stderr if NULL.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value. diff --git a/doc/html/RM_H5F.html b/doc/html/RM_H5F.html index 8e974b8..b77873d 100644 --- a/doc/html/RM_H5F.html +++ b/doc/html/RM_H5F.html @@ -41,7 +41,8 @@ HDF5/H5F API Specification And in this document, the -HDF5 Reference Manual  
+HDF5 Reference Manual   +
H5   H5A   H5D   @@ -49,7 +50,8 @@ And in this document, the H5F   H5G   H5I   -H5P  
+H5P   +
H5R   H5S   H5T   @@ -57,14 +59,9 @@ And in this document, the Tools   Datatypes   - -(PDF -of complete manual formatted as print volume)    - -
-
+

H5F: File Interface

@@ -171,6 +168,7 @@ as the corresponding C function.
  • h5funmount_f
  • h5fget_vfd_handle_f
  • h5fget_filesize_f +
  • h5fget_freespace_f        @@ -235,10 +232,11 @@ as the corresponding C function. in a file before calling H5Fclose. It is generally recommended to do so in all cases.
    Parameters: -
    -
    hid_t file_id -
    IN: Identifier of a file to terminate access to. -
    +
      + + + +
      hid_t file_id    IN: Identifier of a file to terminate access to.
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value. @@ -328,11 +326,13 @@ END SUBROUTINE h5fclose_f with an already opened file.
    Parameters: -
    -
    const char *name -
    IN: Name of the file to access. -
    uintn flags -
    IN: File access flags. Allowable values are: +
      + + + + + + + + + + + + +
      const char *name    IN: Name of the file to access.
      uintn flagsIN: File access flags. Allowable values are:
        H5F_ACC_TRUNC
        Truncate file, if it already exists, @@ -345,18 +345,20 @@ END SUBROUTINE h5fclose_f
      • An additional flag, H5F_ACC_DEBUG, prints debug information. This flag is used only by HDF5 library developers; it is neither tested nor supported - for use in applications. -
        hid_t create_id -
        IN: File creation property list identifier, used when modifying + for use in applications.
      hid_t create_id    IN: File creation property list identifier, used when modifying default file meta-data. - Use H5P_DEFAULT for default file creation properties. -
      hid_t access_id -
      IN: File access property list identifier. + Use H5P_DEFAULT for default file creation properties.
      hid_t access_idIN: File access property list identifier. If parallel file access is desired, this is a collective call according to the communicator stored in the access_id. - Use H5P_DEFAULT for default file access properties. - + Use H5P_DEFAULT for default file access properties.
    Returns:
    Returns a file identifier if successful; otherwise returns a negative value. @@ -422,12 +424,12 @@ END SUBROUTINE h5fcreate_f action is global or local. Valid values are
    - + - - + + - +
    H5F_SCOPE_GLOBAL
    H5F_SCOPE_GLOBAL     Flushes the entire virtual file.
    H5F_SCOPE_LOCALFlushes the entire virtual file.
    H5F_SCOPE_LOCAL Flushes only the specified file.
    Flushes only the specified file.
    Note: @@ -437,12 +439,14 @@ END SUBROUTINE h5fcreate_f open files. After that, the OS is responsible for ensuring that the data is actually flushed to disk.
    Parameters: -
    -
    hid_t object_id -
    IN: Identifier of object used to identify the file. -
    H5F_scope_t scope -
    IN: Specifies the scope of the flushing action. -
    +
      + + + + + + +
      hid_t object_idIN: Identifier of object used to identify the file.
      H5F_scope_t scope    IN: Specifies the scope of the flushing action.
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value. @@ -489,10 +493,11 @@ END SUBROUTINE h5fflush_f HDF5 User's Guide for additional information and related functions.
    Parameters: -
    -
    hid_t file_id -
    IN: Identifier of file to get access property list of -
    +
      + + + +
      hid_t file_id    IN: Identifier of file to get access property list of
    Returns:
    Returns a file access property list identifier if successful; otherwise returns a negative value. @@ -517,7 +522,6 @@ END SUBROUTINE h5fget_access_plist_f -->
    -
    @@ -542,10 +546,11 @@ END SUBROUTINE h5fget_access_plist_f HDF5 User's Guide for additional information and related functions.
    Parameters: -
    -
    hid_t file_id -
    IN: Identifier of the file to get creation property list of -
    +
      +
      +
      + +
      hid_t file_id    IN: Identifier of the file to get creation property list of
    Returns:
    Returns a file creation property list identifier if successful; otherwise returns a negative value. @@ -629,7 +634,7 @@ END SUBROUTINE h5fget_filesize_f
    -
    Name: H5Fget_freespace +
    Name: H5Fget_freespace
    Signature:
    hssize_t H5Fget_freespace(hid_t file_id)
    Purpose: @@ -644,10 +649,11 @@ END SUBROUTINE h5fget_filesize_f only report the free space that has been created during that interval.
    Parameters: -
    -
    hid_t file_id -
    IN: Identifier of a currently-open HDF5 file -
    +
      + + + +
      hid_t file_id    IN: Identifier of a currently-open HDF5 file
    Returns:
    Returns a the amount of free space in the file if successful; otherwise returns a negative value. @@ -811,13 +817,15 @@ END SUBROUTINE h5fget_name_f For example, the expression (H5F_OBJ_DATASET|H5F_OBJ_GROUP) would call for datasets and groups.
    Parameters: -
    -
    hid_t file_id -
    IN: Identifier of a currently-open HDF5 file or - H5F_OBJ_ALL for all currently-open HDF5 files. -
    unsigned int types -
    IN: Type of object for which identifiers are to be returned. -
    +
      + + + + + + +
      hid_t file_idIN: Identifier of a currently-open HDF5 file or + H5F_OBJ_ALL for all currently-open HDF5 files.
      unsigned int types    IN: Type of object for which identifiers are to be returned.
    Returns:
    Returns a the number of open objects if successful; otherwise returns a negative value. @@ -878,17 +886,22 @@ END SUBROUTINE h5fget_obj_count_f To retrieve identifiers for all open objects, pass a negative value for the max_objs.
    Parameters: -
    -
    hid_t file_id -
    IN: Identifier of a currently-open HDF5 file or - H5F_OBJ_ALL for all currently-open HDF5 files. -
    unsigned int types -
    IN: Type of object for which identifiers are to be returned. -
    int max_objs -
    IN: Maximum number of object identifiers to place into obj_id_list. -
    hid_t *obj_id_list -
    OUT: Pointer to the returned list of open object identifiers. -
    +
      + + + + + + + + + + + + +
      hid_t file_idIN: Identifier of a currently-open HDF5 file or + H5F_OBJ_ALL for all currently-open HDF5 files.
      unsigned int typesIN: Type of object for which identifiers are to be returned.
      int max_objsIN: Maximum number of object identifiers to place into + obj_id_list.
      hid_t *obj_id_list    OUT: Pointer to the returned list of open object identifiers.
    Returns:
    Returns number of objects placed into obj_id_list if successful; otherwise returns a negative value. @@ -948,22 +961,25 @@ END SUBROUTINE h5fget_obj_ids_f open; it will be invalid if the file is closed and reopened or opened during a subsequent session.
    Parameters: -
    -
    hid_t file_id -
    IN: Identifier of the file to be queried. -
    hid_t fapl_id -
    IN: File access property list identifier. +
      + + + + + + + + + +
      hid_t file_idIN: Identifier of the file to be queried.
      hid_t fapl_idIN: File access property list identifier. For most drivers, the value will be H5P_DEFAULT. - For the FAMILY or MULTI drivers, - this value should be defined through the property list - functions: - H5Pset_family_offset for the FAMILY - driver and H5Pset_multi_type for the - MULTI driver. -
      void *file_handle -
      OUT: Pointer to the file handle being used by - the low-level virtual file driver. - + For the FAMILY or MULTI drivers, + this value should be defined through the property list + functions: + H5Pset_family_offset for the FAMILY + driver and H5Pset_multi_type for the + MULTI driver.
      void *file_handle    OUT: Pointer to the file handle being used by + the low-level virtual file driver.
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value. @@ -998,10 +1014,11 @@ SUBROUTINE
    H5Fis_hdf5 determines whether a file is in the HDF5 format.
    Parameters: -
    -
    const char *name -
    IN: File name to check format. -
    +
      + + + +
      const char *name    IN: File name to check format.
    Returns:
    When successful, returns a positive value, for TRUE, or 0 (zero), for FALSE. @@ -1050,19 +1067,23 @@ END SUBROUTINE h5fis_hdf5_f Note that loc_id is either a file or group identifier and name is relative to loc_id.
    Parameters: -
    -
    hid_t loc_id -
    IN: Identifier for of file or group in - which name is defined. -
    const char *name -
    IN: Name of the group onto which the +
      + + + + + + + + + + + + +
      hid_t loc_idIN: Identifier for of file or group in + which name is defined.
      const char *name    IN: Name of the group onto which the file specified by child_id - is to be mounted. -
      hid_t child_id -
      IN: Identifier of the file to be mounted. -
      hid_t plist_id -
      IN: Identifier of the property list to be used. - + is to be mounted.
      hid_t child_idIN: Identifier of the file to be mounted.
      hid_t plist_idIN: Identifier of the property list to be used.
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value. @@ -1150,11 +1171,13 @@ END SUBROUTINE h5fmount_f multiple opens of the same file.
    Parameters: -
    -
    const char *name -
    IN: Name of the file to access. -
    unsigned flags -
    IN: File access flags. Allowable values are: +
      + + + + + + -
      hid_t access_id -
      IN: Identifier for the file access properties list. +
      + + +
      const char *name    IN: Name of the file to access.
      unsigned flagsIN: File access flags. Allowable values are:
        H5F_ACC_RDWR
        Allow read and write access to file. @@ -1167,15 +1190,16 @@ END SUBROUTINE h5fmount_f debug information. This flag is used only by HDF5 library developers; it is neither tested nor supported for use in applications. -
      +
      hid_t access_id    IN: Identifier for the file access properties list. If parallel file access is desired, this is a collective call according to the communicator stored in the access_id. - Use H5P_DEFAULT for default file access properties. - + Use H5P_DEFAULT for default file access properties.
    Returns:
    Returns a file identifier if successful; otherwise returns a negative value. @@ -1235,11 +1259,12 @@ END SUBROUTINE h5fopen_f The new file identifier should be closed by calling H5Fclose when it is no longer needed.
    Parameters: -
    -
    hid_t file_id -
    IN: Identifier of a file for which an additional identifier - is required. -
    +
      + + + +
      hid_t file_id    IN: Identifier of a file for which an additional identifier + is required.
    Returns:
    Returns a new file identifier if successful; otherwise returns a negative value. @@ -1290,13 +1315,15 @@ END SUBROUTINE h5freopen_f Note that loc_id is either a file or group identifier and name is relative to loc_id.
    Parameters: -
    -
    hid_t loc_id -
    IN: File or group identifier for the location at which - the specified file is to be unmounted. -
    const char *name -
    IN: Name of the mount point. -
    +
      + + + + + + +
      hid_t loc_idIN: File or group identifier for the location at which + the specified file is to be unmounted.
      const char *name    IN: Name of the mount point.
    Returns:
    Returns a non-negative value if successful; otherwise returns a negative value. @@ -1336,7 +1363,8 @@ END SUBROUTINE h5funmount_f And in this document, the -HDF5 Reference Manual  
    +HDF5 Reference Manual   +
    H5   H5A   H5D   @@ -1344,7 +1372,8 @@ And in this document, the H5F   H5G   H5I   -H5P  
    +H5P   +
    H5R   H5S   H5T   @@ -1352,17 +1381,12 @@ And in this document, the Tools   Datatypes   - -(PDF -of complete manual formatted as print volume)    -
  • -
    -
    +
    HDF Help Desk
    -Describes HDF5 Release 1.6.3, September 2004 +Describes HDF5 Release 1.7, the unreleased development branch; working toward HDF5 Release 1.8.0