diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-09-08 19:15:44 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-09-08 19:15:44 (GMT) |
commit | b5e2752ad6d942a5dcee5f9fd4fad0a2e89c4a67 (patch) | |
tree | 790770464529c19e146112e5b48c77218132d8b7 | |
parent | 72a58073cd51996f34906f992a2377073df5bbc0 (diff) | |
download | hdf5-b5e2752ad6d942a5dcee5f9fd4fad0a2e89c4a67.zip hdf5-b5e2752ad6d942a5dcee5f9fd4fad0a2e89c4a67.tar.gz hdf5-b5e2752ad6d942a5dcee5f9fd4fad0a2e89c4a67.tar.bz2 |
[svn-r673] Changes since 19980908
----------------------
./COPYING
Reformatted as text instead of C. Removed zlib crew from the
list of contributors since no zlib code is actually in the
hdf5 library.
./INSTALL
./INSTALL.ascired
./MANIFEST
Minor updates for Beta release including version number
change.
./INSTALL_MAINT
Added information about making a release.
./RELEASE
Updated function list based on public header files.
./bin/checkposix
Got rid of complaints about some obvious things.
./doc/html/H5.api.html
./doc/html/RM_H5F.html
./src/H5F.c
./src/H5Fpublic.h
./test/tfile.c
Changed H5Fget_create_template() and H5Fget_access_template()
to H5Fget_create_plist() and H5Fget_access_plist() since that
conforms better to lots of other names.
./doc/html/Datatypes.html
./doc/html/ExternalFiles.html
./doc/html/Files.html
./doc/html/H5.api.html
./doc/html/H5.sample_code.html
./doc/html/RM_H5F.html
./doc/html/RM_H5Front.html
Changed `template' to `property list', etc.
./doc/html/Ragged.html [NEW]
Documentation for ragged arrays.
./src/H5Iprivate.h
./src/H5Ipublic.h
./src/H5I.c
Changed the scope of some symbols to be more local.
./src/H5.c
./src/H5AC.c
./src/H5D.c
./src/H5E.c
./src/H5F.c
./src/H5Ffamily.c
./src/H5Fistore.c
./src/H5Flow.c
./src/H5Fsec2.c
./src/H5Fsplit.c
./src/H5Fstdio.c
./src/H5G.c
./src/H5Gnode.c
./src/H5HG.c
./src/H5I.c
./src/H5O.c
./src/H5Ocomp.c
./src/H5Odtype.c
./src/H5Oefl.c
./src/H5Omtime.c
./src/H5Oname.c
./src/H5P.c
./src/H5S.c
./src/H5Shyper.c
./src/H5Tbit.c
./src/H5Tconv.c
./src/H5V.c
./src/H5Z.c
./src/H5private.h
Fixed some violations of our naming scheme by adding HD to the
beginning of all Posix functions.
49 files changed, 920 insertions, 720 deletions
@@ -1,48 +1,39 @@ -/*======================================================================= +Copyright Notice and Statement for NCSA Hierarchical Data Format (HDF) +Software Library and Utilities -Copyright Notice and Statement for -NCSA Hierarchical Data Format (HDF) Software Library and Utilities +NCSA Hierarchical Data Format (HDF) Software Library and Utilities Copyright +1998 the Board of Trustees of the University of Illinois. All rights reserved. - -NCSA Hierarchical Data Format (HDF) Software Library and Utilities -Copyright 1998 the Board of Trustees of the University of Illinois -All rights reserved. - -Contributors: National Center for Supercomputing Applications (NCSA) at -the University of Illinois, Lawrence Livermore Nat'l Laboratory (LLNL), -Sandia National Laboratories (SNL), Los Alamos National Laboratory (LANL), -Jean-loup Gailly and Mark Adler (gzip library) +Contributors: National Center for Supercomputing Applications (NCSA) at the +University of Illinois, Lawrence Livermore Nat'l Laboratory (LLNL), Sandia +National Laboratories (SNL), Los Alamos National Laboratory (LANL). 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, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or materials provided with the distribution. - -3. In addition, redistributions of modified forms of the source or binary -code must carry prominent notices stating that the original code was -changed and the date of the change. - -4. All publications or advertising materials mentioning features or use of -this software must acknowledge that it was developed by the National Center -for Supercomputing Applications at the University of Illinois, and credit -the Contributors. +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. -5. Neither the name of the University nor the names of the Contributors may -be used to endorse or promote products derived from this software without -specific prior written permission from the University or the Contributors. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or materials provided with the distribution. -6. THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND THE CONTRIBUTORS "AS IS" -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. +3. In addition, redistributions of modified forms of the source or binary + code must carry prominent notices stating that the original code was + changed and the date of the change. +4. All publications or advertising materials mentioning features or use of + this software must acknowledge that it was developed by the National + Center for Supercomputing Applications at the University of Illinois, and + credit the Contributors. -=======================================================================*/ +5. Neither the name of the University nor the names of the Contributors may + be used to endorse or promote products derived from this software without + specific prior written permission from the University or the Contributors. +6. THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND THE CONTRIBUTORS "AS IS" + 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. @@ -26,28 +26,27 @@ for the install may be found in the file: INSTALL.ascired. Step 0: Install optional third-party packages. * GNU zlib compression library, version 1.0.2 or later is used for - the `deflate' compression method. If libz.a cannot be found then - this form of compression is not compiled into the library. + the `deflate' compression method if available; otherwise no + compression filters will be predefined. Step 1. Unpack the source tree. - * The tarball will unpack into an hdf5-1.0.0a directory with one of + * The tarball will unpack into an hdf5-1.1.0 directory with one of the following commands: - $ tar xf hdf5-1.0.0a.tar OR - $ gunzip <hdf5-1.0.0a.tar.gz |tar xf - OR - $ bunzip2 <hdf5-1.0.0a.tar.bz2 |tar xf - OR - $ uncompress -c <hdf5-1.0.0a.tar.Z |tar xf - + $ tar xf hdf5-1.1.0.tar OR + $ gunzip <hdf5-1.1.0.tar.gz |tar xf - OR + $ bunzip2 <hdf5-1.1.0.tar.bz2 |tar xf - OR + $ uncompress -c <hdf5-1.1.0.tar.Z |tar xf - Step 2. Configure. * HDF5 uses the GNU autoconf program for configuration. Most installations can be configured by typing just (from the - hdf5-1.0.0a directory) + hdf5-1.1.0 directory) $ sh configure - * The configuration process can be controlled through environment variables, command-line switches, and host configuration files. For a complete list of switches say `sh configure --help'. @@ -92,13 +91,12 @@ Step 2. Configure. `--disable-hsizet' can be given but the resulting library will be unable to handle datasets larger than 4GB. - * By default libraries, include files, programs, and documentation - are installed (when one says `make install') under - /usr/local/lib, /usr/local/include, /usr/local/bin, and - /usr/local/man. However, if you want them in some other - location you can specify a prefix to use instead of /usr/local. - For instance, to install in /usr/lib, /usr/include, /usr/bin, - and /usr/man one would say + * Libraries, include files, programs, and documentation are + installed (when one says `make install') under /usr/local/lib, + /usr/local/include, /usr/local/bin, and /usr/local/man. + However, if you want them in some other location you can specify + a prefix to use instead of /usr/local. For instance, to install + in /usr/lib, /usr/include, /usr/bin, and /usr/man one would say $ ./configure --prefix=/usr @@ -129,11 +127,11 @@ Step 4. Run confidence tests. The command will fail if any test fails, and one will see the word "*FAIL*" in the output. - Note: some old versions of make will report that `test is up to + * Some old versions of make will report that `test is up to date'. If this happens then run `make _test' instead or run `make test' from within the test directory. - Temporary files will be deleted by each test when it completes, + * Temporary files will be deleted by each test when it completes, but may continue to exist in an incomplete state if the test fails. To prevent deletion of the files define the HDF5_NOCLEANUP environment variable. @@ -144,12 +142,38 @@ Step 5. Install public files. $ make install - This step will fail unless you have permission to write to the - installation directories. Of course, you can use the header - files, library, and programs directly out of the source tree if - you like, skipping this step. The directory specified for the - --prefix switch (or "/usr/local") must exist, but the directories - under it are created automatically by make. + * This step will fail unless you have permission to write to the + installation directories. Of course, you can use the header + files, library, and programs directly out of the source tree if + you like, skipping this step. The directory specified for the + --prefix switch (or "/usr/local") must exist, but the + directories under it are created automatically by make. + + * The minimum which must be installed are: + + The library: + ./src/libhdf5.a + + The public header files: + ./src/H5*public.h + + The main header file: + ./src/hdf5.h + + The configuration information: + ./src/H5config.h + + * Additional useful things which are installed: + + The tools library: + ./tools/libh5tools.a + + Some tools: + ./tools/h5ls + ./tools/h5repart + ./tools/h5dump + ./tools/h5debug + ./tools/h5import (a demo) Step 6. Subscribe to mailing lists. diff --git a/INSTALL.ascired b/INSTALL.ascired index 49a9b11..cd11de0 100644 --- a/INSTALL.ascired +++ b/INSTALL.ascired @@ -17,9 +17,9 @@ effort is shown here at steps 9) and steps 10). The total required steps are something similar to: FROM SASN100, -1) uncompress hdf5-1.0.0a.tar.Z +1) uncompress hdf5-1.1.0.tar.Z -2) tar xvf hdf5-1.0.0a.tar +2) tar xvf hdf5-1.1.0.tar 3) cd ./hdf5 @@ -73,9 +73,9 @@ execution of parallel tests described in steps 12) through 16). The total required steps are something similar to: FROM SASN100, -1) uncompress hdf5-1.0.0a.tar.Z +1) uncompress hdf5-1.1.0.tar.Z -2) tar xvf hdf5-1.0.0a.tar +2) tar xvf hdf5-1.1.0.tar 3) cd ./hdf5 diff --git a/INSTALL_MAINT b/INSTALL_MAINT index 5066a55..20ee264 100644 --- a/INSTALL_MAINT +++ b/INSTALL_MAINT @@ -97,3 +97,15 @@ Information for HDF5 maintainers: which limits the number of children to two (this doesn't work at the top level because the `-j2' is not passed to recursive makes). + +* To create a release tarball go to the top-level directory and run + ./bin/release. You can optionally supply one or more of the words + `tar', `gzip', `bzip2' or `compress' on the command line. The + result will be a (compressed) tar file(s) in the `releases' + directory. The README file is updated to contain the release date + and version number. + +* To create a tarball of all the files which are part of HDF5 go to + the top-level directory and type: + + tar cvf foo.tar `grep '^\.' MANIFEST |unexpand |cut -f1` @@ -1,9 +1,8 @@ #------------------------------------------------------------------------------ # This is the list of files that are part of HDF5. All files have a # `./' prefix and appear in lexicographic order. Lines that end with -# _DO_NOT_DISTRIBUTE_ (preceded by tabs) will not be included in a -# release. Blank lines and comments are ignored. Comments must start -# in column one. +# _DO_NOT_DISTRIBUTE_ will not be included in a release. Blank lines +# and comments are ignored. Comments must start in column one. #------------------------------------------------------------------------------ ./COPYING @@ -91,6 +90,7 @@ ./doc/html/RM_H5S.html ./doc/html/RM_H5T.html ./doc/html/RM_H5Z.html +./doc/html/Ragged.html ./doc/html/Version.html ./doc/html/chunk1.gif ./doc/html/chunk1.obj _DO_NOT_DISTRIBUTE_ @@ -7,8 +7,9 @@ Release information for hdf5-1.0.23a * The compression API has been replaced with a more general filter API. See doc/html/Filters.html for details. -* Alpha-quality 2d ragged arrays, a layer built on top of other hdf5 - objects. The API and storage format will almost certainly change. +* Alpha-quality 2d ragged arrays are implemented as a layer built on + top of other hdf5 objects. The API and storage format will almost + certainly change. * More debugging support including API tracing. See Debugging.html. @@ -137,8 +138,8 @@ Library H5open - initialize library (happens automatically) H5close - shut down the library (happens automatically) H5dont_atexit - don't call H5close on exit - H5version - retrieve library version info - H5version_check - check for specific library version + H5get_libversion - retrieve library version info + H5check_version - check for specific library version Property Lists H5Pclose - release template resources @@ -180,10 +181,10 @@ Property Lists H5Pset_buffer - set raw-data I/O pipe buffer properties H5Pget_preserve - get type conversion preservation properties H5Pset_preserve - set type conversion preservation properties - H5Pget_compression - get raw data compression properties - H5Pset_compression - set raw data compression properties - H5Pget_deflate - get deflate compression properties - H5Pset_deflate - set deflate compression properties + H5Pget_nfilters - get number of raw data filters + H5Pget_filter - get raw data filter properties + H5Pset_filter - set raw data filter properties + H5Pset_deflate - set deflate compression filter properties H5Pget_mpi - get MPI-IO properties H5Pset_mpi - set MPI-IO properties H5Pget_xfer - get data transfer properties @@ -201,64 +202,74 @@ Datasets H5Dextend - extend a dataset Attributes - H5Acreate - create a new attribute - H5Aopen_name - open an attribute by name - H5Aopen_idx - open an attribute by number + H5Acreate - create a new attribute + H5Aopen_name - open an attribute by name + H5Aopen_idx - open an attribute by number H5Awrite - write values into an attribute H5Aread - read values from an attribute - H5Aget_space - get attribute data space - H5Aget_type - get attribute data type - H5Aget_name - get attribute name - H5Anum_attrs - return the number of attributes for an object - H5Aiterate - iterate over an object's attributes - H5Adelete - delete an attribute + H5Aget_space - get attribute data space + H5Aget_type - get attribute data type + H5Aget_name - get attribute name + H5Anum_attrs - return the number of attributes for an object + H5Aiterate - iterate over an object's attributes + H5Adelete - delete an attribute H5Aclose - close an attribute Errors H5Eclear - clear the error stack H5Eprint - print an error stack - H5Eget_auto - get automatic error reporting settings - H5Eset_auto - set automatic error reporting + H5Eget_auto - get automatic error reporting settings + H5Eset_auto - set automatic error reporting H5Ewalk - iterate over the error stack - H5Ewalk_cb - the default error stack iterator function - H5Eget_major - get the message for the major error number - H5Eget_minor - get the message for the minor error number + H5Ewalk_cb - the default error stack iterator function + H5Eget_major - get the message for the major error number + H5Eget_minor - get the message for the minor error number Files - H5Fclose - close a file and release resources + H5Fclose - close a file and release resources H5Fcreate - create a new file - H5Fget_create_template- get file creation property list - H5Fget_access_template- get file access property list + H5Fget_create_plist - get file creation property list + H5Fget_access_plist - get file access property list H5Fis_hdf5 - determine if a file is an hdf5 file - H5Fopen - open an existing file + H5Fopen - open an existing file Groups H5Gclose - close a group and release resources - H5Gcreate - create a new group + H5Gcreate - create a new group H5Gopen - open an existing group H5Gpop - pop a group from the cwg stack H5Gpush - push a group onto the cwg stack H5Gset - set the current working group (cwg) - H5Giterate - iterate over the contents of a group + H5Giterate - iterate over the contents of a group H5Gmove - change the name of some object H5Glink - create a hard or soft link to an object - H5Gunlink - break the link between a name and an object - H5Gstat - get information about a group entry + H5Gunlink - break the link between a name and an object + H5Gget_objinfo - get information about a group entry H5Gget_linkval - get the value of a soft link + H5Gget_comment - get the comment string for an object + H5Gset_comment - set the comment string for an object Dataspaces - H5Sclose - release dataspace - H5Screate - create a new dataspace - H5Screate_simple - create a new simple dataspace - H5Sextent_dims - get dataspace size + H5Screate - create a new data space + H5Scopy - copy a data space + H5Sclose - release data space + H5Screate_simple - create a new simple data space + H5Sset_space - set simple data space extents + H5Sis_simple - determine if data space is simple + H5Sset_extent_simple - set simple data space dimensionality and size + H5Sget_simple_extent_npoints - get number of points in simple extent + H5Sget_simple_extent_ndims - get simple data space dimensionality + H5Sget_simple_extent_dims - get simple data space size + H5Sget_simple_extent_type - get type of simple extent + H5Sset_extent_none - reset extent to be empty + H5Sextent_copy - copy the extent from one data space to another + H5Sget_select_npoints - get number of points selected for I/O H5Sselect_hyperslab - set hyperslab dataspace selection H5Sselect_elements - set element sequence dataspace selection - H5Sextent_ndims - get dataspace dimensionality - H5Sextent_npoints - get number of points in extent of dataspace - H5Sselect_npoints - get number of selected points in dataspace - H5Sis_simple - determine if dataspace is simple - H5Sset_extent_simple - set simple dataspace dimensionality and size - H5Scopy - copy a dataspace + H5Sselect_all - select entire extent for I/O + H5Sselect_none - deselect all elements of extent + H5Soffset_simple - set selection offset + H5Sselect_valid - determine if selection is valid for extent Datatypes H5Tclose - release data type resources @@ -268,8 +279,14 @@ Datatypes H5Tcopy - copy a data type H5Tcreate - create a new data type H5Tequal - compare two data types + H5Tlock - lock type to prevent changes H5Tfind - find a data type conversion function H5Tconvert - convert data from one type to another + H5Tregister_hard - register specific type conversion function + H5Tregister_soft - register general type conversion function + H5Tunregister - remove a type conversion function + H5Tget_overflow - get function that handles overflow conv. cases + H5Tset_overflow - set function to handle overflow conversion cases H5Tget_class - get data type class H5Tget_cset - get character set H5Tget_ebias - get exponent bias @@ -288,11 +305,9 @@ Datatypes H5Tget_sign - get integer sign type H5Tget_size - get size in bytes H5Tget_strpad - get string padding - H5Tinsert - insert struct member - H5Tlock - lock type to prevent changes + H5Tinsert - insert scalar struct member + H5Tinsert_array - insert array struct member H5Tpack - pack struct members - H5Tregister_hard - register specific type conversion function - H5Tregister_soft - register general type conversion function H5Tset_cset - set character set H5Tset_ebias - set exponent bias H5Tset_fields - set floating point fields @@ -305,10 +320,16 @@ Datatypes H5Tset_sign - set integer sign type H5Tset_size - set size in bytes H5Tset_strpad - set string padding - H5Tunregister - remove a type conversion function -Compression - H5Tregister - register a new compression method +Filters + H5Tregister - register a new filter method + +Ragged Arrays (alpha) + H5Rcreate - create a new ragged array + H5Ropen - open an existing array + H5Rclose - close a ragged array + H5Rwrite - write to an array + H5Rread - read from an array This release has been tested on UNIX platforms only; specifically: Linux, FreedBSD, IRIX, Solaris & Dec UNIX. @@ -317,24 +338,24 @@ Linux, FreedBSD, IRIX, Solaris & Dec UNIX. Release information for parallel HDF5 ------------------------------------- -+) Current release supports independent access to fixed dimension datasets - only. +* Current release supports independent access to fixed dimension datasets + only. -+) The comm and info arguments of H5Cset_mpi are not used. All parallel - I/O are done via MPI_COMM_WORLD. Access_mode for H5Cset_mpi can be - H5ACC_INDEPENDENT only. +* The comm and info arguments of H5Cset_mpi are not used. All parallel + I/O are done via MPI_COMM_WORLD. Access_mode for H5Cset_mpi can be + H5ACC_INDEPENDENT only. -+) This release of parallel HDF5 has been tested on IBM SP2 and SGI - Origin 2000 systems. It uses the ROMIO version of MPIO interface - for parallel I/O supports. +* This release of parallel HDF5 has been tested on IBM SP2 and SGI + Origin 2000 systems. It uses the ROMIO version of MPIO interface + for parallel I/O supports. -+) Useful URL's. - Parallel HDF webpage: "http://hdf.ncsa.uiuc.edu/Parallel_HDF/" - ROMIO webpage: "http://www.mcs.anl.gov/home/thakur/romio/" +* Useful URL's. + Parallel HDF webpage: "http://hdf.ncsa.uiuc.edu/Parallel_HDF/" + ROMIO webpage: "http://www.mcs.anl.gov/home/thakur/romio/" -+) Some to-do items for future releases - support for Intel Teraflop platform. - support for unlimited dimension datasets. - support for file access via a communicator besides MPI_COMM_WORLD. - support for collective access to datasets. - support for independent create/open of datasets. +* Some to-do items for future releases + support for Intel Teraflop platform. + support for unlimited dimension datasets. + support for file access via a communicator besides MPI_COMM_WORLD. + support for collective access to datasets. + support for independent create/open of datasets. diff --git a/bin/checkposix b/bin/checkposix index ef2951b..b01d323 100755 --- a/bin/checkposix +++ b/bin/checkposix @@ -46,14 +46,19 @@ while (<>) { # calls. next if $name =~ /^(if|for|return|sizeof|switch|while|void)$/; + # Ignore things that get misdetected because of the simplified + # parsing that takes place here. + next if $name =~ /^int$/; + # These are really HDF5 functions/macros even though they don't # start with `h' or `H'. next if $name =~ /^FUNC_(ENTER|LEAVE)(_INIT)?$/; next if $name =~ /^U?INT(8|16|32|64)(ENCODE|DECODE)$/; - next if $name =~ /^(MIN|MAX3?|NELMTS|BOUND|CONSTR)$/; + next if $name =~ /^(MIN3?|MAX3?|NELMTS|BOUND|CONSTR)$/; + next if $name =~ /^addr_defined$/; # These functions/macros are exempt. - next if $name =~ /^(assert|main|[fs]?printf)$/; + next if $name =~ /^(assert|main|[fs]?printf|va_(start|arg|end))$/; print "$ARGV:$.: $name\n"; } diff --git a/doc/html/Datatypes.html b/doc/html/Datatypes.html index 50e0ab7..4c57359 100644 --- a/doc/html/Datatypes.html +++ b/doc/html/Datatypes.html @@ -1157,7 +1157,7 @@ typedef herr_t (*H5T_conv_t)(hid_t <em>src_type</em>, initialized. This is useful for those functions requiring some extra buffer space as the buffer can probably be allocated more efficiently by the library (the application can supply - the buffer as part of the dataset transfer template). + the buffer as part of the dataset transfer property list). <br><br> <dt><code>H5T_BKG_YES</code> @@ -1388,7 +1388,7 @@ H5Tregister_soft ("cus2be", H5T_INTEGER, H5T_INTEGER, cray_ushort2be); <address><a href="mailto:koziol@ncsa.uiuc.edu">Quincey Koziol</a></address> <!-- Created: Thu Dec 4 14:57:32 EST 1997 --> <!-- hhmts start --> -Last modified: Fri Aug 7 10:24:52 EDT 1998 +Last modified: Tue Sep 8 14:43:32 EDT 1998 <!-- hhmts end --> </body> </html> diff --git a/doc/html/ExternalFiles.html b/doc/html/ExternalFiles.html index 39ebd2b..91b72c7 100644 --- a/doc/html/ExternalFiles.html +++ b/doc/html/ExternalFiles.html @@ -110,16 +110,16 @@ Currently, the default low-level file driver is used for all family members (H5F_LOW_DFLT, usually set to be Section 2 I/O or Section 3 stdio), but we'll probably eventually want to pass - that as a parameter of the file access template, which hasn't - been implemented yet. When creating a family, a default family - member size is used (defined at the top H5Ffamily.c, currently - 64MB) but that also should be settable in the file access - template. When opening an existing family, the size of the first - member is used to determine the member size (flushing/closing a - family ensures that the first member is the correct size) but - the other family members don't have to be that large (the local - address space, however, is logically the same size for all - members). + that as a parameter of the file access property list, which + hasn't been implemented yet. When creating a family, a default + family member size is used (defined at the top H5Ffamily.c, + currently 64MB) but that also should be settable in the file + access property list. When opening an existing family, the size + of the first member is used to determine the member size + (flushing/closing a family ensures that the first member is the + correct size) but the other family members don't have to be that + large (the local address space, however, is logically the same + size for all members). <p>I haven't implemented a split meta/raw family yet but am rather curious to see how it would perform. I was planning to use the @@ -130,7 +130,7 @@ then we'll chose the split family and use the default low level driver for each of the two family members. Eventually we'll want to pass these kinds of things through the file access - template instead of relying on naming convention. + property list instead of relying on naming convention. <h3>External Raw Data</h3> @@ -199,7 +199,7 @@ struct H5F_mount_t { <p>The <code>H5Fmount</code> function takes the ID of an open file, the name of a to-be-mounted file, the name of the mount - point, and a file access template (like <code>H5Fopen</code>). + point, and a file access property list (like <code>H5Fopen</code>). It opens the new file and adds a record to the parent's mount table. The <code>H5Funmount</code> function takes the parent file ID and the name of the mount point and closes the file @@ -272,7 +272,7 @@ struct H5F_mount_t { <address><a href="mailto:matzke@llnl.gov">Robb Matzke</a></address> <!-- Created: Sat Nov 8 18:08:52 EST 1997 --> <!-- hhmts start --> -Last modified: Wed Nov 12 15:01:14 EST 1997 +Last modified: Tue Sep 8 14:43:32 EDT 1998 <!-- hhmts end --> </body> </html> diff --git a/doc/html/Files.html b/doc/html/Files.html index d620b75..36512f7 100644 --- a/doc/html/Files.html +++ b/doc/html/Files.html @@ -61,7 +61,7 @@ set. The <em>access_properties</em> is a file access property list ID or <code>H5P_DEFAULT</code> for the default I/O access parameters. Creating and changing the parameters for access - templates is documented further below. Files which are opened + property lists is documented further below. Files which are opened more than once return a unique identifier for each <code>H5Fopen()</code> call and can be accessed through all file IDs. The return value is an ID for the open file and it @@ -200,40 +200,40 @@ an address which is a multiple of some number. </dl> </ul> - <h2>5. Examples of using file templates</h2> + <h2>5. Examples of using file property lists</h2> - <h3>5.1. Example of using file creation templates</h3> + <h3>5.1. Example of using file creation property lists</h3> <p>This following example shows how to create a file with 64-bit object offsets and lengths:<br> <pre> - hid_t create_template; + hid_t create_plist; hid_t file_id; - create_template = H5Pcreate(H5P_FILE_CREATE); - H5Pset_sizes(create_template, 8, 8); + create_plist = H5Pcreate(H5P_FILE_CREATE); + H5Pset_sizes(create_plist, 8, 8); file_id = H5Fcreate("test.h5", H5F_ACC_TRUNC, - create_template, H5P_DEFAULT); + create_plist, H5P_DEFAULT); . . . H5Fclose(file_id); </pre> - <h3>5.2. Example of using file creation templates</h3> + <h3>5.2. Example of using file creation plist</h3> <p>This following example shows how to open an existing file for independent datasets access by MPI parallel I/O:<br> <pre> - hid_t access_template; + hid_t access_plist; hid_t file_id; - access_template = H5Pcreate(H5P_FILE_ACCESS); - H5Pset_mpi(access_template, MPI_COMM_WORLD, MPI_INFO_NULL); + access_plist = H5Pcreate(H5P_FILE_ACCESS); + H5Pset_mpi(access_plist, MPI_COMM_WORLD, MPI_INFO_NULL); /* H5Fopen must be called collectively */ - file_id = H5Fopen("test.h5", H5F_ACC_RDWR, access_template); + file_id = H5Fopen("test.h5", H5F_ACC_RDWR, access_plist); . . . @@ -532,7 +532,7 @@ <address><a href="mailto:matzke@llnl.gov">Robb Matzke</a></address> <!-- Created: Tue Jan 27 09:11:27 EST 1998 --> <!-- hhmts start --> -Last modified: Thu Aug 6 16:17:08 EDT 1998 +Last modified: Tue Sep 8 14:43:31 EDT 1998 <!-- hhmts end --> </body> </html> diff --git a/doc/html/H5.api.html b/doc/html/H5.api.html index b2402a5..5f3cf78 100644 --- a/doc/html/H5.api.html +++ b/doc/html/H5.api.html @@ -19,33 +19,33 @@ HDF5 Draft API Specification <li><a href="#File-Open">H5Fopen</a> <li><a href="#File-Create">H5Fcreate</a> <li><a href="#File-IsHDF5">H5Fis_hdf5</a> - <li><a href="#File-GetCreateTemplate">H5Fget_create_template</a> + <li><a href="#File-GetCreatePlist">H5Fget_create_plist</a> <li><a href="#File-Close">H5Fclose</a> </ol> -<li><a href="#Template">Template</a> - H5P<name> - API for manipulating object templates +<li><a href="#Plist">Property list</a> - H5P<name> - API for manipulating object property lists <ol type=A> - <li><a href="#Template-Create">H5Pcreate</a> - <li><a href="#Template-GetClass">H5Pget_class</a> - <li><a href="#Template-Copy">H5Pcopy</a> - <li><a href="#Template-Close">H5Pclose</a> - <li><a href="#Template-GetVersion">H5Pget_version</a> - <li><a href="#Template-SetUserblock">H5Pset_userblock</a> - <li><a href="#Template-GetUserblock">H5Pget_userblock</a> - <li><a href="#Template-SetSizes">H5Pset_sizes</a> - <li><a href="#Template-GetSizes">H5Pget_sizes</a> - <li><a href="#Template-SetMPI">H5Pset_mpi</a> - <li><a href="#Template-GetMPI">H5Pget_mpi</a> - <li><a href="#Template-SetXfer">H5Pset_xfer</a> - <li><a href="#Template-GetXfer">H5Pget_xfer</a> - <li><a href="#Template-SetSymK">H5Pset_sym_k</a> - <li><a href="#Template-GetSymK">H5Pget_sym_k</a> - <li><a href="#Template-SetIstoreK">H5Pset_istore_k</a> - <li><a href="#Template-GetIstoreK">H5Pget_istore_k</a> - <li><a href="#Template-SetLayout">H5Pset_layout</a> - <li><a href="#Template-GetLayout">H5Pget_layout</a> - <li><a href="#Template-SetChunk">H5Pset_chunk</a> - <li><a href="#Template-GetChunk">H5Pget_chunk</a> + <li><a href="#Plist-Create">H5Pcreate</a> + <li><a href="#Plist-GetClass">H5Pget_class</a> + <li><a href="#Plist-Copy">H5Pcopy</a> + <li><a href="#Plist-Close">H5Pclose</a> + <li><a href="#Plist-GetVersion">H5Pget_version</a> + <li><a href="#Plist-SetUserblock">H5Pset_userblock</a> + <li><a href="#Plist-GetUserblock">H5Pget_userblock</a> + <li><a href="#Plist-SetSizes">H5Pset_sizes</a> + <li><a href="#Plist-GetSizes">H5Pget_sizes</a> + <li><a href="#Plist-SetMPI">H5Pset_mpi</a> + <li><a href="#Plist-GetMPI">H5Pget_mpi</a> + <li><a href="#Plist-SetXfer">H5Pset_xfer</a> + <li><a href="#Plist-GetXfer">H5Pget_xfer</a> + <li><a href="#Plist-SetSymK">H5Pset_sym_k</a> + <li><a href="#Plist-GetSymK">H5Pget_sym_k</a> + <li><a href="#Plist-SetIstoreK">H5Pset_istore_k</a> + <li><a href="#Plist-GetIstoreK">H5Pget_istore_k</a> + <li><a href="#Plist-SetLayout">H5Pset_layout</a> + <li><a href="#Plist-GetLayout">H5Pget_layout</a> + <li><a href="#Plist-SetChunk">H5Pset_chunk</a> + <li><a href="#Plist-GetChunk">H5Pget_chunk</a> </ol> <!-- @@ -253,19 +253,20 @@ documented below. <dt><strong>Signature:</strong> <dd><em>hid_t </em><code>H5Fopen</code>(<em>const char *</em><code>name</code>, <em>uintn</em> <code>flags</code>, - <em>hid_t</em> <code>access_template</code> + <em>hid_t</em> <code>access_plist</code> ) <dt><strong>Description:</strong> <dd>This is the primary function for opening existing HDF5 files. - The <code>flags</code> parameter determines the file access mode. - There is no read flag, all open files are implicitily opened for - read access. - All flags may be combined with the '|' (boolean OR operator) to - change the behavior of the file open call. - The <code>access_template</code> parameter is a template containing - additional information required for specific methods of access, - parallel I/O for example. The paramters for access templates are - described in the H5P API documentation. + The <code>flags</code> parameter determines the file + access mode. There is no read flag, all open files are + implicitily opened for read access. All flags may be + combined with the '|' (boolean OR operator) to change the + behavior of the file open call. The + <code>access_plist</code> parameter is a property list + containing additional information required for specific + methods of access, parallel I/O for example. The + paramters for access property lists are described in the + H5P API documentation. <dt><strong>Parameters:</strong> <dl> <dt><em>const char *</em><code>name</code> @@ -276,11 +277,11 @@ documented below. <dt>H5F_ACC_RDWR <dd>Allow read and write access to file. </dl></ul> - <dt><em>hid_t</em><code>access_template</code> - <dd>Template indicating the file access properties. + <dt><em>hid_t</em><code>access_plist</code> + <dd>Property list indicating the file access properties. If parallel file access is desired, this is a collective call according to the communicator stored in the - access_template. Use 0 for default access template. + access_plist. Use 0 for default access properties. </dl> <dt><strong>Returns:</strong> <dd>An ID (of type <em>hid_t</em>) for the file upon success, @@ -293,22 +294,23 @@ documented below. <dt><strong>Signature:</strong> <dd><em>hid_t </em><code>H5Fcreate</code>(<em>const char *</em><code>name</code>, <em>uintn</em> <code>flags</code>, - <em>hid_t</em> <code>create_template</code>, - <em>hid_t</em> <code>access_template</code> + <em>hid_t</em> <code>create_plist</code>, + <em>hid_t</em> <code>access_plist</code> ) <dt><strong>Description:</strong> <dd>This is the primary function for opening and creating HDF5 files. - The <code>flags</code> parameter determines whether an existing - file will be overwritten or not. All newly created files are opened - for both reading and writing. - All flags may be combined with the '|' (boolean OR operator) to - change the behavior of the file open call. - The <code>create_template</code> and <code>access_template</code> - parameters are templates containing additional information required - for specific methods of access or particular aspects of the file - to set when creating a file. - The parameters for creation and access templates are - described in the H5P API documentation. + The <code>flags</code> parameter determines whether an + existing file will be overwritten or not. All newly + created files are opened for both reading and writing. + All flags may be combined with the '|' (boolean OR + operator) to change the behavior of the file open call. + The <code>create_plist</code> and + <code>access_plist</code> parameters are property lists + containing additional information required for specific + methods of access or particular aspects of the file to set + when creating a file. The parameters for creation and + access property lists are described in the H5P API + documentation. <dt><strong>Parameters:</strong> <dl> <dt><em>const char *</em><code>name</code> @@ -321,13 +323,14 @@ documented below. be truncated, erasing all data previously stored in the file. </dl></ul> - <dt><em>hid_t</em><code>create_template</code> - <dd>File creation template ID, used when modifying default file meta-data - <dt><em>hid_t</em><code>access_template</code> - <dd>Template indicating the file access properties. + <dt><em>hid_t</em><code>create_plist</code> + <dd>File creation property list ID, used when modifying + default file meta-data. + <dt><em>hid_t</em><code>access_plist</code> + <dd>Property list indicating the file access properties. If parallel file access is desired, this is a collective call according to the communicator stored in the - access_template. Use 0 for default access template. + access_plist. Use 0 for default access properties. </dl> <dt><strong>Returns:</strong> <dd>An ID (of type <em>hid_t</em>) for the file upon success, @@ -353,18 +356,18 @@ documented below. <hr> <dl> -<dt><strong>Name:</strong> <a name="File-GetCreateTemplate">H5Fget_create_template</a> +<dt><strong>Name:</strong> <a name="File-GetCreatePlist">H5Fget_create_plist</a> <dt><strong>Signature:</strong> - <dd><em>hid_t </em><code>H5Fget_create_template</code>(<em>hid_t</em> <code>file_id</code> + <dd><em>hid_t </em><code>H5Fget_create_plist</code>(<em>hid_t</em> <code>file_id</code> ) <dt><strong>Description:</strong> - <dd>This function returns an template ID with a copy of the parameters - used to create this file. Useful for duplicating the parameters - when creating another file. + <dd>This function returns a property list ID with a copy of + the parameters used to create this file. Useful for + duplicating the parameters when creating another file. <dt><strong>Parameters:</strong> <dl> <dt><em>hid_t</em> <code>file_id</code> - <dd>File ID to get creation template of + <dd>File ID for which to get creation property list. </dl> <dt><strong>Returns:</strong> <dd>zero/negative @@ -390,24 +393,24 @@ documented below. </dl> <hr> -<h2><a name="Template">Template API Functions</a></h2> -<P>These functions manipulate template objects to allow objects which require +<h2><a name="Plist">Property List API Functions</a></h2> +<P>These functions manipulate property lists to allow objects which require many different parameters to be easily manipulated. <br> <br> <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-Create">H5Pcreate</a> +<dt><strong>Name:</strong> <a name="Plist-Create">H5Pcreate</a> <dt><strong>Signature:</strong> <dd><em>hid_t </em><code>H5Pcreate</code>(<em>H5P_class_t</em> <code>type</code> ) <dt><strong>Description:</strong> - <dd>This function returns a template ID for a copy of the default - template of a given type. + <dd>This function returns a property list ID for a copy of the default + property list of a given type. <br> <dl> - <dt>Template Types and Uses: + <dt>Property List Types and Uses: <ul><dl> <dt>H5P_FILE_CREATE <dd>Used to set the metadata information about a file during @@ -425,7 +428,7 @@ many different parameters to be easily manipulated. <dt><strong>Parameters:</strong> <dl> <dt><em>H5P_class_t</em> <code>type</code> - <dd>The type of template to create. + <dd>The type of property list to create. </dl> <dt><strong>Returns:</strong> <dd>Valid ID on success, negative on failure @@ -433,16 +436,16 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-Close">H5Pclose</a> +<dt><strong>Name:</strong> <a name="Plist-Close">H5Pclose</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pclose</code>(<em>hid_t</em> <code>template_id</code> + <dd><em>herr_t </em><code>H5Pclose</code>(<em>hid_t</em> <code>plist_id</code> ) <dt><strong>Description:</strong> - <dd>This function terminates access to a template. + <dd>This function terminates access to a property list. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to terminate access to. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to terminate access to. </dl> <dt><strong>Returns:</strong> <dd>zero/negative @@ -450,43 +453,43 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-GetClass">H5Pget_class</a> +<dt><strong>Name:</strong> <a name="Plist-GetClass">H5Pget_class</a> <dt><strong>Signature:</strong> - <dd><em>H5P_class_t </em><code>H5Pget_class</code>(<em>hid_t</em> <code>template_id</code> + <dd><em>H5P_class_t </em><code>H5Pget_class</code>(<em>hid_t</em> <code>plist_id</code> ) <dt><strong>Description:</strong> - <dd>This function queries the class of a template ID. + <dd>This function queries the class of a property list ID. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to query. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to query. </dl> <dt><strong>Returns:</strong> - <dd>Template class code on success, negative on failure + <dd>Property list class code on success, negative on failure </dl> <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-Copy">H5Pcopy</a> +<dt><strong>Name:</strong> <a name="Plist-Copy">H5Pcopy</a> <dt><strong>Signature:</strong> - <dd><em>hid_t </em><code>H5Pcopy</code>(<em>hid_t</em> <code>template_id</code> + <dd><em>hid_t </em><code>H5Pcopy</code>(<em>hid_t</em> <code>plist_id</code> ) <dt><strong>Description:</strong> - <dd>This function makes a copy of a template ID. + <dd>This function makes a copy of a property list ID. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to duplicate. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to duplicate. </dl> <dt><strong>Returns:</strong> - <dd>Template ID on success, negative on failure + <dd>Property list ID on success, negative on failure </dl> <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-GetVersion">H5Pget_version</a> +<dt><strong>Name:</strong> <a name="Plist-GetVersion">H5Pget_version</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pget_version</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pget_version</code>(<em>hid_t</em> <code>plist_id</code>, <em>int *</em> <code>boot</code>, <em>int *</em> <code>freelist</code>, <em>int *</em> <code>stab</code>, @@ -494,12 +497,12 @@ many different parameters to be easily manipulated. ) <dt><strong>Description:</strong> <dd>This function queries the version information of various objects - for a file creation template. Any pointer parameters which are - passed as NULL are not queried. + for a file creation property list. Any pointer parameters + which are passed as NULL are not queried. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to query. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to query. <dt><em>int *</em> <code>boot</code> <dd>Pointer to location to return boot block version number. <dt><em>int *</em> <code>freelist</code> @@ -515,21 +518,21 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-SetUserblock">H5Pset_userblock</a> +<dt><strong>Name:</strong> <a name="Plist-SetUserblock">H5Pset_userblock</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pset_userblock</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pset_userblock</code>(<em>hid_t</em> <code>plist_id</code>, <em>hsize_t</em> <code>size</code> ) <dt><strong>Description:</strong> <dd>This function sets the size of the user-block located at the beginning of an HDF5 file. This function is only valid for - file creation templates. The default user-block size is 0. + file creation property lists. The default user-block size is 0. Only values which are powers of 2 larger equal to 512 or larger may be used as a valid user-block size. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template to modify. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list to modify. <dt><em>hsize_t</em> <code>size</code> <dd>Size of the user-block in bytes. </dl> @@ -539,19 +542,19 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-GetUserblock">H5Pget_userblock</a> +<dt><strong>Name:</strong> <a name="Plist-GetUserblock">H5Pget_userblock</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pget_userblock</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pget_userblock</code>(<em>hid_t</em> <code>plist_id</code>, <em>hsize_t *</em> <code>size</code> ) <dt><strong>Description:</strong> <dd>This function retrieves the size of the user-block located at the beginning of an HDF5 file. This function is only valid for - file creation templates. + file creation property lists. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to query. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to query. <dt><em>hsize_t *</em> <code>size</code> <dd>Pointer to location to return user-block size. </dl> @@ -561,23 +564,23 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-SetSizes">H5Pset_sizes</a> +<dt><strong>Name:</strong> <a name="Plist-SetSizes">H5Pset_sizes</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pset_sizes</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pset_sizes</code>(<em>hid_t</em> <code>plist_id</code>, <em>size_t</em> <code>sizeof_addr</code>, <em>size_t</em> <code>sizeof_size</code> ) <dt><strong>Description:</strong> <dd>This function sets the byte size of the offsets and lengths used to - address objects in an HDF5 file. This function is only valid for - file creation templates. Passing in a value of 0 for one of the - sizeof parameters retains the current value. The default value - for both values is 4 bytes. Valid values currenly are 2, 4, 8 and - 16. + address objects in an HDF5 file. This function is only + valid for file creation property lists. Passing in a + value of 0 for one of the sizeof parameters retains the + current value. The default value for both values is 4 + bytes. Valid values currenly are 2, 4, 8 and 16. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template to modify. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list to modify. <dt><em>size_t</em> <code>sizeof_addr</code> <dd>Size of an object offset in bytes. <dt><em>size_t</em> <code>sizeof_size</code> @@ -589,20 +592,20 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-GetSizes">H5Pget_sizes</a> +<dt><strong>Name:</strong> <a name="Plist-GetSizes">H5Pget_sizes</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pget_sizes</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pget_sizes</code>(<em>hid_t</em> <code>plist_id</code>, <em>size_t *</em> <code>sizeof_addr</code>, <em>size_t *</em> <code>sizeof_size</code> ) <dt><strong>Description:</strong> <dd>This function retrieves the size of the offsets and lengths used in an HDF5 file. This function is only valid for file creation - templates. + property lists. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to query. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to query. <dt><em>size_t *</em> <code>size</code> <dd>Pointer to location to return offset size in bytes. <dt><em>size_t *</em> <code>size</code> @@ -614,7 +617,7 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-SetMPI">H5Pset_mpi</a> +<dt><strong>Name:</strong> <a name="Plist-SetMPI">H5Pset_mpi</a> <dt><strong>Signature:</strong> <dd><em>herr_t </em><code>H5Pset_mpi</code>(<em>hid_t</em> <code>tid</code>, <em>MPI_Comm</em> <code>comm</code>, @@ -622,29 +625,29 @@ many different parameters to be easily manipulated. ) <dt><strong>Description:</strong> <dd>Store the access mode for parallel I/O call and the user supplied - communicator and info in the access template which can then + communicator and info in the access property list which can then be used to open file. This function is available only in the parallel HDF5 library. <dt><strong>Parameters:</strong> <dl> <dt><em>hid_t</em> <code>tid</code> - <dd>ID of template to modify + <dd>ID of property list to modify <dt><em>MPI_Comm</em> <code>comm</code> <dd> MPI communicator to be used for file open as defined in MPI_FILE_OPEN of MPI-2. This function does not make a duplicated communicator. Any modification to comm after this function call returns may have undetermined effect - to the access template. Users should call this function - again to setup the template. + to the access property list. Users should call this function + again to setup the property list. <dt><em>MPI_Info</em> <code>info</code> <dd> MPI info object to be used for file open as defined in MPI_FILE_OPEN of MPI-2. This function does not make a duplicated info. Any modification to info after this function call returns may have undetermined effect - to the access template. Users should call this function - again to setup the template. + to the access property list. Users should call this function + again to setup the property list. </dl> <dt><strong>Returns:</strong> <dd>zero/negative @@ -652,7 +655,7 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-GetMPI">H5Pget_mpi</a> +<dt><strong>Name:</strong> <a name="Plist-GetMPI">H5Pget_mpi</a> <dt><strong>Signature:</strong> <dd><em>herr_t </em><code>H5Pget_mpi</code>(<em>hid_t</em> <code>tid</code>, <em>MPI_Comm</em> <code>*comm</code>, @@ -678,7 +681,7 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-SetXfer">H5Pset_xfer</a> +<dt><strong>Name:</strong> <a name="Plist-SetXfer">H5Pset_xfer</a> <dt><strong>Signature:</strong> <dd><em>herr_t </em><code>H5Pset_xfer</code>(<em>hid_t</em> <code>tid</code>, <em>H5D_transfer_t</em> <code>data_xfer_mode</code> @@ -707,7 +710,7 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-GetXfer">H5Pget_xfer</a> +<dt><strong>Name:</strong> <a name="Plist-GetXfer">H5Pget_xfer</a> <dt><strong>Signature:</strong> <dd><em>herr_t </em><code>H5Pget_xfer</code>(<em>hid_t</em> <code>tid</code>, <em>H5D_transfer_t *</em> <code>data_xfer_mode</code> @@ -729,31 +732,32 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-SetSymK">H5Pset_sym_k</a> +<dt><strong>Name:</strong> <a name="Plist-SetSymK">H5Pset_sym_k</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pset_sym_k</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pset_sym_k</code>(<em>hid_t</em> <code>plist_id</code>, <em>size_t</em> <code>ik</code>, <em>size_t</em> <code>lk</code> ) <dt><strong>Description:</strong> <dd>This function sets the size of parameters used to control the - symbol table nodes. This function is only valid for - file creation templates. Passing in a value of 0 for one of the - parameters retains the current value. - <code>ik</code> is one half the rank of a tree that stores a symbol - table for a group. Internal nodes of the symbol table are on - average 75% full. That is, the average rank of the tree is - 1.5 times the value of <code>ik</code>. - <code>lk</code> is one half of the number of symbols that can be stored in - a symbol table node. A symbol table node is the leaf of a - symbol table tree which is used to store a group. When - symbols are inserted randomly into a group, the group's - symbol table nodes are 75% full on average. That is, they - contain 1.5 times the number of symbols specified by <code>lk</code>. -<dt><strong>Parameters:</strong> - <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to query. + symbol table nodes. This function is only valid for file + creation property lists. Passing in a value of 0 for one + of the parameters retains the current value. + <code>ik</code> is one half the rank of a tree that stores + a symbol table for a group. Internal nodes of the symbol + table are on average 75% full. That is, the average rank + of the tree is 1.5 times the value of + <code>ik</code>. <code>lk</code> is one half of the number + of symbols that can be stored in a symbol table node. A + symbol table node is the leaf of a symbol table tree which + is used to store a group. When symbols are inserted + randomly into a group, the group's symbol table nodes are + 75% full on average. That is, they contain 1.5 times the + number of symbols specified by <code>lk</code>. +<dt><strong>Parameters:</strong> + <dl> + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to query. <dt><em>size_t</em> <code>ik</code> <dd>Symbol table tree rank. <dt><em>size_t</em> <code>lk</code> @@ -765,23 +769,23 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-GetSymK">H5Pget_sym_k</a> +<dt><strong>Name:</strong> <a name="Plist-GetSymK">H5Pget_sym_k</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pget_sym_k</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pget_sym_k</code>(<em>hid_t</em> <code>plist_id</code>, <em>size_t *</em> <code>ik</code>, <em>size_t *</em> <code>lk</code> ) <dt><strong>Description:</strong> <dd>This function retrieves the size of the symbol table's B-tree 1/2 rank and the symbol table's leaf node 1/2 size. See - information for <a href="#Template-SetSymK">H5Pset_sym_k</a> for - more information. This function is only valid for file creation - templates. If a parameter valued is set to NULL, that parameter is - not retrieved. + information for <a href="#Plist-SetSymK">H5Pset_sym_k</a> + for more information. This function is only valid for file + creation property lists. If a parameter valued is set to + NULL, that parameter is not retrieved. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to query. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to query. <dt><em>size_t *</em> <code>ik</code> <dd>Pointer to location to return the symbol table's B-tree 1/2 rank. <dt><em>size_t *</em> <code>size</code> @@ -793,23 +797,24 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-SetIstoreK">H5Pset_istore_k</a> +<dt><strong>Name:</strong> <a name="Plist-SetIstoreK">H5Pset_istore_k</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pset_istore_k</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pset_istore_k</code>(<em>hid_t</em> <code>plist_id</code>, <em>size_t</em> <code>ik</code> ) <dt><strong>Description:</strong> <dd>This function sets the size of the parameter used to control the - B-trees for indexing chunked datasets. This function is only valid for - file creation templates. Passing in a value of 0 for one of the - parameters retains the current value. - <code>ik</code> is one half the rank of a tree that stores chunked raw - data. On average, such a tree will be 75% full, or have an - average rank of 1.5 times the value of <code>ik</code>. + B-trees for indexing chunked datasets. This function is + only valid for file creation property lists. Passing in a + value of 0 for one of the parameters retains the current + value. <code>ik</code> is one half the rank of a tree + that stores chunked raw data. On average, such a tree + will be 75% full, or have an average rank of 1.5 times the + value of <code>ik</code>. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to query. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to query. <dt><em>size_t</em> <code>ik</code> <dd>1/2 rank of chunked storage B-tree. </dl> @@ -819,20 +824,20 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-GetIstoreK">H5Pget_istore_k</a> +<dt><strong>Name:</strong> <a name="Plist-GetIstoreK">H5Pget_istore_k</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pget_istore_k</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pget_istore_k</code>(<em>hid_t</em> <code>plist_id</code>, <em>size_t *</em> <code>ik</code> ) <dt><strong>Description:</strong> <dd>Queries the 1/2 rank of an indexed storage B-tree. See - <a href="#Template-SetIstoreK">H5Pset_istore_k</a> for details. + <a href="#Plist-SetIstoreK">H5Pset_istore_k</a> for details. The argument <code>ik</code> may be the null pointer. This - function is only valid for file creation templates. + function is only valid for file creation property lists. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to query. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to query. <dt><em>size_t *</em> <code>ik</code> <dd>Pointer to location to return the chunked storage B-tree 1/2 rank. </dl> @@ -842,15 +847,16 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-SetLayout">H5Pset_layout</a> +<dt><strong>Name:</strong> <a name="Plist-SetLayout">H5Pset_layout</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pset_layout</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pset_layout</code>(<em>hid_t</em> <code>plist_id</code>, <em>H5D_layout_t</em> <code>layout</code> ) <dt><strong>Description:</strong> <dd>This function sets the type of storage used store the raw data for - a dataset. This function is only valid for dataset creation templates. - Valid parameter for <code>layout</code> are: + a dataset. This function is only valid for dataset + creation property lists. Valid parameter for + <code>layout</code> are: <ul> <dl> <dt>H5D_COMPACT <dd>Store raw data and object header contiguously in file. @@ -866,8 +872,8 @@ many different parameters to be easily manipulated. </dl> </ul> <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to query. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to query. <dt><em>H5D_layout_t</em> <code>layout</code> <dd>Type of storage layout for raw data. </dl> @@ -877,14 +883,14 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-GetLayout">H5Pget_layout</a> +<dt><strong>Name:</strong> <a name="Plist-GetLayout">H5Pget_layout</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pget_layout</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pget_layout</code>(<em>hid_t</em> <code>plist_id</code>, <em>H5D_layout_t *</em> <code>layout</code> ) <dt><strong>Description:</strong> <dd>Queries the layout of the raw data for a dataset. - This function is only valid for dataset creation templates. + This function is only valid for dataset creation property lists. Valid types for <code>layout</code> are: <ul> <dl> <dt>H5D_COMPACT @@ -898,8 +904,8 @@ many different parameters to be easily manipulated. </dl> </ul> <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to query. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to query. <dt><em>H5D_layout_t *</em> <code>layout</code> <dd>Pointer to location to return the storage layout. </dl> @@ -909,24 +915,25 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-SetChunk">H5Pset_chunk</a> +<dt><strong>Name:</strong> <a name="Plist-SetChunk">H5Pset_chunk</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pset_chunk</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pset_chunk</code>(<em>hid_t</em> <code>plist_id</code>, <em>int</em> <code>ndims</code>, <em>const hsize_t *</em> <code>dim</code> ) <dt><strong>Description:</strong> <dd>This function sets the size of the chunks used to store a chunked - layout dataset. This function is only valid for dataset creation - templates. The <code>ndims</code> parameter currently must be the - same size as the rank of the dataset. The values of the - <code>dim</code> array define the size of the chunks to store the - dataset's raw data. As a side-effect, the layout of the dataset is - changed to H5D_CHUNKED, if it isn't already. + layout dataset. This function is only valid for dataset + creation property lists. The <code>ndims</code> parameter + currently must be the same size as the rank of the + dataset. The values of the <code>dim</code> array define + the size of the chunks to store the dataset's raw data. + As a side-effect, the layout of the dataset is changed to + H5D_CHUNKED, if it isn't already. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to query. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to query. <dt><em>int</em> <code>ndims</code> <dd>The number of dimensions of each chunk. <dt><em>const hsize_t *</em> <code>dim</code> @@ -938,20 +945,20 @@ many different parameters to be easily manipulated. <hr> <dl> -<dt><strong>Name:</strong> <a name="Template-GetChunk">H5Pget_chunk</a> +<dt><strong>Name:</strong> <a name="Plist-GetChunk">H5Pget_chunk</a> <dt><strong>Signature:</strong> - <dd><em>herr_t </em><code>H5Pget_chunk</code>(<em>hid_t</em> <code>template_id</code>, + <dd><em>herr_t </em><code>H5Pget_chunk</code>(<em>hid_t</em> <code>plist_id</code>, <em>int</em> <code>max_ndims</code> <em>hsize_t *</em> <code>dims</code> ) <dt><strong>Description:</strong> <dd>Queries the size of chunks for the raw data of a chunked layout dataset. This function is only valid for dataset creation - templates. + property lists. <dt><strong>Parameters:</strong> <dl> - <dt><em>hid_t</em> <code>template_id</code> - <dd>Template ID to query. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>Property list ID to query. <dt><em>int</em> <code>max_ndims</code> <dd>Size of the <code>dims</code> array. <dt><em>hsize_t *</em> <code>dims</code> @@ -1100,19 +1107,20 @@ be constructed from a datatype and a dataspace. <em>const char *</em><code>name</code>, <em>hid_t</em><code>type_id</code>, <em>hid_t</em><code>space_id</code>, - <em>hid_t</em><code>template_id</code> + <em>hid_t</em><code>plist_id</code> ) <dt><strong>Description:</strong> <dd>This function creates a new dataset in the file specified with the - <code>file_id</code>. The <code>type_id</code> and <code>space_id</code> - are the IDs of the datatype and dataspace used to construct the - framework of the dataset. The datatype and dataspace parameters - describe the dataset as it will exist in the file, which is not - necessarily the same as it exists in memory. The <code>template_id</code> - contains either the default template (H5P_DEFAULT) or a template_id - with particular constant properties used to create the dataset. The - <code>name</code> is used to identify the dataset in a group and must - be unique within that group. + <code>file_id</code>. The <code>type_id</code> and + <code>space_id</code> are the IDs of the datatype and + dataspace used to construct the framework of the dataset. The + datatype and dataspace parameters describe the dataset as it + will exist in the file, which is not necessarily the same as + it exists in memory. The <code>plist_id</code> contains + either the default property lists (H5P_DEFAULT) or a plist_id + with particular constant properties used to create the + dataset. The <code>name</code> is used to identify the + dataset in a group and must be unique within that group. <dt><strong>Parameters:</strong> <dl> <dt><em>hid_t</em> <code>file_id</code> @@ -1123,8 +1131,8 @@ be constructed from a datatype and a dataspace. <dd>ID of the datatype to use when creating the dataset. <dt><em>hid_t</em> <code>space_id</code> <dd>ID of the dataspace to use when creating the dataset. - <dt><em>hid_t</em> <code>template_id</code> - <dd>ID of the dataset creation template. + <dt><em>hid_t</em> <code>plist_id</code> + <dd>ID of the dataset creation property list. </dl> <dt><strong>Returns:</strong> <dd>Dataset ID on success, negative on failure. @@ -1195,15 +1203,16 @@ be constructed from a datatype and a dataspace. <dd><em>hid_t </em><code>H5Dget_create_plist</code>(<em>hid_t </em><code>dataset_id</code> ) <dt><strong>Description:</strong> - <dd>This function returns a copy of the dataset creation template for a - dataset. The template should be released with the H5Pclose() function. + <dd>This function returns a copy of the dataset creation property + list for a dataset. The property list should be released with the + H5Pclose() function. <dt><strong>Parameters:</strong> <dl> <dt><em>hid_t</em> <code>dataset_id</code> <dd>ID of the dataset to query. </dl> <dt><strong>Returns:</strong> - <dd>Dataset creation template ID on success, negative on failure. + <dd>Dataset creation property list ID on success, negative on failure. </dl> <hr> @@ -1214,22 +1223,24 @@ be constructed from a datatype and a dataspace. <em>hid_t</em> <code>mem_type_id</code>, <em>hid_t</em> <code>mem_space_id</code>, <em>hid_t</em> <code>file_space_id</code>, - <em>hid_t</em> <code>transfer_template_id</code>, + <em>hid_t</em> <code>transfer_plist_id</code>, <em>void *</em> <code>buf</code> ) <dt><strong>Description:</strong> <dd>This function reads raw data from the specified dataset into <code>buf</code>, - converting from the file datatype of the dataset into the memory - datatype specified in <code>mem_type_id</code>. The portion of the - dataset to read from disk is specified with the <code>file_spaceid</code> - which can contain a dataspace with a hyperslab selected or the constant - H5S_ALL, which indicates the entire dataset is to be read. The portion - of the dataset read into the memory buffer is specified with the - <code>mem_space_id</code> which can also be a hyperslab of the same - size or the H5S_ALL parameter to store the entire dataset. The - <code>transfer_template_id</code> is a dataset transfer template ID which - is used to provide addition parameters for the I/O operation or can - be H5P_DEFAULT for the default library behavior. + converting from the file datatype of the dataset into the + memory datatype specified in <code>mem_type_id</code>. The + portion of the dataset to read from disk is specified with the + <code>file_spaceid</code> which can contain a dataspace with a + hyperslab selected or the constant H5S_ALL, which indicates + the entire dataset is to be read. The portion of the dataset + read into the memory buffer is specified with the + <code>mem_space_id</code> which can also be a hyperslab of the + same size or the H5S_ALL parameter to store the entire + dataset. The <code>transfer_plist_id</code> is a dataset + transfer property list ID which is used to provide addition + parameters for the I/O operation or can be H5P_DEFAULT for the + default library behavior. <dt><strong>Parameters:</strong> <dl> <dt><em>hid_t</em> <code>dataset_id</code> @@ -1240,8 +1251,8 @@ be constructed from a datatype and a dataspace. <dd>ID of the memory dataspace. <dt><em>hid_t</em> <code>file_space_id</code> <dd>ID of the dataset's dataspace in the file. - <dt><em>hid_t</em> <code>transfer_template_id</code> - <dd>ID of a transfer template for this I/O operation. + <dt><em>hid_t</em> <code>transfer_plist_id</code> + <dd>ID of a transfer property list for this I/O operation. <dt><em>void *</em> <code>buf</code> <dd>Buffer to store information read from the file. </dl> @@ -1257,23 +1268,24 @@ be constructed from a datatype and a dataspace. <em>hid_t</em> <code>mem_type_id</code>, <em>hid_t</em> <code>mem_space_id</code>, <em>hid_t</em> <code>file_space_id</code>, - <em>hid_t</em> <code>transfer_template_id</code>, + <em>hid_t</em> <code>transfer_plist_id</code>, <em>const void *</em> <code>buf</code> ) <dt><strong>Description:</strong> <dd>This function writes raw data from memory into the specified dataset - converting from the memory datatype of the dataset specified in - <code>mem_type_id</code> into the file datatype. - The portion of the - dataset to written to disk is specified with the <code>file_spaceid</code> - which can contain a dataspace with a hyperslab selected or the constant - H5S_ALL, which indicates the entire dataset is to be written. The portion - of the dataset written from the memory buffer is specified with the - <code>mem_space_id</code> which can also be a hyperslab of the same - size or the H5S_ALL parameter to store the entire dataset. The - <code>transfer_template_id</code> is a dataset transfer template ID which - is used to provide addition parameters for the I/O operation or can - be H5P_DEFAULT for the default library behavior. + converting from the memory datatype of the dataset specified + in <code>mem_type_id</code> into the file datatype. The + portion of the dataset to written to disk is specified with + the <code>file_spaceid</code> which can contain a dataspace + with a hyperslab selected or the constant H5S_ALL, which + indicates the entire dataset is to be written. The portion of + the dataset written from the memory buffer is specified with + the <code>mem_space_id</code> which can also be a hyperslab of + the same size or the H5S_ALL parameter to store the entire + dataset. The <code>transfer_plist_id</code> is a dataset + transfer property list ID which is used to provide addition + parameters for the I/O operation or can be H5P_DEFAULT for the + default library behavior. <dt><strong>Parameters:</strong> <dl> <dt><em>hid_t</em> <code>dataset_id</code> @@ -1284,8 +1296,8 @@ be constructed from a datatype and a dataspace. <dd>ID of the memory dataspace. <dt><em>hid_t</em> <code>file_space_id</code> <dd>ID of the dataset's dataspace in the file. - <dt><em>hid_t</em> <code>transfer_template_id</code> - <dd>ID of a transfer template for this I/O operation. + <dt><em>hid_t</em> <code>transfer_plist_id</code> + <dd>ID of a transfer property list for this I/O operation. <dt><em>const void *</em> <code>buf</code> <dd>Buffer to store information to be written to the file. </dl> diff --git a/doc/html/H5.sample_code.html b/doc/html/H5.sample_code.html index b3e5336..3c46205 100644 --- a/doc/html/H5.sample_code.html +++ b/doc/html/H5.sample_code.html @@ -29,7 +29,7 @@ overwrite the previous file's information. <code> <pre> hid_t file_id; - file_id=<A HREF="H5.apiv2.html#File-Create">H5Fcreate</a>("example1.h5",H5F_ACC_EXCL,H5P_DEFAULT_TEMPLATE,H5P_DEFAULT_TEMPLATE); + file_id=<A HREF="H5.apiv2.html#File-Create">H5Fcreate</a>("example1.h5",H5F_ACC_EXCL,H5P_DEFAULT,H5P_DEFAULT); <A HREF="H5.apiv2.html#File-Close">H5Fclose</a>(file_id); diff --git a/doc/html/RM_H5F.html b/doc/html/RM_H5F.html index 926d7ba..cbb0a48 100644 --- a/doc/html/RM_H5F.html +++ b/doc/html/RM_H5F.html @@ -45,8 +45,8 @@ documented below. </ul> </td><td> </td><td valign=top> <ul> - <li><a href="#File-GetCreateTemplate">H5Fget_create_template</a> - <li><a href="#File-GetAccessTemplate">H5Fget_access_template</a> + <li><a href="#File-GetCreatePlist">H5Fget_create_plist</a> + <li><a href="#File-GetAccessPlist">H5Fget_access_plist</a> </ul> </td></tr> </table> @@ -126,8 +126,8 @@ documented below. The more complex behaviors of file creation and access are controlled through the file-creation and file-access property lists. The value of <code>H5P_DEFAULT</code> for - a template value indicates that the library should use - the default values for the appropriate template. Also see + a property list value indicates that the library should use + the default values for the appropriate property list. Also see <code>H5Fpublic.h</code> for the list of supported flags. <dt><strong>Parameters:</strong> <dl> @@ -151,14 +151,14 @@ documented below. <dd>Apply default file access and creation properties. </dl></ul> <dt><em>hid_t</em> <code>create_id</code> - <dd>File creation template identifier, used when modifying + <dd>File creation property list identifier, used when modifying default file meta-data. <dt><em>hid_t</em> <code>access_id</code> <dd>File access property list identifier. If parallel file access is desired, this is a collective call according to the communicator stored in the - <code>access_template</code>. - Use <code>0</code> for default access template. + <code>access_id</code>. + Use <code>0</code> for default access properties. </dl> <dt><strong>Returns:</strong> <dd>Returns a file identifier if successful; @@ -190,14 +190,14 @@ documented below. <hr> <dl> -<dt><strong>Name:</strong> <a name="File-GetCreateTemplate">H5Fget_create_template</a> +<dt><strong>Name:</strong> <a name="File-GetCreatePlist">H5Fget_create_plist</a> <dt><strong>Signature:</strong> - <dd><em>hid_t </em><code>H5Fget_create_template</code>(<em>hid_t</em> <code>file_id</code> + <dd><em>hid_t </em><code>H5Fget_create_plist</code>(<em>hid_t</em> <code>file_id</code> ) <dt><strong>Purpose:</strong> <dd>Returns a file creation property list identifier. <dt><strong>Description:</strong> - <dd><code>H5Fget_create_template</code> returns a file creation + <dd><code>H5Fget_create_plist</code> returns a file creation property list identifier identifying the creation properties used to create this file. This function is useful for duplicating properties when creating another file. @@ -222,13 +222,13 @@ documented below. <hr> <dl> -<dt><strong>Name:</strong> <a name="File-GetAccessTemplate">H5Fget_access_template</a> +<dt><strong>Name:</strong> <a name="File-GetAccessPlist">H5Fget_access_plist</a> <dt><strong>Signature:</strong> - <dd><em>hid_t </em><code>H5Fget_access_template</code>(<em>hid_t</em> <code>file_id</code>) + <dd><em>hid_t </em><code>H5Fget_access_plist</code>(<em>hid_t</em> <code>file_id</code>) <dt><strong>Purpose:</strong> <dd>Returns a file access property list identifier. <dt><strong>Description:</strong> - <dd><code>H5Fget_access_template</code> returns the + <dd><code>H5Fget_access_plist</code> returns the file access property list identifier of the specified file. <p> See "File Access Properties" in diff --git a/doc/html/RM_H5Front.html b/doc/html/RM_H5Front.html index 9c4e1ce..5d8b601 100644 --- a/doc/html/RM_H5Front.html +++ b/doc/html/RM_H5Front.html @@ -32,7 +32,7 @@ tools required to meet specific aspects of the HDF5 data-handling requirements. <li><a href="RM_H5.html">Library Functions</a> -- The general-purpose <strong>H5</strong> functions. <li><a href="RM_H5F.html">File Interface</a> -- The <strong>H5F</strong> API for accessing HDF files. -<li><a href="RM_H5P.html">Property List Interface</a> -- The <strong>H5P</strong> API for manipulating object templates. +<li><a href="RM_H5P.html">Property List Interface</a> -- The <strong>H5P</strong> API for manipulating object property lists. <li><a href="RM_H5D.html">Dataset Interface</a> -- The <strong>H5D</strong> API for manipulating scientific datasets. <li><a href="RM_H5T.html">Datatype Interface</a> -- The <strong>H5T</strong> API for defining dataset element information. <li><a href="RM_H5S.html">Dataspace Interface</a> -- The <strong>H5S</strong> API for defining dataset dataspace. diff --git a/doc/html/Ragged.html b/doc/html/Ragged.html new file mode 100644 index 0000000..aaa653b --- /dev/null +++ b/doc/html/Ragged.html @@ -0,0 +1,138 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + <head> + <title>Ragged Arrays</title> + </head> + + <body> + <h1>Ragged Arrays</h1> + + <h2>1. Introduction</h2> + + <p><b>Ragged arrays should be considered alpha quality. They were + added to HDF5 to satisfy the needs of the ASCI/DMF vector + bundle project; the interface and storage methods are likely + to change in the future in ways that are not backward + compatible.</b> + + <p>A two-dimensional ragged array has been added to the library + and built on top of other existing functionality. A ragged + array is a one-dimensional array of <em>rows</em> where the + length of any row is independent of the lengths of the other + rows. The number of rows and the length of each row can be + changed at any time (the current version does not support + truncating an array by removing rows). All elements of the + ragged array have the same data type and, as with datasets, the + data is type-converted between memory buffers and files. + + <p>The current implementation works best when most of the rows are + approximately the same length since a two dimensional dataset + can be created to hold a nominal number of elements from each + row with the additional elements stored in a separate dataset + which implements a heap. + + <p>A ragged array is a composite object implemented as a group + with three datasets. The name of the group is the name of the + ragged array. The <em>raw</em> dataset is a two-dimensional + array that contains the first <em>N</em> elements of each row + where <em>N</em> is determined by the application when the array + is created. If most rows have fewer than <em>N</em> elements + then internal fragmentation may be quite bad. + + <p>The <em>over</em> dataset is a one-dimensional array that + contains elements from each row that don't fit in the + <em>raw</em> dataset. + + <p>The <em>meta</em> dataset maintains information about each row + such as the number of elements in the row, the location of the + overflow elements in the <em>over</em> dataset (if any), and the + amount of space reserved in <em>over</em> for the row. The + <em>meta</em> dataset has one entry per row and is where most of + the storage overhead is concentrated when rows are relatively + short. + + <h2>2. Opening and Closing</h2> + + <dl> + <dt><code>hid_t H5Rcreate (hid_t <em>location</em>, const char + *<em>name</em>, hid_t <em>type</em>, hid_t + <em>plist</em>)</code> + <dd>This function creates a new ragged array by creating the + group with the specified name and populating it with the + component datasets (which should not be accessed + independently). The dataset creation property list + <em>plist</em> defines the width of the <em>raw</em> dataset; + a nominal row is considered to be the width of a chunk. The + <em>type</em> argument defines the data type which will be + stored in the file. A negative value is returned if the array + cannot be created. + + <br><br> + <dt><code>hid_t H5Ropen (hid_t <em>location</em>, const char + *<em>name</em>)</code> + <dd>This function opens a ragged array by opening the specified + group and the component datasets (which should not be accessed + indepently). A negative value is returned if the array cannot + be opened. + + <br><br> + <dt><code>herr_t H5Rclose (hid_t <em>array</em>)</code> + <dd>All ragged arrays should be closed by calling this + function. The group and component datasets will be closed + automatically by the library. + </dl> + + <h2>3. Reading and Writing</h2> + + <p>In order to be as efficient as possible the ragged array layer + operates on sets of contiguous rows and it is to the + application's advantage to perform I/O on as many rows at a time + as possible. These functions take a starting row number and the + number of rows on which to operate. + + <dl> + <dt><code>herr_t H5Rwrite (hid_t <em>array_id</em>, hssize_t + <em>start_row</em>, hsize_t <em>nrows</em>, hid_t + <em>type</em>, hsize_t <em>size</em>[], void + *<em>buf</em>[])</code> + <dd>A set of ragged array rows beginning at <em>start_row</em> + and continuing for <em>nrows</em> is written to the file, + converting the memory data type <em>type</em> to the file data + type which was defined when the array was created. The number + of elements to write from each row is specified in the + <em>size</em> array and the data for each row is pointed to + from the <em>buf</em> array. The <em>size</em> and + <em>buf</em> are indexed so their first element corresponds to + the first row on which to operate. + + <br><br> + <dt><code>herr_t H5Rread (hid_t <em>array_id</em>, hssize_t + <em>start_row</em>, hsize_t <em>nrows</em>, hid_t + <em>type</em>, hsize_t <em>size</em>[], void + *<em>buf</em>[])</code> + <dd>A set of ragged array rows beginning at <em>start_row</em> + and continuing for <em>nrows</em> is read from the file, + converting from the file data type which was defined when the + array was created to the memory data type <em>type</em>. The + number of elements to read from each row is specified in the + <em>size</em> array and the buffers in which to place the + results are pointed to by the <em>buf</em> array. On return, + the <em>size</em> array will contain the actual size of the + row which may be different than the requested size. When the + request size is smaller than the actual size the row will be + truncated; otherwise the remainder of the output buffer will + be zero filled. If a pointer in the <em>buf</em> array is + null then the library will ignore the corresponding + <em>size</em> value and allocate a buffer large enough to hold + the entire row. This function returns negative for failures + with <em>buf</em> containing the original input values. + </dl> + + <hr> + <address><a href="mailto:matzke@llnl.gov">Robb Matzke</a></address> +<!-- Created: Wed Aug 26 14:10:32 EDT 1998 --> +<!-- hhmts start --> +Last modified: Fri Aug 28 14:27:19 EDT 1998 +<!-- hhmts end --> + </body> +</html> @@ -135,7 +135,7 @@ H5_init_library(void) /* Debugging? */ H5_debug_mask("-all"); - H5_debug_mask(getenv("HDF5_DEBUG")); + H5_debug_mask(HDgetenv("HDF5_DEBUG")); FUNC_LEAVE(SUCCEED); } @@ -351,7 +351,7 @@ H5_debug_mask(const char *s) int clear; while (s && *s) { - if (isalpha(*s) || '-'==*s || '+'==*s) { + if (HDisalpha(*s) || '-'==*s || '+'==*s) { /* Enable or Disable debugging? */ if ('-'==*s) { clear = TRUE; @@ -364,21 +364,21 @@ H5_debug_mask(const char *s) } /* Get the name */ - for (i=0; isalpha(*s); i++, s++) { + for (i=0; HDisalpha(*s); i++, s++) { if (i<sizeof pkg_name) pkg_name[i] = *s; } pkg_name[MIN(sizeof(pkg_name)-1, i)] = '\0'; /* Trace, all, or one? */ - if (!strcmp(pkg_name, "trace")) { + if (!HDstrcmp(pkg_name, "trace")) { H5_debug_g.trace = clear?NULL:stream; - } else if (!strcmp(pkg_name, "all")) { + } else if (!HDstrcmp(pkg_name, "all")) { for (i=0; i<H5_NPKGS; i++) { H5_debug_g.pkg[i].stream = clear?NULL:stream; } } else { for (i=0; i<H5_NPKGS; i++) { - if (!strcmp(H5_debug_g.pkg[i].name, pkg_name)) { + if (!HDstrcmp(H5_debug_g.pkg[i].name, pkg_name)) { H5_debug_g.pkg[i].stream = clear?NULL:stream; break; } @@ -388,10 +388,10 @@ H5_debug_mask(const char *s) } } - } else if (isdigit(*s)) { + } else if (HDisdigit(*s)) { int fd = (int)HDstrtol (s, &rest, 0); if ((stream=HDfdopen(fd, "w"))) { - setvbuf (stream, NULL, _IOLBF, 0); + HDsetvbuf (stream, NULL, _IOLBF, 0); } s = rest; } else { @@ -469,16 +469,16 @@ H5check_version (unsigned majnum, unsigned minnum, unsigned relnum) if (H5_VERS_MAJOR!=majnum || H5_VERS_MINOR!=minnum || H5_VERS_RELEASE!=relnum) { - fputs ("Warning! The HDF5 header files included by this application " - "do not match the\nversion used by the HDF5 library to which " - "this application is linked. Data\ncorruption or segmentation " - "faults would be likely if the application were\nallowed to " - "continue.\n", stderr); + HDfputs ("Warning! The HDF5 header files included by this application " + "do not match the\nversion used by the HDF5 library to which " + "this application is linked. Data\ncorruption or " + "segmentation faults would be likely if the application " + "were\nallowed to continue.\n", stderr); fprintf (stderr, "Headers are %u.%u.%u, library is %u.%u.%u\n", majnum, minnum, relnum, H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); - fputs ("Bye...\n", stderr); - abort (); + HDfputs ("Bye...\n", stderr); + HDabort (); } return SUCCEED; } @@ -599,14 +599,14 @@ HDfprintf (FILE *stream, const char *fmt, ...) modifier[0] = '\0'; if ('%'==fmt[0] && '%'==fmt[1]) { - putc ('%', stream); + HDputc ('%', stream); fmt += 2; nout++; } else if ('%'==fmt[0]) { s = fmt+1; /* Flags */ - while (strchr ("-+ #", *s)) { + while (HDstrchr ("-+ #", *s)) { switch (*s) { case '-': leftjust = 1; @@ -625,9 +625,9 @@ HDfprintf (FILE *stream, const char *fmt, ...) } /* Field width */ - if (isdigit (*s)) { + if (HDisdigit (*s)) { zerofill = ('0'==*s); - fwidth = (int)strtol (s, &rest, 10); + fwidth = (int)HDstrtol (s, &rest, 10); s = rest; } else if ('*'==*s) { fwidth = va_arg (ap, int); @@ -641,8 +641,8 @@ HDfprintf (FILE *stream, const char *fmt, ...) /* Precision */ if ('.'==*s) { s++; - if (isdigit (*s)) { - prec = (int)strtol (s, &rest, 10); + if (HDisdigit (*s)) { + prec = (int)HDstrtol (s, &rest, 10); s = rest; } else if ('*'==*s) { prec = va_arg (ap, int); @@ -652,20 +652,20 @@ HDfprintf (FILE *stream, const char *fmt, ...) } /* Type modifier */ - if (strchr ("ZHhlq", *s)) { + if (HDstrchr ("ZHhlq", *s)) { switch (*s) { case 'H': if (sizeof(hsize_t)==sizeof(long)) { - strcpy (modifier, "l"); + HDstrcpy (modifier, "l"); } else if (sizeof(hsize_t)==sizeof(long long)) { - strcpy (modifier, PRINTF_LL_WIDTH); + HDstrcpy (modifier, PRINTF_LL_WIDTH); } break; case 'Z': if (sizeof(size_t)==sizeof(long)) { - strcpy (modifier, "l"); + HDstrcpy (modifier, "l"); } else if (sizeof(size_t)==sizeof(long long)) { - strcpy (modifier, PRINTF_LL_WIDTH); + HDstrcpy (modifier, PRINTF_LL_WIDTH); } else if (sizeof(size_t)==sizeof(int)) { modifier[0] = '\0'; } @@ -687,28 +687,28 @@ HDfprintf (FILE *stream, const char *fmt, ...) leftjust?"-":"", plussign?"+":"", ldspace?" ":"", prefix?"#":"", zerofill?"0":""); if (fwidth>0) { - sprintf (template+strlen (template), "%d", fwidth); + sprintf (template+HDstrlen(template), "%d", fwidth); } if (prec>0) { - sprintf (template+strlen (template), ".%d", prec); + sprintf (template+HDstrlen(template), ".%d", prec); } if (*modifier) { - sprintf (template+strlen (template), "%s", modifier); + sprintf (template+HDstrlen(template), "%s", modifier); } - sprintf (template+strlen (template), "%c", conv); + sprintf (template+HDstrlen(template), "%c", conv); /* Conversion */ switch (conv) { case 'd': case 'i': - if (!strcmp (modifier, "h")) { + if (!HDstrcmp(modifier, "h")) { short x = va_arg (ap, short); n = fprintf (stream, template, x); } else if (!*modifier) { int x = va_arg (ap, int); n = fprintf (stream, template, x); - } else if (!strcmp (modifier, "l")) { + } else if (!HDstrcmp (modifier, "l")) { long x = va_arg (ap, long); n = fprintf (stream, template, x); } else { @@ -721,13 +721,13 @@ HDfprintf (FILE *stream, const char *fmt, ...) case 'u': case 'x': case 'X': - if (!strcmp (modifier, "h")) { + if (!HDstrcmp (modifier, "h")) { unsigned short x = va_arg (ap, unsigned short); n = fprintf (stream, template, x); } else if (!*modifier) { unsigned int x = va_arg (ap, unsigned int); n = fprintf (stream, template, x); - } else if (!strcmp (modifier, "l")) { + } else if (!HDstrcmp (modifier, "l")) { unsigned long x = va_arg (ap, unsigned long); n = fprintf (stream, template, x); } else { @@ -741,10 +741,10 @@ HDfprintf (FILE *stream, const char *fmt, ...) case 'E': case 'g': case 'G': - if (!strcmp (modifier, "h")) { + if (!HDstrcmp (modifier, "h")) { float x = va_arg (ap, float); n = fprintf (stream, template, x); - } else if (!*modifier || !strcmp (modifier, "l")) { + } else if (!*modifier || !HDstrcmp (modifier, "l")) { double x = va_arg (ap, double); n = fprintf (stream, template, x); } else { @@ -771,24 +771,24 @@ HDfprintf (FILE *stream, const char *fmt, ...) ldspace?" ":"", prefix?"#":"", zerofill?"0":""); if (fwidth>0) { - sprintf(template+strlen(template), "%d", fwidth); + sprintf(template+HDstrlen(template), "%d", fwidth); } if (sizeof(x->offset)==SIZEOF_INT) { - strcat(template, "d"); + HDstrcat(template, "d"); } else if (sizeof(x->offset)==SIZEOF_LONG) { - strcat(template, "ld"); + HDstrcat(template, "ld"); } else if (sizeof(x->offset)==SIZEOF_LONG_LONG) { - strcat(template, PRINTF_LL_WIDTH); - strcat(template, "d"); + HDstrcat(template, PRINTF_LL_WIDTH); + HDstrcat(template, "d"); } n = fprintf(stream, template, x->offset); } else { - strcpy(template, "%"); - if (leftjust) strcat(template, "-"); + HDstrcpy(template, "%"); + if (leftjust) HDstrcat(template, "-"); if (fwidth) { - sprintf(template+strlen(template), "%d", fwidth); + sprintf(template+HDstrlen(template), "%d", fwidth); } - strcat(template, "s"); + HDstrcat(template, "s"); fprintf(stream, template, x?"UNDEF":"NULL"); } } @@ -811,20 +811,20 @@ HDfprintf (FILE *stream, const char *fmt, ...) case 'n': if (1) { - template[strlen(template)-1] = 'u'; + template[HDstrlen(template)-1] = 'u'; n = fprintf (stream, template, nout); } break; default: - fputs (template, stream); - n = (int)strlen (template); + HDfputs (template, stream); + n = (int)HDstrlen (template); break; } nout += n; fmt = s; } else { - putc (*fmt, stream); + HDputc (*fmt, stream); fmt++; nout++; } @@ -891,7 +891,7 @@ HDstrtoll (const char *s, const char **rest, int base) } /* Skip white space */ - while (isspace (*s)) s++; + while (HDisspace (*s)) s++; /* Optional minus or plus sign */ if ('+'==*s) { @@ -1083,33 +1083,33 @@ H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds) double bw; if (nseconds<=0.0) { - strcpy(buf, " NaN"); + HDstrcpy(buf, " NaN"); } else { bw = nbytes/nseconds; if (bw==0.0) { - strcpy(buf, "0.000 B/s"); + HDstrcpy(buf, "0.000 B/s"); } else if (bw<1.0) { sprintf(buf, "%10.4e", bw); } else if (bw<1024.0) { sprintf(buf, "%05.4f", bw); - strcpy(buf+5, " B/s"); + HDstrcpy(buf+5, " B/s"); } else if (bw<1024.0*1024.0) { sprintf(buf, "%05.4f", bw/1024.0); - strcpy(buf+5, " kB/s"); + HDstrcpy(buf+5, " kB/s"); } else if (bw<1024.0*1024.0*1024.0) { sprintf(buf, "%05.4f", bw/(1024.0*1024.0)); - strcpy(buf+5, " MB/s"); + HDstrcpy(buf+5, " MB/s"); } else if (bw<1024.0*1024.0*1024.0*1024.0) { sprintf(buf, "%05.4f", bw/(1024.0*1024.0*1024.0)); - strcpy(buf+5, " GB/s"); + HDstrcpy(buf+5, " GB/s"); } else if (bw<1024.0*1024.0*1024.0*1024.0*1024.0) { sprintf(buf, "%05.4f", bw/(1024.0*1024.0*1024.0*1024.0)); - strcpy(buf+5, " TB/s"); + HDstrcpy(buf+5, " TB/s"); } else { sprintf(buf, "%10.4e", bw); - if (strlen(buf)>10) { + if (HDstrlen(buf)>10) { sprintf(buf, "%10.3e", bw); } } @@ -1174,16 +1174,16 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) for (i=0; i<NELMTS(asize); i++) asize[i] = -1; /* Parse the argument types */ - for (argno=0; *type; argno++, type+=isupper(*type)?2:1) { + for (argno=0; *type; argno++, type+=HDisupper(*type)?2:1) { /* Count levels of indirection */ for (ptr=0; '*'==*type; type++) ptr++; if ('['==*type) { if ('a'==type[1]) { - asize_idx = (int)strtol(type+2, &rest, 10); + asize_idx = (int)HDstrtol(type+2, &rest, 10); assert(']'==*rest); type = rest+1; } else { - rest = strchr(type, ']'); + rest = HDstrchr(type, ']'); assert(rest); type = rest+1; asize_idx = -1; @@ -1199,9 +1199,9 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) */ argname = va_arg (ap, char*); if (argname) { - n = MAX (0, (int)strlen(argname)-3); - if (!strcmp (argname+n, "_id")) { - strncpy (buf, argname, MIN ((int)sizeof(buf)-1, n)); + n = MAX (0, (int)HDstrlen(argname)-3); + if (!HDstrcmp (argname+n, "_id")) { + HDstrncpy (buf, argname, MIN ((int)sizeof(buf)-1, n)); buf[MIN((int)sizeof(buf)-1, n)] = '\0'; argname = buf; } @@ -1536,7 +1536,7 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) break; case H5_FILE: fprintf(out, "%ld", (long)obj); - if (strcmp (argname, "file")) { + if (HDstrcmp (argname, "file")) { fprintf (out, " (file)"); } break; @@ -1549,13 +1549,13 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) case H5_TEMPLATE_6: case H5_TEMPLATE_7: fprintf(out, "%ld", (long)obj); - if (strcmp (argname, "plist")) { + if (HDstrcmp (argname, "plist")) { fprintf (out, " (plist)"); } break; case H5_GROUP: fprintf(out, "%ld", (long)obj); - if (strcmp (argname, "group")) { + if (HDstrcmp (argname, "group")) { fprintf (out, " (group)"); } break; @@ -1648,14 +1648,14 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) fprintf(out, "H5T_FORTRAN_S1"); } else { fprintf(out, "%ld", (long)obj); - if (strcmp (argname, "type")) { + if (HDstrcmp (argname, "type")) { fprintf (out, " (type)"); } } break; case H5_DATASPACE: fprintf(out, "%ld", (long)obj); - if (strcmp (argname, "space")) { + if (HDstrcmp (argname, "space")) { fprintf (out, " (space)"); } /*Save the rank of simple data spaces for arrays*/ @@ -1668,25 +1668,25 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) break; case H5_DATASET: fprintf(out, "%ld", (long)obj); - if (strcmp (argname, "dset")) { + if (HDstrcmp (argname, "dset")) { fprintf (out, " (dset)"); } break; case H5_ATTR: fprintf(out, "%ld", (long)obj); - if (strcmp (argname, "attr")) { + if (HDstrcmp (argname, "attr")) { fprintf (out, " (attr)"); } break; case H5_TEMPBUF: fprintf(out, "%ld", (long)obj); - if (strcmp(argname, "tbuf")) { + if (HDstrcmp(argname, "tbuf")) { fprintf(out, " (tbuf"); } break; case H5_RAGGED: fprintf(out, "%ld", (long)obj); - if (strcmp(argname, "array")) { + if (HDstrcmp(argname, "array")) { fprintf(out, " (array)"); } break; @@ -2221,7 +2221,7 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) break; default: - if (isupper (type[0])) { + if (HDisupper (type[0])) { fprintf (out, "BADTYPE(%c%c)", type[0], type[1]); } else { fprintf (out, "BADTYPE(%c)", type[0]); @@ -2237,7 +2237,7 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } else { fprintf (out, ")"); } - fflush (out); + HDfflush (out); return; } @@ -869,19 +869,19 @@ H5AC_debug(H5F_t __unused__ *f) switch (i) { case H5AC_BT_ID: - strcpy(s, "B-tree nodes"); + HDstrcpy(s, "B-tree nodes"); break; case H5AC_SNODE_ID: - strcpy(s, "symbol table nodes"); + HDstrcpy(s, "symbol table nodes"); break; case H5AC_LHEAP_ID: - strcpy (s, "local heaps"); + HDstrcpy (s, "local heaps"); break; case H5AC_GHEAP_ID: - strcpy (s, "global heaps"); + HDstrcpy (s, "global heaps"); break; case H5AC_OHDR_ID: - strcpy(s, "object headers"); + HDstrcpy(s, "object headers"); break; default: sprintf(s, "unknown id %d", i); @@ -978,7 +978,7 @@ H5D_create(H5G_entry_t *loc, const char *name, const H5T_t *type, if (efl->nused>0) { size_t heap_size = H5HL_ALIGN (1); for (i=0; i<efl->nused; i++) { - heap_size += H5HL_ALIGN (strlen (efl->slot[i].name)+1); + heap_size += H5HL_ALIGN (HDstrlen (efl->slot[i].name)+1); } if (H5HL_create (f, heap_size, &(efl->heap_addr))<0 || (size_t)(-1)==H5HL_insert (f, &(efl->heap_addr), 1, "")) { diff --git a/src/H5Distore.c b/src/H5Distore.c index 6f758a8..48ad749 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -272,7 +272,7 @@ H5F_istore_debug_key (FILE *stream, intn indent, intn fwidth, for (i=0; i<udata->mesg.ndims; i++) { HDfprintf (stream, "%s%Hd", i?", ":"", key->offset[i]); } - fputs ("}\n", stream); + HDfputs ("}\n", stream); FUNC_LEAVE (SUCCEED); } @@ -261,7 +261,7 @@ H5Eprint(FILE *stream) if (!stream) stream = stderr; fprintf (stream, "HDF5-DIAG: Error detected in thread 0."); if (estack && estack->nused>0) fprintf (stream, " Back trace follows."); - fputc ('\n', stream); + HDfputc ('\n', stream); status = H5E_walk (H5E_WALK_DOWNWARD, H5Ewalk_cb, (void*)stream); FUNC_LEAVE (status); @@ -142,8 +142,8 @@ H5F_init_interface(void) #ifdef HAVE_PARALLEL { /* Allow MPI buf-and-file-type optimizations? */ - const char *s = getenv ("HDF5_MPI_1_METAWRITE"); - if (s && isdigit(*s)) { + const char *s = HDgetenv ("HDF5_MPI_1_METAWRITE"); + if (s && HDisdigit(*s)) { H5_mpi_1_metawrite_g = (int)HDstrtol (s, NULL, 0); } } @@ -250,11 +250,11 @@ H5F_encode_length_unusual(const H5F_t *f, uint8 **p, uint8 *l) /*------------------------------------------------------------------------- - * Function: H5Fget_create_template + * Function: H5Fget_create_plist * - * Purpose: Get an atom for a copy of the file-creation template for this - * file. This function returns an atom with a copy of the - * template parameters used to create a file. + * Purpose: Get an atom for a copy of the file-creation property list for + * this file. This function returns an atom with a copy of the + * properties used to create a file. * * Return: Success: template ID * @@ -265,36 +265,35 @@ H5F_encode_length_unusual(const H5F_t *f, uint8 **p, uint8 *l) * Modifications: * * Robb Matzke, 18 Feb 1998 - * Calls H5P_copy() to copy the template and H5P_close() to free that - * template if an error occurs. + * Calls H5P_copy() to copy the property list and H5P_close() to free + * that property list if an error occurs. * *------------------------------------------------------------------------- */ hid_t -H5Fget_create_template(hid_t file_id) +H5Fget_create_plist(hid_t file_id) { H5F_t *file = NULL; hid_t ret_value = FAIL; - H5F_create_t *tmpl = NULL; + H5F_create_t *plist = NULL; - FUNC_ENTER(H5Fget_create_template, FAIL); + FUNC_ENTER(H5Fget_create_plist, FAIL); H5TRACE1("i","i",file_id); /* check args */ - if (H5_FILE != H5I_group(file_id) || NULL==(file=H5I_object (file_id))) { + if (H5_FILE != H5I_group(file_id) || NULL==(file=H5I_object(file_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); } - /* Create the template object to return */ - if (NULL==(tmpl=H5P_copy (H5P_FILE_CREATE, - file->shared->create_parms))) { - HRETURN_ERROR (H5E_INTERNAL, H5E_CANTINIT, FAIL, - "unable to copy file creation properties"); + /* Create the property list object to return */ + if (NULL==(plist=H5P_copy(H5P_FILE_CREATE, file->shared->create_parms))) { + HRETURN_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, + "unable to copy file creation properties"); } /* Create an atom */ - if ((ret_value = H5P_create(H5P_FILE_CREATE, tmpl)) < 0) { - H5P_close (H5P_FILE_CREATE, tmpl); + if ((ret_value = H5P_create(H5P_FILE_CREATE, plist)) < 0) { + H5P_close(H5P_FILE_CREATE, plist); HRETURN_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register property list"); } @@ -304,13 +303,13 @@ H5Fget_create_template(hid_t file_id) /*------------------------------------------------------------------------- - * Function: H5Fget_access_template + * Function: H5Fget_access_plist * - * Purpose: Returns a copy of the file access template of the specified - * file. + * Purpose: Returns a copy of the file access property list of the + * specified file. * * Return: Success: Object ID for a copy of the file access - * template. + * property list. * * Failure: FAIL * @@ -322,35 +321,34 @@ H5Fget_create_template(hid_t file_id) *------------------------------------------------------------------------- */ hid_t -H5Fget_access_template(hid_t file_id) +H5Fget_access_plist(hid_t file_id) { H5F_t *f = NULL; - H5F_access_t *tmpl = NULL; + H5F_access_t *plist = NULL; hid_t ret_value = FAIL; - FUNC_ENTER (H5Fget_access_template, FAIL); + FUNC_ENTER(H5Fget_access_plist, FAIL); H5TRACE1("i","i",file_id); /* Check args */ - if (H5_FILE!=H5I_group (file_id) || NULL==(f=H5I_object (file_id))) { - HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); + if (H5_FILE!=H5I_group(file_id) || NULL==(f=H5I_object(file_id))) { + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); } - /* Create the template object to return */ - if (NULL==(tmpl=H5P_copy (H5P_FILE_ACCESS, - f->shared->access_parms))) { - HRETURN_ERROR (H5E_INTERNAL, H5E_CANTINIT, FAIL, - "unable to copy file access properties"); + /* Create the property list object to return */ + if (NULL==(plist=H5P_copy(H5P_FILE_ACCESS, f->shared->access_parms))) { + HRETURN_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, + "unable to copy file access properties"); } /* Create an atom */ - if ((ret_value = H5P_create (H5P_FILE_ACCESS, tmpl))<0) { - H5P_close (H5P_FILE_ACCESS, tmpl); - HRETURN_ERROR (H5E_ATOM, H5E_CANTREGISTER, FAIL, - "unable to register property list"); + if ((ret_value = H5P_create(H5P_FILE_ACCESS, plist))<0) { + H5P_close(H5P_FILE_ACCESS, plist); + HRETURN_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, + "unable to register property list"); } - FUNC_LEAVE (ret_value); + FUNC_LEAVE(ret_value); } diff --git a/src/H5Ffamily.c b/src/H5Ffamily.c index 464ffa1..8d429fa 100644 --- a/src/H5Ffamily.c +++ b/src/H5Ffamily.c @@ -117,7 +117,7 @@ H5F_fam_open(const char *name, const H5F_access_t *access_parms, access_parms->u.fam.memb_access, F_OK, NULL)) { break; - } else if (unlink(member_name) < 0) { + } else if (HDunlink(member_name) < 0) { HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "can't delete member"); } } diff --git a/src/H5Fistore.c b/src/H5Fistore.c index 6f758a8..48ad749 100644 --- a/src/H5Fistore.c +++ b/src/H5Fistore.c @@ -272,7 +272,7 @@ H5F_istore_debug_key (FILE *stream, intn indent, intn fwidth, for (i=0; i<udata->mesg.ndims; i++) { HDfprintf (stream, "%s%Hd", i?", ":"", key->offset[i]); } - fputs ("}\n", stream); + HDfputs ("}\n", stream); FUNC_LEAVE (SUCCEED); } diff --git a/src/H5Flow.c b/src/H5Flow.c index 53124b1..31ba501 100644 --- a/src/H5Flow.c +++ b/src/H5Flow.c @@ -498,9 +498,9 @@ H5F_low_access(const H5F_low_class_t *type, const char *name, ret_value = (type->access) (name, access_parms, mode, key /*out*/); } else { - ret_value = (0 == access(name, mode) ? TRUE : FALSE); + ret_value = (0 == HDaccess(name, mode) ? TRUE : FALSE); if (key) { - stat(name, &sb); + HDstat(name, &sb); key->dev = sb.st_dev; key->ino = sb.st_ino; } diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 55f7f3d..d00c1d7 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -83,8 +83,8 @@ hid_t H5Fcreate (const char *filename, unsigned flags, hid_t create_plist, hid_t H5Fopen (const char *filename, unsigned flags, hid_t access_plist); herr_t H5Fflush(hid_t object_id); herr_t H5Fclose (hid_t file_id); -hid_t H5Fget_create_template (hid_t file_id); -hid_t H5Fget_access_template (hid_t file_id); +hid_t H5Fget_create_plist (hid_t file_id); +hid_t H5Fget_access_plist (hid_t file_id); #ifdef __cplusplus } diff --git a/src/H5Fsec2.c b/src/H5Fsec2.c index 9b6a0b5..96f6d0f 100644 --- a/src/H5Fsec2.c +++ b/src/H5Fsec2.c @@ -87,7 +87,7 @@ H5F_sec2_open(const char *name, const H5F_access_t __unused__ *access_parms, oflags |= (flags & H5F_ACC_EXCL) ? O_EXCL : 0; oflags |= (flags & H5F_ACC_TRUNC) ? O_TRUNC : 0; - if ((fd = open(name, oflags, 0666)) < 0) { + if ((fd = HDopen(name, oflags, 0666)) < 0) { HRETURN_ERROR(H5E_IO, H5E_CANTOPENFILE, NULL, "open failed"); } if (NULL==(lf = H5MM_calloc(sizeof(H5F_low_t)))) { @@ -97,7 +97,7 @@ H5F_sec2_open(const char *name, const H5F_access_t __unused__ *access_parms, lf->u.sec2.fd = fd; lf->u.sec2.op = H5F_OP_SEEK; lf->u.sec2.cur = 0; - fstat(fd, &sb); + HDfstat(fd, &sb); lf->eof.offset = sb.st_size; if (key) { @@ -131,7 +131,7 @@ H5F_sec2_close(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms) { FUNC_ENTER(H5F_sec2_close, FAIL); - if (close(lf->u.sec2.fd) < 0) { + if (HDclose(lf->u.sec2.fd) < 0) { HRETURN_ERROR(H5E_IO, H5E_CLOSEERROR, FAIL, "close failed"); } lf->u.sec2.fd = -1; @@ -210,7 +210,7 @@ H5F_sec2_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms, HRETURN_ERROR (H5E_IO, H5E_SEEKERROR, FAIL, "lseek64 failed"); } #else - if (lseek(lf->u.sec2.fd, offset, SEEK_SET) < 0) { + if (HDlseek(lf->u.sec2.fd, offset, SEEK_SET) < 0) { HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "lseek failed"); } #endif @@ -230,7 +230,7 @@ H5F_sec2_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms, * Read the data. If a read error occurs then set the last file operation * to UNKNOWN because the file position isn't guaranteed by Posix. */ - if ((n = read(lf->u.sec2.fd, buf, size)) < 0) { + if ((n = HDread(lf->u.sec2.fd, buf, size)) < 0) { lf->u.sec2.op = H5F_OP_UNKNOWN; HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "read failed"); } else if ((size_t)n < size) { @@ -307,7 +307,7 @@ H5F_sec2_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms, if (!H5F_OPT_SEEK || lf->u.sec2.op == H5F_OP_UNKNOWN || lf->u.sec2.cur != offset) { - if (lseek(lf->u.sec2.fd, offset, SEEK_SET) < 0) { + if (HDlseek(lf->u.sec2.fd, offset, SEEK_SET) < 0) { HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "lseek failed"); } lf->u.sec2.cur = offset; @@ -317,7 +317,7 @@ H5F_sec2_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms, * Write the data to the file. If the write failed then set the * operation back to UNKNOWN since Posix doesn't gurantee its value. */ - if (n != write(lf->u.sec2.fd, buf, size)) { + if (n != HDwrite(lf->u.sec2.fd, buf, size)) { lf->u.sec2.op = H5F_OP_UNKNOWN; HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write failed"); } diff --git a/src/H5Fsplit.c b/src/H5Fsplit.c index c49d2e0..e4a78f2 100644 --- a/src/H5Fsplit.c +++ b/src/H5Fsplit.c @@ -118,11 +118,11 @@ H5F_split_open(const char *name, const H5F_access_t *access_parms, /* Open the meta data file */ ext = access_parms->u.split.meta_ext ? access_parms->u.split.meta_ext : H5F_SPLIT_META_EXT; - if (strlen (name)+strlen (ext) >= sizeof fullname) { + if (HDstrlen(name)+HDstrlen(ext) >= sizeof fullname) { HGOTO_ERROR (H5E_IO, H5E_CANTINIT, NULL, "file name is too long"); } - strcpy (fullname, name); - strcat (fullname, ext); + HDstrcpy(fullname, name); + HDstrcat(fullname, ext); lf->u.split.meta = H5F_low_open(meta_type, fullname, access_parms->u.split.meta_access, @@ -134,11 +134,11 @@ H5F_split_open(const char *name, const H5F_access_t *access_parms, /* Open the raw data file */ ext = access_parms->u.split.raw_ext ? access_parms->u.split.raw_ext : H5F_SPLIT_RAW_EXT; - if (strlen (name)+strlen (ext) >= sizeof fullname) { + if (HDstrlen(name)+HDstrlen(ext) >= sizeof fullname) { HGOTO_ERROR (H5E_IO, H5E_CANTINIT, NULL, "file name is too long"); } - strcpy (fullname, name); - strcat (fullname, ext); + HDstrcpy(fullname, name); + HDstrcat(fullname, ext); lf->u.split.raw = H5F_low_open(raw_type, fullname, access_parms->u.split.raw_access, @@ -372,11 +372,11 @@ H5F_split_access(const char *name, const H5F_access_t *access_parms, meta_type = H5F_low_class (access_parms->u.split.meta_access->driver); ext = access_parms->u.split.meta_ext ? access_parms->u.split.meta_ext : H5F_SPLIT_META_EXT; - if (strlen (name)+strlen (ext) >= sizeof fullname) { + if (HDstrlen(name)+HDstrlen(ext) >= sizeof fullname) { HRETURN_ERROR (H5E_IO, H5E_CANTINIT, FAIL, "file name is too long"); } - strcpy (fullname, name); - strcat (fullname, ext); + HDstrcpy(fullname, name); + HDstrcat(fullname, ext); status = H5F_low_access(meta_type, fullname, access_parms->u.split.meta_access, @@ -391,11 +391,11 @@ H5F_split_access(const char *name, const H5F_access_t *access_parms, raw_type = H5F_low_class (access_parms->u.split.raw_access->driver); ext = access_parms->u.split.raw_ext ? access_parms->u.split.raw_ext : H5F_SPLIT_RAW_EXT; - if (strlen (name)+strlen (ext) >= sizeof fullname) { + if (HDstrlen(name)+HDstrlen(ext) >= sizeof fullname) { HRETURN_ERROR (H5E_IO, H5E_CANTINIT, FAIL, "file name is too long"); } - strcpy (fullname, name); - strcat (fullname, ext); + HDstrcpy(fullname, name); + HDstrcat(fullname, ext); status = H5F_low_access(raw_type, fullname, access_parms->u.split.raw_access, diff --git a/src/H5Fstdio.c b/src/H5Fstdio.c index db2b3e2..5fa8078 100644 --- a/src/H5Fstdio.c +++ b/src/H5Fstdio.c @@ -82,9 +82,9 @@ H5F_stdio_open(const char *name, const H5F_access_t __unused__ *access_parms, FUNC_ENTER(H5F_stdio_open, NULL); - if (access(name, F_OK) < 0) { + if (HDaccess(name, F_OK) < 0) { if ((flags & H5F_ACC_CREAT) && (flags & H5F_ACC_RDWR)) { - f = fopen(name, "wb+"); + f = HDfopen(name, "wb+"); } else { HRETURN_ERROR(H5E_IO, H5E_CANTOPENFILE, NULL, "file doesn't exist and CREAT wasn't specified"); @@ -96,12 +96,12 @@ H5F_stdio_open(const char *name, const H5F_access_t __unused__ *access_parms, } else if (flags & H5F_ACC_RDWR) { if (flags & H5F_ACC_TRUNC) - f = fopen(name, "wb+"); + f = HDfopen(name, "wb+"); else - f = fopen(name, "rb+"); + f = HDfopen(name, "rb+"); } else { - f = fopen(name, "rb"); + f = HDfopen(name, "rb"); } if (!f) HRETURN_ERROR(H5E_IO, H5E_CANTOPENFILE, NULL, "fopen failed"); @@ -115,17 +115,17 @@ H5F_stdio_open(const char *name, const H5F_access_t __unused__ *access_parms, lf->u.stdio.op = H5F_OP_SEEK; lf->u.stdio.cur = 0; H5F_addr_reset(&(lf->eof)); - if (fseek(lf->u.stdio.f, 0, SEEK_END) < 0) { + if (HDfseek(lf->u.stdio.f, 0, SEEK_END) < 0) { lf->u.stdio.op = H5F_OP_UNKNOWN; } else { - hssize_t x = ftell (lf->u.stdio.f); + hssize_t x = HDftell (lf->u.stdio.f); assert (x>=0); H5F_addr_inc(&(lf->eof), (hsize_t)x); } /* The unique key */ if (key) { - fstat(fileno(f), &sb); + HDfstat(fileno(f), &sb); key->dev = sb.st_dev; key->ino = sb.st_ino; } @@ -156,7 +156,7 @@ H5F_stdio_close(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms) { FUNC_ENTER(H5F_stdio_close, FAIL); - if (fclose(lf->u.stdio.f) < 0) { + if (HDfclose(lf->u.stdio.f) < 0) { HRETURN_ERROR(H5E_IO, H5E_CLOSEERROR, FAIL, "fclose failed"); } lf->u.stdio.f = NULL; @@ -234,7 +234,7 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms, HRETURN_ERROR (H5E_IO, H5E_SEEKERROR, FAIL, "fseek64 failed"); } #else - if (fseek(lf->u.stdio.f, offset, SEEK_SET) < 0) { + if (HDfseek(lf->u.stdio.f, offset, SEEK_SET) < 0) { HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "fseek failed"); } #endif @@ -255,8 +255,8 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms, * will advance the file position by N. If N is negative or an error * occurs then the file position is undefined. */ - n = fread(buf, 1, size, lf->u.stdio.f); - if (n <= 0 && ferror(lf->u.stdio.f)) { + n = HDfread(buf, 1, size, lf->u.stdio.f); + if (n <= 0 && HDferror(lf->u.stdio.f)) { lf->u.stdio.op = H5F_OP_UNKNOWN; HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "fread failed"); } else if (n < size) { @@ -341,7 +341,7 @@ H5F_stdio_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms, HRETURN_ERROR (H5E_IO, H5E_SEEKERROR, FAIL, "fseek64 failed"); } #else - if (fseek(lf->u.stdio.f, offset, SEEK_SET) < 0) { + if (HDfseek(lf->u.stdio.f, offset, SEEK_SET) < 0) { HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "fseek failed"); } #endif @@ -353,7 +353,7 @@ H5F_stdio_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms, * advanced by the number of bytes read. Otherwise nobody knows where it * is. */ - if (n != fwrite(buf, 1, size, lf->u.stdio.f)) { + if (n != HDfwrite(buf, 1, size, lf->u.stdio.f)) { lf->u.stdio.op = H5F_OP_UNKNOWN; HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "fwrite failed"); } @@ -400,7 +400,7 @@ H5F_stdio_flush(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms) /* * Flush */ - if (fflush(lf->u.stdio.f) < 0) { + if (HDfflush(lf->u.stdio.f) < 0) { HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "fflush failed"); } FUNC_LEAVE(SUCCEED); @@ -1001,7 +1001,7 @@ H5G_namei(H5G_entry_t *loc_ent, const char *name, const char **rest/*out*/, } else { *obj_ent = *loc_ent; } - memset(grp_ent, 0, sizeof(H5G_entry_t)); + HDmemset(grp_ent, 0, sizeof(H5G_entry_t)); H5F_addr_undef(&(grp_ent->header)); @@ -1971,7 +1971,7 @@ H5G_link (H5G_entry_t *loc, H5G_link_t type, const char *cur_name, } if ((size_t)(-1)==(offset=H5HL_insert (grp_ent.file, &(stab_mesg.heap_addr), - strlen(cur_name)+1, + HDstrlen(cur_name)+1, cur_name))) { HRETURN_ERROR (H5E_SYM, H5E_CANTINIT, FAIL, "unable to write link value to local heap"); @@ -2075,7 +2075,7 @@ H5G_get_objinfo (H5G_entry_t *loc, const char *name, hbool_t follow_link, HRETURN_ERROR (H5E_SYM, H5E_CANTINIT, FAIL, "unable to read symbolic link value"); } - statbuf->linklen = strlen(s)+1; /*count the null terminator*/ + statbuf->linklen = HDstrlen(s)+1; /*count the null terminator*/ statbuf->objno[0] = statbuf->objno[1] = 0; statbuf->nlink = 0; statbuf->type = H5G_LINK; @@ -2179,7 +2179,7 @@ H5G_linkval (H5G_entry_t *loc, const char *name, size_t size, char *buf/*out*/) /* Copy to output buffer */ if (size>0 && buf) { - strncpy (buf, s, size); + HDstrncpy (buf, s, size); } FUNC_LEAVE (SUCCEED); @@ -2270,8 +2270,8 @@ H5G_get_comment(H5G_entry_t *loc, const char *name, size_t bufsize, char *buf) if (buf && bufsize>0) buf[0] = '\0'; retval = 0; } else { - strncpy(buf, comment.s, bufsize); - retval = (intn)strlen(comment.s); + HDstrncpy(buf, comment.s, bufsize); + retval = (intn)HDstrlen(comment.s); H5O_reset(H5O_NAME, &comment); } diff --git a/src/H5Gnode.c b/src/H5Gnode.c index 5767b78..1751edb 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -923,7 +923,7 @@ H5G_node_iterate (H5F_t *f, const haddr_t *addr, void *_udata) name = H5HL_peek (f, &(bt_udata->group->ent.cache.stab.heap_addr), name_off[i]); assert (name); - n = strlen (name); + n = HDstrlen (name); if (n+1>sizeof(buf)) { if (NULL==(s = H5MM_malloc (n+1))) { HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, @@ -932,7 +932,7 @@ H5G_node_iterate (H5F_t *f, const haddr_t *addr, void *_udata) } else { s = buf; } - strcpy (s, name); + HDstrcpy (s, name); ret_value = (bt_udata->op)(bt_udata->group_id, s, bt_udata->op_data); if (s!=buf) H5MM_xfree (s); @@ -952,12 +952,12 @@ H5HG_debug(H5F_t *f, const haddr_t *addr, FILE *stream, intn indent, if (j+k<size) { fprintf (stream, "%02x ", p[j+k]); } else { - fputs (" ", stream); + HDfputs(" ", stream); } } for (k=0; k<16 && j+k<size; k++) { if (8==k) fprintf (stream, " "); - fputc (p[j+k]>' ' && p[j+k]<='~' ? p[j+k] : '.', stream); + HDfputc(p[j+k]>' ' && p[j+k]<='~' ? p[j+k] : '.', stream); } fprintf (stream, "\n"); } @@ -63,11 +63,58 @@ static char RcsId[] = "@(#)$Revision$"; #include <H5Eprivate.h> #include <H5MMprivate.h> +/* Interface initialialization? */ #define PABLO_MASK H5I_mask +static hbool_t interface_initialize_g = FALSE; +#define INTERFACE_INIT H5I_init_interface +static herr_t H5I_init_interface(void); + +/* + * Define the following macro for fast hash calculations (but limited + * hash sizes) + */ +#define HASH_SIZE_POWER_2 + +/* Define the following macro for atom caching over all the atoms */ +#define IDS_ARE_CACHED /*-------------------- Locally scoped variables -----------------------------*/ #ifdef IDS_ARE_CACHED +# define ID_CACHE_SIZE 4 /*# of previous atoms cached */ +#endif + +/* # of bits to use for Group ID in each atom (change if MAXGROUP>16) */ +#define GROUP_BITS 8 +#define GROUP_MASK 0xFF + +/* # of bits to use for the Atom index in each atom (assumes 8-bit bytes) */ +#define ID_BITS ((sizeof(hid_t)*8)-GROUP_BITS) +#define ID_MASK 0x0FFFFFFF + +/* Map an atom to a Group number */ +#define H5I_GROUP(a) ((H5I_group_t) \ + ((((hid_t)(a))>> \ + ((sizeof(hid_t)*8)-GROUP_BITS))&GROUP_MASK)) + +#ifdef HASH_SIZE_POWER_2 +/* + * Map an ID to a hash location (assumes s is a power of 2 and smaller + * than the ID_MASK constant). + */ +# define H5I_LOC(a,s) ((hid_t)((size_t)(a)&((s)-1))) +#else +/* + * Map an ID to a hash location. + */ +# define H5I_LOC(a,s) (((hid_t)(a)&ID_MASK)%(s)) +#endif + +/* Combine a Group number and an atom index into an atom */ +#define H5I_MAKE(g,i) ((((hid_t)(g)&GROUP_MASK)<<ID_BITS)| \ + ((hid_t)(i)&ID_MASK)) + +#ifdef IDS_ARE_CACHED /* Array of pointers to ID groups */ static hid_t H5I_id_cache[ID_CACHE_SIZE] = {-1, -1, -1, -1}; static void *H5I_obj_cache[ID_CACHE_SIZE]; @@ -79,11 +126,6 @@ static H5I_id_group_t *id_group_list[MAXGROUP]; /* Pointer to the atom node free list */ static H5I_id_info_t *id_free_list = NULL; -/* Interface initialialization? */ -static hbool_t interface_initialize_g = FALSE; -#define INTERFACE_INIT H5I_init_interface -static herr_t H5I_init_interface(void); - /*--------------------- Local function prototypes ---------------------------*/ static H5I_id_info_t *H5I_find_id(hid_t id); static H5I_id_info_t *H5I_get_id_node(void); @@ -261,7 +303,7 @@ H5I_destroy_group(H5I_group_t grp) * Remove atoms from the global atom cache. */ for (i=0; i<ID_CACHE_SIZE; i++) { - if (ID_TO_GROUP(H5I_id_cache[i]) == grp) { + if (H5I_GROUP(H5I_id_cache[i]) == grp) { H5I_id_cache[i] = (-1); H5I_obj_cache[i] = NULL; } @@ -334,7 +376,7 @@ H5I_register(H5I_group_t grp, /* IN: Group to register the object in */ HGOTO_DONE(FAIL); /* Create the struct & it's ID */ - new_id = MAKE_ID(grp, grp_ptr->nextid); + new_id = H5I_MAKE(grp, grp_ptr->nextid); id_ptr->id = new_id; id_ptr->count = 1; /*initial reference count*/ id_ptr->obj_ptr = object; @@ -365,9 +407,9 @@ H5I_register(H5I_group_t grp, /* IN: Group to register the object in */ do { /* new ID to check for */ - hid_t next_id = MAKE_ID(grp, grp_ptr->nextid); + hid_t next_id = H5I_MAKE(grp, grp_ptr->nextid); H5I_id_info_t *curr_id; /* ptr to the current atom */ - hash_loc = ID_TO_LOC (grp_ptr->nextid, grp_ptr->hash_size); + hash_loc = H5I_LOC (grp_ptr->nextid, grp_ptr->hash_size); curr_id = grp_ptr->id_list[hash_loc]; if (curr_id == NULL) break; /* Ha! this is not likely... */ @@ -411,7 +453,7 @@ H5I_register(H5I_group_t grp, /* IN: Group to register the object in */ hid_t H5I_inc_ref(hid_t id) { - H5I_group_t grp = ID_TO_GROUP(id); /* object's group */ + H5I_group_t grp = H5I_GROUP(id); /* object's group */ H5I_id_group_t *grp_ptr = NULL; /* ptr to the ID group*/ H5I_id_info_t *id_ptr = NULL; /* ptr to the new ID */ hid_t ret_value = FAIL; @@ -509,7 +551,7 @@ H5I_group(hid_t id) FUNC_ENTER(H5I_group, BADGROUP); - ret_value = ID_TO_GROUP(id); + ret_value = H5I_GROUP(id); if (ret_value <= BADGROUP || ret_value >= MAXGROUP) { HGOTO_DONE(BADGROUP); } @@ -545,14 +587,14 @@ H5I_remove(hid_t id) FUNC_ENTER(H5I_remove, NULL); - grp = ID_TO_GROUP(id); + grp = H5I_GROUP(id); if (grp <= BADGROUP || grp >= MAXGROUP) HGOTO_DONE(NULL); grp_ptr = id_group_list[grp]; if (grp_ptr == NULL || grp_ptr->count <= 0) HGOTO_DONE(NULL); /* Get the location in which the ID is located */ - hash_loc = (uintn) ID_TO_LOC(id, grp_ptr->hash_size); + hash_loc = (uintn) H5I_LOC(id, grp_ptr->hash_size); curr_id = grp_ptr->id_list[hash_loc]; if (curr_id == NULL) HGOTO_DONE(NULL); @@ -622,7 +664,7 @@ H5I_remove(hid_t id) intn H5I_dec_ref(hid_t id) { - H5I_group_t grp = ID_TO_GROUP(id); /* Group the object is in */ + H5I_group_t grp = H5I_GROUP(id); /* Group the object is in */ H5I_id_group_t *grp_ptr = NULL; /* ptr to the group */ H5I_id_info_t *id_ptr = NULL; /* ptr to the new ID */ void * obj; /* object to call 'free' function with */ @@ -728,7 +770,7 @@ H5I_find_id(hid_t id) FUNC_ENTER(H5I_find_id, NULL); - grp = ID_TO_GROUP(id); + grp = H5I_GROUP(id); if (grp <= BADGROUP || grp >= MAXGROUP) HGOTO_DONE(NULL); @@ -737,7 +779,7 @@ H5I_find_id(hid_t id) HGOTO_DONE(NULL); /* Get the location in which the ID is located */ - hash_loc = (uintn) ID_TO_LOC(id, grp_ptr->hash_size); + hash_loc = (uintn) H5I_LOC(id, grp_ptr->hash_size); id_ptr = grp_ptr->id_list[hash_loc]; if (id_ptr == NULL) HGOTO_DONE(NULL); diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h index 0cc0286..f475004 100644 --- a/src/H5Iprivate.h +++ b/src/H5Iprivate.h @@ -24,40 +24,6 @@ /* Private headers needed by this file */ #include <H5private.h> -/* ID Feature controls */ - -/* - * Define the following macro for fast hash calculations (but limited - * hash sizes) - */ -#define HASH_SIZE_POWER_2 - -/* Define the following macro for atom caching over all the atoms */ -#define IDS_ARE_CACHED - -#ifdef IDS_ARE_CACHED -# define ID_CACHE_SIZE 4 /*# of previous atoms cached */ -#endif - -/* Map an atom to a Group number */ -#define ID_TO_GROUP(a) ((H5I_group_t)((((hid_t)(a))>> \ - ((sizeof(hid_t)*8)-GROUP_BITS))&GROUP_MASK)) - -#ifdef HASH_SIZE_POWER_2 - -/* - * Map an ID to a hash location (assumes s is a power of 2 and smaller - * than the ID_MASK constant). - */ -# define ID_TO_LOC(a,s) ((hid_t)((size_t)(a)&((s)-1))) -#else - -/* - * Map an ID to a hash location. - */ -# define ID_TO_LOC(a,s) (((hid_t)(a)&ID_MASK)%(s)) -#endif - /* Default sizes of the hash-tables for various atom groups */ #define H5I_ERRSTACK_HASHSIZE 64 #define H5I_FILEID_HASHSIZE 64 diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h index d678fc8..88de38e 100644 --- a/src/H5Ipublic.h +++ b/src/H5Ipublic.h @@ -51,18 +51,6 @@ typedef enum { /* Type of atoms to return to users */ typedef int hid_t; -/* # of bits to use for Group ID in each atom (change if MAXGROUP>16) */ -#define GROUP_BITS 8 -#define GROUP_MASK 0xFF - -/* # of bits to use for the Atom index in each atom (assumes 8-bit bytes) */ -#define ID_BITS ((sizeof(hid_t)*8)-GROUP_BITS) -#define ID_MASK 0x0FFFFFFF - -/* Combine a Group number and an atom index into an atom */ -#define MAKE_ID(g,i) ((((hid_t)(g)&GROUP_MASK)<<ID_BITS)| \ - ((hid_t)(i)&ID_MASK)) - #ifdef __cplusplus extern "C" { #endif @@ -1290,7 +1290,7 @@ static herr_t H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force) { intn idx; - time_t now = time(NULL); + time_t now = HDtime(NULL); size_t size; FUNC_ENTER(H5O_touch_oh, FAIL); diff --git a/src/H5Ocomp.c b/src/H5Ocomp.c index 1b959a1..3f6ff54 100644 --- a/src/H5Ocomp.c +++ b/src/H5Ocomp.c @@ -112,7 +112,7 @@ H5O_pline_decode(H5F_t __unused__ *f, const uint8 *p, * should be, but to be safe...) */ pline->filter[i].name = H5MM_malloc(name_length+1); - memcpy(pline->filter[i].name, p, name_length); + HDmemcpy(pline->filter[i].name, p, name_length); pline->filter[i].name[name_length] = '\0'; p += name_length; } @@ -199,7 +199,7 @@ H5O_pline_encode (H5F_t __unused__ *f, uint8 *p/*out*/, const void *mesg) (cls=H5Z_find(pline->filter[i].id))) { name = cls->name; } - name_length = name ? strlen(name)+1 : 0; + name_length = name ? HDstrlen(name)+1 : 0; /* Encode the filter */ UINT16ENCODE(p, pline->filter[i].id); @@ -207,7 +207,7 @@ H5O_pline_encode (H5F_t __unused__ *f, uint8 *p/*out*/, const void *mesg) UINT16ENCODE(p, pline->filter[i].flags); UINT16ENCODE(p, pline->filter[i].cd_nelmts); if (name_length>0) { - memcpy(p, name, name_length); + HDmemcpy(p, name, name_length); p += name_length; while (name_length++ % 8) *p++ = 0; } @@ -339,7 +339,7 @@ H5O_pline_size (H5F_t __unused__ *f, const void *mesg) (cls=H5Z_find(pline->filter[i].id))) { name = cls->name; } - name_len = name ? strlen(name)+1 : 0; + name_len = name ? HDstrlen(name)+1 : 0; size += 2 + /*filter identification number */ diff --git a/src/H5Odtype.c b/src/H5Odtype.c index d4a4d6f..1653921 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -418,7 +418,7 @@ H5O_dtype_encode_helper(uint8 **pp, const H5T_t *dt) for (i = 0; i < dt->u.compnd.nmembs; i++) { /* Name, multiple of eight bytes */ HDstrcpy ((char*)(*pp), dt->u.compnd.memb[i].name); - n = strlen(dt->u.compnd.memb[i].name); + n = HDstrlen(dt->u.compnd.memb[i].name); for (z=n+1; z%8; z++) (*pp)[z] = '\0'; *pp += z; diff --git a/src/H5Oefl.c b/src/H5Oefl.c index 1c8adcc..f961f57 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -189,7 +189,7 @@ H5O_efl_encode(H5F_t *f, uint8 *p, const void *_mesg) */ if (0==mesg->slot[i].name_offset) { offset = H5HL_insert (f, &(mesg->heap_addr), - strlen (mesg->slot[i].name)+1, + HDstrlen (mesg->slot[i].name)+1, mesg->slot[i].name); if ((size_t)(-1)==offset) { HRETURN_ERROR (H5E_EFL, H5E_CANTINIT, FAIL, @@ -447,22 +447,22 @@ H5O_efl_read (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr, HGOTO_ERROR (H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed"); } - if ((fd=open (efl->slot[i].name, O_RDONLY))<0) { + if ((fd=HDopen (efl->slot[i].name, O_RDONLY, 0))<0) { HGOTO_ERROR (H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file"); } - if (lseek (fd, (off_t)(efl->slot[i].offset+skip), SEEK_SET)<0) { + if (HDlseek (fd, (off_t)(efl->slot[i].offset+skip), SEEK_SET)<0) { HGOTO_ERROR (H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file"); } to_read = MIN(efl->slot[i].size-skip, size); - if ((n=read (fd, buf, to_read))<0) { + if ((n=HDread (fd, buf, to_read))<0) { HGOTO_ERROR (H5E_EFL, H5E_READERROR, FAIL, "read error in external raw data file"); } else if ((size_t)n<to_read) { HDmemset (buf+n, 0, to_read-n); } - close (fd); + HDclose (fd); fd = -1; size -= to_read; buf += to_read; @@ -472,7 +472,7 @@ H5O_efl_read (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr, ret_value = SUCCEED; done: - if (fd>=0) close (fd); + if (fd>=0) HDclose (fd); FUNC_LEAVE (ret_value); } @@ -532,8 +532,8 @@ H5O_efl_write (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr, HGOTO_ERROR (H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed"); } - if ((fd=open (efl->slot[i].name, O_RDWR))<0) { - if (access (efl->slot[i].name, F_OK)<0) { + if ((fd=HDopen (efl->slot[i].name, O_RDWR, 0))<0) { + if (HDaccess (efl->slot[i].name, F_OK)<0) { HGOTO_ERROR (H5E_EFL, H5E_CANTOPENFILE, FAIL, "external raw data file does not exist"); } else { @@ -541,16 +541,16 @@ H5O_efl_write (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr, "unable to open external raw data file"); } } - if (lseek (fd, (off_t)(efl->slot[i].offset+skip), SEEK_SET)<0) { + if (HDlseek (fd, (off_t)(efl->slot[i].offset+skip), SEEK_SET)<0) { HGOTO_ERROR (H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file"); } to_write = MIN(efl->slot[i].size-skip, size); - if ((size_t)write (fd, buf, to_write)!=to_write) { + if ((size_t)HDwrite (fd, buf, to_write)!=to_write) { HGOTO_ERROR (H5E_EFL, H5E_READERROR, FAIL, "write error in external raw data file"); } - close (fd); + HDclose (fd); fd = -1; size -= to_write; buf += to_write; @@ -560,7 +560,7 @@ H5O_efl_write (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr, ret_value = SUCCEED; done: - if (fd>=0) close (fd); + if (fd>=0) HDclose (fd); FUNC_LEAVE (ret_value); } diff --git a/src/H5Omtime.c b/src/H5Omtime.c index d55f179..f144364 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -76,11 +76,11 @@ H5O_mtime_decode(H5F_t __unused__ *f, const uint8 *p, assert (!sh); /* Initialize time zone information */ - if (0==ncalls++) tzset(); + if (0==ncalls++) HDtzset(); /* decode */ for (i=0; i<14; i++) { - if (!isdigit(p[i])) { + if (!HDisdigit(p[i])) { HRETURN_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message"); } @@ -92,7 +92,7 @@ H5O_mtime_decode(H5F_t __unused__ *f, const uint8 *p, * and then figure out the adjustment based on the local time zone and * daylight savings setting. */ - memset(&tm, 0, sizeof tm); + HDmemset(&tm, 0, sizeof tm); tm.tm_year = (p[0]-'0')*1000 + (p[1]-'0')*100 + (p[2]-'0')*10 + (p[3]-'0') - 1900; tm.tm_mon = (p[4]-'0')*10 + (p[5]-'0') - 1; @@ -101,7 +101,7 @@ H5O_mtime_decode(H5F_t __unused__ *f, const uint8 *p, tm.tm_min = (p[10]-'0')*10 + (p[11]-'0'); tm.tm_sec = (p[12]-'0')*10 + (p[13]-'0'); tm.tm_isdst = -1; /*figure it out*/ - if ((time_t)-1==(the_time=mktime(&tm))) { + if ((time_t)-1==(the_time=HDmktime(&tm))) { HRETURN_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "badly formatted modification time message"); } @@ -188,7 +188,7 @@ H5O_mtime_encode(H5F_t __unused__ *f, uint8 *p, const void *_mesg) assert(mesg); /* encode */ - tm = gmtime(mesg); + tm = HDgmtime(mesg); sprintf((char*)p, "%04d%02d%02d%02d%02d%02d", 1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); @@ -304,10 +304,10 @@ H5O_mtime_debug(H5F_t __unused__ *f, const void *_mesg, FILE *stream, assert(fwidth >= 0); /* debug */ - tm = localtime(mesg); + tm = HDlocaltime(mesg); - strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm); + HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm); fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Time:", buf); diff --git a/src/H5Oname.c b/src/H5Oname.c index 97a7e10..420e6e5 100644 --- a/src/H5Oname.c +++ b/src/H5Oname.c @@ -83,12 +83,12 @@ H5O_name_decode(H5F_t __unused__ *f, const uint8 *p, /* decode */ if (NULL==(mesg = H5MM_calloc(sizeof(H5O_name_t))) || - NULL==(mesg->s = H5MM_malloc (strlen ((const char*)p)+1))) { + NULL==(mesg->s = H5MM_malloc (HDstrlen((const char*)p)+1))) { H5MM_xfree (mesg); HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); } - strcpy (mesg->s, (const char*)p); + HDstrcpy(mesg->s, (const char*)p); FUNC_LEAVE(mesg); } @@ -123,7 +123,7 @@ H5O_name_encode(H5F_t __unused__ *f, uint8 *p, const void *_mesg) assert(mesg && mesg->s); /* encode */ - strcpy ((char*)p, mesg->s); + HDstrcpy((char*)p, mesg->s); FUNC_LEAVE(SUCCEED); } @@ -161,7 +161,7 @@ H5Pcreate(H5P_class_t type) HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } - memcpy(plist, &H5F_create_dflt, sizeof(H5F_create_t)); + HDmemcpy(plist, &H5F_create_dflt, sizeof(H5F_create_t)); break; case H5P_FILE_ACCESS: @@ -169,7 +169,7 @@ H5Pcreate(H5P_class_t type) HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } - memcpy(plist, &H5F_access_dflt, sizeof(H5F_access_t)); + HDmemcpy(plist, &H5F_access_dflt, sizeof(H5F_access_t)); break; case H5P_DATASET_CREATE: @@ -177,7 +177,7 @@ H5Pcreate(H5P_class_t type) HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } - memcpy(plist, &H5D_create_dflt, sizeof(H5D_create_t)); + HDmemcpy(plist, &H5D_create_dflt, sizeof(H5D_create_t)); break; case H5P_DATASET_XFER: @@ -185,7 +185,7 @@ H5Pcreate(H5P_class_t type) HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } - memcpy(plist, &H5D_xfer_dflt, sizeof(H5D_xfer_t)); + HDmemcpy(plist, &H5D_xfer_dflt, sizeof(H5D_xfer_t)); break; default: @@ -1307,7 +1307,7 @@ H5Pget_external(hid_t plist_id, int idx, size_t name_size, char *name/*out*/, /* Return values */ if (name_size>0 && name) { - strncpy (name, plist->efl.slot[idx].name, name_size); + HDstrncpy (name, plist->efl.slot[idx].name, name_size); } if (offset) *offset = plist->efl.slot[idx].offset; if (size) *size = plist->efl.slot[idx].size; @@ -1731,16 +1731,16 @@ H5Pget_split(hid_t plist_id, size_t meta_ext_size, char *meta_ext/*out*/, /* Output arguments */ if (meta_ext && meta_ext_size>0) { if (plist->u.split.meta_ext) { - strncpy (meta_ext, plist->u.split.meta_ext, meta_ext_size); + HDstrncpy (meta_ext, plist->u.split.meta_ext, meta_ext_size); } else { - strncpy (meta_ext, ".meta", meta_ext_size); + HDstrncpy (meta_ext, ".meta", meta_ext_size); } } if (raw_ext && raw_ext_size>0) { if (plist->u.split.raw_ext) { - strncpy (raw_ext, plist->u.split.raw_ext, raw_ext_size); + HDstrncpy (raw_ext, plist->u.split.raw_ext, raw_ext_size); } else { - strncpy (raw_ext, ".raw", raw_ext_size); + HDstrncpy (raw_ext, ".raw", raw_ext_size); } } if (meta_properties) { @@ -2364,7 +2364,7 @@ H5Pget_filter(hid_t plist_id, int idx, unsigned int *flags/*out*/, H5Z_class_t *cls = H5Z_find(plist->pline.filter[idx].id); if (cls) s = cls->name; } - if (s) strncpy(name, s, namelen); + if (s) HDstrncpy(name, s, namelen); else name[0] = '\0'; } @@ -81,8 +81,8 @@ H5S_init_interface(void) #ifdef HAVE_PARALLEL { /* Allow MPI buf-and-file-type optimizations? */ - const char *s = getenv ("HDF5_MPI_OPT_TYPES"); - if (s && isdigit(*s)) { + const char *s = HDgetenv ("HDF5_MPI_OPT_TYPES"); + if (s && HDisdigit(*s)) { H5_mpi_opt_types_g = (int)HDstrtol (s, NULL, 0); } } @@ -113,11 +113,12 @@ static void H5S_term_interface(void) { size_t i; + +#ifdef H5S_DEBUG int j, nprints=0; H5S_conv_t *path=NULL; char buf[256]; -#ifdef H5S_DEBUG /* * Print statistics about each conversion path. */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 0b2be16..c59d38e 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -373,8 +373,8 @@ H5S_hyper_get_regions (size_t *num_regions, intn dim, size_t bound_count, /* Sort region list and eliminate duplicates if necessary */ if(num_reg>1) { - qsort(ret_value,num_reg,sizeof(H5S_hyper_region_t), - H5S_hyper_compare_regions); + HDqsort(ret_value,num_reg,sizeof(H5S_hyper_region_t), + H5S_hyper_compare_regions); for(i=1,curr_reg=0,uniq_reg=1; i<num_reg; i++) { if(ret_value[curr_reg].start!=ret_value[i].start && ret_value[curr_reg].end!=ret_value[i].end) { @@ -1977,8 +1977,10 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src) /* Sort the boundary arrays */ for(i=0; i<src->extent.u.simple.rank; i++) { - qsort(new_hyper->lo_bounds[i],new_hyper->count,sizeof(H5S_hyper_bound_t),H5S_hyper_compare_bounds); - qsort(new_hyper->hi_bounds[i],new_hyper->count,sizeof(H5S_hyper_bound_t),H5S_hyper_compare_bounds); + HDqsort(new_hyper->lo_bounds[i], new_hyper->count, + sizeof(H5S_hyper_bound_t), H5S_hyper_compare_bounds); + HDqsort(new_hyper->hi_bounds[i], new_hyper->count, + sizeof(H5S_hyper_bound_t), H5S_hyper_compare_bounds); } /* end for */ #ifdef QAK printf("%s: check 7.0\n", FUNC); diff --git a/src/H5Tbit.c b/src/H5Tbit.c index d80c8b3..4d1d796 100644 --- a/src/H5Tbit.c +++ b/src/H5Tbit.c @@ -187,7 +187,7 @@ H5T_bit_get_d (uint8 *buf, size_t offset, size_t size) break; default: - abort (); + HDabort (); } FUNC_LEAVE (val); @@ -228,7 +228,7 @@ H5T_bit_set_d (uint8 *buf, size_t offset, size_t size, hsize_t val) break; default: - abort (); + HDabort (); } H5T_bit_copy (buf, offset, (uint8*)&val, 0, size); diff --git a/src/H5Tconv.c b/src/H5Tconv.c index a8dcbf3..0f1d120 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -644,14 +644,14 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, } else if (src->size>=dst->size) { sp = dp = (uint8*)buf; direction = 1; - olap = (size_t)(ceil((double)(src->size)/ - (double)(src->size-dst->size))-1); + olap = (size_t)(HDceil((double)(src->size)/ + (double)(src->size-dst->size))-1); } else { sp = (uint8*)buf + (nelmts-1) * src->size; dp = (uint8*)buf + (nelmts-1) * dst->size; direction = -1; - olap = (size_t)(ceil((double)(dst->size)/ - (double)(dst->size-src->size))-1); + olap = (size_t)(HDceil((double)(dst->size)/ + (double)(dst->size-src->size))-1); } /* The conversion loop */ @@ -1023,14 +1023,14 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, } else if (src_p->size>=dst_p->size) { sp = dp = (uint8*)buf; direction = 1; - olap = (size_t)(ceil((double)(src_p->size)/ - (double)(src_p->size-dst_p->size))-1); + olap = (size_t)(HDceil((double)(src_p->size)/ + (double)(src_p->size-dst_p->size))-1); } else { sp = (uint8*)buf + (nelmts-1) * src_p->size; dp = (uint8*)buf + (nelmts-1) * dst_p->size; direction = -1; - olap = (size_t)(ceil((double)(dst_p->size)/ - (double)(dst_p->size-src_p->size))-1); + olap = (size_t)(HDceil((double)(dst_p->size)/ + (double)(dst_p->size-src_p->size))-1); } /* The conversion loop */ @@ -1129,7 +1129,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, msize = src.u.f.msize; } else { assert("normalization method not implemented yet" && 0); - abort(); + HDabort(); } /* @@ -1151,7 +1151,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, expo -= src.u.f.ebias; } else { assert("normalization method not implemented yet" && 0); - abort(); + HDabort(); } /* @@ -1406,14 +1406,14 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, } else if (src->size>=dst->size) { sp = dp = (uint8*)buf; direction = 1; - olap = (size_t)(ceil((double)(src->size)/ - (double)(src->size-dst->size))-1); + olap = (size_t)(HDceil((double)(src->size)/ + (double)(src->size-dst->size))-1); } else { sp = (uint8*)buf + (nelmts-1) * src->size; dp = (uint8*)buf + (nelmts-1) * dst->size; direction = -1; - olap = (size_t)(ceil((double)(dst->size)/ - (double)(dst->size-src->size))-1); + olap = (size_t)(HDceil((double)(dst->size)/ + (double)(dst->size-src->size))-1); } /* Allocate the overlap buffer */ @@ -1471,7 +1471,7 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, nchars = src->size; while (nchars>0 && ' '==s[nchars-1]) --nchars; nchars = MIN(dst->size, nchars); - memcpy(d, s, nchars); + HDmemcpy(d, s, nchars); break; case H5T_STR_RESERVED_3: @@ -157,7 +157,7 @@ H5V_hyper_stride(intn n, const hsize_t *size, hsize_t acc; /*accumulator */ int i; /*counter */ - FUNC_ENTER(H5V_hyper_stride, (abort(), 0)); + FUNC_ENTER(H5V_hyper_stride, (HDabort(), 0)); assert(n >= 0 && n < H5V_HYPER_NDIMS); assert(size); @@ -106,7 +106,7 @@ H5Z_term_interface (void) } /* Truncate the comment to fit in the field */ - strncpy(comment, H5Z_table_g[i].name, sizeof comment); + HDstrncpy(comment, H5Z_table_g[i].name, sizeof comment); comment[sizeof(comment)-1] = '\0'; /* @@ -388,7 +388,7 @@ H5Z_find(H5Z_filter_t id) *------------------------------------------------------------------------- */ herr_t -H5Z_pipeline(H5F_t *f, const H5O_pline_t *pline, uintn flags, +H5Z_pipeline(H5F_t __unused__ *f, const H5O_pline_t *pline, uintn flags, uintn *filter_mask/*in,out*/, size_t *nbytes/*in,out*/, size_t *buf_size/*in,out*/, void **buf/*in,out*/) { diff --git a/src/H5private.h b/src/H5private.h index 99da0dd..9efc617 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -359,7 +359,7 @@ int HDfprintf (FILE *stream, const char *fmt, ...); #define HDmkfifo(S,M) mkfifo(S,M) #define HDmktime(T) mktime(T) #define HDmodf(X,Y) modf(X,Y) -/* open() variable arguments */ +#define HDopen(S,F,M) open(S,F,M) #define HDopendir(S) opendir(S) #define HDpathconf(S,N) pathconf(S,N) #define HDpause() pause() diff --git a/test/tfile.c b/test/tfile.c index d1a6f00..f62f5ef 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -105,8 +105,8 @@ test_file_create(void) VERIFY(fid2, FAIL, "H5Fcreate"); /* Get the file-creation template */ - tmpl1 = H5Fget_create_template(fid1); - CHECK(tmpl1, FAIL, "H5Fget_create_template"); + tmpl1 = H5Fget_create_plist(fid1); + CHECK(tmpl1, FAIL, "H5Fget_create_plist"); /* Get the file-creation parameters */ ret = H5Pget_userblock(tmpl1, &ublock); @@ -159,8 +159,8 @@ test_file_create(void) CHECK(ret, FAIL, "H5Pclose"); /* Get the file-creation template */ - tmpl1 = H5Fget_create_template(fid2); - CHECK(tmpl1, FAIL, "H5Fget_create_template"); + tmpl1 = H5Fget_create_plist(fid2); + CHECK(tmpl1, FAIL, "H5Fget_create_plist"); /* Get the file-creation parameters */ ret = H5Pget_userblock(tmpl1, &ublock); @@ -201,8 +201,8 @@ test_file_create(void) CHECK(ret, FAIL, "H5Pclose"); /* Get the file-creation template */ - tmpl1 = H5Fget_create_template(fid3); - CHECK(tmpl1, FAIL, "H5Fget_create_template"); + tmpl1 = H5Fget_create_plist(fid3); + CHECK(tmpl1, FAIL, "H5Fget_create_plist"); /* Get the file-creation parameters */ ret = H5Pget_userblock(tmpl1, &ublock); @@ -260,8 +260,8 @@ test_file_open(void) CHECK(fid1, FAIL, "H5Fopen"); /* Get the file-creation template */ - tmpl1 = H5Fget_create_template(fid1); - CHECK(tmpl1, FAIL, "H5Fget_create_template"); + tmpl1 = H5Fget_create_plist(fid1); + CHECK(tmpl1, FAIL, "H5Fget_create_plist"); /* Get the file-creation parameters */ ret = H5Pget_userblock(tmpl1, &ublock); |